Commit 1751324d authored by tianyiming's avatar tianyiming

一码通西咸存量数据处理

parent 12e76933
...@@ -569,12 +569,18 @@ ...@@ -569,12 +569,18 @@
<select id="selectWriteXiXian" resultType="java.lang.String"> <select id="selectWriteXiXian" resultType="java.lang.String">
SELECT SELECT
record ibjoi."RECORD"
FROM FROM
idx_biz_jg_other_info "biz_jg_supervisory_code" bjsc
LEFT JOIN idx_biz_jg_other_info ibjoi ON bjsc.code96333 = ibjoi."CODE96333"
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjsi.record = ibjoi.record
WHERE WHERE
"CODE96333" IN ( SELECT code96333 FROM "biz_jg_supervisory_code" WHERE code96333 LIKE'31%' AND supervisory_code LIKE'D%' AND (status = '1' or status = '2') ) ibjsi."ORG_BRANCH_CODE" LIKE'50*18667%'
AND "CLAIM_STATUS" = '已认领'; AND ( bjsc.code96333 LIKE'31%' OR bjsc.code96333 LIKE'33%' )
AND bjsc.supervisory_code LIKE'D%'
AND ( bjsc.status = '1' OR bjsc.status = '2' )
AND create_status = 0
AND "CLAIM_STATUS" = '已认领'
</select> </select>
<update id="clearCode"> <update id="clearCode">
...@@ -593,13 +599,16 @@ ...@@ -593,13 +599,16 @@
<select id="selectXiXian" resultType="java.lang.String"> <select id="selectXiXian" resultType="java.lang.String">
SELECT SELECT
record ibjoi."RECORD"
FROM FROM
idx_biz_jg_other_info "biz_jg_supervisory_code" bjsc
LEFT JOIN idx_biz_jg_other_info ibjoi ON bjsc.code96333 = ibjoi."CODE96333"
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjsi.record = ibjoi.record
WHERE WHERE
"RECORD" IN ( SELECT "RECORD" FROM idx_biz_jg_supervision_info WHERE "ORG_BRANCH_CODE" LIKE'50*18667%' ) ibjsi."ORG_BRANCH_CODE" LIKE'50*18667%'
AND "CLAIM_STATUS" = '已认领' AND ( bjsc.status = '1' OR bjsc.status = '2' )
AND ( "CODE96333" NOT LIKE'31%' OR "CODE96333" IS NULL ); AND create_status = 1
AND "CLAIM_STATUS" = '已认领';
</select> </select>
<delete id="clearSupervisoryCode"> <delete id="clearSupervisoryCode">
...@@ -636,6 +645,23 @@ ...@@ -636,6 +645,23 @@
<delete id="clearSupervisoryCodeAndXiXian"> <delete id="clearSupervisoryCodeAndXiXian">
delete "biz_jg_supervisory_code" WHERE code96333 LIKE '31%' AND supervisory_code LIKE 'D%' AND (status = '1' or status = '2'); DELETE
"biz_jg_supervisory_code"
WHERE
code96333 IN (
SELECT
ibjoi."CODE96333"
FROM
"biz_jg_supervisory_code" bjsc
LEFT JOIN idx_biz_jg_other_info ibjoi ON bjsc.code96333 = ibjoi."CODE96333"
LEFT JOIN idx_biz_jg_supervision_info ibjsi ON ibjsi.record = ibjoi.record
WHERE
ibjsi."ORG_BRANCH_CODE" LIKE '50*18667%'
AND ( bjsc.code96333 LIKE '31%' OR bjsc.code96333 LIKE '33%' )
AND bjsc.supervisory_code LIKE 'D%'
AND ( bjsc.status = '1' OR bjsc.status = '2' )
AND create_status = 0
AND "CLAIM_STATUS" = '已认领'
);
</delete> </delete>
</mapper> </mapper>
...@@ -1572,11 +1572,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1572,11 +1572,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override @Override
public void creatXiXian() { public void creatXiXian() {
// 1查找以31开头的96333码对应的数据writeRecordList // 1查找以31或者33开头且为用户手动录入的96333码对应的数据writeRecordList
List<String> writeRecordList = equipmentCategoryMapper.selectWriteXiXian(); List<String> writeRecordList = equipmentCategoryMapper.selectWriteXiXian();
// 1.1删除码表中以31开头的96333码对应的数据 // 1.1删除码表中以31或者33开头且为用户手动录入
equipmentCategoryMapper.clearSupervisoryCodeAndXiXian(); equipmentCategoryMapper.clearSupervisoryCodeAndXiXian();
// 1.2将以31开头的96333码对应的数据的监管码清空 // 1.2将以31或者33开头且为用户手动录入的96333码对应的数据的监管码清空
equipmentCategoryMapper.updateSupervisoryCode(writeRecordList); equipmentCategoryMapper.updateSupervisoryCode(writeRecordList);
// 2查找管辖机构为西咸,但96333码不为31开头的数据recordList // 2查找管辖机构为西咸,但96333码不为31开头的数据recordList
List<String> recordList = equipmentCategoryMapper.selectXiXian(); List<String> recordList = equipmentCategoryMapper.selectXiXian();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment