自动化立体仓库 - WMS系统
#
mrzhssss
2022-12-01 e19b4d3b6a68314887f78786c36ad97339d5faaf
#
9个文件已修改
66 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OutController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/OrderDetlMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/OrderDetlService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OrderDetlServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/OrderDetlMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/order.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/out.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OutController.java
@@ -67,13 +67,13 @@
            List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist);
            for (LocDetl locDetl : locDetls) {
                if (issued > 0) {
//                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
//                            issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued);
//                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103);
                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
                            locDetl.getAnfme(), issued < locDetl.getAnfme()? issued : locDetl.getAnfme());
                    //速腾只有全板,所以只能101全板出库
                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101);
                            issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued);
                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103);
//                    LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
//                            locDetl.getAnfme(), issued < locDetl.getAnfme()? issued : locDetl.getAnfme());
//                    //速腾只有全板,所以只能101全板出库
//                    List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101);
                    locDto.setStaNos(staNos);
                    locDtos.add(locDto);
                    exist.add(locDetl.getLocNo());
@@ -84,7 +84,8 @@
                }
            }
            if (issued > 0) {
                LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued);
                LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued);
//                LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued);
                locDto.setLack(Boolean.TRUE);
                locDtos.add(locDto);
            }
src/main/java/com/zy/asrs/mapper/OrderDetlMapper.java
@@ -36,4 +36,6 @@
    int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("workQty")Double workQty);
    Integer checkAllDetlFinish(@Param("orderNo") String orderNo);
    Integer sameOrderComb(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch);
}
src/main/java/com/zy/asrs/service/OrderDetlService.java
@@ -39,4 +39,6 @@
    boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty);
    Boolean checkAllDetlFinish(String orderNo);
    Integer sameOrderComb(String orderNo, String matnr, String batch);
}
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -102,6 +102,13 @@
                combMat.setBatch("");
            }
        }
        for (CombParam.CombMat combMat : param.getCombMats()) {
            Integer sum = orderDetlService.sameOrderComb(param.getOrderNo(), combMat.getMatnr(),combMat.getBatch());
            OrderDetl orderDetl = orderDetlService.selectItem(param.getOrderNo(), combMat.getMatnr(), combMat.getBatch());
            if ( combMat.getAnfme() > (orderDetl.getAnfme() - sum)) {
                throw new CoolException("组托数量已超出订单需求量,请检查是否有其他的组托已完成");
            }
        }
        Date now = new Date();
src/main/java/com/zy/asrs/service/impl/OrderDetlServiceImpl.java
@@ -95,4 +95,17 @@
    public Boolean checkAllDetlFinish(String orderNo) {
        return this.baseMapper.checkAllDetlFinish(orderNo) <= 0 ;
    }
    /**
     * 获取相同单号,相同批号,相同物料代码已经在入库通知档里组托的数量
     * @param orderNo
     * @param matnr
     * @param batch
     * @return
     */
    @Override
    public Integer sameOrderComb(String orderNo, String matnr, String batch) {
        Integer sum = this.baseMapper.sameOrderComb(orderNo, matnr, batch);
        return  sum != null ? sum : 0;
    }
}
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -289,9 +289,8 @@
        // 获取库位
        LocMast locMast = locMastService.selectById(taskDto.getLocNo());
        // 获取路径
//        int ioType = taskDto.isAll() ? 101 : 103;
        //仅适用于速腾项目,没有捡料
        int ioType = 101;
        int ioType = taskDto.isAll() ? 101 : 103;
        StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), staNo.getDevNo());
        // 生成工作号
        int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType));
@@ -972,7 +971,9 @@
        // 获取目标站
        Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                .eq("type_no", wrkMast.getIoType() - 50)
                .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站
                //速腾特有捡料, 11站是出库站, 然后手动走到15站进行再入库
                .eq("stn_no", 15) // 作业站点 = 拣料出库的目标站
                .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号
        StaDesc staDesc = staDescService.selectOne(wrapper);
        if (Cools.isEmpty(staDesc)) {
@@ -984,7 +985,7 @@
        // 更新工作档数据状态
        wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57
        wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走
        wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站
        wrkMast.setSourceStaNo(staDesc.getStnNo()); // 源站
        wrkMast.setStaNo(staNo); // 目标站
        wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位
        wrkMast.setSourceLocNo(""); // 源库位清空
src/main/resources/mapper/OrderDetlMapper.xml
@@ -127,6 +127,14 @@
    <select id="checkAllDetlFinish" resultType="java.lang.Integer">
        SELECT count(*) From man_order_detl WHERE qty &lt; anfme and order_no = #{orderNo}
    </select>
    <select id="sameOrderComb" resultType="java.lang.Integer">
        SELECT SUM(anfme) FROM cust_wait_pakin WHERE  1=1
        <if test="orderNo!=null and orderNo!='' ">
            and order_no like '%' + #{orderNo} + '%'
        </if>
        and matnr = #{matnr}
        and batch = #{batch}
    </select>
    <update id="increase">
        update man_order_detl
src/main/webapp/static/js/order/order.js
@@ -236,7 +236,7 @@
                        {field: 'batch', title: '批号', edit: true},
                        {field: 'specs', title: '规格'},
                        {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                        {field: 'workQty', title: '作业数量',  minWidth: 100, width: 100},
                        {field: 'qty', title: '作业数量',  minWidth: 100, width: 100},
                        // {field: 'unit', title: '单位', width: 80},
                        {field: 'memo', title: '备注' , edit: true},
                        {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
@@ -307,7 +307,7 @@
                                // insTbSSXM.reload({data: xxDataList});
                                return false;
                            }
                            if(obj.value < data.workQty){
                            if(obj.value < data.qty){
                                layer.msg("输入数量不能小于作业中数量", {icon: 2});
                                // data[obj.field] = 0;
                                // insTbSSXM.reload({data: xxDataList});
src/main/webapp/static/js/order/out.js
@@ -162,9 +162,9 @@
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'batch', title: '序列码', align: 'center'},
                                    { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'},
                                    // { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'},
                                    // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    { title: '立库余量', align: 'center', width: 90, toolbar: '#checkAnfme'},
                                    { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'},
                                    {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                                    {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                                    {type: 'checkbox', merge: ['locNo']},