自动化立体仓库 - WMS系统
dubin
22 小时以前 bb1975d8505229818207225b71d72683616c183b
根据客户需求清单修改程序
20个文件已修改
131 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/InOutController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MatController.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/InOut.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/WaitPakinMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/WrkDetlMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/InOutService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocDetlService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/WaitPakinService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/WrkDetlService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WaitPakinServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/matInOut/matInOut.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/barcodeMatnr/barcodeMatnr.html 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/halfBarcode/halfBarcode.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/matInOut/matInOut.html 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/InOutController.java
@@ -1,5 +1,6 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.annotations.ManagerAuth;
@@ -8,13 +9,16 @@
import com.core.common.R;
import com.zy.asrs.entity.InOut;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.WaitPakin;
import com.zy.asrs.service.InOutService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@RestController
@@ -64,4 +68,15 @@
            }
        }
    }
    @RequestMapping(value = "/matInOut/export/auth")
    @ManagerAuth(memo = "商品信息导出")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<InOut> wrapper = new EntityWrapper<>();
        Map<String, Object> map = excludeTrash(param.getJSONObject("inOut"));
        convert(map, wrapper);
        List<InOut> list = inOutService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
}
src/main/java/com/zy/asrs/controller/MatController.java
@@ -13,9 +13,7 @@
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.EmptyPlateOutParam;
import com.zy.asrs.entity.result.KeyValueVo;
import com.zy.asrs.service.InOutService;
import com.zy.asrs.service.MatBarcodeService;
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatExcelListener;
import com.zy.common.CodeRes;
import com.zy.common.config.AdminInterceptor;
@@ -46,6 +44,12 @@
    private InOutService inOutService;
    @Autowired
    private MatBarcodeService matBarcodeService;
    @Autowired
    private WaitPakinService waitPakinService;
    @Autowired
    private LocDetlService locDetlService;
    @Autowired
    private WrkDetlService wrkDetlService;
    @RequestMapping(value = "/mat/auto/matnr/auth")
    public R autoMatnr(){
@@ -195,9 +199,18 @@
            return R.error();
        }
        for (Mat entity : list){
            if (!matService.delete(new EntityWrapper<>(entity))) {
                throw new CoolException("删除失败,请联系管理员");
            Integer locCount = locDetlService.selectCountByMatNr(entity.getMatnr());
            Integer waitCount = waitPakinService.selectCountByMatNr(entity.getMatnr());
            Integer wrkCount = wrkDetlService.selectCountByMatNr(entity.getMatnr());
            InOut inOut = inOutService.selectByMatnr(entity.getMatnr());
            if (locCount > 0 || waitCount > 0 || wrkCount >0){
                throw new CoolException(entity.getMatnr() + "模具库存/组托/工作档数据已存在,不能删除");
            }else {
                if (!matService.delete(new EntityWrapper<>(entity)) && !inOutService.delete(new EntityWrapper<>(inOut))) {
                    throw new CoolException("删除商品档案/商品信息失败,请联系管理员");
                }
            }
        }
        return R.ok();
    }
src/main/java/com/zy/asrs/entity/InOut.java
@@ -62,6 +62,12 @@
    private String barcode;
    /**
     * 托盘条码
     */
    @TableField("brand")
    private String brand;
    /**
     * 生产日期
     */
    @TableField("manu_date")
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -90,4 +90,7 @@
    List<StockStatisDTO> asrsAndErpList(Map<String, Object> condition);
    long asrsAndErpCount(Map<String, Object> condition);
    @Select("select count(*) from asr_loc_detl where matnr = #{matnr};")
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/mapper/WaitPakinMapper.java
@@ -3,10 +3,13 @@
import com.zy.asrs.entity.WaitPakin;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface WaitPakinMapper extends BaseMapper<WaitPakin> {
    @Select("select count(*) from cust_wait_pakin where matnr = #{matnr};")
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/mapper/WrkDetlMapper.java
@@ -5,6 +5,7 @@
import com.zy.asrs.entity.param.PickInParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.Date;
@@ -32,4 +33,7 @@
    int updateIoTimeWms(@Param("workNo") Integer workNo, @Param("ioTime") Date ioTime);
    List<PickInParam> selectDetByBarcode(@Param("barcode") String barcode);
    @Select("select count(*) from asr_wrk_detl where matnr = #{matnr};")
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/service/InOutService.java
@@ -1,5 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zy.asrs.entity.InOut;
src/main/java/com/zy/asrs/service/LocDetlService.java
@@ -89,4 +89,6 @@
    List<Map<String, Object>> selectLocDetlUnilateralMoveShuttleMap(Integer crnNo);
    List<LocDetl> selectLocDetlUnilateralMoveShuttle(String matnr, String batch, String grade, Integer crnNo);
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/service/WaitPakinService.java
@@ -9,4 +9,6 @@
public interface WaitPakinService extends IService<WaitPakin> {
    void comb(List<MatBarcode> list);
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/service/WrkDetlService.java
@@ -29,4 +29,6 @@
    boolean updateIoTimeWms(Integer wrkNo, Date now);
    List<PickInParam> selectDetByBarcode(String barcode);
    Integer selectCountByMatNr(String matnr);
}
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -211,6 +211,11 @@
    }
    @Override
    public Integer selectCountByMatNr(String matnr) {
        return this.baseMapper.selectCountByMatNr(matnr);
    }
    @Override
    public LocDetl selectItem(String locNo, WrkDetl wrkDetl) {
        List<LocDetl> locDetls = this.baseMapper.selectItem3(locNo, wrkDetl.getMatnr());
        if (locDetls != null) {
src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
@@ -167,7 +167,7 @@
        mb.setMatnr(mat.getMatnr());
        mb.setMaktx(mat.getMaktx());
        mb.setSpecs(mat.getSpecs());
        mb.setModel(mat.getModel());
        mb.setModel(mat.getName());
        if (!matBarcodeService.insert(mb)){
            throw new CoolException("物料托盘绑定失败");
        }
src/main/java/com/zy/asrs/service/impl/WaitPakinServiceImpl.java
@@ -67,4 +67,9 @@
            }
        }
    }
    @Override
    public Integer selectCountByMatNr(String matnr) {
        return this.baseMapper.selectCountByMatNr(matnr);
    }
}
src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java
@@ -101,4 +101,9 @@
    public List<PickInParam> selectDetByBarcode(String barcode){
        return this.baseMapper.selectDetByBarcode(barcode);
    }
    @Override
    public Integer selectCountByMatNr(String matnr) {
        return this.baseMapper.selectCountByMatNr(matnr);
    }
}
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -38,6 +38,8 @@
    private OrderDetlService orderDetlService;
    @Autowired
    private InOutService inOutService;
    @Autowired
    private MatService matService;
    public ReturnT<String> start(WrkMast wrkMast) {
        // 4.入库完成
@@ -123,8 +125,12 @@
                            locDetl.setModel(wrkDetl.getModel());
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            Mat mat = matService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("在库");
                                inOut.setTemp1("在库");//属性 是否在库
                                inOut.setBrand(wrkDetl.getBarcode());//托盘条码
                                inOut.setTemp2(mat.getName());//套号
                                inOut.setTemp3(wrkMast.getLocNo());//库位号
//                                inOut.setModiTime(now.toString());
                            }
                            if (!inOutService.updateById(inOut)){
@@ -184,7 +190,9 @@
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("不在库");
                                inOut.setTemp1("不在库");//属性 是否在库
                                inOut.setBrand("");//托盘条码
                                inOut.setTemp3("");
//                                inOut.setModiTime(now.toString());
                            }
                            if (!inOutService.updateById(inOut)){
@@ -252,7 +260,9 @@
                            InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                            if (inOut != null){
                                inOut.setTemp1("在库");
                                inOut.setTemp1("在库");//属性 是否在库
                                inOut.setBrand(wrkDetl.getBarcode());//托盘条码
                                inOut.setTemp3(wrkMast.getLocNo());//库位号
//                                inOut.setModiTime(now.toString());
                            }
                            if (!inOutService.updateById(inOut)){
@@ -394,7 +404,9 @@
                    for (WrkDetl wrkDetl : wrkDetls101) {
                        InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr());
                        if (inOut != null){
                            inOut.setTemp1("不在库");
                            inOut.setTemp1("不在库");//属性 是否在库
                            inOut.setBrand("");//托盘条码
                            inOut.setTemp3("");//库位号
//                            inOut.setModiTime(now.toString());
                        }
                        if (!inOutService.updateById(inOut)){
src/main/webapp/static/js/common.js
@@ -295,7 +295,7 @@
    ,{field: 'length', align: 'center',title: '单箱毛重', hide: true}
    ,{field: 'volume', align: 'center',title: '单箱体积', hide: true}
    ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true}
    ,{field: 'price', align: 'center',title: '可放长度(mm)', hide:false }
    ,{field: 'price', align: 'center',title: '可放厚度(mm)', hide:false }
    ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true}
    ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true}
    ,{field: 'deadTime', align: 'center',title: '保质期', hide: true}
src/main/webapp/static/js/matInOut/matInOut.js
@@ -1,7 +1,7 @@
var pageCurr;
function getCol() {
    var cols = [
        {field: 'locNo$', align: 'center',title: '库位号', hide: true}
        {field: 'locNo$', align: 'center',title: '库位号', hide: false}
        ,{field: 'storeDate', align: 'center',title: '库龄(天)', sort:true, hide: true}
        ,{field: 'matnr', align: 'center',title: '商品模具名称', sort:true}
        ,{field: 'model', align: 'center',title: '代码', hide: true}
@@ -14,7 +14,7 @@
        ,{field: 'zpallet', align: 'center',title: '托盘条码',hide: true}
        ,{field: 'specs', align: 'center',title: '规格'}
        ,{field: 'color', align: 'center',title: '颜色', hide: true}
        ,{field: 'brand', align: 'center',title: '品牌', hide: true}
        ,{field: 'brand', align: 'center',title: '托盘条码', hide: false}
        ,{field: 'unit', align: 'center',title: '单位', hide: false}
        ,{field: 'price', align: 'center',title: '单价', hide: true}
        ,{field: 'color', align: 'center',title: '状态', hide: false}
@@ -38,8 +38,8 @@
        ,{field: 'check$', align: 'center',title: '要求检验', hide: true}
        ,{field: 'danger$', align: 'center',title: '危险品', hide: true}
        ,{field: 'temp1', align: 'center',title: '属性', hide: false}
        ,{field: 'temp1', align: 'center',title: '名称总称', hide: true}
        ,{field: 'temp2', align: 'center',title: '客户图号', hide: true}
        ,{field: 'temp2', align: 'center',title: '套号', hide: false}
        ,{field: 'temp3', align: 'center',title: '库位号', hide: false}
    ];
@@ -197,7 +197,7 @@
                    };
                    var loadIndex = layer.msg('正在导出...', {icon: 16, shade: 0.01, time: false});
                    $.ajax({
                        url: baseUrl+"/locDetl/export/auth",
                        url: baseUrl+"/matInOut/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
src/main/webapp/views/barcodeMatnr/barcodeMatnr.html
@@ -29,6 +29,11 @@
            <input class="layui-input" type="text" name="specs" placeholder="规格" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="model" placeholder="套号" autocomplete="off">
        </div>
    </div>
    <!-- 日期范围 -->
<!--    <div class="layui-inline" style="width: 300px">-->
<!--        <div class="layui-input-inline">-->
@@ -49,7 +54,7 @@
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" id="btn-wrk" lay-event="addWrk">解绑</button>
        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">绑定</button>
<!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">绑定</button>-->
        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">组托</button>
        <button class="layui-btn layui-btn-sm" id="btn-clamp" lay-event="clampData">并板</button>
        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="">导出</button>
src/main/webapp/views/halfBarcode/halfBarcode.html
@@ -31,7 +31,7 @@
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="price" placeholder="可放长度" autocomplete="off">
            <input class="layui-input" type="text" name="price" placeholder="可放厚度" autocomplete="off">
        </div>
    </div>
    <!-- 日期范围 -->
src/main/webapp/views/matInOut/matInOut.html
@@ -31,7 +31,7 @@
<!--    </div>-->
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off">
            <input class="layui-input" type="text" name="matnr" placeholder="商品模具名称" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
@@ -41,6 +41,16 @@
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="temp2" placeholder="套号" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="brand" placeholder="托盘条码" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <select name="temp1" id="temp1" class="layui-input" type="text" placeholder="属性" autocomplete="off">
                <!--                    <option style="display: none"></option>-->
                <option value="">属性</option>