自动化立体仓库 - WMS系统
skyouc
8 小时以前 6ea39c790edb8a59b1637d18383a14019985d2ba
bug修复
组托上架功能优化
4个文件已修改
63 ■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/BasStationDetl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/CombParam.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/basStation/basStationDetl.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/BasStationDetl.java
@@ -1,9 +1,11 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.core.common.SpringUtils;
import com.zy.asrs.service.MatService;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import java.text.SimpleDateFormat;
@@ -45,6 +47,9 @@
     */
    @ApiModelProperty(value= "数量")
    private Double anfme;
    @ApiModelProperty("执行中数量")
    private Double workQty;
    /**
     * 托盘条码
@@ -441,6 +446,15 @@
        }
    }
    public String getTag$() {
        MatService service = SpringUtils.getBean(MatService.class);
        Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr));
        if (Cools.isEmpty(order)){
            return null;
        }
        return order.getTagId$();
    }
    public String getDanger$(){
        if (null == this.danger){ return null; }
        switch (this.danger){
src/main/java/com/zy/asrs/entity/param/CombParam.java
@@ -24,6 +24,8 @@
    //唯一编码
    private String bsCode;
    private String carBarcode;
    private String type;
    private List<CombMat> combMats;
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1589,17 +1589,16 @@
        if (Objects.isNull(params.getBsCode())) {
            throw new CoolException("BS码不能为空!!");
        }
        Task task = taskService.selectOne(new EntityWrapper<Task>()
                .eq("io_type", TaskIOType.PICK_OUT.type)
                .eq("wrk_sts", 14)
                .eq("barcode", params.getCarBarcode()));
        if (Objects.isNull(task)) {
            throw new CoolException("数据错误:任务信息存在!!");
        }
//        Task task = taskService.selectOne(new EntityWrapper<Task>()
//                .eq("io_type", TaskIOType.PICK_OUT.type)
//                .eq("wrk_sts", 14)
//                .eq("barcode", params.getCarBarcode()));
//        if (Objects.isNull(task)) {
//            throw new CoolException("数据错误:任务信息存在!!");
//        }
        List<TaskDetl> taskDetl = taskDetlService.selectList(new EntityWrapper<TaskDetl>()
        List<BasStationDetl> taskDetl = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>()
                .eq("three_code", params.getBsCode())
                .eq("wrk_no", task.getWrkNo())
                .eq("zpallet", params.getCarBarcode()));
        if (Objects.isNull(taskDetl) || taskDetl.isEmpty()) {
@@ -1688,9 +1687,22 @@
                throw new CoolException("物料:" + detlDto.getMatnr() + ", 超出当前托盘装载上限!!");
            }
            BasStationDetl stationDetl = basStationDetlService.selectOne(new EntityWrapper<BasStationDetl>()
                    .eq("zpallet", param.getCarBarcode())
                    .eq("three_code", detlDto.getThreeCode()));
            if (Objects.isNull(stationDetl)) {
                throw new CoolException("明细内容不存在!!");
            }
            Double v = stationDetl.getAnfme() - stationDetl.getWorkQty();
            if (detlDto.getAnfme().compareTo(v) > 0) {
                throw new CoolException("组托上限为:" + stationDetl.getAnfme() + ", 已组托:" + stationDetl.getWorkQty() + ", 还可组托:" + v);
            }
            WaitPakin waitPakin = new WaitPakin();
            BeanUtils.copyProperties(mat, waitPakin);
            waitPakin.setBatch(detlDto.getBatch());
            waitPakin.setType(param.getType());
            waitPakin.setZpallet(param.getBarcode());
            // 设置组托类型
            waitPakin.setType(param.getType());
@@ -1698,6 +1710,7 @@
            waitPakin.setAnfme(detlDto.getAnfme());
            waitPakin.setThreeCode(detlDto.getThreeCode());
            waitPakin.setStatus("Y");
            waitPakin.setSuppCode(detlDto.getStandby1());
            waitPakin.setStandby1(detlDto.getStandby1());
            waitPakin.setStandby2(detlDto.getStandby2());
            waitPakin.setStandby3(detlDto.getStandby3());
@@ -1711,6 +1724,20 @@
            if (!waitPakinService.insert(waitPakin)) {
                throw new CoolException("保存入库通知档失败");
            }
            Double v1 = stationDetl.getWorkQty() + detlDto.getAnfme();
            stationDetl.setWorkQty(v1);
            if (!basStationDetlService.updateById(stationDetl)) {
                throw new CoolException("站点明细修改失败");
            }
            if (v1.compareTo(stationDetl.getWorkQty()) >= 0) {
                if (!basStationDetlService.deleteById(stationDetl)) {
                    throw new CoolException("原始数据移除失败!");
                }
            }
        }
    }
src/main/webapp/views/basStation/basStationDetl.html
@@ -32,7 +32,7 @@
        var cols = [
            {field: 'devNo', align: 'center', title: '站点台号'}
        ];
        cols.push.apply(cols, cacheCols);
        cols.push.apply(cols, detlCols);
        return cols;
    }