自动化立体仓库 - WMS系统
pang.jiabao
2025-04-30 abb9b5c51d8a20be68b64e0c4a9620f6578d2e3a
手动导入订单和mes下发订单,增加客户名称和备注字段
6个文件已修改
30 ■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/param/ZwmsOutLocWorkDto.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/importexcle/ImportOrderDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/importexcle/ImportOrderListener.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/order.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/order.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/ZwmsOutLocWorkDto.java
@@ -16,6 +16,10 @@
    private String orderType; // 订单类型
    private String customerName; // 客户名称
    private String memo; // 订单备注
    List<String> groups; // 包装组号列表
//    private List<Rolls> matDetails;
src/main/java/com/zy/asrs/importexcle/ImportOrderDto.java
@@ -14,7 +14,7 @@
    @ExcelProperty(value = "包装组号/源库位",index = 0)
    private String column1;
    @ExcelProperty(value = "出库单号/单据类型/目标库位",index = 1)
    @ExcelProperty(value = "出库单号/单据类型/客户名称/备注/目标库位",index = 1)
    private String column2;
    @ExcelProperty(value = "目标巷道",index = 2)
src/main/java/com/zy/asrs/importexcle/ImportOrderListener.java
@@ -4,6 +4,7 @@
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.exception.ExcelAnalysisException;
import com.alibaba.fastjson.JSON;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.SnowflakeIdWorker;
import com.zy.asrs.entity.DocType;
@@ -68,13 +69,13 @@
    public void invoke(ImportOrderDto data, AnalysisContext context) {
        log.info("解析到第 {} 条数据:{}", ++count, JSON.toJSONString(data));
        list.add(data);
        if (context.getCurrentRowNum() == 3) {
        if (context.getCurrentRowNum() == 5) {
            String time = DateUtils.convert(new Date(),DateUtils.yyyyMMddHHmmss_F);
            Order order2 = orderService.selectByNo(list.get(0).getColumn2());
            Order order2 = orderService.selectByNo(list.get(0).getColumn2()); // 订单号
            if(order2 != null) {
                throw new ExcelAnalysisException("单据已存在!");
            }
            DocType docType = docTypeService.selectOrAdd(list.get(1).getColumn2(), Boolean.FALSE);
            DocType docType = docTypeService.selectOrAdd(list.get(1).getColumn2(), Boolean.FALSE); // 订单类型
            if (docType == null) {
                throw new ExcelAnalysisException("单据类型错误:" + list.get(1).getColumn2());
            }
@@ -85,6 +86,8 @@
            order.setOrderNo(orderNo);
            order.setOrderTime(time);
            order.setDocType(docType.getDocId());
            order.setCstmrName(Cools.isEmpty(list.get(2).getColumn2()) ? "" : list.get(2).getColumn2()); // 客户名称
            order.setMemo(Cools.isEmpty(list.get(3).getColumn2()) ? "" : list.get(3).getColumn2()); // 备注
            order.setSettle(1L);
            order.setStatus(1);
            order.setCreateBy(userId);
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -1393,7 +1393,7 @@
                null,    // 初始票据号
                null,    // 票据号
                null,    // 客户编号
                null,    // 客户
                param.getCustomerName(),    // 客户
                null,    // 联系方式
                null,    // 操作人员
                null,    // 合计金额
@@ -1416,7 +1416,7 @@
                now,    // 添加时间
                9527L,    // 修改人员
                now,    // 修改时间
                null    // 备注
                param.getMemo()    // 备注
        );
        if (!orderService.insert(order)) {
@@ -1982,6 +1982,9 @@
        // 根据托盘码获取任务主档
        WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", barcode));
        if (wrkMast == null) {
            return R.parse("该条码无正在执行任务:" + barcode);
        }
        // 根据任务主档获取工作档明细
        List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo()));
        // 提取包装组号
src/main/webapp/static/js/order/order.js
@@ -55,7 +55,8 @@
            {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160},
            {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200},
            {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl',  minWidth: 160, width: 160},
            {field: 'memo', align: 'center',title: '备注', hide: true},
            {field: 'cstmrName', align: 'center',title: '客户名称'},
            {field: 'memo', align: 'center',title: '备注'},
            {align: 'center', title: '操作', toolbar: '#operate', width: 240}
        ]],
        request: {
src/main/webapp/views/order/order.html
@@ -54,6 +54,11 @@
                            <input name="order_no" class="layui-input" type="text" placeholder="输入单据编号"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline mr0">
                            <input name="cstmr_name" class="layui-input" type="text" placeholder="请输入客户名称"/>
                        </div>
                    </div>
                    <div class="layui-inline" style="width: 300px">
                        <div class="layui-input-inline">
                            <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px">