瀏覽代碼

Merge remote-tracking branch 'origin/zdsz3.0' into zdsz3.0

wangzhe 1 年之前
父節點
當前提交
869cbdecac

+ 12 - 2
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringCivilServiceImpl.java

@@ -29,6 +29,7 @@ import org.hibernate.validator.internal.util.stereotypes.Lazy;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
@@ -1059,8 +1060,16 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
                 MonthTableNameHandler.setData(format.format(item.getCreateTime()));
                 zEngineeringInfoMapper.update(lqw);
                 MonthTableNameHandler.removeData();
-                izEngiineeringPhotoService.writeImg(infoIdList.getInfoIdList(), item);
+                try {
+                    threadPoolTaskExecutor.execute(()->{
+                        izEngiineeringPhotoService.writeImg(infoIdList.getInfoIdList(), item);
+                    });
+                }catch (Exception e){
+                    e.getStackTrace();
+                }finally {
+                }
             });
+            threadPoolTaskExecutor.shutdown();
 
             izEngineeringReviewService.insert(zEngineeringReviewBo);
         } catch (Exception e) {
@@ -1068,7 +1077,8 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
         }
         return 0;
     }
-
+    @Autowired
+    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
 
     @Override
     public List<ZEngineeringNodeBo> getRivewStatus(String Id) {

+ 17 - 14
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringNodeServiceImpl.java

@@ -950,20 +950,23 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
 
             });
             List stateList=new ArrayList();
-            sysDictMap.get(item.getEnginType()+"_"+item.getEnginClassification()).stream().forEach(item3 -> {
-                Map<String,Object> map=new HashMap<>();
-                if (nodeList.size()>0&&nodeList.stream().anyMatch(x->x.getType().equals(item3.getDictValue()))){
-                    map.put("Type",item3.getDictValue());
-                    map.put("state",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewStatus():"0");
-                    map.put("content",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewContent():"暂未审核");
-                }else {
-                    map.put("Type",item3.getDictValue());
-                    map.put("state","0");
-                    map.put("content","暂未审核");
-                }
-                stateList.add(map);
-                ReViewStateMap.set(stateList);;
-            });
+            List<SysDictData> list = sysDictMap.get(item.getEnginType()+"_"+item.getEnginClassification());
+            if (list!=null&&!list.isEmpty()){
+                list.stream().forEach(item3 -> {
+                    Map<String,Object> map=new HashMap<>();
+                    if (nodeList.size()>0&&nodeList.stream().anyMatch(x->x.getType().equals(item3.getDictValue()))){
+                        map.put("Type",item3.getDictValue());
+                        map.put("state",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewStatus():"0");
+                        map.put("content",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewContent():"暂未审核");
+                    }else {
+                        map.put("Type",item3.getDictValue());
+                        map.put("state","0");
+                        map.put("content","暂未审核");
+                    }
+                    stateList.add(map);
+                    ReViewStateMap.set(stateList);;
+                });
+            }
             if(item.getEnginClassification().contains("indoor_engin")){
                 Map<String,Object> map=new HashMap<>();
                 map.put("Type","开栓");