#
mrzhssss
2022-09-06 bfaf2e3cba978abf78c768f6737f9b9f987c43ff
src/main/java/zy/cloud/wms/manager/controller/ItemController.java
@@ -32,6 +32,8 @@
    private FlowStatusService flowStatusService;
    @Autowired
    private CstmrService cstmrService;
    @Autowired
    private ProjectStatusService projectStatusService;
    @RequestMapping(value = "/item/{id}/auth")
    @ManagerAuth
@@ -113,6 +115,9 @@
        /**
         * 控管
         */
        if (Cools.isEmpty(item.getHostId()) || item.getHostId() == 0){
            item.setHostId(1L);
        }
        if (Cools.isEmpty(item)) {
            return R.error("参数为空,请联系管理员");
        }
@@ -133,11 +138,10 @@
            throw new CoolException("请选择客户");
        }
        Cstmr cstmr = cstmrService.selectOne(new EntityWrapper<Cstmr>()
                .eq("id",Long.parseLong(item.getUuid())));
                .eq("id",Long.parseLong(item.getCstmrUuid())));
        if (Cools.isEmpty(cstmr)) {
            throw new CoolException("找不到该客户,请检查");
        }
        item.setCustMan(cstmr.getName());
        item.setCustMobile(cstmr.getTel());
        item.setCustAdress(cstmr.getAddr());
@@ -159,6 +163,7 @@
        if (Cools.isEmpty(item)) {
            return R.error("参数为空,请联系管理员");
        }
//        item.setType("1");
//        if (!item.getType().equals("1")) {
//            throw new CoolException("目前仅支持集成项目");
@@ -284,5 +289,19 @@
        return R.ok();
    }
    @RequestMapping(value = "/progressRate/auth")
    @ManagerAuth
    public R queryProgressRate(String condition) {
        List<Map<String, Object>> result = new ArrayList<>();
        List<ProjectStatus> projectStatuses = projectStatusService.selectList(null);
        for (ProjectStatus projectStatus : projectStatuses) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", projectStatus.getId());
            map.put("value", projectStatus.getStatusName());
            result.add(map);
        }
        return R.ok(result);
    }
}