自动化立体仓库 - WMS系统
skyouc
2 天以前 af8a669a028838d4896eb4167a6895551938dd29
备货指示派工单反馈优化
5个文件已修改
283 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/MatController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/TaskDetlLog.java 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locCache/locCache.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/mat/mat.html 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MatController.java
@@ -188,7 +188,9 @@
            if (pakinCount > 0 || wrkCount > 0 || taskCount > 0) {
                throw new CoolException(entity.getMatnr() + "在作业清单中,无法执行删除操作!!");
            }
            if (!matService.delete(new EntityWrapper<>(entity))) {
            if (!matService.delete(new EntityWrapper<Mat>()
                    .eq("matnr", entity.getMatnr())
                    .eq("supp_code", entity.getSuppCode()))) {
                throw new CoolException("删除失败,请联系管理员");
            }
        }
src/main/java/com/zy/asrs/entity/TaskDetlLog.java
@@ -2,25 +2,37 @@
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.baomidou.mybatisplus.annotations.TableField;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.zy.asrs.service.BasAreasService;
import com.zy.asrs.service.LocCacheService;
import com.zy.asrs.service.TaskLogService;
import org.springframework.format.annotation.DateTimeFormat;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import java.text.SimpleDateFormat;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
import java.util.Objects;
@Data
@TableName("agv_task_detl_log")
@@ -37,284 +49,285 @@
    /**
     * 工作号
     */
    @ApiModelProperty(value= "工作号")
    @ApiModelProperty(value = "工作号")
    @TableField("wrk_no")
    private Integer wrkNo;
    /**
     * 工作时间
     */
    @ApiModelProperty(value= "工作时间")
    @ApiModelProperty(value = "工作时间")
    @TableField("io_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ioTime;
    /**
     * 数量
     */
    @ApiModelProperty(value= "数量")
    @ApiModelProperty(value = "数量")
    private Double anfme;
    /**
     * 托盘条码
     */
    @ApiModelProperty(value= "托盘条码")
    @ApiModelProperty(value = "托盘条码")
    private String zpallet;
    /**
     * 商品编号
     */
    @ApiModelProperty(value= "商品编号")
    @ApiModelProperty(value = "商品编号")
    private String matnr;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    @ApiModelProperty(value = "商品名称")
    private String maktx;
    /**
     * 批号
     */
    @ApiModelProperty(value= "批号")
    @ApiModelProperty(value = "批号")
    private String batch;
    /**
     * 单据编号
     */
    @ApiModelProperty(value= "单据编号")
    @ApiModelProperty(value = "单据编号")
    @TableField("order_no")
    private String orderNo;
    /**
     * 规格
     */
    @ApiModelProperty(value= "规格")
    @ApiModelProperty(value = "规格")
    private String specs;
    /**
     * 型号
     */
    @ApiModelProperty(value= "型号")
    @ApiModelProperty(value = "型号")
    private String model;
    /**
     * 颜色
     */
    @ApiModelProperty(value= "颜色")
    @ApiModelProperty(value = "颜色")
    private String color;
    /**
     * 品牌
     */
    @ApiModelProperty(value= "品牌")
    @ApiModelProperty(value = "品牌")
    private String brand;
    /**
     * 单位
     */
    @ApiModelProperty(value= "单位")
    @ApiModelProperty(value = "单位")
    private String unit;
    /**
     * 单价
     */
    @ApiModelProperty(value= "单价")
    @ApiModelProperty(value = "单价")
    private Double price;
    /**
     * sku
     */
    @ApiModelProperty(value= "sku")
    @ApiModelProperty(value = "sku")
    private String sku;
    /**
     * 单位量
     */
    @ApiModelProperty(value= "单位量")
    @ApiModelProperty(value = "单位量")
    private Double units;
    /**
     * 条码
     */
    @ApiModelProperty(value= "条码")
    @ApiModelProperty(value = "条码")
    private String barcode;
    /**
     * 产地
     */
    @ApiModelProperty(value= "产地")
    @ApiModelProperty(value = "产地")
    private String origin;
    /**
     * 厂家
     */
    @ApiModelProperty(value= "厂家")
    @ApiModelProperty(value = "厂家")
    private String manu;
    /**
     * 生产日期
     */
    @ApiModelProperty(value= "生产日期")
    @ApiModelProperty(value = "生产日期")
    @TableField("manu_date")
    private String manuDate;
    /**
     * 品项数
     */
    @ApiModelProperty(value= "品项数")
    @ApiModelProperty(value = "品项数")
    @TableField("item_num")
    private String itemNum;
    /**
     * 安全库存量
     */
    @ApiModelProperty(value= "安全库存量")
    @ApiModelProperty(value = "安全库存量")
    @TableField("safe_qty")
    private Double safeQty;
    /**
     * 重量
     */
    @ApiModelProperty(value= "重量")
    @ApiModelProperty(value = "重量")
    private Double weight;
    /**
     * 长度
     */
    @ApiModelProperty(value= "长度")
    @ApiModelProperty(value = "长度")
    @TableField("man_length")
    private Double manLength;
    /**
     * 体积
     */
    @ApiModelProperty(value= "体积")
    @ApiModelProperty(value = "体积")
    private Double volume;
    /**
     * 三方编码
     */
    @ApiModelProperty(value= "三方编码")
    @ApiModelProperty(value = "三方编码")
    @TableField("three_code")
    private String threeCode;
    /**
     * 供应商
     */
    @ApiModelProperty(value= "供应商")
    @ApiModelProperty(value = "供应商")
    private String supp;
    /**
     * 供应商编码
     */
    @ApiModelProperty(value= "供应商编码")
    @ApiModelProperty(value = "供应商编码")
    @TableField("supp_code")
    private String suppCode;
    /**
     * 是否批次 1: 是  0: 否
     * 是否批次 1: 是  0: 否
     */
    @ApiModelProperty(value= "是否批次 1: 是  0: 否  ")
    @ApiModelProperty(value = "是否批次 1: 是  0: 否  ")
    @TableField("be_batch")
    private Integer beBatch;
    /**
     * 保质期
     */
    @ApiModelProperty(value= "保质期")
    @ApiModelProperty(value = "保质期")
    @TableField("dead_time")
    private String deadTime;
    /**
     * 预警天数
     */
    @ApiModelProperty(value= "预警天数")
    @ApiModelProperty(value = "预警天数")
    @TableField("dead_warn")
    private Integer deadWarn;
    /**
     * 制购 1: 制造  2: 采购  3: 外协
     * 制购 1: 制造  2: 采购  3: 外协
     */
    @ApiModelProperty(value= "制购 1: 制造  2: 采购  3: 外协  ")
    @ApiModelProperty(value = "制购 1: 制造  2: 采购  3: 外协  ")
    private Integer source;
    /**
     * 要求检验 1: 是  0: 否
     * 要求检验 1: 是  0: 否
     */
    @ApiModelProperty(value= "要求检验 1: 是  0: 否  ")
    @ApiModelProperty(value = "要求检验 1: 是  0: 否  ")
    private Integer inspect;
    /**
     * 危险品 1: 是  0: 否
     * 危险品 1: 是  0: 否
     */
    @ApiModelProperty(value= "危险品 1: 是  0: 否  ")
    @ApiModelProperty(value = "危险品 1: 是  0: 否  ")
    private Integer danger;
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @ApiModelProperty(value = "修改人员")
    @TableField("modi_user")
    private Long modiUser;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @ApiModelProperty(value = "修改时间")
    @TableField("modi_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modiTime;
    /**
     * 添加人员
     */
    @ApiModelProperty(value= "添加人员")
    @ApiModelProperty(value = "添加人员")
    @TableField("appe_user")
    private Long appeUser;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @ApiModelProperty(value = "添加时间")
    @TableField("appe_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appeTime;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    @ApiModelProperty(value = "备注")
    private String memo;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    @TableField("line_number")
    private Long lineNumber;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    private String standby1;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    private String standby2;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    private String standby3;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    @TableField("box_type1")
    private String boxType1;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    @TableField("box_type2")
    private String boxType2;
    @ApiModelProperty(value= "")
    @ApiModelProperty(value = "")
    @TableField("box_type3")
    private String boxType3;
    public TaskDetlLog() {}
    public TaskDetlLog() {
    }
    public TaskDetlLog(Integer wrkNo,Date ioTime,Double anfme,String zpallet,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double manLength,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long lineNumber,String standby1,String standby2,String standby3,String boxType1,String boxType2,String boxType3) {
    public TaskDetlLog(Integer wrkNo, Date ioTime, Double anfme, String zpallet, String matnr, String maktx, String batch, String orderNo, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Long modiUser, Date modiTime, Long appeUser, Date appeTime, String memo, Long lineNumber, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) {
        this.wrkNo = wrkNo;
        this.ioTime = ioTime;
        this.anfme = anfme;
@@ -412,16 +425,18 @@
//            null    // 
//    );
    public String getIoTime$(){
        if (Cools.isEmpty(this.ioTime)){
    public String getIoTime$() {
        if (Cools.isEmpty(this.ioTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
    }
    public String getBeBatch$(){
        if (null == this.beBatch){ return null; }
        switch (this.beBatch){
    public String getBeBatch$() {
        if (null == this.beBatch) {
            return null;
        }
        switch (this.beBatch) {
            case 1:
                return "是";
            case 0:
@@ -431,9 +446,11 @@
        }
    }
    public String getSource$(){
        if (null == this.source){ return null; }
        switch (this.source){
    public String getSource$() {
        if (null == this.source) {
            return null;
        }
        switch (this.source) {
            case 1:
                return "制造";
            case 2:
@@ -445,9 +462,11 @@
        }
    }
    public String getInspect$(){
        if (null == this.inspect){ return null; }
        switch (this.inspect){
    public String getInspect$() {
        if (null == this.inspect) {
            return null;
        }
        switch (this.inspect) {
            case 1:
                return "是";
            case 0:
@@ -457,9 +476,11 @@
        }
    }
    public String getDanger$(){
        if (null == this.danger){ return null; }
        switch (this.danger){
    public String getDanger$() {
        if (null == this.danger) {
            return null;
        }
        switch (this.danger) {
            case 1:
                return "是";
            case 0:
@@ -469,33 +490,72 @@
        }
    }
    public String getModiUser$(){
    /**
     * 获取库区类型
     *
     * @return java.lang.String
     * @author Ryan
     * @date 2026/1/19 14:07
     */
    public String getAreaType() {
        if (null == this.wrkNo) {
            return null;
        }
        TaskLogService taskLogService = SpringUtils.getBean(TaskLogService.class);
        TaskLog taskLog = taskLogService.selectOne(new EntityWrapper<TaskLog>().eq("wrk_no", this.wrkNo));
        if (Objects.isNull(taskLog)) {
            return null;
        }
        LocCacheService locCacheService = SpringUtils.getBean(LocCacheService.class);
        LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", taskLog.getLocNo()));
        if (Objects.isNull(locCache)) {
            return null;
        }
        BasAreasService basAreasService = SpringUtils.getBean(BasAreasService.class);
        BasAreas basAreas = basAreasService.selectById(locCache.getAreaId());
        if (Objects.isNull(basAreas)) {
            return null;
        }
        if (basAreas.getAreaNo().equals("SO")) {
            return "2";
        } else if (basAreas.getAreaNo().equals("EO")) {
            return "3";
        } else if (basAreas.getAreaNo().equals("LK")) {
            return "1";
        } else {
            return "4";
        }
    }
    public String getModiUser$() {
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.modiUser);
        if (!Cools.isEmpty(user)){
        if (!Cools.isEmpty(user)) {
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getModiTime$(){
        if (Cools.isEmpty(this.modiTime)){
    public String getModiTime$() {
        if (Cools.isEmpty(this.modiTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
    }
    public String getAppeUser$(){
    public String getAppeUser$() {
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.appeUser);
        if (!Cools.isEmpty(user)){
        if (!Cools.isEmpty(user)) {
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getAppeTime$(){
        if (Cools.isEmpty(this.appeTime)){
    public String getAppeTime$() {
        if (Cools.isEmpty(this.appeTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -19,6 +19,8 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.enums.OrderTypeEnum;
import com.zy.asrs.service.*;
import com.zy.asrs.service.impl.TaskDetlLogServiceImpl;
import com.zy.asrs.service.impl.TaskDetlServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.OrderInAndOutUtil;
@@ -69,6 +71,8 @@
    private LocDetlService locDetlService;
    @Autowired
    CheckOrderDetlService checkOrderDetlService;
    @Autowired
    private TaskDetlLogService taskDetlLogService;
    @Transactional
@@ -288,9 +292,9 @@
                        .setPro_id(detl.getSuppCode())
                        .setLocation_no(locDetl.getZpallet())
                        .setSj_emp(locDetl.getModiUser$())
                        .setLocation_type(MatLocType.getMatTag(material.getTagId()  + ""))
                        .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
                        // 上报时,默认上报时间是更新时间
                        .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss") )
                        .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
                        // 上报时,默认上报数量是订单数量
                        .setPick_qty(detl.getQty().intValue())
                        // 上报时,默认损坏数量是0
@@ -361,6 +365,15 @@
                if (Objects.isNull(material)) {
                    throw new CoolException("物料不存在");
                }
                TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>()
                        .eq("matnr", detl.getMatnr())
                        .eq("supp_code", detl.getStandby1())
                        .eq("order_no", detl.getOrderNo()));
                if (Objects.isNull(detlLog)) {
                    throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!");
                }
                //目标库区
                orderParam.setTarget_location(detlLog.getAreaType());
                OrderItemsParam itemParam = new OrderItemsParam();
                // BS Code
                itemParam
@@ -371,12 +384,19 @@
                        // 上报时,默认产品id是供应商编码
                        .setPro_id(detl.getSuppCode())
//                        // 上报时,默认来源位置是null
                        .setLocation_no(null)
                        .setLocation_no(detlLog.getZpallet())
                        // 上报时,默认上报数量是订单数量
                        .setPick_qty(detl.getQty().intValue());
                reportOrderParams.add(itemParam);
            });
            if (orderParam.getTarget_location().equals("2")) {
                orderParam.setType("11");
            } else if (orderParam.getTarget_location().equals("3")) {
                orderParam.setType("12");
            } else {
                orderParam.setType("13");
            }
            orderParam.setPartList(reportOrderParams);
            XSR response = null;
@@ -516,7 +536,7 @@
    /**
     * 损溢单完结上报
     *
     *
     * @param order
     * @return
     */
@@ -562,7 +582,7 @@
            if (response.getSuccess()) {
                return SUCCESS;
            } else {
                return  FAIL;
                return FAIL;
            }
        }
src/main/webapp/views/locCache/locCache.html
@@ -33,7 +33,8 @@
                            <select name="area_name">
                                <option value="">库区名称</option>
                                <option value="入库区">入库区</option>
                                <option value="集货区">集货区</option>
                                <option value="SO">SO库区</option>
                                <option value="EO">EO库区</option>
                            </select>
                        </div>
                    </div>
src/main/webapp/views/mat/mat.html
@@ -98,9 +98,9 @@
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label" style="padding: 8px 15px 8px 15px">商品规格:</label>
                            <label class="layui-form-label" style="padding: 8px 15px 8px 15px">供应商:</label>
                            <div class="layui-input-inline">
                                <input name="specs" class="layui-input" placeholder="输入商品规格"/>
                                <input name="suppCode" class="layui-input" placeholder="输入商品规格"/>
                            </div>
                        </div>
                        <div class="layui-inline">&emsp;
@@ -130,19 +130,19 @@
        <button class="layui-btn layui-btn-sm" id="btn-batch-update" lay-event="batchModifties">批量修改</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>
        <!-- 商品/物料 数据中心 -->
        <div class="dropdown-menu" style="float: right">
            <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm">&nbsp;数据同步 <i class="layui-icon layui-icon-drop"></i></button>
            <ul class="dropdown-menu-nav dark">
                <div class="dropdown-anchor"></div>
                <li class="title">1st menu</li>
                <li><a onclick="excelMouldDownload()" style="font-size: 12px"><i class="layui-icon layui-icon-template-1"></i>模板下载</a></li>
                <li><a onclick="importExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-upload"></i>导入 Excel</a></li>
                <li style="display: none"><input id="importExcel" type="file" onchange="upload(this)" ></li>
                <hr>
                <li class="title">2nd menu</li>
                <li><a onclick="exportExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-export"></i>导出 Excel</a></li>
            </ul>
        </div>
<!--        <div class="dropdown-menu" style="float: right">-->
<!--            <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm">&nbsp;数据同步 <i class="layui-icon layui-icon-drop"></i></button>-->
<!--            <ul class="dropdown-menu-nav dark">-->
<!--                <div class="dropdown-anchor"></div>-->
<!--                <li class="title">1st menu</li>-->
<!--                <li><a onclick="excelMouldDownload()" style="font-size: 12px"><i class="layui-icon layui-icon-template-1"></i>模板下载</a></li>-->
<!--                <li><a onclick="importExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-upload"></i>导入 Excel</a></li>-->
<!--                <li style="display: none"><input id="importExcel" type="file" onchange="upload(this)" ></li>-->
<!--                <hr>-->
<!--                <li class="title">2nd menu</li>-->
<!--                <li><a onclick="exportExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-export"></i>导出 Excel</a></li>-->
<!--            </ul>-->
<!--        </div>-->
<!--        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right;margin-right: -10px">导出</button>-->
    </div>
</script>