lyfO_o
2022-11-18 1c375d6dcd0c41bc3c206585a2712ec066bf5992
src/main/java/com/nanometer/smartlab/api/ApiAction.java
@@ -101,6 +101,9 @@
    @Lazy
    @Resource
    private OpeUseFlowService opeUseFlowService;
    @Lazy
    @Resource
    private SysWarehouseStatusService sysWarehouseStatusService;
    @Value("${institute.url}")
    String instituteUrl;
@@ -426,7 +429,7 @@
        return retJSON.toJSONString();
    }
    // 报警情况接口(warning)
    // 报警情况接口(warning)  货柜预警接口
    @ResponseBody
    @RequestMapping(value = "/alarm")
    public String alarm(HttpServletRequest request) throws IOException {
@@ -618,7 +621,8 @@
                           (String[])wareContainerCodeList.toArray(new String[0])));
            }
            if(user.getSeeFlag().ordinal() == SeeFlag.MANAGE.ordinal()){
            if(user.getSeeFlag().ordinal() == SeeFlag.MANAGE.ordinal()
            || user.getSeeFlag().ordinal() == SeeFlag.LEADING.ordinal()){
                map.put("containerCodeList", containerCodeList);
            }
        }
@@ -1795,4 +1799,36 @@
        }
        return retJSON.toJSONString();
    }
    @ResponseBody
    @RequestMapping("/getAllWarehouse")
    public Object getAllWarehouse() {
        try {
            List<Map> res = sysWarehouseService.getAllWarehouse();
            return ResponseModel.getOkInstence(res);
        } catch (Exception e) {
            e.printStackTrace();
            return ResponseModel.getErrInstance("系统内部错误");
        }
    }
    @ResponseBody
    @RequestMapping(value = "addWarehouseStatus",method = RequestMethod.POST)
    public Object addWarehouseStatus(@RequestBody SysWarehouseStatus one){
        try {
            one.setCreateTime(new Date());
            sysWarehouseStatusService.addOne(one);
            return ResponseModel.getOkInstence("新增成功");
        } catch (BusinessException e) {
            e.printStackTrace();
            return ResponseModel.getErrInstance(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            return ResponseModel.getErrInstance("系统内部错误");
        }
    }
}