Commit fef967ce authored by suhuiguang's avatar suhuiguang

1.修改未多线程刷数据

parent 1f9d533a
......@@ -1473,7 +1473,8 @@
SELECT
u.sequence_nbr,
u.supervision_org_code,
c.company_name as supervision_org_name
c.company_name as supervision_org_name,
u.use_registration_code
FROM
"tzs_jg_use_registration" u ,
privilege_company c
......@@ -1482,6 +1483,7 @@
and u.is_delete = '0'
AND c.is_deleted = FALSE
and u.status='已完成'
and u.use_registration_code <![CDATA[<>]]> ''
ORDER BY u.audit_pass_date
</select>
<select id="selectMissingSupOrgCodeUseList"
......@@ -1490,7 +1492,7 @@
u.sequence_nbr,
h.change_data::json->>'orgBranchCode' as supervisionOrgCode
FROM
"amos_tzs_biz"."tzs_jg_use_registration" u,
"tzs_jg_use_registration" u,
"tzs_jg_registration_history" h
WHERE
u."status" = '已完成'
......
......@@ -1130,7 +1130,7 @@ public class DataHandlerServiceImpl {
log.info("存量数据刷属地监管部门到证管理表处理开始--->");
// 1|5|6 预处理,存量数据导入时缺少记录到tzs_jg_use_registration->supervision_org_code,先补充supervision_org_code到tzs_jg_use_registration
List<JgUseRegistrationDto> missingSupOrgCodeUses = useRegistrationService.getBaseMapper().selectMissingSupOrgCodeUseList();
missingSupOrgCodeUses.forEach(u->{
missingSupOrgCodeUses.parallelStream().forEach(u->{
// TODO 历史存量数据里有:610422_三原县市场监督管理局,需要转换为:50*73*123_三原县市场监督管理局, null则挂到根节点省上
if(StringUtils.isNotEmpty(u.getSupervisoryCode()) && u.getSupervisoryCode().split("_").length > 1){
String[] orgCodeNameArray = u.getSupervisoryCode().split("_");
......@@ -1156,7 +1156,7 @@ public class DataHandlerServiceImpl {
// 1|5|6 处理
AtomicReference<Long> dealNum = new AtomicReference<>(0L);
List<JgUseRegistrationDto> useRegistrations = useRegistrationService.getBaseMapper().getListOfPass();
useRegistrations.forEach(u->{
useRegistrations.parallelStream().forEach(u->{
LambdaUpdateWrapper<JgUseRegistrationManage> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgUseRegistrationManage::getUseRegistrationCode,u.getUseRegistrationCode());
updateWrapper.set(JgUseRegistrationManage::getSuperviseOrgCode,u.getSupervisionOrgCode());
......@@ -1166,7 +1166,7 @@ public class DataHandlerServiceImpl {
});
// 2 处理
List<JgVehicleInformation> vehicleUseRegs = jgVehicleInformationService.getBaseMapper().getListOfPass();
vehicleUseRegs.forEach(u->{
vehicleUseRegs.parallelStream().forEach(u->{
LambdaUpdateWrapper<JgUseRegistrationManage> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgUseRegistrationManage::getUseRegistrationCode,u.getUseRegistrationCode());
updateWrapper.set(JgUseRegistrationManage::getSuperviseOrgCode,u.getOrgBranchCode());
......@@ -1176,7 +1176,7 @@ public class DataHandlerServiceImpl {
});
// 3 处理
List<JgChangeVehicleRegistrationUnit> vehicleRegistrationUnits = jgChangeVehicleRegistrationUnitMapper.getListOfPass();
vehicleRegistrationUnits.forEach(u->{
vehicleRegistrationUnits.parallelStream().forEach(u->{
LambdaUpdateWrapper<JgUseRegistrationManage> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgUseRegistrationManage::getUseRegistrationCode,u.getUseRegistCode());
updateWrapper.set(JgUseRegistrationManage::getSuperviseOrgCode,u.getOrgBranchCode());
......@@ -1186,7 +1186,7 @@ public class DataHandlerServiceImpl {
});
// 4 处理
List<JgChangeRegistrationTransfer> transfers = jgChangeRegistrationTransferMapper.getListOfPass();
transfers.forEach(u->{
transfers.parallelStream().forEach(u->{
if(StringUtils.isNotEmpty(u.getRemark()) && u.getRemark().split("_").length > 1){
String[] orgCodeNameArray = u.getRemark().split("_");
LambdaUpdateWrapper<JgUseRegistrationManage> updateWrapper = new LambdaUpdateWrapper<>();
......
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