log.warn("backUpMongoTemplate 不可用,配置的是本机: ip["+mongoProperties.getHost()+"] db ["+mongoProperties.getDatabase()+"] baseDb["+baseDatabase+"] ");
EnLog.warn("backUpMongoTemplate unavailable, configured as local: ip["+mongoProperties.getHost()+"] db ["+mongoProperties.getDatabase()+"] baseDb["+baseDatabase+"]");
EnLog.info("["+oldLocInfo.getBarcode()+"] already has locked position ["+oldLocInfo.getLockPosName()+"], cid ["+oldLocInfo.getCid()+"] not in ["+String.join(",",cidList)+"], clear previous lock");
EnLog.info("Lock position ["+reelLockPosInfo.getLockPosName()+"] for ["+reelLockPosInfo.getBarcode()+"] failed, already locked by ["+locInfo.getBarcode()+"]");
EnLog.error("Lock position ["+reelLockPosInfo.getLockPosName()+"] for ["+reelLockPosInfo.getBarcode()+"], key=["+key+"] error: "+exception.toString());
EnLog.warn("Reset size ["+barcode.getPlateSize()+"x"+barcode.getHeight()+"] to ["+codeBeanFromRule.getReelWidth()+"x"+codeBeanFromRule.getReelHeight()+"]");
EnLog.info("Reset PCB "+codeBeanFromRule.getCodeStr()+" label amount and current amount to: "+currentLabelAmount+", xrayCount="+barcode.getXrayCount());
EnLog.info("Get put-in pos for ["+barcodeSave.getBarcode()+"], barcode already has put-in task posname["+task.getPosName()+"], mark put-in task as NG, auto checkout after checkin");
EnLog.info("Get put-in pos for ["+barcodeSave.getBarcode()+"], barcode already has put-in task posname["+task.getPosName()+"], CACHE_SAME_BARCODE_SETTINGS="+barcodeSet+", current material NG, continue finished task");
}
thrownewValidateException("smfcore.error.barcode.hastask","Serial No.(S)[0] already have storage task",newString[]{barcodeSave.getBarcode()});
EnLog.error("Barcode ["+barcodeSave.getBarcode()+"] task executing, but task storage is: "+task.getStorageId()+" request storage is: "+task.getStorageId());
//throw new ValidateException("条码["+barcodeSave.getBarcode()+"]任务正在执行");
EnLog.info(barcodeSave.getBarcode()+"["+plateW+"x"+plateH+"] start put-in to "+storage.getCid()+"["+posId+"], lastReelP=["+lastReelP+"], current height=["+barcodeSave.getHeight()+"]");
//清空展示的消息
serverExceptions.remove(storage.getCid());
...
...
@@ -363,9 +375,11 @@ public class BaseDeviceHandler implements IDeviceHandler {
EnLog.info("Get put-in pos for ["+barcodeSave.getBarcode()+"], barcode already has put-in task posname["+task.getPosName()+"], mark put-in task as NG, auto checkout after checkin");
EnLog.info("Get put-in pos for ["+barcodeSave.getBarcode()+"], barcode already has put-in task posname["+task.getPosName()+"], CACHE_SAME_BARCODE_SETTINGS="+barcodeSet+", current material NG, continue finished task");
}
thrownewValidateException("smfcore.error.barcode.hastask","Serial No.(S)[0] already have storage task",newString[]{barcodeSave.getBarcode()});
...
...
@@ -594,6 +616,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
}
}catch(ValidateExceptione){
log.error("更新状态时出错"+e.getMessage());
EnLog.error("Error updating status "+e.getMessage());
}
}
}
...
...
@@ -622,6 +645,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
EnLog.info(task.getBarcode()+" put-in pos ["+task.getPosName()+"] finished, but task was canceled, change to finished, execute time ["+executeTime+"] seconds");
EnLog.info(task.getBarcode()+" checkout pos ["+task.getPosName()+"] finished, but task was canceled, change to finished, execute time ["+executeTime+"] seconds");
updateCheckoutData(task,outBoxStatus);
}
}elseif(ObjectUtil.isNotEmpty(posName)){
...
...
@@ -713,12 +744,15 @@ public class BaseDeviceHandler implements IDeviceHandler {
EnLog.info("Checkout "+storage.getName()+"["+posName+"] material ["+outTask.getBarcode()+"]["+outTask.isNgReel()+"] sent to client "+storage.getCid());
EnLog.info("Barcode "+barcode.getBarcode()+" already in position, CACHE_SAME_BARCODE_SETTINGS=1, auto checkout existing material ["+barcode.getBarcode()+"], set ngReel=true");
EnLog.info("Barcode "+barcode.getBarcode()+" already in position, CACHE_SAME_BARCODE_SETTINGS=2, mark pos["+hasPos.getPosName()+"] barcode["+barcode.getBarcode()+"] as ngReel=NG");
EnLog.info("Get put-in pos for ["+code+"], barcode already has put-in task pos["+dataLog.getPosName()+"], mark task NG and auto checkout after put-in");
EnLog.info("Get put-in pos for ["+code+"], barcode already has put-in task pos["+dataLog.getPosName()+"], CACHE_SAME_BARCODE_SETTINGS="+barcodeSet+", current material NG, existing put-in task continues");
}
returnresultMap;
// //已有入库任务
...
...
@@ -566,6 +592,7 @@ public class RobotBoxHandler extends BaseDeviceHandler {
EnLog.info("Get put-in pos for ["+code+"], barcode["+barcode.getBarcode()+"] no available position for ["+barcode.getPlateSize()+"x"+barcode.getHeight()+"]");
returnresultMap;
}
...
...
@@ -649,6 +679,7 @@ public class RobotBoxHandler extends BaseDeviceHandler {
EnLog.error("Barcode["+barcode.getBarcode()+"] requires Xray counting, CI is offline, throw exception");
thrownewApiException("smfcore.micron.xray.offline","{0} required counting partial quantity, Xray counter is not online",newString[]{barcode.getBarcode()});
}
}
...
...
@@ -941,6 +983,7 @@ public class RobotBoxHandler extends BaseDeviceHandler {
EnLog.warn("Update barcode["+barcode+"] ["+inouType+"] task state already ["+opTask.getStatus()+"="+opTask.getLocInfo()+"], no need to update to ["+statusStr+"="+locInfo+"]");
EnLog.info("Update barcode["+barcode+"] ["+inouType+"] task state from ["+opTask.getStatus()+"="+opTask.getLocInfo()+"] to ["+statusStr+"="+locInfo+"]");
opTask.setStatus(statusStr);
opTask.setLocInfo(locInfo);
...
...
@@ -1017,10 +1066,12 @@ public class RobotBoxHandler extends BaseDeviceHandler {
EnLog.info("Material "+finishedTask.getBarcode()+" has been taken out from pos "+finishedTask.getPosName()+" to door, but reel not sensed, disable pos");
EnLog.info("Put in task finished inventory check: storage["+storage.getCid()+"] size["+sizeStr+"] current inventory["+currCount+"] upload inventory["+updateCount+"], do not change pos");
EnLog.error("Put in task finished inventory check: storage["+storage.getCid()+"] size["+sizeStr+"] current inventory["+currCount+"] upload inventory["+updateCount+"], do not change pos");
returnnull;
}
...
...
@@ -300,15 +314,18 @@ public class ThirdBoxHandler extends BaseDeviceHandler{
EnLog.info("Put in task finished inventory check: storage["+storage.getCid()+"] new size["+key+"] current inventory["+sizeEmptyCount+"] upload inventory["+sizeCount+"], failed to find empty pos");
EnLog.info("Put in task finished inventory check: storage["+storage.getCid()+"] new size["+key+"] current inventory["+sizeEmptyCount+"] upload inventory["+sizeCount+"], found new pos["+pos.getPosName()+"], change task to new pos");
EnLog.error(cid+" put in pos["+posName+"] ReelId["+barcode+"] original pos["+oldPosId+"]["+oldPosName+"], change pos to ["+newPos.getPosName()+"], posId=["+newPos.getId()+"]");
task.setPosName(newPos.getPosName());
task.setPosId(newPos.getId());
}
...
...
@@ -332,11 +350,13 @@ public class ThirdBoxHandler extends BaseDeviceHandler{
EnLog.info("watchOrderDir, mode=[{0}], reason=[{1}]: Order no [{2}] already exists in DB, ignore file: {3}",mode,reason,orderName,orderFile.getAbsolutePath());
//resultFile = new File(localDir+File.separator + "error",backupFileName);
returnfalse;
}
...
...
@@ -233,6 +238,7 @@ public class DefaultOrderFileListener implements IOrderFileListener {
EnLog.info("cid=["+cid+"] get next self-audit ["+selfAudit.getBatchNo()+"] pos success: posName["+item.getPosName()+"] barcode["+item.getBarcode()+"],["+item.getPlateW()+"X"+item.getPlateH()+"]");
returnResultBean.newOkResult(resultMap);
}
}
...
...
@@ -112,11 +114,13 @@ public class SelfAuditDeviceController {
EnLog.info("Self-audit put-in done, inventory has barcode but actual is empty, store original barcode first, update pos["+storagePos.getPosName()+"]=["+barcodeIn.getBarcode()+"]");
EnLog.info("Self-audit put-in done, inventory empty but actual has barcode, auto create put-in task for actualBarcode, update pos["+storagePos.getPosName()+"]=["+barcodeIn.getBarcode()+"]");
EnLog.error("Self-audit put-in done, inventory empty but actual has barcode, actualBarcode parse failed, cannot create put-in task, pos["+storagePos.getPosName()+"] still empty");
}
}
...
...
@@ -260,6 +279,7 @@ public class SelfAuditDeviceController {
EnLog.info("Self-audit ["+selfAudit.getBatchNo()+"] completed posCount["+selfAudit.getEndItemNum()+"] total["+selfAudit.getTotalItemNum()+"], has abnormal pos, set status to END and wait processing");
EnLog.info("Self-audit ["+selfAudit.getBatchNo()+"] completed posCount["+selfAudit.getEndItemNum()+"] total["+selfAudit.getTotalItemNum()+"], set status to FINISHED");
}
}
...
...
@@ -296,6 +318,7 @@ public class SelfAuditDeviceController {
EnLog.info("Self-audit posSelfAuditEnd: posName=["+posName+"], barcode=["+barcode+"], actualBarcode=["+actualBarcode+"]: pos self-audit info not found");
EnLog.info("Lock material: material locked by other order when unlocking: pos [{0}] barcode [{1}] lockId [{2}], order finished, can unlock",pos.getPosName(),code.getBarcode(),code.getLockId());
EnLog.info("Lock material: material locked by other order when unlocking: pos [{0}] barcode [{1}] lockId [{2}], order not finished, cannot unlock",pos.getPosName(),code.getBarcode(),code.getLockId());
continue;
}
}
...
...
@@ -115,6 +121,7 @@ public class LockMaterialController {
EnLog.info("Barcode "+subBarcode.getBarcode()+" ["+subBarcode.getPartNumber()+"] put-in to material box ["+barcode.getBarcode()+"], qty: "+barcode.getAmount());
EnLog.error("When importing pos for ["+storage.getName()+"], posName ["+String.join(",",existPosName)+"] already exists in other storage, not creating");
EnLog.info("Update system settings: stopout="+sysSettingsDto.isStopOut()+",stopjob="+sysSettingsDto.isStartJob()+",sluggishDay="+sysSettingsDto.getSluggishDay()
EnLog.info("Barcode["+barcode.getBarcode()+"] locked pos["+pos.getPosName()+"], storageId["+pos.getStorageId()+"] not in requested list["+String.join(",",storageIds)+"], refind pos");
EnLog.info("API002, interface communication failed: "+errMsg);
returnresultMap;
}
else{
Stringmsg=MessageUtils.getText("smfcore.api.fail",newString[]{"API002 : "+result.getResponseData()},MessageUtils.getDefaultLocal(),"{0} Failed to get data");
resultMap.put("msg",msg);
log.info("API002 ,接口通信失败:"+msg);
EnLog.info("API002, interface communication failed: "+msg);
returnresultMap;
// log.info("API002 ,接口通信失败");
// throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API002 : "+result.getResponseData()});
...
...
@@ -360,6 +371,7 @@ public class MicronApi {
catch(Exceptione){
//超时返回:API002 interface time out
log.error(url+"出错",e);
EnLog.error(url+" error",e);
resultMap.put("msg","API002 interface time out");
returnresultMap;
}
...
...
@@ -399,6 +411,7 @@ public class MicronApi {
}
try{
log.info("调用MES接口 API004: url="+url+"");
EnLog.info("Call MES API004: url="+url);
MicronResultresult=HttpHelper.getMicronJson(url);
StringerrMsg=getDErrorMsg(result);
if(result.isOk()){
...
...
@@ -408,6 +421,7 @@ public class MicronApi {
// 这个需要改进一些,如果dispatchIds 长度为0,能不能显示 no line prep available for pcb pretask, depending on the mode,
// 如果是lineprep dispatch 和 mcl pretask 也reply 相对的message, 再说这个API transaction 没有fail,只是没有lineprep, 这个error fail to get data 有点误导了
log.info("API004 ,接口通信失败: no line prep available for pcb pretask, depending on the mode");
EnLog.info("API004, interface communication failed: no line prep available for pcb pretask, depending on the mode");
//throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API004"});
Stringmsg="No line prep available for pcb pretask ";
if(mode.equalsIgnoreCase("PCBPRETASK")){
...
...
@@ -426,10 +440,12 @@ public class MicronApi {
returnresultDis;
}elseif(ObjectUtil.isNotEmpty(errMsg)){
log.info("API004 ,接口通信失败:"+errMsg);
EnLog.info("API004, interface communication failed: "+errMsg);
thrownewApiException(errMsg);
}else{
log.info("API004 ,接口通信失败");
EnLog.info("API004, interface communication failed");
//throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API004"});
Stringmsg="API004 : "+result.getResponseData()+" Failed to get data";
EnLog.info("updateMInventory: barcode ["+obj.getCarrier()+"] MPos ["+obj.getDepot()+"] in pos ["+inPos.getPosName()+"-"+inPos.getStorageId()+"-"+inStorage.getCid()+"], clear and put-in to storage ["+SStorage.getName()+"-"+SStorage.getCid()+"-"+SStorage.getId()+"]");
EnLog.error("In-list ["+inList.getName()+"]: barcode["+item.getRi()+"] pos["+item.getPosName()+"] currentState="+item.getState()+", do not change state to "+s);
EnLog.info("In-list ["+inList.getName()+"], rfid["+rfid+"], posName["+item.getPosName()+"], ri["+item.getRi()+"], task canceled but put-in finished, still need to send API002");
EnLog.info("pnSubmit,mode=["+mode+"],["+taskDto.getOperationId()+"], New order added:"+liteOrder.getOrderNo()+", total "+items.size()+" order details");
@@ -705,6 +712,7 @@ public class MicronDispatchController {
reelItem.setStatus(OrderItemStatus.CheckOk);
log.info("工单【"+order.getOrderNo()+"】PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 验证成功,更改状态为 CheckOk ,锁定库位【"+pos.getPosName()+"】");
EnLog.info("Order ["+order.getOrderNo()+"] PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 verification successful, change status to CheckOk, lock storage position ["+pos.getPosName()+"]");
//锁定物料
pos.getBarcode().setLockId(order.getOrderNo());
...
...
@@ -722,6 +730,7 @@ public class MicronDispatchController {
reelItem.setExecutFailReason(str);
reelItem.setStatus(OrderItemStatus.Reserved);
log.info("工单【"+order.getOrderNo()+"】PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 验证失败,更改状态为 Reserved");
EnLog.info("Order ["+order.getOrderNo()+"] PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 verification failed, change status to Reserved");
}else{
Stringstr=s.getDescription();
if(ObjectUtil.isNotEmpty(s.getMaterialStatus())){
...
...
@@ -730,6 +739,7 @@ public class MicronDispatchController {
reelItem.setExecutFailReason(str);
reelItem.setStatus(OrderItemStatus.CheckFail);
log.info("工单【"+order.getOrderNo()+"】PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 验证失败,更改状态为 CheckFail");
EnLog.info("Order ["+order.getOrderNo()+"] PN ["+item.getPn()+"] RI ["+reelItem.getRi()+"] API009 verification failed, change status to CheckFail");
}
selectReelItems.add(reelItem);
...
...
@@ -744,6 +754,7 @@ public class MicronDispatchController {
log.info(order.getOrderNo()+"已勾选物料完成,直接出料");
EnLog.info(order.getOrderNo()+" material selection completed, direct dispatch");
EnLog.info(" abort mode ["+order.getMode()+"] total "+needSendList.size()+" checkout completed, call API007, order about to close, no longer update order status");
}
}catch(Exceptionex){
log.error("关闭工单前调用API007出错:"+ex.toString());
EnLog.error("Error calling API007 before closing order: "+ex.toString(),ex);
}
order.setStatus(LITEORDER_STATUS.CLOSED);
...
...
@@ -886,11 +903,13 @@ public class MicronDispatchController {
liteOrderCache.addOrderToMap(order);
log.info(" mode="+order.getMode()+"工单关闭");
EnLog.info(" mode="+order.getMode()+" order closed");
EnLog.info("abort terminate checkout, mode="+mode+", there are still executing tasks, status="+task.getStatus()+": barcode="+task.getBarcode()+", posName="+task.getPosName()+", try to auto cancel task");
EnLog.info("lockOrderName="+orderName+" found material ["+barcode.getBarcode()+"], PN=["+barcode.getPartNumber()+"], qty="+barcode.getAmount()+", totalFound="+lockNum);
posToLock.add(pos);
}
excludePosIds.add(pos.getId());
...
...
@@ -315,6 +324,7 @@ public class MesApiController {