Bladeren bron

优化 采购信息的异步线程池

tags/24080901
PoffyZhang 1 jaar geleden
bovenliggende
commit
42f573503c
1 gewijzigde bestanden met toevoegingen van 19 en 19 verwijderingen
  1. +19
    -19
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java

+ 19
- 19
pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java Bestand weergeven

@@ -534,26 +534,26 @@ public class GovProjectCollectionManage {

String finalBaseProjId = baseProjId;
UserInfoDetails finalUser = user;
threadPoolTaskScheduler.execute(() -> {
Integer index = 1;
for(GovBizProjectProcureDTO procure : procures){
procure.setBaseProjId(finalBaseProjId);
procure.setBaseProjName(baseProjName);
procure.setBaseBidCode(finalBaseProjId + StrPool.DASH + index);
GovBizProjectProcure saveProcure = BeanUtil.copyProperties(procure,GovBizProjectProcure.class);
saveProcure.setBaseProjId(finalBaseProjId);
saveProcure.setId(null);
saveProcure.setAreaCode(RegionConst.RC_LS);
saveProcure.setTongTime(LocalDateTime.now());
saveProcure.setBizTime(LocalDateTime.now());
saveProcure.setUpdateBy(finalUser.getUsername());
saveProcure.setUpdateOn(LocalDateTime.now());
if(procureService.save(saveProcure)){
uploadFileToProvincialOssProcure(procure,null,saveProcure);
}
index++;

Integer index = 1;
for(GovBizProjectProcureDTO procure : procures){
procure.setBaseProjId(finalBaseProjId);
procure.setBaseProjName(baseProjName);
procure.setBaseBidCode(finalBaseProjId + StrPool.DASH + index);
GovBizProjectProcure saveProcure = BeanUtil.copyProperties(procure,GovBizProjectProcure.class);
saveProcure.setBaseProjId(finalBaseProjId);
saveProcure.setId(null);
saveProcure.setAreaCode(RegionConst.RC_LS);
saveProcure.setTongTime(LocalDateTime.now());
saveProcure.setBizTime(LocalDateTime.now());
saveProcure.setUpdateBy(finalUser.getUsername());
saveProcure.setUpdateOn(LocalDateTime.now());
if(procureService.save(saveProcure)){
threadPoolTaskScheduler.execute(() -> uploadFileToProvincialOssProcure(procure,null,saveProcure));
}
});
index++;
}

}

//7. 推送数据(改为定时推送了)


Laden…
Annuleren
Opslaan