Ver código fonte

履职任务提交 代码优化

zhulu 10 meses atrás
pai
commit
d1e95d781d

+ 6 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/gx/service/ResumptionServiceImpl.java

@@ -152,7 +152,7 @@ public class ResumptionServiceImpl implements ResumptionService {
         }
 
         resumptionDelService.delResumptionData(taskId);
-
+        SysOrg org =null;
 
         //保存新的数据
         AppResumptionData data = null;
@@ -198,7 +198,11 @@ public class ResumptionServiceImpl implements ResumptionService {
                         throw new ServiceException("整改期限为空或不是有效的数值");
                     }
                     //TODO 获取机构数据,应从缓存中获取
-                    SysOrg org = remoteOrgService.selectSysOrgById(sysResumption.getOrgId(), SecurityConstants.INNER);
+                    //不应在循环中获取机构信息, 任务的机构信息只需获取一次, 有异常数据时才获取
+                    if(org ==null)
+                    {
+                        org = remoteOrgService.selectSysOrgById(sysResumption.getOrgId(), SecurityConstants.INNER);
+                    }
 
                     Question question = Question.builder()
                             .srcTaskId(taskId)