Commit 7646b463 sunke

通知Qisda自动重发修正

真实绑定时无法找到预绑定料盘问题
解决补料需求单出库时,如果有首盘工单在缺料补发,会等到缺料补发出完时才会出库的问题
自动执行间隔2分钟
通知Qisda接口放入线程中执行
纯入库接口添加code参数
入库通知时使用initialAmount字段
1 个父辈 17b75a20
...@@ -146,7 +146,7 @@ public class InquiryShelfBean { ...@@ -146,7 +146,7 @@ public class InquiryShelfBean {
//保证双层线上最多只能有两个料架 //保证双层线上最多只能有两个料架
List<ShelfInfo> cAndDShelfList = getSortedCAndDShelfList(task); List<ShelfInfo> cAndDShelfList = getSortedCAndDShelfList(task);
AppendInfo taskAppendInfo = task.getAppendInfo(); AppendInfo taskAppendInfo = task.getAppendInfo();
if(taskAppendInfo.isFirstReelAction()){ if(taskAppendInfo.isFirstReelAction() && !task.isLessSendReel()){
//如果任务是在最小(有空位)和次小的料架当中,可以出库 //如果任务是在最小(有空位)和次小的料架当中,可以出库
ShelfInfo firstEmptyShelf = null; ShelfInfo firstEmptyShelf = null;
ShelfInfo secondEmptyShelf = null; ShelfInfo secondEmptyShelf = null;
......
...@@ -572,7 +572,7 @@ public class Barcode extends BaseMongoBean { ...@@ -572,7 +572,7 @@ public class Barcode extends BaseMongoBean {
if(realBind){ if(realBind){
appendInfo.setBindSlot(outItem.getSlotlocation()+""); appendInfo.setBindSlot(outItem.getSlotlocation()+"");
}else{ }else{
appendInfo.setBindSlot(""); appendInfo.setBindSlot(null);
} }
appendInfo.setSlotIndex(outItem.getSlotlocation()); appendInfo.setSlotIndex(outItem.getSlotlocation());
......
...@@ -90,6 +90,11 @@ public class OutInfo extends BaseMongoBean { ...@@ -90,6 +90,11 @@ public class OutInfo extends BaseMongoBean {
*/ */
private long firstExecuteTime; private long firstExecuteTime;
/**
* 上次任务完成时间
*/
private long taskEndTime;
@Transient @Transient
private Map<String, OutItem> outItemMap = new HashMap<>(); private Map<String, OutItem> outItemMap = new HashMap<>();
...@@ -355,7 +360,7 @@ public class OutInfo extends BaseMongoBean { ...@@ -355,7 +360,7 @@ public class OutInfo extends BaseMongoBean {
this.firstExecuteTime = firstExecuteTime; this.firstExecuteTime = firstExecuteTime;
} }
public boolean updateExecuteTime(long executeTime){ public boolean updateFirstExecuteTime(long executeTime){
if(this.firstExecuteTime <= 0){ if(this.firstExecuteTime <= 0){
setFirstExecuteTime(executeTime); setFirstExecuteTime(executeTime);
return true; return true;
...@@ -363,6 +368,28 @@ public class OutInfo extends BaseMongoBean { ...@@ -363,6 +368,28 @@ public class OutInfo extends BaseMongoBean {
return false; return false;
} }
public long getTaskEndTime() {
return taskEndTime;
}
public void setTaskEndTime(long taskEndTime) {
this.taskEndTime = taskEndTime;
}
public Date getFirstExecuteDate(){
if(firstExecuteTime > 0){
return new Date(firstExecuteTime);
}
return null;
}
public Date getTaskEndDate(){
if(taskEndTime > 0){
return new Date(taskEndTime);
}
return null;
}
@Override @Override
public String toString() { public String toString() {
return "OutInfo{" + return "OutInfo{" +
......
...@@ -20,6 +20,8 @@ public interface IOutInfoDao extends IMongoDao { ...@@ -20,6 +20,8 @@ public interface IOutInfoDao extends IMongoDao {
void updateStatus(String hSerial, int bindStatus, int sendStatus); void updateStatus(String hSerial, int bindStatus, int sendStatus);
void updateTaskEndTime(String hSerial, long taskEndTime);
void updateTaskFinishNum(String hSerail, int taskFinishNum); void updateTaskFinishNum(String hSerail, int taskFinishNum);
void updateOutReelNum(String hSerial, int outReelNum); void updateOutReelNum(String hSerial, int outReelNum);
......
...@@ -82,6 +82,11 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao { ...@@ -82,6 +82,11 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao {
} }
@Override @Override
public void updateTaskEndTime(String hSerial, long taskEndTime){
update(hSerial, "taskEndTime", taskEndTime);
}
@Override
public void updateTaskFinishNum(String hSerail, int taskFinishNum){ public void updateTaskFinishNum(String hSerail, int taskFinishNum){
update(hSerail, "taskFinishNum", taskFinishNum); update(hSerail, "taskFinishNum", taskFinishNum);
} }
......
...@@ -206,13 +206,13 @@ public final class DateUtil { ...@@ -206,13 +206,13 @@ public final class DateUtil {
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_YEAR,5); c.set(Calendar.DAY_OF_YEAR,5);
list.add(c.getTime()); list.add(c.getTime());
c.set(Calendar.DAY_OF_YEAR,3); c.set(Calendar.DAY_OF_YEAR,10);
list.add(c.getTime());
c.set(Calendar.DAY_OF_YEAR,2);
list.add(c.getTime()); list.add(c.getTime());
c.set(Calendar.DAY_OF_YEAR,1); c.set(Calendar.DAY_OF_YEAR,1);
list.add(c.getTime()); list.add(c.getTime());
c.set(Calendar.DAY_OF_YEAR,4); c.set(Calendar.DAY_OF_YEAR,111);
list.add(c.getTime());
c.set(Calendar.DAY_OF_YEAR,9);
list.add(c.getTime()); list.add(c.getTime());
list.sort(new Comparator<Date>() { list.sort(new Comparator<Date>() {
......
...@@ -20,6 +20,8 @@ import java.util.ArrayList; ...@@ -20,6 +20,8 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* Created by sunke on 2020/4/14. * Created by sunke on 2020/4/14.
...@@ -30,12 +32,66 @@ public class QisdaApi { ...@@ -30,12 +32,66 @@ public class QisdaApi {
private static String USER_NAME = "SMD-BOX"; private static String USER_NAME = "SMD-BOX";
private static ExecutorService threadPool = Executors.newCachedThreadPool();
/**
* CIS收料入库接口
*/
public static void VMIMateriaReceive(final Barcode barcode, final DataLog task){
threadPool.execute(new Runnable() {
@Override
public void run() {
VMIMateriaReceiveThread(barcode, task);
}
});
}
/**
* 纯入库操作完成时通知Qisda
*/
public static void VMILocationIn(final String reelID, final String location, final String fullCodeStr){
threadPool.execute(new Runnable() {
@Override
public void run() {
VMILocationInThread(reelID, location, fullCodeStr);
}
});
}
/**
* 出仓完成时通知(线程)
* @param materialInfoMap
*/
public static void VMILocationOut(final String reelId, final Map<String, Object> materialInfoMap){
threadPool.execute(new Runnable() {
@Override
public void run() {
VMILocationOutThread(reelId, materialInfoMap);
}
});
}
/**
* 物料放上小车时调用(线程)
* @param task 任务信息
* @param barcode 条码信息
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
*/
public static void VMIMateriaRecAss(final DataLog task, final Barcode barcode, final String latest){
threadPool.execute(new Runnable() {
@Override
public void run() {
VMIMateriaRecAssThread(task, barcode, latest);
}
});
}
/** /**
* 获取库存进行比对 * 获取库存进行比对
*/ */
public static Map<String,DiffInfo> getInventory() throws ApiException { public static Map<String,DiffInfo> getInventory() throws ApiException {
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok";
Map<String,Object> paramMap = new HashMap<String,Object>(); Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("area","4D"); paramMap.put("area","4D");
...@@ -345,16 +401,19 @@ public class QisdaApi { ...@@ -345,16 +401,19 @@ public class QisdaApi {
return barcode; return barcode;
} }
/** /**
* 纯入库操作完成时通知Qisda * 纯入库操作完成时通知Qisda
*/ */
public static void VMILocationIn(String reelID, String location){ public static void VMILocationInThread(String reelID, String location,String fullCodeStr){
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationIn"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationIn";
Map<String,Object> paramMap = new HashMap<String,Object>(); Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("reelID",reelID); paramMap.put("reelID",reelID);
paramMap.put("location",location); paramMap.put("location",location);
paramMap.put("userName",USER_NAME); paramMap.put("userName",USER_NAME);
log.info("纯入库操作完成时通知Qisda接口(VMILocationIn):reelID=" + reelID + "&location="+location); paramMap.put("code",fullCodeStr);
log.info("纯入库操作完成时通知Qisda接口(VMILocationIn):reelID=" + reelID + "&location="+location +"&code=" + fullCodeStr);
QisdaApiRequest apiRequest = new QisdaApiRequest("纯入库",paramMap,reelID,url); QisdaApiRequest apiRequest = new QisdaApiRequest("纯入库",paramMap,reelID,url);
try { try {
String result = HttpHelper.postParam(url,paramMap); String result = HttpHelper.postParam(url,paramMap);
...@@ -367,10 +426,12 @@ public class QisdaApi { ...@@ -367,10 +426,12 @@ public class QisdaApi {
QisdaCache.addFailedRequest(apiRequest); QisdaCache.addFailedRequest(apiRequest);
} }
/** /**
* CIS收料入库接口 * CIS收料入库接口
*/ */
public static void VMIMateriaReceive(Barcode barcode, DataLog task){ public static void VMIMateriaReceiveThread(Barcode barcode, DataLog task){
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceive"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceive";
Map<String,Object> materialInfoMap = new HashMap<String,Object>(); Map<String,Object> materialInfoMap = new HashMap<String,Object>();
...@@ -408,11 +469,12 @@ public class QisdaApi { ...@@ -408,11 +469,12 @@ public class QisdaApi {
} }
/** /**
* 出仓完成时通知 * 出仓完成时通知
* @param materialInfoMap * @param materialInfoMap
*/ */
public static void VMILocationOut(String reelId, Map<String, Object> materialInfoMap){ private static void VMILocationOutThread(String reelId, Map<String, Object> materialInfoMap){
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOut"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOut";
String materialInfo = JsonUtil.toJsonStr(materialInfoMap); String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
...@@ -433,14 +495,13 @@ public class QisdaApi { ...@@ -433,14 +495,13 @@ public class QisdaApi {
} }
/** /**
* 物料放上小车时调用 * 物料放上小车时调用
* @param task 任务信息 * @param task 任务信息
* @param barcode 条码信息 * @param barcode 条码信息
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间) * @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
*/ */
public static void VMIMateriaRecAss(DataLog task, Barcode barcode, String latest){ private static void VMIMateriaRecAssThread(DataLog task, Barcode barcode, String latest){
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaRecAss"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaRecAss";
Map<String,Object> materialInfoMap = new HashMap<String,Object>(); Map<String,Object> materialInfoMap = new HashMap<String,Object>();
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
...@@ -461,13 +522,14 @@ public class QisdaApi { ...@@ -461,13 +522,14 @@ public class QisdaApi {
materialInfoMap.put("vehicleID","");//料车编号 materialInfoMap.put("vehicleID","");//料车编号
} }
int rfidLoc = appendInfo.getRfidLoc(); int rfidLoc = appendInfo.getRfidLoc();
if(task.isLessSendReel()){ rfidLoc = task.resolveRfidLoc(rfidLoc + "");
if(appendInfo.isFirstReelAction()){ // if(task.isLessSendReel()){
rfidLoc = 1; // if(appendInfo.isFirstReelAction()){
}else if(appendInfo.isTailAction()){ // rfidLoc = 1;
rfidLoc = 2; // }else if(appendInfo.isTailAction()){
} // rfidLoc = 2;
} // }
// }
materialInfoMap.put("vehicleLocation",rfidLoc);//料车架位号 materialInfoMap.put("vehicleLocation",rfidLoc);//料车架位号
materialInfoMap.put("lot", barcode.getBatch());//生产批次(批次号) materialInfoMap.put("lot", barcode.getBatch());//生产批次(批次号)
String productCode = DateUtil.toDateString(barcode.getProduceDate(),"yyyyMMdd"); String productCode = DateUtil.toDateString(barcode.getProduceDate(),"yyyyMMdd");
......
...@@ -157,9 +157,17 @@ public class OutInfoCache { ...@@ -157,9 +157,17 @@ public class OutInfoCache {
} }
public void executeOutTask(){ public void executeOutTask(){
long now = System.currentTimeMillis();
for (OutInfo unEndOutInfo : getCachedOutInfos()) { for (OutInfo unEndOutInfo : getCachedOutInfos()) {
//未执行过的,走双层线 //未执行过的或任务已完成的才可以执行
checkOutOutItems(unEndOutInfo.gethSerial()); if(unEndOutInfo.isTaskEnd() || unEndOutInfo.isNew()){
long lastEndTime = unEndOutInfo.getTaskEndTime();
//距离上次任务完成2分钟后才可再次执行
if(now - lastEndTime >= 2 * 60 * 1000){
checkOutOutItems(unEndOutInfo.gethSerial());
}
}
} }
} }
...@@ -291,7 +299,7 @@ public class OutInfoCache { ...@@ -291,7 +299,7 @@ public class OutInfoCache {
public void addOutInfo(OutInfo outInfo){ public void addOutInfo(OutInfo outInfo){
//先把缓存清理掉,从数据库中查询 //先把缓存清理掉,从数据库中查询
String hserial =outInfo.gethSerial(); String hserial =outInfo.gethSerial();
if(!hserial.isEmpty()){ if(!hserial.isEmpty() && !outInfo.isSendEnd() && !outInfo.isClosed()){
log.info("将需求单"+ outInfo +"加入到缓存"); log.info("将需求单"+ outInfo +"加入到缓存");
outInfo.setOutItemMap(new HashMap<String, OutItem>()); outInfo.setOutItemMap(new HashMap<String, OutItem>());
List<OutItem> outItemList = outItemDao.findByHSerial(hserial); List<OutItem> outItemList = outItemDao.findByHSerial(hserial);
...@@ -399,7 +407,14 @@ public class OutInfoCache { ...@@ -399,7 +407,14 @@ public class OutInfoCache {
* 获取缓存的需求单信息 * 获取缓存的需求单信息
*/ */
public List<OutInfo> getCachedOutInfos(){ public List<OutInfo> getCachedOutInfos(){
List<OutInfo> outInfoList = Lists.newArrayList(outInfoMap.values()); List<OutInfo> outInfoList = Lists.newArrayList();
for (OutInfo outInfo : outInfoMap.values()) {
if(outInfo.isClosed() || outInfo.isSendEnd()){
removeFromCache(outInfo.gethSerial());
}else{
outInfoList.add(outInfo);
}
}
//执行过按执行时间先后排序, 未执行过的放在最后 //执行过按执行时间先后排序, 未执行过的放在最后
outInfoList.sort(new Comparator<OutInfo>() { outInfoList.sort(new Comparator<OutInfo>() {
@Override @Override
...@@ -567,16 +582,21 @@ public class OutInfoCache { ...@@ -567,16 +582,21 @@ public class OutInfoCache {
sendEnd = false; sendEnd = false;
} }
} }
if(sendEnd){
outInfo.setSendStatus(StorageConstants.SEND_STATUS.SEND_OK); if(outInfo.isTaskEnd()){
}else{ outInfo.setTaskEndTime(System.currentTimeMillis());
//有出库的,状态为发料缺料 if(sendEnd){
if(outInfo.isTaskEnd()){ outInfo.setSendStatus(StorageConstants.SEND_STATUS.SEND_OK);
}else{
//有出库的,状态为发料缺料
outInfo.setSendStatus(StorageConstants.SEND_STATUS.SEND_LESS); outInfo.setSendStatus(StorageConstants.SEND_STATUS.SEND_LESS);
} }
outInfoDao.updateTaskEndTime(outInfo.gethSerial(), outInfo.getTaskEndTime());
outInfoDao.updateStatus(outInfo.gethSerial(), -1 , outInfo.getSendStatus());
} }
outInfoMap.put(outInfo.gethSerial(),outInfo); outInfoMap.put(outInfo.gethSerial(),outInfo);
outInfoDao.updateStatus(outInfo.gethSerial(), -1 , outInfo.getSendStatus());
if(outInfo.isSendEnd()){ if(outInfo.isSendEnd()){
removeFromCache(outInfo.gethSerial()); removeFromCache(outInfo.gethSerial());
} }
...@@ -590,11 +610,8 @@ public class OutInfoCache { ...@@ -590,11 +610,8 @@ public class OutInfoCache {
log.info("需求单["+hSerial+"]发料已完成或关闭,从缓存中清除,同时清理使用过的料串"); log.info("需求单["+hSerial+"]发料已完成或关闭,从缓存中清除,同时清理使用过的料串");
} }
private OutInfo updateExecuteTime(OutInfo outInfo,long executeTime){ private OutInfo updateExecuteTime(OutInfo outInfo,long executeTime){
boolean updateResult = outInfo.updateExecuteTime(executeTime); boolean updateResult = outInfo.updateFirstExecuteTime(executeTime);
if(updateResult){ if(updateResult){
outInfoDao.updateExecuteTime(outInfo.gethSerial(), outInfo.getFirstExecuteTime()); outInfoDao.updateExecuteTime(outInfo.gethSerial(), outInfo.getFirstExecuteTime());
outInfoMap.put(outInfo.gethSerial(),outInfo); outInfoMap.put(outInfo.gethSerial(),outInfo);
...@@ -635,14 +652,21 @@ public class OutInfoCache { ...@@ -635,14 +652,21 @@ public class OutInfoCache {
if(dataCache.getSettings().isStopOut()){ if(dataCache.getSettings().isStopOut()){
return ResultBean.newErrorResult(100, "系统更新中,暂停出库,请稍后再试",false); return ResultBean.newErrorResult(100, "系统更新中,暂停出库,请稍后再试",false);
} }
if(outInfo == null){ if(outInfo == null){
return ResultBean.newErrorResult(1001,"未找到需求单",false); return ResultBean.newErrorResult(1001,"未找到需求单",false);
} }
if(outInfo.isExecuting()){ String hSerial = outInfo.gethSerial();
return ResultBean.newErrorResult(1003,"需求单["+outInfo.gethSerial()+"]正在执行",false); String executingHSerial = QisdaCache.getCurrentOrderHSerial();
if(hSerial.equals(executingHSerial)){
return ResultBean.newErrorResult(1006,"需求单["+outInfo.gethSerial()+"]正在执行",false);
} }
// if(!outInfo.isNew() && !outInfo.isTaskEnd()){
// return ResultBean.newErrorResult(1007,"需求单["+outInfo.gethSerial()+"]执行未完成",false);
// }
//如果有其他任务在执行,不允许出库 //如果有其他任务在执行,不允许出库
Collection<DataLog> queueTasks = taskService.getQueueTasks(); Collection<DataLog> queueTasks = taskService.getQueueTasks();
List<DataLog> allTasks = taskService.getFinishedTasks(); List<DataLog> allTasks = taskService.getFinishedTasks();
......
...@@ -69,19 +69,15 @@ public class MainTimer { ...@@ -69,19 +69,15 @@ public class MainTimer {
}, 60, 10, TimeUnit.SECONDS); }, 60, 10, TimeUnit.SECONDS);
} }
private boolean isProcessTask = false;
private void timerTask(){ private void timerTask(){
try{ try{
if(isProcessTask){ QisdaCache.runTimer();
return;
}
isProcessTask = true;
outInfoCache.runTimer(); outInfoCache.runTimer();
}catch (Exception e){ }catch (Exception e){
log.error("定时器执行出错",e); log.error("定时器执行出错",e);
}finally { }finally {
isProcessTask = false;
} }
} }
......
...@@ -138,7 +138,8 @@ public class QisdaApiController extends BaseController { ...@@ -138,7 +138,8 @@ public class QisdaApiController extends BaseController {
public static void PutInFinished(Barcode barcode, DataLog task){ public static void PutInFinished(Barcode barcode, DataLog task){
//纯入库 //纯入库
if(barcode.getAppendInfo().isCISIn()){ if(barcode.getAppendInfo().isCISIn()){
QisdaApi.VMILocationIn(barcode.getBarcode(),task.getPosName()); String fullCode = barcode.getFullCodeStr();
QisdaApi.VMILocationIn(barcode.getBarcode(),task.getPosName(),fullCode);
}else{ }else{
//DN单收料或Facility收料 //DN单收料或Facility收料
QisdaApi.VMIMateriaReceive(barcode, task); QisdaApi.VMIMateriaReceive(barcode, task);
......
...@@ -393,7 +393,7 @@ public class QisdaBindService { ...@@ -393,7 +393,7 @@ public class QisdaBindService {
int realLockQty = outItem.getRealLockQty(); int realLockQty = outItem.getRealLockQty();
int newRealLockQty = realLockQty + dbQty; int newRealLockQty = realLockQty + dbQty;
log.info("\t真实绑定["+barcode.getBarcode()+"]到So=["+outItem.getSo()+"]hSerial=["+outItem.getSourceName()+"] 绑定数量:" + outItem.getRealLockQty() +"/" + outItem.getQty()); log.info("\t真实绑定["+barcode.getBarcode()+"]到So=["+outItem.getSo()+"]hSerial=["+outItem.getSourceName()+"] 绑定数量:" + newRealLockQty +"/" + outItem.getQty());
barcode.realBindItem(outItem); barcode.realBindItem(outItem);
pos.setBarcode(barcode); pos.setBarcode(barcode);
storagePosDao.save(pos); storagePosDao.save(pos);
......
...@@ -122,14 +122,16 @@ public class QisdaCache { ...@@ -122,14 +122,16 @@ public class QisdaCache {
if(failedRequestMap.get(mapKey) == null){ if(failedRequestMap.get(mapKey) == null){
log.info(mapKey + "通知指令发送到Qisda失败,加入到缓存"); log.info(mapKey + "通知指令发送到Qisda失败,加入到缓存");
failedRequestMap.put(apiRequest.getMapKey(), apiRequest); failedRequestMap.put(apiRequest.getMapKey(), apiRequest);
cacheInfoDao.updateCacheItem(FAILED_REQUEST_MAP_KEY, failedRequestMap);
} }
} }
public static void removeFailedRequest(QisdaApiRequest apiRequest){ public static void removeFailedRequest(QisdaApiRequest apiRequest){
String mapKey = apiRequest.getMapKey(); String mapKey = apiRequest.getMapKey();
if(failedRequestMap.get(mapKey) == null){ if(failedRequestMap.get(mapKey) != null){
log.info(mapKey + "通知指令发送到Qisda成功,从缓存中移除"); log.info(mapKey + "通知指令发送到Qisda成功,从缓存中移除");
failedRequestMap.remove(apiRequest.getMapKey()); failedRequestMap.remove(apiRequest.getMapKey());
cacheInfoDao.updateCacheItem(FAILED_REQUEST_MAP_KEY, failedRequestMap);
} }
} }
......
...@@ -803,8 +803,8 @@ public class QisdaDeviceController extends BaseController { ...@@ -803,8 +803,8 @@ public class QisdaDeviceController extends BaseController {
log.info("缺料补发料需要通知Qisda"); log.info("缺料补发料需要通知Qisda");
Barcode barcodeObj = barcodeManager.findByBarcode(cacheTask.getBarcode()); Barcode barcodeObj = barcodeManager.findByBarcode(cacheTask.getBarcode());
String latest = outInfo.getShelfLatest(); String latest = outInfo.getShelfLatest();
//放到线程中
QisdaApi.VMIMateriaRecAss(cacheTask, barcodeObj,latest); QisdaApi.VMIMateriaRecAss(cacheTask, barcodeObj,latest);
} else{ } else{
Barcode barcodeObj = barcodeManager.findByBarcode(cacheTask.getBarcode()); Barcode barcodeObj = barcodeManager.findByBarcode(cacheTask.getBarcode());
String latest = outInfo.getShelfLatest(); String latest = outInfo.getShelfLatest();
......
...@@ -665,7 +665,7 @@ public class TaskService implements ITaskService { ...@@ -665,7 +665,7 @@ public class TaskService implements ITaskService {
if(barcode != null){ if(barcode != null){
task.setPartNumber(barcode.getPartNumber()); task.setPartNumber(barcode.getPartNumber());
task.setBarcode(barcode.getBarcode()); task.setBarcode(barcode.getBarcode());
task.setNum(barcode.getAmount()); task.setNum(barcode.getInitialAmount());
task.setW(barcode.getPlateSize()); task.setW(barcode.getPlateSize());
task.setH(barcode.getHeight()); task.setH(barcode.getHeight());
AppendInfo appendInfo = barcode.getAppendInfo(); AppendInfo appendInfo = barcode.getAppendInfo();
...@@ -872,7 +872,7 @@ public class TaskService implements ITaskService { ...@@ -872,7 +872,7 @@ public class TaskService implements ITaskService {
for (DataLog task : waitTasks) { for (DataLog task : waitTasks) {
if(task.isCheckOutTask()) { if(task.isCheckOutTask()) {
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
if(appendInfo.isFirstReelAction()){ if(appendInfo.isFirstReelAction() && !task.isLessSendReel()){
//首盘料 //首盘料
hasFirstReelAction = true; hasFirstReelAction = true;
} }
...@@ -1578,7 +1578,7 @@ public class TaskService implements ITaskService { ...@@ -1578,7 +1578,7 @@ public class TaskService implements ITaskService {
task.setPartNumber(barcode.getPartNumber()); task.setPartNumber(barcode.getPartNumber());
task.setBarcode(barcode.getBarcode()); task.setBarcode(barcode.getBarcode());
task.setAppendInfo(barcode.getAppendInfo()); task.setAppendInfo(barcode.getAppendInfo());
task.setNum(barcode.getAmount()); task.setNum(barcode.getInitialAmount());
dataCache.updateInventory(pos,barcode); dataCache.updateInventory(pos,barcode);
//dataCache.updateStorage(task.getCid()); //dataCache.updateStorage(task.getCid());
...@@ -1661,7 +1661,7 @@ public class TaskService implements ITaskService { ...@@ -1661,7 +1661,7 @@ public class TaskService implements ITaskService {
dataLog.setAppendInfo(barcode.getAppendInfo()); dataLog.setAppendInfo(barcode.getAppendInfo());
//dataLog.setRelationCodes(barcode.getRelationCodes()); //dataLog.setRelationCodes(barcode.getRelationCodes());
dataLog.setType(StorageConstants.OP.PUT_IN); dataLog.setType(StorageConstants.OP.PUT_IN);
dataLog.setNum(barcode.getAmount()); dataLog.setNum(barcode.getInitialAmount());
dataLog.setCid(storage.getCid()); dataLog.setCid(storage.getCid());
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!