Commit d3a2e4cb zshaohui

优化提交

1 个父辈 51dcbdc6
...@@ -35,9 +35,14 @@ import com.neotel.smfcore.custom.lizhen.innerBox.bean.StorageExport; ...@@ -35,9 +35,14 @@ 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.enums.ExtendType;
import com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil; import com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil;
import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi; import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.FetchHoldInfoRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchHoldInfoResult;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.DisableBarcodeUtil; import com.neotel.smfcore.custom.luxsan.factory_c.common.util.DisableBarcodeUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.enums.LiteorderCheckType; 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.rawstor.enums.TaskCurrentLoc;
import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
...@@ -1208,7 +1213,7 @@ public class LiteOrderCache { ...@@ -1208,7 +1213,7 @@ public class LiteOrderCache {
} }
public synchronized void wipTicketOut(String orderNo) { public synchronized void wipTicketOut(String orderNo,boolean isHold) {
LiteOrder cacheOrder = liteOrderMap.get(orderNo); LiteOrder cacheOrder = liteOrderMap.get(orderNo);
if (cacheOrder == null) { if (cacheOrder == null) {
cacheOrder = liteOrderManager.findByOrderNo(orderNo); cacheOrder = liteOrderManager.findByOrderNo(orderNo);
...@@ -1228,6 +1233,7 @@ public class LiteOrderCache { ...@@ -1228,6 +1233,7 @@ public class LiteOrderCache {
throw new ValidateException("smfcore.order.out.executing", "工单正在执行"); throw new ValidateException("smfcore.order.out.executing", "工单正在执行");
} }
log.info("开始执行工单:" + orderNo); log.info("开始执行工单:" + orderNo);
cacheOrder.setTaskReelCount(0); cacheOrder.setTaskReelCount(0);
cacheOrder.setFinishedReelCount(0); cacheOrder.setFinishedReelCount(0);
...@@ -1241,6 +1247,29 @@ public class LiteOrderCache { ...@@ -1241,6 +1247,29 @@ public class LiteOrderCache {
int taskReelCount = 0; int taskReelCount = 0;
//如果是hold的,判断有没有符合的条件
List<StoragePos> storagePosList = new ArrayList<>();
if (isHold) {
for (LiteOrderItem orderItem : cacheOrder.getOrderItems()) {
List<FetchHoldInfoResult> resultList = LuxsanApi.fetchHoldInfo(new FetchHoldInfoRequest(CommonUtil.plantCode, orderItem.getSrcWarehouse(), orderItem.getPn()));
if (resultList != null && !resultList.isEmpty()) {
List<String> palletIdList = resultList.stream().map(FetchHoldInfoResult::getPALLET_ID).collect(Collectors.toList());
List<Criteria> orCriterialList = Lists.newArrayList();
orCriterialList.add(Criteria.where("barcode.barcode").in(palletIdList));
orCriterialList.add(Criteria.where("barcode.palletId").is(palletIdList));
Criteria c = new Criteria().orOperator(orCriterialList);
List<StoragePos> posList = storagePosManager.findByQuery(new Query(c));
if (posList != null && !posList.isEmpty()){
for (StoragePos pos : posList) {
storagePosList.add(pos);
}
}
}
}
}
for (LiteOrderItem orderItem : cacheOrder.getOrderItems()) { for (LiteOrderItem orderItem : cacheOrder.getOrderItems()) {
String partNumber = orderItem.getPn(); String partNumber = orderItem.getPn();
...@@ -1252,7 +1281,27 @@ public class LiteOrderCache { ...@@ -1252,7 +1281,27 @@ public class LiteOrderCache {
while (taskNum < remainNum) { while (taskNum < remainNum) {
log.info("当前分配的数量为:"+taskNum+",剩余数量为:"+remainNum); log.info("当前分配的数量为:"+taskNum+",剩余数量为:"+remainNum);
Collection<String> excludePosIds = excludeOutPosIds(); Collection<String> excludePosIds = excludeOutPosIds();
StoragePos pos = storagePosManager.findPartNumberInStorages(storageIdList, partNumber, excludePosIds, checkoutType, orderItem.getBrand());
//1.先从执行的料箱中出库
StoragePos pos = null;
String loc = TaskLocUtil.MW;
if (isHold) {
if (storagePosList != null && !storagePosList.isEmpty()) {
for (StoragePos storagePos : storagePosList) {
if (excludePosIds.contains(storagePos.getId())) {
continue;
}
if (partNumber.equals(storagePos.getBarcode().getPartNumber())) {
if (orderItem.getSrcWarehouse().equals(storagePos.getBarcode().getWarehouseCode())) {
pos = storagePos;
break;
}
}
}
}
} else {
pos = storagePosManager.findPartNumberInStorages(storageIdList, partNumber, excludePosIds, checkoutType, orderItem.getBrand(),orderItem.getSrcWarehouse());
}
if (pos == null) { if (pos == null) {
break; break;
} else { } else {
...@@ -1267,6 +1316,7 @@ public class LiteOrderCache { ...@@ -1267,6 +1316,7 @@ public class LiteOrderCache {
task.setSubSourceInfo(orderItem.getFeederInfo()); task.setSubSourceInfo(orderItem.getFeederInfo());
task.setType(OP.CHECKOUT); task.setType(OP.CHECKOUT);
task.setStatus(OP_STATUS.WAIT.name()); task.setStatus(OP_STATUS.WAIT.name());
task.setLoc(loc);
taskService.addTaskToExecute(task); taskService.addTaskToExecute(task);
} }
} }
......
...@@ -90,4 +90,7 @@ public class StoragePosDto implements Serializable { ...@@ -90,4 +90,7 @@ public class StoragePosDto implements Serializable {
@ApiModelProperty("禁用信息") @ApiModelProperty("禁用信息")
private String msg; private String msg;
@ApiModelProperty("库别")
private String wareHouseCode;
} }
...@@ -17,6 +17,8 @@ import com.neotel.smfcore.core.device.enums.OP; ...@@ -17,6 +17,8 @@ import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS; import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.order.service.manager.ILiteOrderItemManager; import com.neotel.smfcore.core.order.service.manager.ILiteOrderItemManager;
import com.neotel.smfcore.core.order.service.manager.ILiteOrderManager;
import com.neotel.smfcore.core.order.service.po.LiteOrder;
import com.neotel.smfcore.core.order.service.po.LiteOrderItem; import com.neotel.smfcore.core.order.service.po.LiteOrderItem;
import com.neotel.smfcore.core.storage.enums.DeviceType; import com.neotel.smfcore.core.storage.enums.DeviceType;
import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager; import com.neotel.smfcore.core.storage.service.manager.IStoragePosManager;
...@@ -28,6 +30,13 @@ import com.neotel.smfcore.custom.lizhen.LizhenApi; ...@@ -28,6 +30,13 @@ import com.neotel.smfcore.custom.lizhen.LizhenApi;
import com.neotel.smfcore.custom.lizhen.agvBox.enums.INOUT_TYPE; import com.neotel.smfcore.custom.lizhen.agvBox.enums.INOUT_TYPE;
import com.neotel.smfcore.custom.lizhen.agvBox.util.BoxUtil; import com.neotel.smfcore.custom.lizhen.agvBox.util.BoxUtil;
import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType; import com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.custom.luxsan.api.bean.request.PickingIssueRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.TicketPickLabelList;
import com.neotel.smfcore.custom.luxsan.api.bean.request.TicketPickRequest;
import com.neotel.smfcore.custom.luxsan.api.bean.request.TicketPostRequest;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil;
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.rawstor.enums.TaskCurrentLoc;
import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil; import com.neotel.smfcore.custom.luxsan.factory_c.rawstor.util.BoxHandleUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess; import com.neotel.smfcore.security.annotation.AnonymousAccess;
...@@ -73,6 +82,9 @@ public class OutLineController { ...@@ -73,6 +82,9 @@ public class OutLineController {
@Autowired @Autowired
private LizhenApi lizhenApi; private LizhenApi lizhenApi;
@Autowired
private ILiteOrderManager liteOrderManager;
/* /*
* key为工位信息,value为上一个隔口信息 * key为工位信息,value为上一个隔口信息
...@@ -382,6 +394,9 @@ public class OutLineController { ...@@ -382,6 +394,9 @@ public class OutLineController {
for (int index = 0; index < subCodes.size(); ) { for (int index = 0; index < subCodes.size(); ) {
Barcode subCode = subCodes.get(index); Barcode subCode = subCodes.get(index);
//manualCheckOut(subCode);
//生成任务 //生成任务
String orderItemId = subCode.getOrderItemId(); String orderItemId = subCode.getOrderItemId();
int amount = subCode.getAmount(); int amount = subCode.getAmount();
...@@ -441,6 +456,9 @@ public class OutLineController { ...@@ -441,6 +456,9 @@ public class OutLineController {
for (int index = 0; index < needOutBarcodes.size(); index++) { for (int index = 0; index < needOutBarcodes.size(); index++) {
Barcode subCode = needOutBarcodes.get(index); Barcode subCode = needOutBarcodes.get(index);
//manualCheckOut(subCode);
String orderItemId = subCode.getOrderItemId(); String orderItemId = subCode.getOrderItemId();
int amount = subCode.getAmount(); int amount = subCode.getAmount();
subCode.setAmount(0); subCode.setAmount(0);
...@@ -509,6 +527,9 @@ public class OutLineController { ...@@ -509,6 +527,9 @@ public class OutLineController {
//判断当前隔口是否有要出的任务 //判断当前隔口是否有要出的任务
boolean isOut = false; boolean isOut = false;
if (barcode.isOut()) { if (barcode.isOut()) {
//manualCheckOut(barcode);
isOut = true; isOut = true;
String orderItemId = barcode.getOrderItemId(); String orderItemId = barcode.getOrderItemId();
int amount = barcode.getAmount(); int amount = barcode.getAmount();
...@@ -547,11 +568,11 @@ public class OutLineController { ...@@ -547,11 +568,11 @@ public class OutLineController {
} }
} }
if (barcodeByOut != null) { if (barcodeByOut != null) {
String orderItemId = barcodeByOut.getOrderItemId(); String orderItemId = barcodeByOut.getOrderItemId();
barcodeByOut.setOut(false); barcodeByOut.setOut(false);
barcodeByOut.setOrderItemId(null); barcodeByOut.setOrderItemId(null);
barcodeByOut.setSelectMsg(null); barcodeByOut.setSelectMsg(null);
barcodeByOut = barcodeManager.save(barcodeByOut);
pidBarcode.UpdateSubCode(barcodeByOut); pidBarcode.UpdateSubCode(barcodeByOut);
//互换,要出的和隔口中的数据 //互换,要出的和隔口中的数据
...@@ -562,6 +583,12 @@ public class OutLineController { ...@@ -562,6 +583,12 @@ public class OutLineController {
pidBarcode.setAmount(pidBarcode.getAmount() - amount); pidBarcode.setAmount(pidBarcode.getAmount() - amount);
pidBarcode.UpdateSubCode(barcode); pidBarcode.UpdateSubCode(barcode);
//manualCheckOut(barcode);
barcodeByOut = barcodeManager.save(barcodeByOut);
int extendType = StringUtils.isNotBlank(barcode.getOrderItemId()) ? ExtendType.VIRTUAL_PICKING_DETAIL : ExtendType.VIRTUAL_CHECKOUT; int extendType = StringUtils.isNotBlank(barcode.getOrderItemId()) ? ExtendType.VIRTUAL_PICKING_DETAIL : ExtendType.VIRTUAL_CHECKOUT;
generateTask(barcode, opStatus, amount, opType, orderItemId, extendType, false); generateTask(barcode, opStatus, amount, opType, orderItemId, extendType, false);
log.info(barcode.getBarcode() + "不是出库任务," + barcodeByOut.getBarcode() + "需更改out为false"); log.info(barcode.getBarcode() + "不是出库任务," + barcodeByOut.getBarcode() + "需更改out为false");
...@@ -625,6 +652,46 @@ public class OutLineController { ...@@ -625,6 +652,46 @@ public class OutLineController {
} }
public void manualCheckOut(Barcode barcode){
String itemId = barcode.getOrderItemId();
if (StringUtils.isNotEmpty(itemId)){
LiteOrderItem orderItem = liteOrderItemManager.get(itemId);
LiteOrder liteOrder = liteOrderManager.get(orderItem.getOrderId());
if (liteOrder == null){
throw new ValidateException("",barcode.getBarcode()+"未找到对应的工单出库信息");
}
if (liteOrder.getCheckType() == LiteorderCheckType.TICKET_CHECKOUT){
TicketPickRequest request = new TicketPickRequest();
request.setPLANT_CODE(CommonUtil.plantCode);
request.setTICKET_CODE(orderItem.getTicketCode());
request.setTICKET_ITEM(orderItem.getTicketItem());
request.setQTY(barcode.getAmount());
request.setBIN_CODE("");
List<TicketPickLabelList> labelList = new ArrayList<>();
TicketPickLabelList tickPick = new TicketPickLabelList();
tickPick.setREEL_LIST(Arrays.asList(barcode.getBarcode()));
tickPick.setLABEL_ID(barcode.getLabelId());
labelList.add(tickPick);
request.setLABEL_LIST(labelList);
LuxsanApi.ticketPick(request);
LuxsanApi.ticketPost(new TicketPostRequest(CommonUtil.plantCode,orderItem.getTicketCode()));
}
else if (liteOrder.getCheckType() == LiteorderCheckType.PICKING_CHECKOUT){
String batchCode = "";
if (!"N/A".equals(orderItem.getBatchCode())){
batchCode = orderItem.getBatchCode();
}
LuxsanApi.pickingIssue(new PickingIssueRequest(CommonUtil.plantCode, liteOrder.getOrderNo(), orderItem.getItemId(), barcode.getPartNumber()
, barcode.getWarehouseCode(), orderItem.getBrand(), orderItem.getFace(), batchCode, Arrays.asList(barcode.getBarcode())));
}
}
}
private DataLog generateTask(Barcode barcode, String opStatus, int opQty, int opType, String orderItemId,int extendType,boolean isBoxOut) { private DataLog generateTask(Barcode barcode, String opStatus, int opQty, int opType, String orderItemId,int extendType,boolean isBoxOut) {
//生成任务 //生成任务
DataLog task = new DataLog(); DataLog task = new DataLog();
......
...@@ -302,14 +302,14 @@ public class LuxsanApi extends DefaultSmfApiListener { ...@@ -302,14 +302,14 @@ public class LuxsanApi extends DefaultSmfApiListener {
} }
/** /**
* 单据挑料 * 原料单据过账
* *
* @param request * @param request
* @return * @return
*/ */
public static List<TicketPostResult> ticketPost(TicketPostRequest request) { public static void ticketPost(TicketPostRequest request) {
try { try {
log.info("ticketPost接口请求参数为:" + JSONObject.toJSONString(request)); log.info("ticketPost接口请求参数为:" + JSONObject.toJSONString(request) + ",地址为:" + ticketPostUrl);
String resultStr = HttpHelper.postJson(ticketPostUrl, request); String resultStr = HttpHelper.postJson(ticketPostUrl, request);
log.info("ticketPost接口返回结果为:" + resultStr); log.info("ticketPost接口返回结果为:" + resultStr);
...@@ -318,11 +318,6 @@ public class LuxsanApi extends DefaultSmfApiListener { ...@@ -318,11 +318,6 @@ public class LuxsanApi extends DefaultSmfApiListener {
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()}); throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{apiResult.getMSGTX()});
} }
List<TicketPostResult> resultList = JSONObject.parseArray(apiResult.getDATA(), TicketPostResult.class);
if (resultList != null && !resultList.isEmpty()) {
return resultList;
}
} catch (ApiException e) { } catch (ApiException e) {
log.error("ticketPost请求失败:" + e.getMessage()); log.error("ticketPost请求失败:" + e.getMessage());
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()}); throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
......
package com.neotel.smfcore.custom.luxsan.api.bean.request; package com.neotel.smfcore.custom.luxsan.api.bean.request;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
/** /**
* 获取不可用(HOLD)库存信息 * 获取不可用(HOLD)库存信息
*/ */
@Data @Data
@AllArgsConstructor
public class FetchHoldInfoRequest { public class FetchHoldInfoRequest {
//工厂代码 //工厂代码
......
package com.neotel.smfcore.custom.luxsan.api.bean.request; package com.neotel.smfcore.custom.luxsan.api.bean.request;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@Data @Data
@AllArgsConstructor
public class TicketPostRequest { public class TicketPostRequest {
// 厂区 // 厂区
...@@ -12,16 +14,4 @@ public class TicketPostRequest { ...@@ -12,16 +14,4 @@ public class TicketPostRequest {
// 单据号 // 单据号
private String TICKET_CODE; private String TICKET_CODE;
// 单据行
private String TICKET_ITEM;
// 料卷清单
private List<String> REEL_LIST;
// 数量
private int QTY;
// 储位号
private String BIN_CODE;
} }
...@@ -231,7 +231,6 @@ public class CDeviceController { ...@@ -231,7 +231,6 @@ public class CDeviceController {
//311单据转库 //311单据转库
else if (MaterialUtil.ticketTransfer(materialStr)) { else if (MaterialUtil.ticketTransfer(materialStr)) {
TicketTransfer transfer = MaterialUtil.getTicketTransferInfo(materialStr); TicketTransfer transfer = MaterialUtil.getTicketTransferInfo(materialStr);
TicketPickRequest request = new TicketPickRequest(); TicketPickRequest request = new TicketPickRequest();
request.setPLANT_CODE(CommonUtil.plantCode); request.setPLANT_CODE(CommonUtil.plantCode);
...@@ -247,6 +246,7 @@ public class CDeviceController { ...@@ -247,6 +246,7 @@ public class CDeviceController {
labelList.add(tickPick); labelList.add(tickPick);
request.setLABEL_LIST(labelList); request.setLABEL_LIST(labelList);
LuxsanApi.ticketPick(request); LuxsanApi.ticketPick(request);
LuxsanApi.ticketPost(new TicketPostRequest(CommonUtil.plantCode,transfer.getTicket()));
} }
//单据退库上架 //单据退库上架
...@@ -313,6 +313,21 @@ public class CDeviceController { ...@@ -313,6 +313,21 @@ public class CDeviceController {
Map<String, BindGrInfo> cacheMap = dataCache.getCache(CacheNameUtil.CACHE_BIND_GR); Map<String, BindGrInfo> cacheMap = dataCache.getCache(CacheNameUtil.CACHE_BIND_GR);
cacheMap.remove(materialStr); cacheMap.remove(materialStr);
dataCache.updateCache(CacheNameUtil.CACHE_BIND_GR, cacheMap); dataCache.updateCache(CacheNameUtil.CACHE_BIND_GR, cacheMap);
} else if (MaterialUtil.storTransfer(materialStr)){
log.info(materialStr+"绑定储位移转信息,需要清空");
Map<String, StorTransfer> cacheMap = dataCache.getCache(CacheNameUtil.CHCHE_STOR_TRANSFER);
cacheMap.remove(materialStr);
dataCache.updateCache(CacheNameUtil.CHCHE_STOR_TRANSFER, cacheMap);
} else if (MaterialUtil.ticketReturn(materialStr)){
log.info(materialStr+"单据退料,需要清空");
Map<String, TicketReturn> cacheMap = dataCache.getCache(CacheNameUtil.CHCHE_TICKET_RETURN);
cacheMap.remove(materialStr);
dataCache.updateCache(CacheNameUtil.CHCHE_TICKET_RETURN, cacheMap);
} else if (MaterialUtil.ticketTransfer(materialStr)){
log.info(materialStr+"单据转库,需要清空");
Map<String, TicketTransfer> cacheMap = dataCache.getCache(CacheNameUtil.CHCHE_TICKET_TRANSFER);
cacheMap.remove(materialStr);
dataCache.updateCache(CacheNameUtil.CHCHE_TICKET_TRANSFER, cacheMap);
} }
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
} }
......
...@@ -66,9 +66,11 @@ public class AgvDeviceController { ...@@ -66,9 +66,11 @@ public class AgvDeviceController {
if (dataLogList != null && dataLogList.size() > 6){ if (dataLogList != null && dataLogList.size() > 6){
break; break;
} }
if (dataLog.isCheckOutTask() && dataLog.isWait()) { if (dataLog.isCheckOutTask()) {
if (StringUtils.isEmpty(dataLog.getLoc())){ if (dataLog.isWait() || dataLog.isExecuting()) {
dataLog.setLoc(TaskLocUtil.OUT); if (StringUtils.isEmpty(dataLog.getLoc())) {
dataLog.setLoc(TaskLocUtil.OUT);
}
} }
dataLogList.add(dataLog); dataLogList.add(dataLog);
} }
...@@ -141,6 +143,14 @@ public class AgvDeviceController { ...@@ -141,6 +143,14 @@ public class AgvDeviceController {
task.setStatus(statusStr); task.setStatus(statusStr);
taskService.updateFinishedTask(task); taskService.updateFinishedTask(task);
} }
if (OP_STATUS.FINISHED.name().equals(statusStr)){
if (TaskLocUtil.MW.equals(task.getLoc())){
task.setStatus(statusStr);
taskService.updateFinishedTask(task);
}
}
} }
} }
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
......
...@@ -263,7 +263,7 @@ public class LineController { ...@@ -263,7 +263,7 @@ public class LineController {
List<DataLog> dataLogList = taskService.getAllTasks(); List<DataLog> dataLogList = taskService.getAllTasks();
for (DataLog task : dataLogList) { for (DataLog task : dataLogList) {
if (task.isCheckOutTask() && !task.isFinished() && !task.isCancel()){ if (task.isCheckOutTask() && !task.isFinished() && !task.isCancel() && !task.isPause()){
if (StringUtils.isEmpty(soureId)){ if (StringUtils.isEmpty(soureId)){
if (StringUtils.isEmpty(task.getSourceId())){ if (StringUtils.isEmpty(task.getSourceId())){
num = num + 1; num = num + 1;
......
...@@ -50,7 +50,7 @@ public class TakeOutController { ...@@ -50,7 +50,7 @@ public class TakeOutController {
@ApiOperation("单据出库") @ApiOperation("单据出库")
@RequestMapping("/ticketOut") @RequestMapping("/ticketOut")
@AnonymousAccess @AnonymousAccess
public ResultBean ticketOut(String ticket) { public ResultBean ticketOut(String ticket,boolean isHold) {
log.info("半成品仓单据出库:" + ticket); log.info("半成品仓单据出库:" + ticket);
if (StringUtils.isEmpty(ticket)) { if (StringUtils.isEmpty(ticket)) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"单据号"}); throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"单据号"});
...@@ -61,7 +61,7 @@ public class TakeOutController { ...@@ -61,7 +61,7 @@ public class TakeOutController {
List<FetchMoveTicketResult> ticketList = LuxsanApi.fetchMoveTicket(new FetchMoveTicketRequest(CommonUtil.plantCode, ticket)); List<FetchMoveTicketResult> ticketList = LuxsanApi.fetchMoveTicket(new FetchMoveTicketRequest(CommonUtil.plantCode, ticket));
ticketToLiteOrder(ticket,ticketList); ticketToLiteOrder(ticket,ticketList);
} }
liteOrderCache.wipTicketOut(ticket); liteOrderCache.wipTicketOut(ticket,isHold);
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
} }
......
...@@ -22,6 +22,7 @@ import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchShipmentInfoResult; ...@@ -22,6 +22,7 @@ import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchShipmentInfoResult;
import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil; import com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil;
import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.OdnOut; import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.OdnOut;
import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.dto.FetchShipmentInfoDto; import com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.dto.FetchShipmentInfoDto;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -218,6 +219,15 @@ public class WipStorCheckOutController { ...@@ -218,6 +219,15 @@ public class WipStorCheckOutController {
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
} }
@ApiOperation("odn暂停")
@RequestMapping("/pauseOdn")
@AnonymousAccess
public ResultBean pauseOdn(String odn){
return ResultBean.newOkResult("");
}
@ApiOperation("人员调用wms手动解绑") @ApiOperation("人员调用wms手动解绑")
@RequestMapping("/unBindPallet") @RequestMapping("/unBindPallet")
//@AnonymousAccess //@AnonymousAccess
......
...@@ -5,5 +5,6 @@ public class TaskLocUtil { ...@@ -5,5 +5,6 @@ public class TaskLocUtil {
public static final String IN = "semiFinished_In"; public static final String IN = "semiFinished_In";
public static final String OUT = "semiFinished_Out"; public static final String OUT = "semiFinished_Out";
public static final String NG = "semiFinished_ng"; public static final String NG = "semiFinished_ng";
public static final String MW = "semiFinished_mw"; //人工工位
public static final String RR = "semiFinished_rr"; //还原补箱 restoreReplace public static final String RR = "semiFinished_rr"; //还原补箱 restoreReplace
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!