Commit 773da1ec LN

triggerMatReqOrder接口发送数据格式修改。

1 个父辈 253a9627
...@@ -287,6 +287,11 @@ public class Micron20031Api { ...@@ -287,6 +287,11 @@ public class Micron20031Api {
* *
*/ */
public static List<MatOrderBean> checkStockAvailable(Map<String,Integer> pnMap) throws ApiException { public static List<MatOrderBean> checkStockAvailable(Map<String,Integer> pnMap) throws ApiException {
// String resultStr="{\"materials\":[{\"materialType\":\"SOLDER_PASTE\",\"systemId\":\"\",\"typeOfReturn\":\"\",\"sapLocationMovementType\":\"\",\"matReqNo\":\"\",\"micronPn\":\"507-10187\",\"lotNo\":\"\",\"batchNo\":\"\",\"micronLotId\":\"\",\"location\":\"\",\"unitOfMeasures\":\"BOT\",\"equipId\":\"\",\"message\":\"\",\"status\":\"\",\"spoolStatus\":\"\",\"expiredDate\":\"\",\"stepId\":\"\",\"materialDocumentNo\":\"\",\"username\":\"\",\"mode\":\"\",\"quantity\":155.0,\"remainingQuantity\":0,\"expiredDate2\":\"\",\"stabilizationEndDate\":\"\",\"isQualLot\":\"\",\"exposureStartDateTime\":\"\",\"lotNo2\":\"\",\"targetSystemId\":\"\",\"transferMode\":\"\",\"adjustedQuantity\":0,\"manufacturerLotNo\":\"\",\"lotList\":{\"lots\":null},\"newMergeLotId\":\"\",\"inHouseMark\":\"\",\"leadFrameCount\":0,\"modSolderPaste\":\"\",\"supplier\":\"\",\"supplierPN\":\"\",\"printerName\":\"\"},{\"materialType\":\"SOLDER_PASTE\",\"systemId\":\"\",\"typeOfReturn\":\"\",\"sapLocationMovementType\":\"\",\"matReqNo\":\"\",\"micronPn\":\"507-10363\",\"lotNo\":\"\",\"batchNo\":\"\",\"micronLotId\":\"\",\"location\":\"\",\"unitOfMeasures\":\"BOT\",\"equipId\":\"\",\"message\":\"\",\"status\":\"\",\"spoolStatus\":\"\",\"expiredDate\":\"\",\"stepId\":\"\",\"materialDocumentNo\":\"\",\"username\":\"\",\"mode\":\"\",\"quantity\":504.0,\"remainingQuantity\":0,\"expiredDate2\":\"\",\"stabilizationEndDate\":\"\",\"isQualLot\":\"\",\"exposureStartDateTime\":\"\",\"lotNo2\":\"\",\"targetSystemId\":\"\",\"transferMode\":\"\",\"adjustedQuantity\":0,\"manufacturerLotNo\":\"\",\"lotList\":{\"lots\":null},\"newMergeLotId\":\"\",\"inHouseMark\":\"\",\"leadFrameCount\":0,\"modSolderPaste\":\"\",\"supplier\":\"\",\"supplierPN\":\"\",\"printerName\":\"\"}],\"status\":\"PASS\",\"message\":\"\"}";
// log.info("调用MES接口 checkStockAvailable 返回:" + resultStr);
//pnMap的key为pn, value为库存数量 //pnMap的key为pn, value为库存数量
String checkStockAvailableUrl = getUrl(api_CheckStockAvailable); String checkStockAvailableUrl = getUrl(api_CheckStockAvailable);
String auth = getAuthToken(); String auth = getAuthToken();
...@@ -340,8 +345,12 @@ public class Micron20031Api { ...@@ -340,8 +345,12 @@ public class Micron20031Api {
dataMap.put("Quantity",orderBean.getQuantity()); dataMap.put("Quantity",orderBean.getQuantity());
dataMap.put("MaterialType",MATERIAL_TYPE); dataMap.put("MaterialType",MATERIAL_TYPE);
log.info("调用MES接口 triggerMatReqOrder,参数:"+JsonUtil.toJsonStr(dataMap)); //发送集合
String resultStr = HttpHelper.postJsonWithAuth(checkStockAvailableUrl, dataMap, auth); List<Map<String,Object>> paramList=new ArrayList<>();
paramList.add(dataMap);
log.info("调用MES接口 triggerMatReqOrder,参数:"+JsonUtil.toJsonStr(paramList));
String resultStr = HttpHelper.postJsonWithAuth(checkStockAvailableUrl, paramList, auth);
log.info("调用MES接口 triggerMatReqOrder 返回:" + resultStr); log.info("调用MES接口 triggerMatReqOrder 返回:" + resultStr);
Object object=getResult(resultStr,"MicronPN"); Object object=getResult(resultStr,"MicronPN");
// MatReqNo // MatReqNo
......
...@@ -82,6 +82,10 @@ public class MicronSpOrderController { ...@@ -82,6 +82,10 @@ public class MicronSpOrderController {
MatOrderBean bean = new MatOrderBean(); MatOrderBean bean = new MatOrderBean();
bean.setMicronPN(partNumber); bean.setMicronPN(partNumber);
bean.setQuantity(qty); bean.setQuantity(qty);
if(ObjectUtil.isEmpty(unitOfMeasures)){
unitOfMeasures="BOT";
log.info("submitPn 默认 unitOfMeasures= BOT");
}
bean.setUnitOfMeasures(unitOfMeasures); bean.setUnitOfMeasures(unitOfMeasures);
// //
// Map<String, String> map=new HashMap<>(); // Map<String, String> map=new HashMap<>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!