7c9c329e 张雷

增加获取全部厂区机构接口

1 个父辈 08ed838b
......@@ -47,11 +47,12 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM
environmentTarget.setTargetYear(dataAssessmentSocreMaster.getAssessmentDate());
//1859413989066813442 //安全环保目标责任状(约束指标) constraintScore
if("1859413989066813442".equals(dataAssessmentSocreMaster.getReportId())){
environmentTarget.setConstraintScore(dataAssessmentSocreMaster.getSelfScore());
String level = countLevel(dataAssessmentSocreMaster.getLeaderScore());
environmentTarget.setConstraintScore(level);
}
//1872156241933414401 //安全环保目标责任状(责任指标) liabilityScore
if("1872156241933414401".equals(dataAssessmentSocreMaster.getReportId())){
environmentTarget.setLiabilityScore(dataAssessmentSocreMaster.getSelfScore());
environmentTarget.setLiabilityScore(dataAssessmentSocreMaster.getLeaderScore());
}
QueryWrapper<EnvironmentTarget> queryWrapper = new QueryWrapper();
queryWrapper.eq("depart_id" ,dataAssessmentSocreMaster.getDepartId()) ;
......@@ -70,5 +71,11 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM
environmentTargetMapper.insert(environmentTarget);
}
}
//计算评分等级
private String countLevel(String leaderScore) {
String level = "A";
return level;
}
}
......
......@@ -63,6 +63,12 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/queryById", "anon");//采购入库,送货方查询验货单
filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/senderSign", "anon");//采购入库,送货方签名
filterChainDefinitionMap.put("/web/erp/materialAcceptanceForm/edit", "anon"); //保存
filterChainDefinitionMap.put("/web/equipment/supplierManage/list", "anon"); // 供应商
filterChainDefinitionMap.put("/sys/dictItem/list", "anon");
filterChainDefinitionMap.put("/sys/sysDepart/getTreeList", "anon");
filterChainDefinitionMap.put("/web/erp/materialIN/queryById", "anon");//采购入库,查询采购入库信息
filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件
filterChainDefinitionMap.put("/web/process/getProcessByPhone", "anon");//第三方获取待办事件
......
......@@ -9,11 +9,11 @@
sd.depart_name factoryName,
sd.id factoryId,
fl.off_line_length offLineLength
from factory_off_line fl left join sys_depart sd on sd.id=fl.factory_id
from factory_off_line fl left join sys_depart sd on sd.id=fl.depart_id
where 1=1
and fl.type='fac'
<if test="factoryId!=null and factoryId!=''">
and fl.factory_id=#{factoryId}
and fl.depart_id=#{factoryId}
</if>
<if test="time!=null and time!=''">
and left(fl.factory_off_line_start_time,7)=#{time}
......
......@@ -76,6 +76,20 @@ public class SysDepartController {
return result;
}
@ApiOperation(value="无token获取全部机构", notes="无token获取全部机构")
@RequestMapping(value = "/getTreeList", method = RequestMethod.GET)
public Result<List<SysDepartTreeModel>> getTreeList() {
Result<List<SysDepartTreeModel>> result = new Result<>();
try {
List<SysDepartTreeModel> list = sysDepartService.getTreeList();
result.setResult(list);
result.setSuccess(true);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return result;
}
/**
* 部门列表
*
......
......@@ -181,4 +181,6 @@ public interface ISysDepartService extends IService<SysDepart>{
List<SysDeptUserVO> queryDeptAndUserTreeList(String departId,String userType);
List<SysDepart> queryUserDepartList(String userId);
List<SysDepartTreeModel> getTreeList();
}
......
......@@ -574,4 +574,20 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
return departList;
}
@Override
public List<SysDepartTreeModel> getTreeList() {
List<SysDepart> list = new ArrayList<>();
QueryWrapper<SysDepart> sysDepartQueryWrapper = new QueryWrapper<>();
sysDepartQueryWrapper.orderByAsc("depart_order");
list = list(sysDepartQueryWrapper);
// 调用wrapTreeDataToTreeList方法生成树状数据
List<SysDepartTreeModel> listResult = new ArrayList<>();
List<SysDepartTreeModel> jtList = FindsDepartsChildrenUtil.wrapTreeDataToTreeList(list,"A01");
if(jtList.size() > 0){
listResult.addAll(jtList);
}
listResult = filterDepartList(listResult);
return listResult;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!