소스 검색

Merge remote-tracking branch 'origin/master'

JiangPengLi 2 달 전
부모
커밋
0aec65a0dc
1개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 8 6
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreNewServiceImpl.java

+ 8 - 6
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreNewServiceImpl.java

@@ -222,12 +222,14 @@ public class SubPreNewServiceImpl implements SubPreNewService {
         SubPreNamePheVO subPreNamePheVO = new SubPreNamePheVO();
 
         if (subPreFlowUnit != null) {
-            JUnit jUnit = jUnitDao.findById(subPreFlowUnit.getUnitId());
-            BeanUtils.copyProperties(jUnit, subPreNamePheVO);
-            if (StringUtil.isNotEmpty(subPreFlowUnit.getDepartId())) {
-                JDepart depart = jDepartDao.findById(subPreFlowUnit.getDepartId());
-                subPreNamePheVO.setNameZrr(Optional.ofNullable(depart).orElse(new JDepart()).getNameLead());
-                subPreNamePheVO.setTel(Optional.ofNullable(depart).orElse(new JDepart()).getTel());
+            JUnit jUnit = jUnitService.findById(subPreFlowUnit.getUnitId());
+            if (jUnit!= null) {
+                BeanUtils.copyProperties(jUnit, subPreNamePheVO);
+                if (StringUtil.isNotEmpty(subPreFlowUnit.getDepartId())) {
+                    JDepart depart = jDepartDao.findById(subPreFlowUnit.getDepartId());
+                    subPreNamePheVO.setNameZrr(Optional.ofNullable(depart).orElse(new JDepart()).getNameLead());
+                    subPreNamePheVO.setTel(Optional.ofNullable(depart).orElse(new JDepart()).getTel());
+                }
             }
         }