Commit 5b437e11 zshaohui

1.回库报表问题提交

1 个父辈 18f4f9b1
......@@ -186,6 +186,8 @@ public class Barcode extends BasePo implements Serializable {
*/
private String traySeparationBarcode = "";
private boolean needReturnStorage = true;
/**
* 是否是锡膏
*/
......
......@@ -748,6 +748,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
barcode.setInOpor(task.getOperator());
barcode.setCheckOutDate(null, "");
barcode.setPosName(task.getPosName());
barcode.setNeedReturnStorage(true);
if (barcode.isSolder()) {
if (storagePos.isWarmPos()) {
//回温仓位
......
......@@ -646,6 +646,7 @@ public class OrderController {
log.info(opUser + "虚拟回仓: PN【"+barcode.getPartNumber()+"】条码【" + barcode.getBarcode() + "】 工单号【" + liteOrder.getOrderNo() + "】数量【" + num + "】");
dataLog.setType(OP.CHECKOUT);
dataLog.setMpn(findItem.getMpn());
barcode.setUsed(true);
barcode.setUsedDate(new Date());
......
......@@ -289,6 +289,7 @@ public class MaterialBoxController {
boxPutInTime = putInTime;
}
boxBarcode.setPutInTime(boxPutInTime);
boxBarcode.setNeedReturnStorage(false);
barcodeManager.save(boxBarcode);
......
......@@ -238,13 +238,15 @@ public class JkemController {
//判断对应的尺寸,外侧的库位,是否保留5个
List<String> findCidList = new ArrayList<>();
List<Storage> findNewStorageList = new ArrayList<>();
if (barcode.getPlateSize() == 7) {
for (Storage storage : newStorageList) {
int count = storagePosManager.getRemainPosCountByStorage(storage, barcode, taskService.excludePosIds(), "", "_F");
if (count > 5) {
findCidList.add(storage.getCid());
findNewStorageList.add(storage);
} else {
log.info(storage.getCid()+"对应的尺寸:"+barcode.getPlateSize()+"x"+barcode.getHeight()+"外侧库位数量小于等于5个,忽略不入库");
log.info(storage.getCid() + "对应的尺寸:" + barcode.getPlateSize() + "x" + barcode.getHeight() + "外侧库位数量小于等于5个,忽略不入库");
}
}
}
......
......@@ -3,6 +3,7 @@ package com.neotel.smfcore.custom.Jkem21481.manager.impl;
import com.neotel.smfcore.common.bean.PageData;
import com.neotel.smfcore.common.exception.ValidateException;
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.device.enums.OP;
import com.neotel.smfcore.core.order.service.manager.ILiteOrderItemManager;
......@@ -42,6 +43,9 @@ public class ReturnStorageManagerImpl implements IReturnStorageManager {
@Autowired
private IDataLogManager dataLogManager;
@Autowired
private IBarcodeManager barcodeManager;
@Override
public ReturnStorage get(String id) {
return returnStorageDao.findOneById(id);
......@@ -81,12 +85,16 @@ public class ReturnStorageManagerImpl implements IReturnStorageManager {
Criteria.where("barcode").is(task.getBarcode())
.and("type").is(OP.CHECKOUT)
//.and("posName").exists(true).ne("")
).with(Sort.by(Sort.Direction.DESC,"updateDate")));
).with(Sort.by(Sort.Direction.DESC, "updateDate")));
if (dataLog != null) {
log.info(dataLog.getBarcode() + "找到上一个任务,对应的工单号为:" + dataLog.getStorageName() + "任务状态为:" + dataLog.getStatus() + ",上次出库的任务数量为:" + dataLog.getNum());
//判断是否需要回库
Barcode barcode = barcodeManager.findByBarcode(dataLog.getBarcode());
if (dataLog.isCheckOutTask() && dataLog.isFinished()) {
if (barcode.isNeedReturnStorage()) {
//判断两次的partNumber是否相同,如果不同,则跳过
if (task.getPartNumber().equals(dataLog.getPartNumber())){
if (task.getPartNumber().equals(dataLog.getPartNumber())) {
String sourceId = dataLog.getSourceId();
if (StringUtils.isNotEmpty(sourceId)) {
//开始保存任务
......@@ -106,4 +114,5 @@ public class ReturnStorageManagerImpl implements IReturnStorageManager {
}
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!