Parcourir la source

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

tags/24080901
PoffyZhang il y a 1 an
Parent
révision
42f573503c
1 fichiers modifiés avec 19 ajouts et 19 suppressions
  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 Voir le fichier

@@ -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. 推送数据(改为定时推送了)


Chargement…
Annuler
Enregistrer