自动化立体仓库 - WMS系统
*
lsh
昨天 d780ce5e45bf41278f554288bb4b0ac6c37b2c4a
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -90,6 +90,28 @@
        return R.ok(stockOut);
    }
    @RequestMapping(value = "/unqualified/stock/out/list/auth")
    @ManagerAuth
    public R stockOutListUnqualified(@RequestParam(defaultValue = "1")Integer curr,
                          @RequestParam(defaultValue = "10")Integer limit,
                          @RequestParam Map<String, Object> param){
        param.put("danger",2);
        if (!Cools.isEmpty(param.get("modi_time"))){
            String val = String.valueOf(param.get("modi_time"));
            if (val.contains(RANGE_TIME_LINK)) {
                String[] dates = val.split(RANGE_TIME_LINK);
                param.put("startTime", DateUtils.convert(dates[0]));
                param.put("endTime", DateUtils.convert(dates[1]));
                param.remove("modi_time");
            }
        }
        Page<LocDetl> stockOut = locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class));
        if (stockOut.getRecords().size()==0){
            stockOut = locDetlService.getStockOut(toPage(1, limit, param, LocDetl.class));
        }
        return R.ok(stockOut);
    }
    @RequestMapping(value = "/locDetl/list/auth")// /locDetl/list/auth 接口问题
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
@@ -153,12 +175,18 @@
   @RequestMapping(value = "/locDetl/update/auth")
   @ManagerAuth(memo = "库位明细修改")
    public R update(LocDetl locDetl){
        if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){
        if (Cools.isEmpty(locDetl) || null==locDetl.getBatch()){
            return R.error();
        }
        locDetl.setModiUser(getUserId());
        locDetl.setModiTime(new Date());
        locDetlService.updateById(locDetl);
        LocDetl locDetl1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locDetl.getLocNo()).eq("batch", locDetl.getBatch()));
        if (Cools.isEmpty(locDetl1) ){
            return R.error();
        }
        locDetl1.setModiUser(getUserId());
        locDetl1.setModiTime(new Date());
        locDetl1.setDanger(locDetl.getDanger());
        locDetlService.update(locDetl1,new EntityWrapper<LocDetl>().eq("loc_no", locDetl.getLocNo()).eq("batch", locDetl.getBatch()));
//        locDetlService.updateById(locDetl1);
        return R.ok();
    }