| | |
| | | import cn.hutool.http.HttpRequest; |
| | | import com.yuanchu.mom.utils.JsonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import sun.net.www.http.HttpClient; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private static final String IFS_URL = "http://192.168.20.47:8008/PurchService.ashx?contract=ZTKJ&contractKey=4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo=&procedureName=QUERY_POL_RECEIPT_STD&userId=mes_user&inAttr={\"ORDER_NO\":\"-2050314\"}"; |
| | | |
| | | private static final String IMPORT_POL_RECEIVE = "http://192.168.20.47:8081/ErpServices/PurchaseReceiptService/importPolReceive"; |
| | | |
| | | private static final String IFS_UPDATE="http://192.168.20.47:8081/ErpServices/PurchaseReceiptService/importPolReceive"; |
| | | |
| | | private static final Map<String, String> GET_TOKEN_HEADER = new HashMap<>(2); |
| | | |
| | |
| | | */ |
| | | public static List<Map<String, Object>> ifsInterfaces() { |
| | | String result = HttpRequest.get(IFS_URL) |
| | | .header("Authorization", "Bearer " + getToken()) |
| | | .execute().body(); |
| | | Map<String, Object> map = JsonUtil.jsonToPojo(result, Map.class); |
| | | return JsonUtil.jsonToPojo(JsonUtil.jsonToString(map.get("LIST_INFO")), List.class); |
| | |
| | | List<BatchInfo> batchInfos = Arrays.asList(batchInfo); |
| | | System.out.println(importPolReceive(batchInfos)); |
| | | } |
| | | |
| | | public static void ifsUpdate(){ |
| | | |
| | | } |
| | | } |