Commit ea793c9f zshaohui

1.UID出库 导出bug修改

2.扫码出库修改
3.获取空库位,13/15的料箱,可用料箱数修改
4.清空库位,增加物料日志
5.7寸卡控21盘,13/15 卡控500盘
1 个父辈 5d6064be
......@@ -300,7 +300,7 @@ public class StoragePosController {
if (saveDto.getId() == null) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"ID"});
}
if (saveDto.getPosName() == null) {
if (StringUtils.isEmpty(saveDto.getPosName())) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"ID"});
}
StoragePos pos = storagePosManager.get(saveDto.getId());
......@@ -600,7 +600,7 @@ public class StoragePosController {
@ApiOperation("根据条件查找出库")
@GetMapping("/out")
@AnonymousAccess
//@AnonymousAccess
public synchronized ResultBean storagePosFind(StoragePosFindCriteria criteria) {
//判断查询条件是否为空
String provider = criteria.getProvider();
......@@ -897,14 +897,24 @@ public class StoragePosController {
int count = 0;
List<Barcode> subCodeList = barcode.getSubCodeList();
if (subCodeList == null || subCodeList.isEmpty()){
List<Barcode> newSubCodeList = new ArrayList<>();
if (subCodeList != null && !subCodeList.isEmpty()){
for (Barcode subCode : subCodeList) {
if (!StringUtils.isEmpty(subCode.getPosName())){
newSubCodeList.add(subCode);
}
}
}
if (newSubCodeList == null || newSubCodeList.isEmpty()){
if ("C07".equals(barcode.getPartNumber())){
count = 6;
} else if ("C13".equals(barcode.getPartNumber()) || "C15".equals(barcode.getPartNumber())){
count = 3;
}
} else {
Map<String, List<Barcode>> posNameMap = subCodeList.stream().collect(Collectors.groupingBy(Barcode::getPosName));
Map<String, List<Barcode>> posNameMap = newSubCodeList.stream().collect(Collectors.groupingBy(Barcode::getPosName));
if ("C07".equals(barcode.getPartNumber())){
count = 6 - posNameMap.keySet().size();
} else if ("C13".equals(barcode.getPartNumber()) || "C15".equals(barcode.getPartNumber())){
......@@ -915,8 +925,8 @@ public class StoragePosController {
dataList.add(boxData);
//List<Barcode> subCodeList = barcode.getSubCodeList();
if (subCodeList != null && !subCodeList.isEmpty()){
for (Barcode subCode : subCodeList) {
if (newSubCodeList != null && !newSubCodeList.isEmpty()){
for (Barcode subCode : newSubCodeList) {
List<Object> data = new ArrayList<>();
data.add(subCode.getBarcode());
data.add(subCode.getLabelId());
......
......@@ -316,7 +316,7 @@ public class CtuDeviceController {
task.setStatus(statusStr);
if (OP_STATUS.EXECUTING.name().equals(statusStr) || OP_STATUS.WAIT.name().equals(statusStr)) {
taskService.updateQueueTask(task);
} else {
} else if (!OP_STATUS.FINISHED.name().equals(statusStr)){
taskService.moveTaskToFinished(task);
taskService.updateFinishedTask(task);
}
......@@ -477,8 +477,8 @@ public class CtuDeviceController {
//循环判断是否可用
List<DataLog> allTasks = taskService.getAllTasks();
//Map<String, String> binCodeCacheMap = BinCacheUtil.binCodeCacheMap("", "");
Map<String, String> binCodeCacheMap = new HashMap<>();
Map<String, String> binCodeCacheMap = BinCacheUtil.binCodeCacheMap("", "");
//Map<String, String> binCodeCacheMap = new HashMap<>();
for (StoragePos pos : storagePosList) {
Barcode barcode = pos.getBarcode();
......@@ -503,10 +503,10 @@ public class CtuDeviceController {
if ("C07".equals(barcode.getPartNumber())) {
count = 6 - posNameMap.keySet().size();
} else if ("C13".equals(barcode.getPartNumber()) || "C15".equals(barcode.getPartNumber())) {
count = 3 - posNameMap.keySet().size();
count = 1 - posNameMap.keySet().size();
}
}
if (count == 0) {
if (count <= 0) {
continue;
}
......
......@@ -7,11 +7,14 @@ import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.barcode.utils.CodeResolve;
import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.PickingIssueRequest;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -42,7 +45,7 @@ public class InventoryExpController {
@ApiOperation("清除smf库存")
@RequestMapping("/clearSmfInventory")
@AnonymousAccess
//@AnonymousAccess
public ResultBean clearSmfInventory(@RequestBody Map<String, String> paramMap) {
String codeStr = paramMap.get("codeStr");
log.info("清除smf库存,条码为:"+codeStr);
......@@ -63,7 +66,7 @@ public class InventoryExpController {
@ApiOperation("清除smf和wms库存")
@RequestMapping("/clearWmsInventory")
@AnonymousAccess
//@AnonymousAccess
public ResultBean clearWmsInventory(@RequestBody Map<String, String> paramMap) {
String codeStr = paramMap.get("codeStr");
log.info("清除smf和wms库存,条码为:"+codeStr);
......@@ -102,6 +105,9 @@ public class InventoryExpController {
log.info(barcode.getBarcode() + "所属料箱为空,直接清空库位");
}
}
BoxHandleUtil.manualGenerateTask(barcode, OP_STATUS.FINISHED.name(),barcode.getAmount(), OP.CHECKOUT,barcode.getOrderItemId(),SecurityUtils.getLoginUsername()+"手动清空库存");
barcode.setPosName("");
barcode.setOut(false);
barcode.setOrderId("");
......
......@@ -489,7 +489,7 @@ public class TicketSortingController {
barcode.setOut(false);
barcode = barcodeManager.save(barcode);
BoxHandleUtil.manualGenerateTask(barcode, OP_STATUS.CANCEL.name(), barcode.getAmount(), OP.CHECKOUT, orderItemId);
BoxHandleUtil.manualGenerateTask(barcode, OP_STATUS.CANCEL.name(), barcode.getAmount(), OP.CHECKOUT, orderItemId,"");
}
newSubCodeList.add(barcode);
......
......@@ -363,7 +363,7 @@ public class ManualGrPutInController {
barcode.setOut(false);
barcode = barcodeManager.save(barcode);
BoxHandleUtil.manualGenerateTask(barcode,OP_STATUS.CANCEL.name(),barcode.getAmount(),OP.CHECKOUT,orderItemId);
BoxHandleUtil.manualGenerateTask(barcode,OP_STATUS.CANCEL.name(),barcode.getAmount(),OP.CHECKOUT,orderItemId,"");
}
newSubCodeList.add(barcode);
......
......@@ -446,6 +446,26 @@ public class BinCacheUtil {
return "库别[" + reelBarcode.getWarehouseCode() + "]不可放入料格[" + binId + "]";
}
List<Barcode> subCodeList = boxBarcode.getSubCodeList();
//判断是否超过23盘
if (subCodeList != null) {
int hasReelCount = 0;
for (Barcode barcode : subCodeList) {
if (binId.equals(barcode.getPosName())) {
hasReelCount++;
}
}
if(binId.startsWith("C07")) {
if (hasReelCount >= 21) {
return "料格中[" + binId + "]的数量为:" + hasReelCount + ",大于等于21个,请选择其他料格";
}
} else {
if (hasReelCount >= 500) {
return "料格中[" + binId + "]的数量为:" + hasReelCount + ",大于等于500个,请选择其他料格";
}
}
}
if (subCodeList != null) {
for (Barcode barcode : subCodeList) {
if (binId.equals(barcode.getPosName())) {
......
......@@ -563,7 +563,7 @@ public class BoxHandleUtil {
}
public static DataLog manualGenerateTask(Barcode barcode, String opStatus, int opQty, int opType, String orderItemId) {
public static DataLog manualGenerateTask(Barcode barcode, String opStatus, int opQty, int opType, String orderItemId,String operator) {
//生成任务
DataLog task = new DataLog();
task.setStatus(opStatus);
......@@ -573,6 +573,9 @@ public class BoxHandleUtil {
task.setType(opType);
task.setPosName(barcode.getPosName());
task.setOperator(SecurityUtils.getLoginUsername());
if (StringUtils.isNotEmpty(operator)){
task.setOperator(operator);
}
task.setDateCode(barcode.getDateCode());
task.setBatchInfo(barcode.getBatch());
task.setProvider(barcode.getProvider());
......
......@@ -150,7 +150,7 @@ public class ManualLineController {
barcode.setOut(false);
barcode = barcodeManager.save(barcode);
BoxHandleUtil.manualGenerateTask(barcode, OP_STATUS.CANCEL.name(), barcode.getAmount(), OP.CHECKOUT, orderItemId);
BoxHandleUtil.manualGenerateTask(barcode, OP_STATUS.CANCEL.name(), barcode.getAmount(), OP.CHECKOUT, orderItemId,"");
}
newSubCodeList.add(barcode);
......
......@@ -84,6 +84,7 @@ public class MaterialRestController {
@RequestMapping("/removeStackerInfo")
@AnonymousAccess
public ResultBean removeStackerInfo(String stacker){
log.info("移除料串信息:"+stacker);
MaterialLocUtil.removeStacker(stacker);
return ResultBean.newOkResult("");
}
......
......@@ -2,19 +2,19 @@ package com.neotel.smfcore.custom.luxsan.factory_c.third.enums;
public enum MaterialLocEnum {
MATERIAL_STRING_STATION("料串工位", "1"),
DIVERSION_STATION("分流工位", "2"),
WAREHOUSE_IN_ROLLER_LINE_1("1号入库滚筒线", "3"),
WAREHOUSE_IN_ROLLER_LINE_2("2号入库滚筒线", "4"),
WAREHOUSE_OUT_ROLLER_LINE_1("1号出库滚筒线"," 5"),
WAREHOUSE_OUT_ROLLER_LINE_2("2号出库滚筒线", "6"),
W2_1F_CONFLUENCE_LINE("W2 1F汇流线", "7"),
W2_1F_LIFTING_WELL("W2 1F提升井", "8"),
W2_3F_CORRIDOR_ROLLER_LINE("W2 3F连廊滚筒线", "9"),
C2_3F_BG_ROLLER_LINE("C2 3F BG滚筒线", "10"),
C2_3F_CG_ROLLER_LINE("C2 3F CG滚筒线", "11"),
C2_3F_BG_FULL_MATERIAL_STRING_CACHE_LINE("C2 3F BG满料串缓存线", "12"),
C2_3F_CG_FULL_MATERIAL_STRING_CACHE_LINE("C2 3F CG满料串缓存线", "13");
MATERIAL_STRING_STATION("料串工位", "Material_Loading_Station"),
DIVERSION_STATION("分流工位", "Diverging_Station"),
WAREHOUSE_IN_ROLLER_LINE_1("1号入库滚筒线", "Inbound_Roller_Conveyor_1"),
WAREHOUSE_IN_ROLLER_LINE_2("2号入库滚筒线", "Inbound_Roller_Conveyor_2"),
WAREHOUSE_OUT_ROLLER_LINE_1("1号出库滚筒线","Outbound_Roller_Conveyor_1"),
WAREHOUSE_OUT_ROLLER_LINE_2("2号出库滚筒线", "Outbound_Roller_Conveyor_2"),
W2_1F_CONFLUENCE_LINE("W2 1F汇流线", "W2_1F_Convergence_Line"),
W2_1F_LIFTING_WELL("W2 1F提升井", "W2_1F_Elevator_Shaft"),
W2_3F_CORRIDOR_ROLLER_LINE("W2 3F连廊滚筒线", "W2_3F_Corridor_Roller_Conveyor"),
C2_3F_BG_ROLLER_LINE("C2 3F BG滚筒线", "C2_3F_BG_Roller_Conveyor"),
C2_3F_CG_ROLLER_LINE("C2 3F CG滚筒线", "C2_3F_CG_Roller_Conveyor"),
C2_3F_BG_FULL_MATERIAL_STRING_CACHE_LINE("C2 3F BG满料串缓存线", "C2_3F_BG_Full_Material_Buffer_Line"),
C2_3F_CG_FULL_MATERIAL_STRING_CACHE_LINE("C2 3F CG满料串缓存线", "C2_3F_CG_Full_Material_Buffer_Line");
private final String name;
private final String id;
......
......@@ -24,10 +24,6 @@ public class MaterialLocUtil {
private static DataCache dataCache;
public static void removeStacker(String stacker) {
stackerLocMap.remove(stacker);
dataCache.updateCache(CACHE_STACKER_LOC, stackerLocMap);
}
@PostConstruct
public void init() {
......@@ -55,7 +51,11 @@ public class MaterialLocUtil {
if (StringUtils.isNotEmpty(loc)) {
String name = MaterialLocEnum.findNameById(loc);
materialLoc.setLoc(loc);
if (StringUtils.isEmpty(name)){
materialLoc.setLocName(loc);
} else {
materialLoc.setLocName(name);
}
}
......@@ -80,4 +80,9 @@ public class MaterialLocUtil {
public static Collection<MaterialLoc> getAllStackerLoc() {
return stackerLocMap.values();
}
public static void removeStacker(String stacker) {
stackerLocMap.remove(stacker);
dataCache.updateCache(CACHE_STACKER_LOC, stackerLocMap);
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!