src/main/java/com/zy/asrs/controller/OrderController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/controller/OrderDetlController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/system/mapper/ConfigMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/system/service/ConfigService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/system/service/impl/ConfigServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/OrderController.java
@@ -14,6 +14,7 @@ import com.zy.asrs.service.*; import com.zy.common.model.DetlDto; import com.zy.common.web.BaseController; import com.zy.system.service.ConfigService; import lombok.Synchronized; import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -58,6 +59,8 @@ private AgvLocDetlService agvLocDetlService; @Autowired private FlowLogService flowLogService; @Autowired private ConfigService configService; @GetMapping("/doc/type/list") @Transactional @@ -231,7 +234,15 @@ if (o != null) { String[] split = o.toString().split(","); if (split[0].equals("39")) { wrapper.andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT).andNew().in("source", split); //wrapper.andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT).andNew().in("source", split); wrapper.in("source", split); List<String> m = configService.getMatCode(); wrapper.andNew(); if (!Cools.isEmpty(m)) { for (String s : m) { wrapper.like("matnr", s, SqlLike.RIGHT); } } } else { wrapper.in("source", split); } @@ -353,8 +364,18 @@ docIds.add(pakin.getDocId()); } } wrapper.notLike("matnr", "401", SqlLike.RIGHT).notLike("matnr", "402", SqlLike.RIGHT); //wrapper.notLike("matnr", "401", SqlLike.RIGHT).notLike("matnr", "402", SqlLike.RIGHT); //wrapper.in("source", docIds); wrapper.in("source", docIds); List<String> m = configService.getMatCode(); wrapper.andNew(); if (!Cools.isEmpty(m)) { for (String s : m) { wrapper.notLike("matnr", s, SqlLike.RIGHT); } } Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); for (OrderDetl record : page.getRecords()) { Double sumAnfme = agvLocDetlService.getSumAnfmeDb(record.getMatnr(), record.getThreeCode(), 1); @@ -443,7 +464,14 @@ Date now = new Date(); if (param.getDocType() == 33) { for (OrderDetl orderDetl : param.getOrderDetlList()) { if (orderDetl.getMatnr().startsWith("401") || orderDetl.getMatnr().startsWith("402")) { boolean flag = false; List<String> matCode = configService.getMatCode(); for (String s : matCode) { if (orderDetl.getMatnr().startsWith(s)) { flag = true; } } if (flag) { param.setOrderNo("DC" + param.getOrderNo()); break; } @@ -568,7 +596,14 @@ if (param.getDocType().intValue() == 32) { String ono = "DB"; for (OrderDetl orderDetl : param.getOrderDetlList()) { if (orderDetl.getMatnr().startsWith("401") || orderDetl.getMatnr().startsWith("402")) { boolean flag2 = false; List<String> matCode = configService.getMatCode(); for (String s : matCode) { if (orderDetl.getMatnr().startsWith(s)) { flag2 = true; } } if (flag2) { ono = "DC"; } } @@ -1203,7 +1238,14 @@ // 生成调拨单 if (docType.getDocId().intValue() == 32) { String dbUuid; if (!Cools.isEmpty(matnr) && (matnr.startsWith("401") || matnr.startsWith("402"))) { boolean flag3 = false; List<String> matCode = configService.getMatCode(); for (String s : matCode) { if (matnr.startsWith(s)) { flag3 = true; } } if (!Cools.isEmpty(matnr) && flag3) { dbUuid = "DC" + odNo; } else { dbUuid = "DB" + odNo; @@ -1474,7 +1516,14 @@ odNo += "_O"; } if (docName.contains("调拨单")) { if (!Cools.isEmpty(matnr) && (matnr.startsWith("401") || matnr.startsWith("402"))) { boolean flag6 = false; List<String> matCode = configService.getMatCode(); for (String s : matCode) { if (matnr.startsWith(s)) { flag6 = true; } } if (!Cools.isEmpty(matnr) && flag6) { odNo = "DC" + odNo; } else { odNo = "DB" + odNo; src/main/java/com/zy/asrs/controller/OrderDetlController.java
@@ -17,6 +17,7 @@ import com.zy.asrs.mapper.AgvWrkDetlMapper; import com.zy.asrs.service.*; import com.zy.common.web.BaseController; import com.zy.system.service.ConfigService; import lombok.Synchronized; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -44,6 +45,8 @@ @Autowired private AgvWrkDetlMapper agvWrkDetlMapper; @Autowired private ConfigService configService; @RequestMapping(value = "/orderDetl/{id}/auth") @ManagerAuth @@ -216,7 +219,14 @@ docIds.add(pakin.getDocId()); } } wrapper.andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT).andNew().in("source", docIds); wrapper.in("source", docIds); List<String> m = configService.getMatCode(); wrapper.andNew(); if (!Cools.isEmpty(m)) { for (String s : m) { wrapper.like("matnr", s, SqlLike.RIGHT); } } flag = true; } else { wrapper.in("source", split); src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java
@@ -11,12 +11,12 @@ import com.zy.asrs.entity.AgvLocDetl; import com.zy.asrs.entity.AgvLocMast; import com.zy.asrs.entity.AgvWrkDetl; import com.zy.asrs.entity.OrderDetl; import com.zy.asrs.mapper.AgvLocDetlMapper; import com.zy.asrs.service.*; import com.zy.asrs.utils.Utils; import com.zy.common.model.LocDto; import com.zy.common.model.TaskDto; import com.zy.system.service.ConfigService; import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.DataFormatter; @@ -52,6 +52,8 @@ private SnowflakeIdWorker snowflakeIdWorker; @Autowired private FlowLogService flowLogService; @Autowired private ConfigService configService; public void addLocDetlInfo(String locNo, int taskCode) { Date now = new Date(); @@ -108,7 +110,13 @@ if (type.equals(AsrsConstants.ERCHANG)) { wrapper.notLike("loc_no", "F3"); } else { if (matnr.startsWith("401") || matnr.startsWith("402")) { boolean flag = false; for (String s : configService.getMatCode()) { if (matnr.startsWith(s)) { flag = true; } } if (flag) { //wrapper.notLike("loc_no", "F3"); wrapper.notLike("loc_no", "F1"); } else { @@ -199,10 +207,10 @@ /* 更新库存明细 */ public void updateStock(String sourceLoc, String targetLoc,Long userId) { if (Cools.isEmpty(userId)){ public void updateStock(String sourceLoc, String targetLoc, Long userId) { if (Cools.isEmpty(userId)) { this.baseMapper.updateStock(sourceLoc, targetLoc); }else { } else { this.baseMapper.updateStock2(sourceLoc, targetLoc, userId); } } src/main/java/com/zy/system/mapper/ConfigMapper.java
@@ -3,10 +3,14 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; import com.zy.system.entity.Config; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @Mapper @Repository public interface ConfigMapper extends BaseMapper<Config> { @Select("select top 1 * from sys_config where code='MAT_CODE_31'") Config selectByCode(); } src/main/java/com/zy/system/service/ConfigService.java
@@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.service.IService; import com.zy.system.entity.Config; public interface ConfigService extends IService<Config> { import java.util.List; public interface ConfigService extends IService<Config> { List<String> getMatCode(); } src/main/java/com/zy/system/service/impl/ConfigServiceImpl.java
@@ -1,12 +1,24 @@ package com.zy.system.service.impl; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.core.common.Cools; import com.zy.system.entity.Config; import com.zy.system.mapper.ConfigMapper; import com.zy.system.service.ConfigService; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.List; @Service("configService") public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements ConfigService { @Override public List<String> getMatCode() { Config config = baseMapper.selectByCode(); if (Cools.isEmpty(config)) { return null; } String[] split = config.getValue().split(","); return Arrays.asList(split); } }