|
@@ -6,7 +6,6 @@
|
|
|
<sql id="selectSql">
|
|
|
b.ID as id,
|
|
|
a.REPORTER_UNIT as reporterUnit,
|
|
|
- a.STATUS as status,
|
|
|
a.CREDIT_CODE as creditCode,
|
|
|
a.UNIT_CHARACTER as unitCharacter,
|
|
|
a.INDUSTRY_TYPE_ONE as industryTypeOne,
|
|
@@ -79,14 +78,16 @@
|
|
|
FROM gy_unit a,gy_data b
|
|
|
where b.ID = #{value} and
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
- AND a.STATUS = '0'
|
|
|
</select>
|
|
|
- <select id="getRecoverUnit" resultType="com.bootdo.datas.dto.GyDataImportDTO">
|
|
|
- select
|
|
|
- <include refid="selectSql"/>
|
|
|
- FROM gy_unit a,gy_data b
|
|
|
- where b.ID = #{value} and
|
|
|
- a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
+
|
|
|
+ <select id="getRecoverData" resultType="com.bootdo.datas.dto.GyDataImportDTO">
|
|
|
+ SELECT
|
|
|
+ b.ID as id,
|
|
|
+ b.DATA_NAME as dataName,
|
|
|
+ b.GY_NUIT_ID as gyUnitId,
|
|
|
+ b.DATA_STATUS as dataStatus,
|
|
|
+ b.DELETE_STATUS as deleteStatus
|
|
|
+ FROM gy_data b where b.ID = #{value}
|
|
|
</select>
|
|
|
|
|
|
<select id="getDataExcel" resultType="com.bootdo.datas.domain.GyDataExcelDO">
|
|
@@ -95,7 +96,6 @@
|
|
|
FROM gy_unit a,gy_data b
|
|
|
where b.ID = #{value} and
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
- AND a.STATUS = '0'
|
|
|
</select>
|
|
|
|
|
|
<select id="getGbDataExcel" resultType="com.bootdo.datas.domain.GbDataExcelDO">
|
|
@@ -104,17 +104,15 @@
|
|
|
FROM gy_unit a,gy_data b
|
|
|
where b.ID = #{value} and
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
- AND a.STATUS = '0'
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="listId" resultType="com.bootdo.datas.dto.GyDataImportDTO">
|
|
|
SELECT
|
|
|
b.ID as id,b.DATA_STATUS as dataStatus
|
|
|
- FROM gy_unit a,gy_data b
|
|
|
+ FROM gy_data b
|
|
|
<where>
|
|
|
- a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
- AND b.DELETE_STATUS = '0'
|
|
|
+ b.DELETE_STATUS = '0'
|
|
|
and b.DATA_NAME = #{dataName}
|
|
|
and b.GY_NUIT_ID = #{gyUnitId}
|
|
|
</where>
|
|
@@ -127,7 +125,6 @@
|
|
|
<where>
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
AND b.DELETE_STATUS = '0'
|
|
|
- AND a.STATUS = '0'
|
|
|
<if test="neqDataStatus != null and neqDataStatus != ''"> and b.DATA_STATUS != #{neqDataStatus}</if>
|
|
|
<if test="industryTypeOne != null and industryTypeOne != ''"> and a.INDUSTRY_TYPE_ONE like CONCAT('%',#{industryTypeOne},'%')</if>
|
|
|
<if test="dataName != null and dataName != ''"> and b.DATA_NAME like CONCAT('%',#{dataName},'%')</if>
|
|
@@ -186,7 +183,6 @@
|
|
|
<where>
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
AND b.DELETE_STATUS = '0'
|
|
|
- AND a.STATUS = '0'
|
|
|
<if test="neqDataStatus != null and neqDataStatus != ''"> and b.DATA_STATUS != #{neqDataStatus}</if>
|
|
|
<if test="industryTypeOne != null and industryTypeOne != ''"> and a.INDUSTRY_TYPE_ONE like CONCAT('%',#{industryTypeOne},'%')</if>
|
|
|
<if test="dataName != null and dataName != ''"> and b.DATA_NAME like CONCAT('%',#{dataName},'%')</if>
|
|
@@ -235,7 +231,6 @@
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
AND (b.DELETE_STATUS = '1'
|
|
|
or b.DATA_STATUS = '4')
|
|
|
- AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(b.UPDATE_TIME)
|
|
|
<if test="industryTypeOne != null and industryTypeOne != ''"> and a.INDUSTRY_TYPE_ONE like CONCAT('%',#{industryTypeOne},'%')</if>
|
|
|
<if test="dataName != null and dataName != ''">and b.DATA_NAME like CONCAT('%',#{dataName},'%')</if>
|
|
|
<if test="dataLevel != null and dataLevel != ''">and b.DATA_LEVEL = #{dataLevel}</if>
|
|
@@ -286,7 +281,6 @@
|
|
|
a.CREDIT_CODE = b.GY_NUIT_ID
|
|
|
AND (b.DELETE_STATUS = '1'
|
|
|
or b.DATA_STATUS = '4')
|
|
|
- AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(b.UPDATE_TIME)
|
|
|
<if test="industryTypeOne != null and industryTypeOne != ''"> and a.INDUSTRY_TYPE_ONE like CONCAT('%',#{industryTypeOne},'%')</if>
|
|
|
<if test="dataName != null and dataName != ''">and b.DATA_NAME like CONCAT('%',#{dataName},'%')</if>
|
|
|
<if test="dataLevel != null and dataLevel != ''">and b.DATA_LEVEL = #{dataLevel}</if>
|
|
@@ -441,6 +435,7 @@
|
|
|
SET DELETE_STATUS = 0,
|
|
|
DATA_STATUS = 0,
|
|
|
SEND_VERIFY = 0,
|
|
|
+ del_unigue_key = 0,
|
|
|
AUDIT_STAGE = #{auditStage},
|
|
|
UPDATE_TIME = NOW()
|
|
|
WHERE
|
|
@@ -471,6 +466,15 @@
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
+ <select id="countTotal4Del" resultType="int">
|
|
|
+ SELECT
|
|
|
+ count(*)
|
|
|
+ FROM gy_data b
|
|
|
+ <where>
|
|
|
+ b.GY_NUIT_ID =#{gyUnitId}
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<update id="remove">
|
|
|
UPDATE gy_data
|
|
|
SET DELETE_STATUS = 1,
|