自动化立体仓库 - WMS系统
#1
dubin
2025-11-04 57e7846403cd3c72cc70e17e205c4e0d8b3aa404
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -13,12 +13,9 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.ManLocDetl;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.entity.StockStatisDTO;
import com.zy.asrs.mapper.LocDetlMapper;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.ManLocDetlService;
import com.zy.asrs.service.MatService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
@@ -60,9 +57,27 @@
        if (!locNos.isEmpty()) {
            List<LocDetl> res = new ArrayList<>();
            for (String locNo : new HashSet<>(locNos)) {
                List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locNo));
                if (!locDetls.isEmpty()) {
                    res.addAll(locDetls);
                    List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locNo));
                    if (!locDetls.isEmpty()) {
                        res.addAll(locDetls);
                    }
                }
            return R.ok().add(res);
        }
        return R.parse(BaseRes.EMPTY);
    }
    @RequestMapping(value = "/locDetlOut/auth")
    @ManagerAuth
    public R stockOutListAll(@RequestParam(value = "locNos[]") List<String> locNos,@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){
        if (!locNos.isEmpty()&&!matnrs.isEmpty()) {
            List<LocDetl> res = new ArrayList<>();
            for (String locNo : new HashSet<>(locNos)) {
                for (String matnr : new HashSet<>(matnrs)) {
                    List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr).eq("loc_no",locNo));
                    if (!locDetls.isEmpty()) {
                        res.addAll(locDetls);
                    }
                }
            }
            return R.ok().add(res);
@@ -73,6 +88,27 @@
    @RequestMapping(value = "/stock/out/list/auth")
    @ManagerAuth
    public R stockOutList(@RequestParam(defaultValue = "1")Integer curr,
                          @RequestParam(defaultValue = "10")Integer limit,
                          @RequestParam Map<String, Object> param){
        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 = "/clamp/out/list/auth")
    @ManagerAuth
    public R clampOutList(@RequestParam(defaultValue = "1")Integer curr,
                          @RequestParam(defaultValue = "10")Integer limit,
                          @RequestParam Map<String, Object> param){
        if (!Cools.isEmpty(param.get("modi_time"))){
@@ -241,7 +277,7 @@
    public R statis(@RequestParam(defaultValue = "1")Integer curr,
                    @RequestParam(defaultValue = "10")Integer limit,
                    @RequestParam Map<String, Object> param) {
        Page<StockStatisDTO> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, StockStatisDTO.class));
        Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class));
        return R.ok().add(stockStatis);
    }