Commit 79066491 zshaohui

1.功能优化提交

1 个父辈 910d50a1
......@@ -196,14 +196,14 @@ public class DataInitManager {
addNewFunctionMenu(4, raw, "storageTransfer", "储位转移", "storageTransfer", "storageTransfer/index", "transfer", functionMenuMap);
//手动入库
addNewFunctionMenu(8, raw, "manualWarehous", "手动入库", "manualWarehous", "manualWarehous/index", "manualWa", functionMenuMap);
//addNewFunctionMenu(8, raw, "manualWarehous", "手动入库", "manualWarehous", "manualWarehous/index", "manualWa", functionMenuMap);
Menu doc = Menu.CreatePMenu("单据操作", 9, "doc", 1, "docOp", raw);
Menu doc = Menu.CreatePMenu("单据操作", 5, "doc", 1, "docOp", raw);
//931单据领料
addNewFunctionMenu(1, doc, "docMaterialRe", "单据领料", "docMaterialRe", "receipt/docMaterialRe/index", "docMaterial", functionMenuMap);
addNewFunctionMenu(1, doc, "docMaterialRe", "单据分配", "docMaterialRe", "receipt/docMaterialRe/index", "docMaterial", functionMenuMap);
//单据转库
addNewFunctionMenu(2, doc, "docTransferWarehous", "单据转库", "docTransferWarehous", "receipt/docTransferWarehous/index", "docTransfer", functionMenuMap);
......@@ -212,7 +212,7 @@ public class DataInitManager {
addNewFunctionMenu(3, doc, "docReturn", "单据退料", "docReturn", "receipt/docReturn/index", "docRe", functionMenuMap);
//手动出库
addNewFunctionMenu(4, doc,"outVir","手动出库","outVir","outVir/index","docOut",functionMenuMap);
addNewFunctionMenu(6, raw,"outVir","手动出库","outVir","outVir/index","docOut",functionMenuMap);
//addNewFunctionMenu(132,null,"outPage","线外入库","outPage","outers/outPage/index","index",functionMenuMap);
......
......@@ -35,6 +35,8 @@ import com.neotel.smfcore.custom.lizhen.innerBox.bean.StorageExport;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil;
import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.TaskCurrentLoc;
import com.neotel.smfcore.custom.luxsan.factory_c.util.CacheNameUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -1068,6 +1070,12 @@ public class LiteOrderCache {
task.setType(OP.CHECKOUT);
task.setCreator(SecurityUtils.getCurrentUsername());
task.setStatus(OP_STATUS.WAIT.name());
//判断是去人工出料口,还是机器
if (LiteorderCheckType.TICKET_CHECKOUT == liteOrder.getCheckType()){
task.setLoc(TaskCurrentLoc.Manual_FeedingInlet);
}
try {
taskService.addTaskToExecute(task);
} catch (Exception e) {
......@@ -1355,208 +1363,4 @@ public class LiteOrderCache {
log.info("生成工单" + orderNo + "任务结束,数量为:" + taskReelCount);
}
public synchronized String rawTicketCheckOut(String orderNo, boolean outBom, List<String> orderItemIds) {
//1.判断工单是否存在
LiteOrder liteOrder = liteOrderMap.get(orderNo);
if (liteOrder == null) {
liteOrder = liteOrderManager.findByOrderNo(orderNo);
}
if (liteOrder == null) {
return "smfcore.order.out.notFound";
}
//2.判断工单状态是否正常
if (liteOrder.isClosed()) {
return "smfcore.order.hasClose";
}
if (!liteOrder.isTaskFinished() && !liteOrder.isNew()) {
return "smfcore.order.out.executing";
}
List<String> storageIdList = new ArrayList<>();
for (Storage storage : dataCache.getAllStorage().values()) {
storageIdList.add(storage.getId());
}
//3.设置工单其他信息
liteOrder.setStartDate(new Date());
liteOrder.setTaskReelCount(0);
liteOrder.setTaskFinishedTime(-1);
liteOrder.setFinishedReelCount(0);
liteOrder.setStatus(LITEORDER_STATUS.TAILS);
liteOrderMap.put(liteOrder.getOrderNo(), liteOrder);
//4.获取partNumber所在的库位信息
//List<String> partNumberList = liteOrder.getOrderItems().stream().map(item -> item.getPn()).collect(Collectors.toList());
//5.开始处理工单详情
List<StoragePos> needOutPosList = new ArrayList<>();
int orderTaskReelCount = 0;
for (LiteOrderItem orderItem : liteOrder.getOrderItems()) {
List<StoragePos> allStoragePosList = new ArrayList<>();
//6.排除的仓位信息
Collection excludeIdList = excludeOutPosIds();
//7.判断是否指定的itemId
if (orderItemIds != null && !orderItemIds.isEmpty()) {
if (!orderItemIds.contains(orderItem.getId())) {
continue;
}
}
//8.设置出库数量和出库盘数(超发和不超发)
int outReelCount = 0;
int outNumCount = 0;
if (liteOrder.isExcess()) {
if (orderItem.getOutNum() >= orderItem.getNeedNum() && orderItem.getOutReelCount() >= orderItem.getNeedReelCount()) {
continue;
}
outNumCount = orderItem.getOutNum();
outReelCount = orderItem.getOutReelCount();
}
//如果不是超发,则满足其中一个即可
else {
if (orderItem.getTotalOutNum() >= orderItem.getNeedNum() && orderItem.getTotalOutReelCount() >= orderItem.getNeedReelCount()) {
continue;
}
outNumCount = orderItem.getTotalOutNum();
outReelCount = orderItem.getTotalOutReelCount();
}
//9.开始挑料
while (outReelCount < orderItem.getNeedReelCount() || outNumCount < orderItem.getNeedNum()) {
//根据查询条件,查找新的库位
boolean hasOutReel = false;
String warehouseCode = orderItem.getWarehouseCode(); //厂别
String brand = orderItem.getBrand(); //供应商
String pn = orderItem.getPn(); //料号
StoragePos pos = storagePosManager.findPartNumberInStorages(storageIdList, pn, excludeIdList, dataCache.getCheckOutType(), warehouseCode, brand, true);
if (pos == null) {
if (allStoragePosList == null || allStoragePosList.isEmpty()) {
allStoragePosList = storagePosManager.findStoragePosByPartNumber(Arrays.asList(orderItem.getPn()));
}
pos = getStoragePosByPartNumberAndBrand(allStoragePosList, pn, excludeIdList);
}
if (pos == null) {
log.info(orderItem.getOrderId() + "厂商:" + warehouseCode + ",供应商:" + brand + ",料号:" + pn + "未找到存在库位,跳过");
break;
}
Barcode barcode = pos.getBarcode();
List<Barcode> subCodeList = barcode.getSubCodeList();
//进行排序
subCodeList = subCodeList.stream().sorted(Comparator.comparing(Barcode::getCreateDate)).collect(Collectors.toList());
subCodeList = subCodeList.stream().sorted(Comparator.comparing(Barcode::getAmount)).collect(Collectors.toList());
List<String> subCodeIds = new ArrayList<>();
for (Barcode subCode : subCodeList) {
if (outReelCount >= orderItem.getNeedReelCount() && outNumCount >= orderItem.getNeedNum()) {
break;
}
if (subCode.isOut()) {
continue;
}
//判断厂别
if (StringUtils.isNotBlank(warehouseCode)) {
if (!warehouseCode.equals(subCode.getWarehouseCode())) {
continue;
}
}
//判断供应商
if (StringUtils.isNotBlank(brand)) {
if (!brand.equals(subCode.getProvider())) {
continue;
}
}
//判断料号
if (StringUtils.isNotBlank(pn)) {
if (!pn.equals(subCode.getPartNumber())) {
continue;
}
}
subCode.setOut(true);
subCode.setOrderItemId(orderItem.getId());
barcode.UpdateSubCode(subCode);
subCodeIds.add(subCode.getId());
orderTaskReelCount++;
hasOutReel = true;
//判断是否超发,如果超发,先判断是否满足数量.再判断是否满足卷数
if (liteOrder.isExcess()) {
if (outNumCount >= orderItem.getNeedNum()) {
outReelCount++;
} else {
outNumCount = outNumCount + subCode.getAmount();
}
}
//如果不是超发订单,
else {
outReelCount++;
outNumCount = outNumCount + subCode.getAmount();
}
}
if (subCodeIds != null && !subCodeIds.isEmpty()) {
Query query = new Query(Criteria.where("id").in(subCodeIds));
Update update = new Update().set("isOut", true).set("orderItemId", orderItem.getId());
barcodeManager.updateBarcode(query, update);
}
barcodeManager.save(barcode);
log.info("保存barcode时间结束");
excludeIdList.add(pos.getId());
if (hasOutReel) {
needOutPosList.add(pos);
pos.setBarcode(barcode);
storagePosManager.save(pos);
}
}
}
if (needOutPosList != null && !needOutPosList.isEmpty()) {
log.info("开始生成料箱出库任务");
for (StoragePos pos : needOutPosList) {
Barcode barcode = pos.getBarcode();
log.info("barcode:" + barcode.getBarcode() + ",状态为:" + barcode.getStatus());
if (barcode.getStatus() == BARCODE_STATUS.IN_STORE) {
Storage storage = dataCache.getStorageById(pos.getStorageId());
log.info(pos.getPosName() + "出库,料箱号为:" + barcode.getBarcode());
DataLog task = new DataLog(storage, barcode, pos);
task.setSourceId(liteOrder.getId());
task.setSourceName(liteOrder.getOrderNo());
task.setSubSourceId(barcode.getLockName());
task.setSubSourceInfo(barcode.getLockName());
task.setType(OP.CHECKOUT);
task.setCreator(SecurityUtils.getCurrentUsername());
task.setStatus(OP_STATUS.WAIT.name());
try {
taskService.addTaskToExecute(task);
} catch (Exception e) {
e.getMessage();
}
}
}
}
liteOrder.setTaskReelCount(orderTaskReelCount);
liteOrder.setTotalTaskReelCount(liteOrder.getTotalTaskReelCount() + orderTaskReelCount);
liteOrder.setEndDate(new Date());
log.info("工单[" + orderNo + "]任务分配结束,任务数[" + orderTaskReelCount + "]");
smfApi.onOrderStatusChange(liteOrder);
if (orderTaskReelCount <= 0) {
finishedOrderTasks(liteOrder);
}
liteOrderManager.save(liteOrder);
liteOrderMap.put(liteOrder.getOrderNo(), liteOrder);
if (orderTaskReelCount <= 0) {
return "smfcore.order.out.noTask";
}
return "";
}
}
......@@ -379,6 +379,9 @@ public class DataLog extends BasePo implements Serializable {
private boolean callEmptyBox = false;
//任务优先级
private int priority = 0;
public String getBarcode() {
if(barcode == null){
......
......@@ -820,71 +820,73 @@ public class OutLineController {
List<Integer> partition1 = new ArrayList<>();
partition1.add(getCountByPartition(needOutCountMap, boxStr + "-01"));
partition1.add(getCountByPartition(allCountMap, boxStr + "-01"));
partition1.add(1);
List<Integer> partition2 = new ArrayList<>();
partition2.add(getCountByPartition(needOutCountMap, boxStr + "-02"));
partition2.add(getCountByPartition(allCountMap, boxStr + "-02"));
partition2.add(2);
List<Integer> partition3 = new ArrayList<>();
partition3.add(getCountByPartition(needOutCountMap, boxStr + "-03"));
partition3.add(getCountByPartition(allCountMap, boxStr + "-03"));
partition3.add(3);
List<Integer> partition4 = new ArrayList<>();
partition4.add(getCountByPartition(needOutCountMap, boxStr + "-04"));
partition4.add(getCountByPartition(allCountMap, boxStr + "-04"));
partition4.add(4);
List<Integer> partition5 = new ArrayList<>();
partition5.add(getCountByPartition(needOutCountMap, boxStr + "-05"));
partition5.add(getCountByPartition(allCountMap, boxStr + "-05"));
partition5.add(5);
List<Integer> partition6 = new ArrayList<>();
partition6.add(getCountByPartition(needOutCountMap, boxStr + "-06"));
partition6.add(getCountByPartition(allCountMap, boxStr + "-06"));
List<Integer> partition7 = new ArrayList<>();
partition7.add(getCountByPartition(needOutCountMap, boxStr + "-07"));
partition7.add(getCountByPartition(allCountMap, boxStr + "-07"));
List<Integer> partition8 = new ArrayList<>();
partition8.add(getCountByPartition(needOutCountMap, boxStr + "-08"));
partition8.add(getCountByPartition(allCountMap, boxStr + "-08"));
partition6.add(6);
//根据箱子面展示不同的隔扣
if (boxStr.startsWith("C07")) {
platsize = "7";
if ("A".equals(endStr)) {
boxPartitionCounts.add(partition8);
boxPartitionCounts.add(partition7);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition4);
boxPartitionCounts.add(partition6);
boxPartitionCounts.add(partition5);
boxPartitionCounts.add(partition1);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition4);
boxPartitionCounts.add(partition5);
} else {
boxPartitionCounts.add(partition4);
boxPartitionCounts.add(partition5);
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition1);
boxPartitionCounts.add(partition5);
boxPartitionCounts.add(partition6);
boxPartitionCounts.add(partition7);
boxPartitionCounts.add(partition8);
boxPartitionCounts.add(partition4);
boxPartitionCounts.add(partition2);
}
} else if (boxStr.startsWith("C13")) {
platsize = "13";
if ("A".equals(endStr)) {
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition1);
} else {
boxPartitionCounts.add(partition1);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition3);
} else {
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition1);
}
} else if (boxStr.startsWith("C15")) {
platsize = "15";
if ("A".equals(endStr)) {
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition1);
} else {
boxPartitionCounts.add(partition1);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition3);
} else {
boxPartitionCounts.add(partition3);
boxPartitionCounts.add(partition2);
boxPartitionCounts.add(partition1);
}
}
boxAllCount = boxAllCountMap.get(boxStr) == null ? 0 : boxAllCountMap.get(boxStr);
......
......@@ -859,7 +859,7 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
public static void binMove(BinMoveRequest request) {
public static BinMoveResult binMove(BinMoveRequest request) {
log.info("binMoveUrl接口请求参数为:" + JSON.toJSONString(request));
try {
String resultStr = HttpHelper.postJson(binMoveUrl, request);
......@@ -869,10 +869,14 @@ public class LuxsanApi extends DefaultSmfApiListener {
if (LuxsanApiEnum.ERROR.equals(apiResult.getMSGTY())) {
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()});
}
if (apiResult.getDATA() != null) {
return JSONObject.parseObject(apiResult.getDATA(), BinMoveResult.class);
}
} catch (ApiException e) {
e.printStackTrace();
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
}
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{"储位移转失败"});
}
......@@ -966,6 +970,46 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
}
public static TicketMoveResult ticketMove(TicketMoveRequest request) {
log.info("ticketMove接口请求参数为:" + JSON.toJSONString(request));
try {
String resultStr = HttpHelper.postJson(ticketMoveUrl, request);
log.info("ticketMove接口返回为:" + resultStr);
LuxsanApiResult apiResult = JSONObject.parseObject(resultStr, LuxsanApiResult.class);
if (LuxsanApiEnum.ERROR.equals(apiResult.getMSGTY())) {
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()});
}
TicketMoveResult result = JSONObject.parseObject(apiResult.getDATA(), TicketMoveResult.class);
return result;
} catch (ApiException e) {
e.printStackTrace();
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
}
}
public static TicketUpResult ticketUp(TicketUpRequest request) {
log.info("ticketUp接口请求参数为:" + JSON.toJSONString(request));
try {
String resultStr = HttpHelper.postJson(ticketUpUrl, request);
log.info("ticketUp接口返回为:" + resultStr);
LuxsanApiResult apiResult = JSONObject.parseObject(resultStr, LuxsanApiResult.class);
if (LuxsanApiEnum.ERROR.equals(apiResult.getMSGTY())) {
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()});
}
TicketUpResult result = JSONObject.parseObject(apiResult.getDATA(), TicketUpResult.class);
return result;
} catch (ApiException e) {
e.printStackTrace();
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
}
}
@Override
public void outTaskStatusChange(String outNotifyUrl, DataLog task) {
......@@ -1232,4 +1276,19 @@ public class LuxsanApi extends DefaultSmfApiListener {
public void setCancelOdnUrl(String url){
LuxsanApi.cancelOdnUrl = url;
}
public static String ticketMoveUrl;
@Value("${api.ticketMove}")
public void setTicketMoveUrl(String url){
LuxsanApi.ticketMoveUrl = url;
}
//ticketUp
public static String ticketUpUrl;
@Value("${api.ticketUp}")
public void setTicketUpUrl(String url){
LuxsanApi.ticketUpUrl = url;
}
}
package com.neotel.smfcore.custom.luxsan.api.bean.request;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
@Api(tags = "自动仓内单据转库")
@Data
@AllArgsConstructor
public class TicketMoveRequest {
// 厂区
private String PLANT_CODE;
// 单据号
private String TICKET_CODE;
// 单据行
private String TICKET_ITEM;
// 储位号
private String BIN_CODE;
// 料卷行
private List<String> REEL_LIST;
}
package com.neotel.smfcore.custom.luxsan.api.bean.request;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
@Data
@AllArgsConstructor
public class TicketUpRequest {
private String PLANT_CODE;
private String TICKET_CODE;
private String TICKET_ITEM;
private String BIN_CODE;
private List<String> REEL_LIST;
}
package com.neotel.smfcore.custom.luxsan.api.bean.result;
import lombok.Data;
@Data
public class TicketMoveResult {
}
package com.neotel.smfcore.custom.luxsan.api.bean.result;
import lombok.Data;
@Data
public class TicketUpResult {
}
package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.controller;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson.JSON;
import com.neotel.smfcore.common.bean.ReelLockPosInfo;
import com.neotel.smfcore.common.bean.ResultBean;
......@@ -26,9 +27,12 @@ import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.NewLabelToCellRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.PickingIssueRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.*;
import com.neotel.smfcore.custom.luxsan.api.bean.result.BinMoveResult;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.BindGrInfo;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.StorTransfer;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketReturn;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.TicketTransfer;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.CtuTask;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto.ValidBin;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType;
......@@ -185,6 +189,8 @@ public class CDeviceController {
if(boxBarcode != null){
//判断隔口是否可以放入
if (BinCacheUtil.canPutInBinCode(binCodeStr, warhouseCode)) {
//绑定gr
if (MaterialUtil.bindGr(materialStr)){
BindGrInfo bindGrInfo = MaterialUtil.getBindGrInfo(materialStr);
LuxsanApi.newLabelToCell(new NewLabelToCellRequest(
......@@ -197,6 +203,29 @@ public class CDeviceController {
Date grDate = DateUtil.getNoTimeDate(bindGrInfo.getGrDate());
barcode.setProduceDate(grDate);
}
//储位移转
else if (MaterialUtil.storTransfer(materialStr)){
BinMoveResult binMoveResult = LuxsanApi.binMove(new BinMoveRequest(CommonUtil.plantCode, binCodeStr, Arrays.asList(barcode.getBarcode()), barcode.getAmount()));
if (StringUtils.isNotEmpty(binMoveResult.getGR_DATE())){
Date grDate = DateUtil.getNoTimeDate(binMoveResult.getGR_DATE());
barcode.setProduceDate(grDate);
}
}
//单据转库
else if (MaterialUtil.ticketTransfer(materialStr)){
TicketTransfer transfer = MaterialUtil.getTicketTransferInfo(materialStr);
LuxsanApi.ticketMove(new TicketMoveRequest(CommonUtil.plantCode,transfer.getTicket(),transfer.getTicketItem(),binCodeStr,Arrays.asList(barcode.getBarcode())));
}
//单据退库上架
else if (MaterialUtil.ticketReturn(materialStr)){
TicketReturn ticketReturn = MaterialUtil.getTicketReturnInfo(materialStr);
LuxsanApi.ticketUp(new TicketUpRequest(CommonUtil.plantCode,ticketReturn.getTicket(),ticketReturn.getTicketItem(),binCodeStr,Arrays.asList(barcode.getBarcode())));
}
barcode.setPosName(binCodeStr);
barcode.setWarehouseCode(warhouseCode);
barcode.setBarSource(soucre);
......@@ -536,21 +565,49 @@ public class CDeviceController {
String stackerId = paramMap.get("stackerId");
String binListStr = paramMap.get("binList");
String source = paramMap.get("source");
String needBinCodeStr = paramMap.get("needBinCodeStr");
List<String> validBinList = new ArrayList<String>();
log.info("入料机构获取料串[" + stackerId + "]的可用料格[" + binListStr + "],入料机构为[" + source + "]");
log.info("入料机构获取料串[" + stackerId + "]的可用料格[" + binListStr + "],入料机构为[" + source + "],需要的料格信息为:"+needBinCodeStr);
if (MaterialUtil.bindInfo(stackerId)) {
return ResultBean.newErrorResult(-1, "error.nobind", "料串[" + stackerId + "]未绑定任何信息");
}
String partNumber = "";
String provider = "";
String dateStr = "";
BindGrInfo bindGrInfo = MaterialUtil.getBindGrInfo(stackerId);
if (bindGrInfo == null) {
return ResultBean.newErrorResult(-1, "error.nobind", "料串[" + stackerId + "]未绑定GR");
if (MaterialUtil.storTransfer(stackerId)) {
StorTransfer storTransfer = MaterialUtil.getStorTransferInfo(stackerId);
partNumber = storTransfer.getMaterialStr();
provider = storTransfer.getProvider();
} else if (MaterialUtil.ticketTransfer(stackerId)){
TicketTransfer ticketTransfer = MaterialUtil.getTicketTransferInfo(stackerId);
partNumber = ticketTransfer.getPn();
provider = ticketTransfer.getProvider();
} else if (MaterialUtil.ticketReturn(stackerId)){
TicketReturn ticketReturn = MaterialUtil.getTicketReturnInfo(stackerId);
partNumber = ticketReturn.getPn();
provider = ticketReturn.getProvider();
} else if (MaterialUtil.bindGr(stackerId)){
BindGrInfo bindGrInfo = MaterialUtil.getBindGrInfo(stackerId);
partNumber = bindGrInfo.getMaterialCode();
provider = bindGrInfo.getBrand();
dateStr = bindGrInfo.getGrDate();
}
Barcode stackerBarcode = new Barcode();
stackerBarcode.setBarcode(stackerId);
stackerBarcode.setPartNumber(bindGrInfo.getMaterialCode());
stackerBarcode.setProvider(bindGrInfo.getBrand());
stackerBarcode.setPartNumber(partNumber);
stackerBarcode.setProvider(provider);
//将GR日期设置为生产日期
Date grDate = DateUtil.getNoTimeDate(bindGrInfo.getGrDate());
stackerBarcode.setProduceDate(grDate);
if (StringUtils.isNotBlank(dateStr)) {
Date grDate = DateUtil.getNoTimeDate(dateStr);
stackerBarcode.setProduceDate(grDate);
}
String warhouseCode = MaterialUtil.getWarhouseCode(stackerId);
stackerBarcode.setWarehouseCode(warhouseCode);
......@@ -574,7 +631,7 @@ public class CDeviceController {
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("validBinList",validBinList);*/
ValidBin validBin = BinCacheUtil.validBin(stackerBarcode, source, binListStr);
ValidBin validBin = BinCacheUtil.validBin(stackerBarcode, source, binListStr,needBinCodeStr);
if (validBin == null){
return ResultBean.newErrorResult(-1,"",stackerId+"未找到可用料箱");
}
......@@ -588,7 +645,7 @@ public class CDeviceController {
public ResultBean callEmptyBox(String size, String outLet, String wareHouseCode) {
log.info("开始呼叫空箱,尺寸为:" + size + ",出口位置为:" + outLet);
StoragePos storagePos = BoxHandleUtil.callEmptyBox(size, outLet, wareHouseCode);
StoragePos storagePos = BoxHandleUtil.callEmptyBox(size, outLet, wareHouseCode,new ArrayList<>());
if (storagePos == null) {
return ResultBean.newErrorResult(-1, "", "未找到可用料箱");
}
......
......@@ -157,4 +157,10 @@ api:
binMove: http://10.68.30.22:8082/api/mlb/BinMove
#砍单回库
shipCancelUpshelf: http://10.68.30.22:8082/api/mlb/ShipCancelUpshelf
\ No newline at end of file
shipCancelUpshelf: http://10.68.30.22:8082/api/mlb/ShipCancelUpshelf
#单据退库上架
ticketUp: http://10.68.30.22:8082/api/mlb/TicketUp
#自动仓内单据转库
ticketMove: http://10.42.220.171:8082/api/mlb/TicketMove
\ No newline at end of file
......@@ -157,4 +157,10 @@ api:
binMove: http://10.42.220.171:8082/api/mlb/BinMove
#砍单回库
shipCancelUpshelf: http://10.42.220.171:8082/api/mlb/ShipCancelUpshelf
\ No newline at end of file
shipCancelUpshelf: http://10.42.220.171:8082/api/mlb/ShipCancelUpshelf
#单据退库上架
ticketUp: http://10.42.220.171:8082/api/mlb/TicketUp
#自动仓内单据转库
ticketMove: http://10.42.220.171:8082/api/mlb/TicketMove
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!