自动化立体仓库 - WMS系统
#
whycq
2023-10-02 5b5050cfc6912d59138e09d1e7bd589db81d2025
#
6个文件已修改
75 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocDetlController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/WrkDetlLogController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/WrkMastController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/WrkMast.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/DetlDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wrkDetlLog/wrkDetlLog.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -205,7 +205,41 @@
                    .where("loc_no like '" + row + "%'");
        }
        List<LocDetl> list = locDetlService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
        List<AbnormalLocDetlParam> result = new ArrayList<>();
        Page<LocDetl> groupLocDetl = locDetlService.getStockStatis2(toPage(1, 10000, param, LocDetl.class));
        for (LocDetl locDetl : groupLocDetl.getRecords()) {
            AbnormalLocDetlParam abnormalLocDetlParam = new AbnormalLocDetlParam();
            Mat mat = matService.selectOne(new EntityWrapper<Mat>()
                    .eq("matnr", locDetl.getMatnr()));
            if (Cools.isEmpty(mat)) {
                continue;
            }
            if (!Cools.isEmpty(mat.getStoreMax()) || !Cools.isEmpty(mat.getStoreMin())) {
                abnormalLocDetlParam.setStoreMax(mat.getStoreMax());
                abnormalLocDetlParam.setStoreMaxDate(mat.getStoreMaxDate());
                abnormalLocDetlParam.setStoreMin(mat.getStoreMin());
                abnormalLocDetlParam.setAnfme(locDetl.getAnfme());
                abnormalLocDetlParam.setMaktx(mat.getMaktx());
                abnormalLocDetlParam.setMatnr(mat.getMatnr());
                abnormalLocDetlParam.setSpecs(mat.getSpecs());
                abnormalLocDetlParam.setBatch(locDetl.getBatch());
//                SimpleDateFormat simple = new SimpleDateFormat("yyyyMMdd");
//                Date maxDate = simple.parse(locDetl.getBatch());
//                long time = maxDate.getTime();
//                Date now = new Date();
//                long time1 = now.getTime();
//                abnormalLocDetlParam.setNowTime((int) ((time1 - time) / (1000 * 60 * 60 * 24)));
                if (!Cools.isEmpty(mat.getStoreMax()) && locDetl.getAnfme() > mat.getStoreMax()) {
                    result.add(abnormalLocDetlParam);
                } else if (!Cools.isEmpty(mat.getStoreMin()) && locDetl.getAnfme() < mat.getStoreMin()) {
                    result.add(abnormalLocDetlParam);
                }
            }
        }
        return R.ok(exportSupport(result, fields));
    }
    @RequestMapping(value = "/locDetlQuery/auth")
src/main/java/com/zy/asrs/controller/WrkDetlLogController.java
@@ -10,6 +10,7 @@
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.WrkDetl;
import com.zy.asrs.entity.WrkDetlLog;
import com.zy.asrs.service.WrkDetlLogService;
import com.zy.common.web.BaseController;
@@ -58,10 +59,12 @@
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        allLike(WrkDetlLog.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        else {
            wrapper.orderBy("modi_time", false);
src/main/java/com/zy/asrs/controller/WrkMastController.java
@@ -1,5 +1,6 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -14,6 +15,7 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.dto.WrkDetlWithCheck;
import com.zy.asrs.service.*;
import com.zy.common.model.DetlDto;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
@@ -63,6 +65,7 @@
        }else {
            wrapper.orderBy("io_time", false);
        }
        wrkMastService.selectPage(new Page<>(curr, limit), wrapper);
        return R.ok(wrkMastService.selectPage(new Page<>(curr, limit), wrapper));
    }
src/main/java/com/zy/asrs/entity/WrkMast.java
@@ -1,10 +1,12 @@
package com.zy.asrs.entity;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.zy.asrs.service.*;
import com.zy.common.model.DetlDto;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import com.core.common.Cools;
@@ -14,6 +16,7 @@
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -423,9 +426,30 @@
        WrkDetlService wrkDetlService = SpringUtils.getBean(WrkDetlService.class);
        List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(this.wrkNo);
        String orderNo = "";
        List<String> resultRecords = new ArrayList<>();
        if (!Cools.isEmpty(wrkDetls) && wrkDetls.size()!=0){
            if (wrkDetls.get(0).getOrderNo() != null) {
                orderNo = wrkDetls.get(0).getOrderNo();
                for (WrkDetl wrkDetl : wrkDetls) {
                    String orderNo$ = "";
                    JSON.parseArray(wrkDetl.getOrderNo(), DetlDto.class).forEach(detlDto -> {
                        resultRecords.add(detlDto.getOrderNo());
                    });
                }
            }
            int size = resultRecords.size();
            int i = 1;
            for (String resultRecord : resultRecords) {
                if (size == i) {
                    orderNo += resultRecord;
                } else {
                    orderNo += resultRecord + ";";
                }
                i++;
            }
            return String.valueOf(orderNo);
        }
src/main/java/com/zy/common/model/DetlDto.java
@@ -15,6 +15,8 @@
    private String orderNo;
    private String orderNo$;
    private String matnr;
    private String batch;
src/main/webapp/views/wrkDetlLog/wrkDetlLog.html
@@ -31,6 +31,11 @@
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <select id="ownerSelect" name="owner">
                <option value="">请选择客户信息</option>
            </select>