自动化立体仓库 - WMS系统
#1
dubin
13 小时以前 3d7a3f51d1f01c62a03ddbe5cab6e395e30e607b
#1
6个文件已修改
117 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/MatExcelListener.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locMast/locMast.html 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/report/viewWorkIn.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/stoMan/stoQue.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java
@@ -41,30 +41,32 @@
    private MatService matService;
    @Autowired
    private WaitPakinService waitPakinService;
    /*
    * 物料托盘绑定分页查询
    * */
     * 物料托盘绑定分页查询
     * */
    @RequestMapping(value = "/barcodeMatnr/list/auth")
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
    public R list(@RequestParam(defaultValue = "1") Integer curr,
                  @RequestParam(defaultValue = "10") Integer limit,
                  @RequestParam(required = false) String orderByField,
                  @RequestParam(required = false) String orderByType,
                  @RequestParam Map<String, Object> param) {
        excludeTrash(param);
        EntityWrapper<MatBarcode> wrapper = new EntityWrapper<>();
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        else {
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        } else {
            wrapper.orderBy("modi_time", false);
        }
        return R.ok(matBarcodeService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
    private void convert(Map<String, Object> map, EntityWrapper wrapper) {
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
            if (val.contains(RANGE_TIME_LINK)) {
                String[] dates = val.split(RANGE_TIME_LINK);
                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
@@ -75,8 +77,8 @@
    }
    /*
    * 物料托盘解绑
    * */
     * 物料托盘解绑
     * */
    @RequestMapping("/barcodeMatnr/matnrLostBarcode")
    @ManagerAuth(memo = "物料托盘解绑")
    public R matnrLostBarcode(@RequestBody List<MatBarcode> list) {
@@ -85,16 +87,16 @@
    }
    /*
    * 批量组托
    * */
     * 批量组托
     * */
    @RequestMapping("/barcodeMatnr/matnrAndBarcode")
    @ManagerAuth(memo = "物料托盘批量组托")
    public R matnrAndBarcode(@RequestBody List<MatBarcode> list) {
        if (Cools.isEmpty(list)){
        if (Cools.isEmpty(list)) {
            return R.error(BaseRes.PARAM);
        }
        for (MatBarcode matBarcode : list) {
            if (!matBarcode.getZpallet().equals(list.get(0).getZpallet())){
            if (!matBarcode.getZpallet().equals(list.get(0).getZpallet())) {
                log.info(matBarcode.getZpallet());
                log.info(list.get(0).getZpallet());
                throw new CoolException("请选择相同托盘码的数据");
@@ -106,12 +108,12 @@
    }
    /*物料托盘绑定
    *
    * */
     *
     * */
    @RequestMapping(value = "/barcodeMatnr/add/auth")
    @ManagerAuth
    public R add(WaitPakin waitPakin) {
        if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())){
        if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser())) {
            return R.error(BaseRes.PARAM);
        }
        matBarcodeService.addBarcodeMatnr(waitPakin);
@@ -119,24 +121,24 @@
    }
    /*组托
    *
    * */
     *
     * */
    @RequestMapping(value = "/barcodeMatnr/comb/auth")
    @ManagerAuth
    public R comb(WaitPakin waitPakin) {
        Mat mat = matService.selectById(waitPakin.getModiUser());
        MatBarcode matBarcode = matBarcodeService.selectbyMatnr(mat.getMatnr());
        if (matBarcode == null){
        if (matBarcode == null) {
            throw new CoolException("该物料未与托盘绑定");
        }else {
            if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())){
                throw new CoolException("该物料与其他托盘绑定,不能与当前托盘"+waitPakin.getBarcode()+"绑定,与该物料绑定的托盘是"+matBarcode.getZpallet());
        } else {
            if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())) {
                throw new CoolException("该物料与其他托盘绑定,不能与当前托盘" + waitPakin.getBarcode() + "绑定,与该物料绑定的托盘是" + matBarcode.getZpallet());
            }
        }
        if (mat.getColor().equals("报废")){
        if (mat.getColor().equals("报废")) {
            throw new CoolException("该物料已报废,请勿绑定");
        }
        if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())||Cools.isEmpty(waitPakin.getAnfme())){
        if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser()) || Cools.isEmpty(waitPakin.getAnfme())) {
            return R.error(BaseRes.PARAM);
        }
        mobileService.combToWms(waitPakin);
@@ -144,26 +146,26 @@
    }
    /*并板
    *
    * */
     *
     * */
//    @RequestMapping(value = "/barcodeMatnr/clamp/auth")
    @ManagerAuth
    public R clamp(WaitPakin waitPakin) {
        if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())){
        if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser())) {
            return R.error(BaseRes.PARAM);
        }
        Mat mat = matService.selectById(waitPakin.getModiUser());
        MatBarcode matBarcode = matBarcodeService.selectbyMatnr(mat.getMatnr());
        if (matBarcode == null){
        if (matBarcode == null) {
            throw new CoolException("该物料未与托盘绑定");
        }else {
            if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())){
            throw new CoolException("该物料与其他托盘绑定,不能与当前托盘"+waitPakin.getBarcode()+"绑定,与该物料绑定的托盘是"+matBarcode.getZpallet());
        } else {
            if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())) {
                throw new CoolException("该物料与其他托盘绑定,不能与当前托盘" + waitPakin.getBarcode() + "绑定,与该物料绑定的托盘是" + matBarcode.getZpallet());
            }
        }
        MobileAdjustParam combParam=new MobileAdjustParam();
        ArrayList<CombParam.CombMat> combMats=new ArrayList<>();
        CombParam.CombMat combMat=new CombParam.CombMat();
        MobileAdjustParam combParam = new MobileAdjustParam();
        ArrayList<CombParam.CombMat> combMats = new ArrayList<>();
        CombParam.CombMat combMat = new CombParam.CombMat();
        combMat.setMatnr(mat.getMatnr());
        combMat.setMaktx(mat.getMaktx());
//        combMat.setAnfme(waitPakin.getAnfme());
@@ -178,14 +180,14 @@
    /*批量并板*/
    @RequestMapping(value = "/barcodeMatnr/clamp/auth")
    @ManagerAuth
    public R clamp2(@RequestBody List<MatBarcode> list){
        if (Cools.isEmpty(list)){
    public R clamp2(@RequestBody List<MatBarcode> list) {
        if (Cools.isEmpty(list)) {
            return R.error(BaseRes.PARAM);
        }
        for (MatBarcode matBarcode : list) {
            MobileAdjustParam combParam=new MobileAdjustParam();
            ArrayList<CombParam.CombMat> combMats=new ArrayList<>();
            CombParam.CombMat combMat=new CombParam.CombMat();
            MobileAdjustParam combParam = new MobileAdjustParam();
            ArrayList<CombParam.CombMat> combMats = new ArrayList<>();
            CombParam.CombMat combMat = new CombParam.CombMat();
            combMat.setMatnr(matBarcode.getMatnr());
            combMat.setMaktx(matBarcode.getMaktx());
            combMat.setAnfme(1.0);
src/main/java/com/zy/asrs/utils/MatExcelListener.java
@@ -2,6 +2,7 @@
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
@@ -163,10 +164,10 @@
            }
            //模具信息更新
            matService.deleteById(mat.getId());
            matService.delete(new EntityWrapper<Mat>().eq("matnr",mat.getMatnr()));
            mat = excel;
            mat.setTagId(tagId);
            mat.setMatnr(excel.getMatnr()+"__"+excel.getName());
            mat.setMatnr(excel.getMatnr() + "__" + excel.getName());
            if (!matService.insert(mat)) {
                throw new CoolException("保存商品档案失败,商品编码:" + excel.getMatnr());
            }
src/main/webapp/static/js/common.js
@@ -236,7 +236,7 @@
    ,{field: 'batch', align: 'center',title: '批次', hide:true,sort:true}
    ,{field: 'outOrderNo', align: 'center',title: '合同号', sort:true, hide: true}
    ,{field: 'unit', align: 'center',title: '单位', hide: true}
    ,{field: 'anfme', align: 'center',title: '数量', hide: false}
    ,{field: 'anfme', align: 'center',title: '数量', hide: true}
    ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false}
    ,{field: 'specs', align: 'center',title: '规格', hide: false}
    ,{field: 'color', align: 'center',title: '颜色', hide: true}
@@ -250,11 +250,11 @@
    ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true}
    ,{field: 'itemNum', align: 'center',title: '品项数', hide: true}
    ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true}
    ,{field: 'weight', align: 'center',title: '总重量', hide: true}
    ,{field: 'length', align: 'center',title: '单箱毛重', hide: true}
    ,{field: 'weight', align: 'center',title: '理论克重', hide: true, edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
    ,{field: 'length', align: 'center',title: '实际克重', hide: true, edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
    ,{field: 'volume', align: 'center',title: '单箱体积', hide: true}
    ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true}
    ,{field: 'supp', align: 'center',title: '客户名称', hide:false }
    ,{field: 'supp', align: 'center',title: '客户名称', hide:true }
    ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true}
    ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true}
    ,{field: 'deadTime', align: 'center',title: '保质期', hide: true}
@@ -262,7 +262,7 @@
    ,{field: 'source$', align: 'center',title: '制购', hide: true}
    ,{field: 'check$', align: 'center',title: '要求检验', hide: true}
    ,{field: 'danger$', align: 'center',title: '危险品', hide: true}
    ,{field: 'proType', align: 'center',title: '属性', hide: false}
    ,{field: 'proType', align: 'center',title: '属性', hide: true}
    ,{field: 'temp1', align: 'center',title: '名称总称', hide: true}
    ,{field: 'temp2', align: 'center',title: '客户图号', hide: true}
src/main/webapp/views/locMast/locMast.html
@@ -46,7 +46,9 @@
                <!--                    <option style="display: none"></option>-->
                <option value=""></option>
                <option value="1">低库位</option>
                <option value="2">高库位</option>
                <option value="2">中库位</option>
                <option value="5">高库位</option>
                <option value="6">超高库位</option>
            </select>
        </div>
    </div>
src/main/webapp/views/report/viewWorkIn.html
@@ -26,7 +26,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">
src/main/webapp/views/stoMan/stoQue.html
@@ -48,8 +48,10 @@
            <select name="loc_type1" id="loc_type1" class="layui-input" type="text" placeholder="库位类型" autocomplete="off">
                <!--                    <option style="display: none"></option>-->
                <option value=""></option>
                <option value="1">小库位</option>
                <option value="2">大库位</option>
                <option value="1">低库位</option>
                <option value="2">中库位</option>
                <option value="5">高库位</option>
                <option value="6">超高库位</option>
            </select>
        </div>
    </div>