自动化立体仓库 - WMS系统
#
LSH
2023-11-17 b4ffbe0d45e17bd4a4f79c6201e92cc9d3091cb8
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -11,6 +11,7 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocDetlWarningDTO;
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.LocMastService;
@@ -63,6 +64,7 @@
    @ManagerAuth
    public R stockOutList(@RequestParam(defaultValue = "1")Integer curr,
                          @RequestParam(defaultValue = "10")Integer limit,
//                          @RequestParam(required = false)String condition,
                          @RequestParam Map<String, Object> param){
        if (!Cools.isEmpty(param.get("modi_time"))){
            String val = String.valueOf(param.get("modi_time"));
@@ -89,6 +91,7 @@
        convert(param, wrapper);
        allLike(LocDetl.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("supplier");
        return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -124,7 +127,7 @@
            value= (String) param.get(s);
        }
        LocMast loc_no = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", value));
        if (loc_no.getLocSts().equals("O")||loc_no.getLocSts().equals("F")){
        if (loc_no.getLocSts().equals("O")||loc_no.getLocSts().equals("D")||loc_no.getLocSts().equals("F")){
            EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
            convert(param, wrapper);
            allLike(LocDetl.class, param.keySet(), wrapper, condition);
@@ -210,6 +213,24 @@
        return R.ok();
    }
    @RequestMapping(value = "/locDetl/selectAllWarning/auth")
    @ManagerAuth(memo = "库存预警")
    public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr,
                                                           @RequestParam(defaultValue = "10")Integer limit,
                                                           @RequestParam Map<String, Object> param){
        LocDetlWarningDTO locDetlWarningDTO = new LocDetlWarningDTO();
        locDetlWarningDTO.setPageSize(limit);
        locDetlWarningDTO.setPageNumber(curr);
        String mat_no = String.valueOf(param.get("mat_no"));
        if (!Cools.isEmpty(mat_no) && !mat_no.equals("null")) {
            locDetlWarningDTO.setMat_no(mat_no);
        }
        List<LocDetlWarningDTO> list = locDetlService.selectAllWarning(locDetlWarningDTO);
        int count = locDetlService.getAllWarningCount(locDetlWarningDTO);
        Page<LocDetlWarningDTO> page = new Page<>();
        page.setRecords(list);
        page.setTotal(count);
        return R.ok(page);
    }
}