自动化立体仓库 - WMS系统
#
luxiaotao1123
2023-01-29 df65c19219670915339b6f7c1505ff1acb1159d2
#
4个文件已修改
44 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/LocRuleService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locRule/locRule.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocRuleService.java
@@ -5,4 +5,6 @@
public interface LocRuleService extends IService<LocRule> {
    LocRule find(String matnr, String batch);
}
src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java
@@ -1,12 +1,50 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.mapper.LocRuleMapper;
import com.zy.asrs.entity.LocRule;
import com.zy.asrs.service.LocRuleService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zy.asrs.service.MatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("locRuleService")
public class LocRuleServiceImpl extends ServiceImpl<LocRuleMapper, LocRule> implements LocRuleService {
    @Autowired
    private MatService matService;
    @Override
    public LocRule find(String matnr, String batch) {
        if (Cools.isEmpty(matnr)) {
            return null;
        }
        Mat mat = matService.selectByMatnr(matnr);
        if (Cools.isEmpty(mat)) {
            return null;
        }
        LocRule locRule = null;
        do {
            locRule = this.selectOne(new EntityWrapper<LocRule>().eq("matnr", matnr).eq("status", 1));
            if (null != locRule) {
                break;
            }
            locRule = this.selectOne(new EntityWrapper<LocRule>().eq("specs", mat.getSpecs()).eq("status", 1));
            if (null != locRule) {
                break;
            }
            locRule = this.selectOne(new EntityWrapper<LocRule>().eq("model", mat.getModel()).eq("status", 1));
            if (null != locRule) {
                break;
            }
            locRule = this.selectOne(new EntityWrapper<LocRule>().eq("batch", batch).eq("status", 1));
            if (null != locRule) {
                break;
            }
        } while (false);
        return locRule;
    }
}
src/main/java/com/zy/common/service/CommonService.java
@@ -57,6 +57,8 @@
    private SlaveProperties slaveProperties;
    @Autowired
    private MatService matService;
    @Autowired
    private LocRuleService locRuleService;
    /**
     * 生成工作号
src/main/webapp/static/js/locRule/locRule.js
@@ -28,7 +28,7 @@
            ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'cstmr', align: 'center',title: '客户'}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'other', align: 'center',title: '其他'}
            ,{field: 'other', align: 'center',title: '其他', hide: true}
            ,{field: 'rowBeg', align: 'center',title: '开始排'}
            ,{field: 'rowEnd', align: 'center',title: '结束排'}
            ,{field: 'bayBeg', align: 'center',title: '开始列'}