增加获取全部厂区机构接口
正在显示
6 个修改的文件
包含
49 行增加
和
4 行删除
... | @@ -47,11 +47,12 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM | ... | @@ -47,11 +47,12 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM |
47 | environmentTarget.setTargetYear(dataAssessmentSocreMaster.getAssessmentDate()); | 47 | environmentTarget.setTargetYear(dataAssessmentSocreMaster.getAssessmentDate()); |
48 | //1859413989066813442 //安全环保目标责任状(约束指标) constraintScore | 48 | //1859413989066813442 //安全环保目标责任状(约束指标) constraintScore |
49 | if("1859413989066813442".equals(dataAssessmentSocreMaster.getReportId())){ | 49 | if("1859413989066813442".equals(dataAssessmentSocreMaster.getReportId())){ |
50 | environmentTarget.setConstraintScore(dataAssessmentSocreMaster.getSelfScore()); | 50 | String level = countLevel(dataAssessmentSocreMaster.getLeaderScore()); |
51 | environmentTarget.setConstraintScore(level); | ||
51 | } | 52 | } |
52 | //1872156241933414401 //安全环保目标责任状(责任指标) liabilityScore | 53 | //1872156241933414401 //安全环保目标责任状(责任指标) liabilityScore |
53 | if("1872156241933414401".equals(dataAssessmentSocreMaster.getReportId())){ | 54 | if("1872156241933414401".equals(dataAssessmentSocreMaster.getReportId())){ |
54 | environmentTarget.setLiabilityScore(dataAssessmentSocreMaster.getSelfScore()); | 55 | environmentTarget.setLiabilityScore(dataAssessmentSocreMaster.getLeaderScore()); |
55 | } | 56 | } |
56 | QueryWrapper<EnvironmentTarget> queryWrapper = new QueryWrapper(); | 57 | QueryWrapper<EnvironmentTarget> queryWrapper = new QueryWrapper(); |
57 | queryWrapper.eq("depart_id" ,dataAssessmentSocreMaster.getDepartId()) ; | 58 | queryWrapper.eq("depart_id" ,dataAssessmentSocreMaster.getDepartId()) ; |
... | @@ -70,5 +71,11 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM | ... | @@ -70,5 +71,11 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM |
70 | environmentTargetMapper.insert(environmentTarget); | 71 | environmentTargetMapper.insert(environmentTarget); |
71 | } | 72 | } |
72 | } | 73 | } |
74 | |||
75 | //计算评分等级 | ||
76 | private String countLevel(String leaderScore) { | ||
77 | String level = "A"; | ||
78 | return level; | ||
79 | } | ||
73 | } | 80 | } |
74 | 81 | ... | ... |
... | @@ -63,6 +63,12 @@ public class ShiroConfig { | ... | @@ -63,6 +63,12 @@ public class ShiroConfig { |
63 | filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览 | 63 | filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览 |
64 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/queryById", "anon");//采购入库,送货方查询验货单 | 64 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/queryById", "anon");//采购入库,送货方查询验货单 |
65 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/senderSign", "anon");//采购入库,送货方签名 | 65 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/senderSign", "anon");//采购入库,送货方签名 |
66 | |||
67 | filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/edit", "anon"); //保存 | ||
68 | filterChainDefinitionMap.put("/web/equipment/supplierManage/list", "anon"); // 供应商 | ||
69 | filterChainDefinitionMap.put("/sys/dictItem/list", "anon"); | ||
70 | filterChainDefinitionMap.put("/sys/sysDepart/getTreeList", "anon"); | ||
71 | |||
66 | filterChainDefinitionMap.put("/web/erp/materialIN/queryById", "anon");//采购入库,查询采购入库信息 | 72 | filterChainDefinitionMap.put("/web/erp/materialIN/queryById", "anon");//采购入库,查询采购入库信息 |
67 | filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 | 73 | filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 |
68 | filterChainDefinitionMap.put("/web/process/getProcessByPhone", "anon");//第三方获取待办事件 | 74 | filterChainDefinitionMap.put("/web/process/getProcessByPhone", "anon");//第三方获取待办事件 | ... | ... |
... | @@ -9,11 +9,11 @@ | ... | @@ -9,11 +9,11 @@ |
9 | sd.depart_name factoryName, | 9 | sd.depart_name factoryName, |
10 | sd.id factoryId, | 10 | sd.id factoryId, |
11 | fl.off_line_length offLineLength | 11 | fl.off_line_length offLineLength |
12 | from factory_off_line fl left join sys_depart sd on sd.id=fl.factory_id | 12 | from factory_off_line fl left join sys_depart sd on sd.id=fl.depart_id |
13 | where 1=1 | 13 | where 1=1 |
14 | and fl.type='fac' | 14 | and fl.type='fac' |
15 | <if test="factoryId!=null and factoryId!=''"> | 15 | <if test="factoryId!=null and factoryId!=''"> |
16 | and fl.factory_id=#{factoryId} | 16 | and fl.depart_id=#{factoryId} |
17 | </if> | 17 | </if> |
18 | <if test="time!=null and time!=''"> | 18 | <if test="time!=null and time!=''"> |
19 | and left(fl.factory_off_line_start_time,7)=#{time} | 19 | and left(fl.factory_off_line_start_time,7)=#{time} | ... | ... |
... | @@ -76,6 +76,20 @@ public class SysDepartController { | ... | @@ -76,6 +76,20 @@ public class SysDepartController { |
76 | return result; | 76 | return result; |
77 | } | 77 | } |
78 | 78 | ||
79 | @ApiOperation(value="无token获取全部机构", notes="无token获取全部机构") | ||
80 | @RequestMapping(value = "/getTreeList", method = RequestMethod.GET) | ||
81 | public Result<List<SysDepartTreeModel>> getTreeList() { | ||
82 | Result<List<SysDepartTreeModel>> result = new Result<>(); | ||
83 | try { | ||
84 | List<SysDepartTreeModel> list = sysDepartService.getTreeList(); | ||
85 | result.setResult(list); | ||
86 | result.setSuccess(true); | ||
87 | } catch (Exception e) { | ||
88 | log.error(e.getMessage(), e); | ||
89 | } | ||
90 | return result; | ||
91 | } | ||
92 | |||
79 | /** | 93 | /** |
80 | * 部门列表 | 94 | * 部门列表 |
81 | * | 95 | * | ... | ... |
... | @@ -181,4 +181,6 @@ public interface ISysDepartService extends IService<SysDepart>{ | ... | @@ -181,4 +181,6 @@ public interface ISysDepartService extends IService<SysDepart>{ |
181 | List<SysDeptUserVO> queryDeptAndUserTreeList(String departId,String userType); | 181 | List<SysDeptUserVO> queryDeptAndUserTreeList(String departId,String userType); |
182 | 182 | ||
183 | List<SysDepart> queryUserDepartList(String userId); | 183 | List<SysDepart> queryUserDepartList(String userId); |
184 | |||
185 | List<SysDepartTreeModel> getTreeList(); | ||
184 | } | 186 | } | ... | ... |
... | @@ -574,4 +574,20 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart | ... | @@ -574,4 +574,20 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart |
574 | return departList; | 574 | return departList; |
575 | } | 575 | } |
576 | 576 | ||
577 | @Override | ||
578 | public List<SysDepartTreeModel> getTreeList() { | ||
579 | List<SysDepart> list = new ArrayList<>(); | ||
580 | QueryWrapper<SysDepart> sysDepartQueryWrapper = new QueryWrapper<>(); | ||
581 | sysDepartQueryWrapper.orderByAsc("depart_order"); | ||
582 | list = list(sysDepartQueryWrapper); | ||
583 | // 调用wrapTreeDataToTreeList方法生成树状数据 | ||
584 | List<SysDepartTreeModel> listResult = new ArrayList<>(); | ||
585 | List<SysDepartTreeModel> jtList = FindsDepartsChildrenUtil.wrapTreeDataToTreeList(list,"A01"); | ||
586 | if(jtList.size() > 0){ | ||
587 | listResult.addAll(jtList); | ||
588 | } | ||
589 | listResult = filterDepartList(listResult); | ||
590 | return listResult; | ||
591 | } | ||
592 | |||
577 | } | 593 | } | ... | ... |
-
请 注册 或 登录 后发表评论