Commit f9997444 LN

unload/getMicronPN接口返回ng原因

1 个父辈 76a908bc
......@@ -135,6 +135,8 @@ public class DataCache {
}
if (cacheMap.get(Constants.CACHE_StartJob) == null) {
updateCache(Constants.CACHE_StartJob, false);
}if (cacheMap.get(Constants.CACHE_MaxQuantity) == null) {
updateCache(Constants.CACHE_MaxQuantity, 2);
}
}
......
......@@ -795,6 +795,13 @@ public class Micron20031Api {
* //Input: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType
* //Output: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType, Message, Status, ExpiredDate
*/
// 2024-07-16 12:02:39.757 INFO [Micron20031Api.java:817] - 调用MES接口 ReturnMaterial type=EXPIRED_DISPOSAL,参数:{"MaterialType":"SOLDER_PASTE","LotNo":"MMSUAT-SP007","TypeofReturn":"EXPIRED_DISPOSAL","RemainingQuantity":1,"Username":"leandraang","Comments":"test","Mode":"ENABLE_MAM_SAP","BatchNo":"SGMMSTSTB2","SystemID":"SPMMS","MicronPN":"507-10386","Location":"MC99"}
//2024-07-16 12:02:42.842 INFO [HttpHelper.java:198] - postJsonWithAuth url=[https://apim-opc-prod.micron.com/t/app.mfg/mmsilose/v1/DEVL/SINGAPORE/ReturnMaterial] return=
// [{"materialType":"SOLDER_PASTE","systemId":"SPMMS","typeOfReturn":"EXPIRED_DISPOSAL","sapLocationMovementType":"","matReqNo":"",
// "micronPn":"507-10386","lotNo":"MMSUAT-SP007","batchNo":"SGMMSTSTB2","micronLotId":"","location":"MC99","unitOfMeasures":"",
// "equipId":"",
// "message":"SAP ERROR: <item><TYPE>E</TYPE><ID>KI</ID><NUMBER>235</NUMBER><MESSAGE>Account 536111 requires an assignment to a CO object</MESSAGE><LOG_NO /><LOG_MSG_NO>000000</LOG_MSG_NO><MESSAGE_V1>536111</MESSAGE_V1><MESSAGE_V2>000</MESSAGE_V2><MESSAGE_V3 /><MESSAGE_V4 /><PARAMETER>GOODSMVT_ITEM</PARAMETER><ROW>1</ROW><FIELD /><SYSTEM>QE1100</SYSTEM></item>","status":"FAIL","spoolStatus":"","expiredDate":"07-26-2024 11:56:00","stepId":"","materialDocumentNo":"","username":"leandraang","mode":"ENABLE_MAM_SAP","quantity":0,"remainingQuantity":1,"expiredDate2":"","stabilizationEndDate":"","isQualLot":"","exposureStartDateTime":"","lotNo2":"","targetSystemId":"","transferMode":"","adjustedQuantity":0,"manufacturerLotNo":"","lotList":{"lots":null},"newMergeLotId":"","inHouseMark":"","leadFrameCount":0,"modSolderPaste":"","supplier":"","supplierPN":"","printerName":"","lineId":"","comments":"test","maxQuantity":0}]
public static Barcode returnMaterial(Barcode barcode, String typeOfReturn, String username,String comments) throws ApiException {
String checkStockAvailableUrl = getUrl(api_ReturnMaterial);
if(ObjectUtil.isEmpty(checkStockAvailableUrl)){
......
......@@ -115,7 +115,7 @@ public class MicronSpUnloadController {
pos.setBarcode(barcode);
storagePosManager.save(pos);
SpUnloadDto dto=getUnloadDto(pos,1);
SpUnloadDto dto=getUnloadDto(pos,1,"");
return ResultBean.newOkResult(dto);
} catch (ApiException ex) {
log.error("unload/getMicronPN [" + pn + "] barcode [" + pos.getBarcode().getBarcode() + "] chkAuthoriseToDispatch 失败:" + ex.toString());
......@@ -135,9 +135,9 @@ public class MicronSpUnloadController {
}
}
private SpUnloadDto getUnloadDto(StoragePos pos,int unloadState ) {
private SpUnloadDto getUnloadDto(StoragePos pos,int unloadState,String ngMsg ) {
SpUnloadDto dto = new SpUnloadDto(pos.getId(), pos.getStorageId(), pos.getPosName(), pos.getBarcode().getBarcode(),
pos.getBarcode().getPartNumber(), pos.getBarcode().getAmount(),unloadState);
pos.getBarcode().getPartNumber(), pos.getBarcode().getAmount(),unloadState,ngMsg);
return dto;
}
......@@ -201,7 +201,7 @@ public class MicronSpUnloadController {
if (storage == null) {
throw new ValidateException("smfcore.valueNotExist", "{0}[{1}]不存在", new String[]{"storageId", pos.getStorageId()});
}
String ngMsg="";
int unloakOk = 0;
try {
//接口验证能否出库
......@@ -222,10 +222,11 @@ public class MicronSpUnloadController {
}
} catch (ApiException e) {
log.info("removal 料仓【" + storage.getName() + "_" + storage.getCid() + "】 仓位【" + pos.getPosName() + "】returnMaterial 失败");
ngMsg=e.getMessage();
log.info("removal 料仓【" + storage.getName() + "_" + storage.getCid() + "】 仓位【" + pos.getPosName() + "】returnMaterial 失败:"+ngMsg);
}
dtoResult.add(getUnloadDto(pos, unloakOk));
dtoResult.add(getUnloadDto(pos, unloakOk,ngMsg));
loginCache.updateLoginMap(storage.getCid(),SecurityUtils.getLoginUsername());
}
......
......@@ -32,4 +32,8 @@ public class SpUnloadDto {
@ApiModelProperty("出库结果,默认1=成功,0=失败")
private int unloadState = 1;
@ApiModelProperty("错误原因")
private String ngMsg = "";
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!