Parcourir la source

解决 外包履职评价和统计 显示了停用和其他机构的问题

zhulu il y a 1 an
Parent
commit
f1b3e58ece

+ 3 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluateTaskController.java

@@ -123,6 +123,9 @@ public class CoreEvaluateTaskController extends BaseController {
     public AjaxResult statistics(EvaluateTaskStatisticsDTO evaluateTaskStatisticsDTO) {
         AjaxResult ajaxResult = AjaxResult.success();
         SysOrg sysOrg = remoteOrgService.selectSysOrgById(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
+        evaluateTaskStatisticsDTO.setType(sysOrg.getType());
+        evaluateTaskStatisticsDTO.setOrgPath(sysOrg.getPath());
+        evaluateTaskStatisticsDTO.setOrgShortName(sysOrg.getShortName());
         ajaxResult.put("orgName", sysOrg.getShortName());
         if (null != evaluateTaskStatisticsDTO.getPlanId()) {
             CoreEvaluatePlanVO coreEvaluatePlanVO = coreEvaluatePlanService.selectCoreEvaluatePlanById(evaluateTaskStatisticsDTO.getPlanId());

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/dto/EvaluateTaskStatisticsDTO.java

@@ -17,6 +17,7 @@ public class EvaluateTaskStatisticsDTO {
     @ApiModelProperty(value = "机构id")
     private Long orgId;
     private String orgPath;
+    private String orgShortName;
     @ApiModelProperty(value = "外包评价名称")
     private String evaluateName;
     @TableField(exist = false)

+ 8 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/service/impl/CoreEvaluateTaskServiceImpl.java

@@ -203,7 +203,14 @@ public class CoreEvaluateTaskServiceImpl extends ServiceImpl<CoreEvaluateTaskMap
             return null;
         }
         Map map = new HashMap();
-        List<SysOrg> sysOrgs = remoteOrgService.selectSysOrgByParentId(evaluateTaskStatisticsDTO.getOrgId(), SecurityConstants.INNER);
+        List<SysOrg> sysOrgs =new ArrayList<>();
+        if (evaluateTaskStatisticsDTO.getType() < 3 || evaluateTaskStatisticsDTO.getOrgShortName().endsWith("地区行社")) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(evaluateTaskStatisticsDTO.getOrgPath(), 3, SecurityConstants.INNER);
+        } else if (evaluateTaskStatisticsDTO.getType() == 3) {
+            sysOrgs = orgService.selectSysOrgByPathAndType(evaluateTaskStatisticsDTO.getOrgPath(), 4, SecurityConstants.INNER);
+        }
+
+//        List<SysOrg> sysOrgs = remoteOrgService.selectSysOrgByPathAndType(evaluateTaskStatisticsDTO.getOrgPath(),evaluateTaskStatisticsDTO.getType(), SecurityConstants.INNER);
         List<LinkedHashMap> rows = new ArrayList<>();
         Double average = null;
         Integer all = 0;

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -415,6 +415,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         }
         queryWrapper.likeRight("path", path);
         queryWrapper.eq("deleted", 0);
+        queryWrapper.eq("is_lock", 0);
         List list = baseMapper.selectList(queryWrapper);
         return list;
     }