| | |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(priTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("一级分类创建异常,请联系管理员"); |
| | | } |
| | | } |
| | | // 二级分类 |
| | |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(secTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("二级分类创建异常,请联系管理员"); |
| | | } |
| | | } |
| | | tagId = secTag.getId(); |
| | |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("物料信息新增异常,请联系管理员"); |
| | | } else { |
| | | log.info("打包上线添加新物料[商品编号:{}]", mat.getMatnr()); |
| | | } |
| | |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(priTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("一级分类创建异常,请联系管理员"); |
| | | } |
| | | } |
| | | // 二级分类 |
| | |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(secTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("二级分类创建异常,请联系管理员"); |
| | | } |
| | | } |
| | | tagId = secTag.getId(); |
| | |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | throw new CoolException("新增物料信息异常,请联系管理员"); |
| | | } else { |
| | | log.info("同步新物料[商品编号:{}]", mat.getMatnr()); |
| | | } |
| | |
| | | ArrayList<LocDetl> locDetlArrayList = new ArrayList<>(); |
| | | Wrapper<LocDetl> wrapper = new EntityWrapper<LocDetl>() |
| | | .eq("matnr", param.getMatnr()) |
| | | .eq("weight", param.getWeight()) |
| | | .orderBy("batch", true); |
| | | if (param.getDevNo() == 536) { |
| | | .eq("weight", param.getWeight()); |
| | | if (param.getDevNo() == 536){ |
| | | wrapper.eq("model", param.getModel()) |
| | | .eq("specs", param.getOrderNo()); |
| | | .eq("specs", param.getOrderNo()) |
| | | .orderBy("appe_time", true); |
| | | } else { |
| | | wrapper.orderBy("batch", true); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(wrapper); |
| | |
| | | Wrapper<LocDetl> locDetlWrapper = new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()) |
| | | .lt("weight", param.getWeight() + mat.getUnits()) |
| | | .and() |
| | | .gt("weight", param.getWeight()) |
| | | .orderBy("batch", true) |
| | | .orderBy("weight", true); |
| | | .gt("weight", param.getWeight()); |
| | | if (param.getDevNo() == 536){ |
| | | locDetlWrapper.eq("model", param.getModel()) |
| | | .eq("specs", param.getOrderNo()); |
| | | .eq("specs", param.getOrderNo()) |
| | | .orderBy("appe_time", true) |
| | | .orderBy("weight", true); |
| | | } else { |
| | | locDetlWrapper |
| | | .orderBy("batch", true) |
| | | .orderBy("weight", true); |
| | | } |
| | | locDetls = locDetlService.selectList(locDetlWrapper); |
| | | if (locDetls.isEmpty()){ |
| | |
| | | Wrapper<LocDetl> locDetlWrapper = new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()) |
| | | .gt("weight", param.getWeight() - mat.getUnits()) |
| | | .and() |
| | | .lt("weight", param.getWeight()) |
| | | .orderBy("batch", true) |
| | | .orderBy("weight", false); |
| | | .lt("weight", param.getWeight()); |
| | | if (param.getDevNo() == 536){ |
| | | locDetlWrapper.eq("model", param.getModel()) |
| | | .eq("specs", param.getOrderNo()); |
| | | .eq("specs", param.getOrderNo()) |
| | | .orderBy("appe_time", true) |
| | | .orderBy("weight", false); |
| | | } else { |
| | | locDetlWrapper |
| | | .orderBy("batch", true) |
| | | .orderBy("weight", false); |
| | | } |
| | | locDetls = locDetlService.selectList(locDetlWrapper); |
| | | |