| | |
| | | String[] split = orderNo.split("-"); |
| | | String orderNoS = split[0]; |
| | | //登录金蝶r |
| | | log.info("登录金蝶"); |
| | | ReturnT<String> start = loginAuthenticationHandler.start(); |
| | | log.info("登录金蝶:start:"+start); |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (null == docType) { |
| | | return SUCCESS; |
| | |
| | | KingDeeUtilType kingDeeUtilType = KingDeeUtilType.get(docType.getDocName()); |
| | | |
| | | //条件拼接 |
| | | log.info("条件拼接"); |
| | | JSONObject dataJsonObject = new JSONObject(); |
| | | dataJsonObject.put("Numbers",orderNoS); |
| | | dataJsonObject.put("EntryIds",""); |
| | |
| | | jsonObject.put("FormId",kingDeeUtilType.formId); |
| | | jsonObject.put("data", dataJsonObject); |
| | | String add = jsonObject.toJSONString(); |
| | | log.info("条件拼接:"+jsonObject); |
| | | |
| | | //下推 |
| | | log.info("下推"); |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject data = JSON.parseObject(response); |
| | | log.info("下推response:"+response); |
| | | Object IsSuccess = findValueByKey(JSON.parseObject(response), "IsSuccess"); |
| | | String bool=IsSuccess.toString(); |
| | | //下推完成原订单4转6 6.上报完成 |
| | |
| | | orderService.update(order,new EntityWrapper<Order>().eq("order_no",order.getOrderNo())); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("下推error:"+response); |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | |
| | | |
| | | public enum KingDeeUtilType { |
| | | |
| | | SAL_DELIVERYNOTICE(1, "发货通知单","SAL_DELIVERYNOTICE","FQty","销售出库单","SAL_OUTSTOCK",0,"DeliveryNotice_Outstock"), |
| | | SAL_DELIVERYNOTICE(1, "发货通知单","SAL_DELIVERYNOTICE","FQty","销售出库单","SAL_OUTSTOCK",0,"DeliveryNotice-Outstock"), |
| | | |
| | | //米多青岛 |
| | | STK_OutStockApply30(2, "试用品发货通知单","","","研发样品出库单","",0,""), |