自动化立体仓库 - WMS系统
将物料保质期字段改为寿命,并显示出来
新增物料同步的时候判断有无库存,无则修改有则返回
3个文件已修改
18 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/MesController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MesServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MesController.java
@@ -36,6 +36,11 @@
    public MesReturn synMatInfo(@RequestHeader(required = false) String appkey,@RequestBody MesMatInfo param,HttpServletRequest request){
        auth(appkey, param, request);
        MesReturn mesReturn = new MesReturn();
        if (mesService.synMatInfo(param) == -2) {
            mesReturn.setSuccess("2");
            mesReturn.setMessage("该物料已存在,无法修改");
            return mesReturn;
        }
        mesReturn.setSuccess(mesService.synMatInfo(param) == 1 ? "1" : "2");
        return mesReturn;
    }
src/main/java/com/zy/asrs/service/impl/MesServiceImpl.java
@@ -14,10 +14,12 @@
import com.zy.asrs.entity.param.CombParam;
import com.zy.asrs.entity.rcs.*;
import com.zy.asrs.mapper.AgvInfoMapper;
import com.zy.asrs.mapper.LocDetlMapper;
import com.zy.asrs.service.*;
import com.zy.common.model.enums.WorkNoType;
import com.zy.common.service.CommonService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -72,6 +74,8 @@
    private CommonService commonService;
    @Resource
    private AgvInfoMapper agvInfoMapper;
    @Autowired
    private LocDetlMapper locDetlMapper;
    // region MES接口
@@ -131,6 +135,11 @@
    public int synMatInfo(MesMatInfo mesMatInfo)  {
        try {
            List<LocDetl> locDetls = locDetlMapper.selectList(new EntityWrapper<LocDetl>()
                    .eq("matnr", mesMatInfo.getItem_no()));
            if (locDetls.size() > 0) {
                return -2;
            }
            // 规则定义:默认第3层为同步的物料类型
            long secondPath = 2;
            String secondParentName = WMS_CURRENT_NAME;
src/main/webapp/static/js/common.js
@@ -180,11 +180,12 @@
}
var matCols = [
    {field: 'matnr', align: 'center',title: '商品编号(品号)', width: 180}
    {field: 'matnr', align: 'left',title: '商品编号(品号)', width: 180}
    // {field: 'id', align: 'center',title: 'ID'}
    // ,{field: 'uuid', align: 'center',title: '编号'}
    ,{field: 'maktx', align: 'center',title: '商品名称(品名)', width: 200}
    ,{field: 'specs', align: 'center',title: '规格'}
    ,{field: 'deadTime', align: 'center',title: '寿命'}
    ,{field: 'model', align: 'center',title: '代码', hide: true}
    ,{field: 'color', align: 'center',title: '颜色', hide: true}
    ,{field: 'brand', align: 'center',title: '品牌', hide: true}
@@ -206,7 +207,6 @@
    ,{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}
    ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true}
    ,{field: 'source$', align: 'center',title: '制购', hide: true}
    ,{field: 'check$', align: 'center',title: '要求检验', hide: true}