mes-plan/src/main/java/com/chinaztt/mes/plan/controller/CustomerOrderController.java
@@ -304,14 +304,14 @@ /** * 同步otc订单数据 * * @param selectTime * @param pathCode 0:原路径;1:订单所属公司为ZTKJ的订单 * @param selectTime 选择日期,查询该日期后至当前时间的数据 * @param orderNo 订单编号 * @return */ @GetMapping("/otcCustomerOrderSync") public R otcCustomerOrderSync(@RequestParam("selectTime") String selectTime, @RequestParam("pathCode") String pathCode) { public R otcCustomerOrderSync(@RequestParam("selectTime") String selectTime, @RequestParam("orderNo") String orderNo) { log.info("---------------->"+selectTime); return customerOrderService.otcCustomerOrderSync(selectTime, pathCode); return customerOrderService.otcCustomerOrderSync(selectTime, orderNo); } mes-plan/src/main/java/com/chinaztt/mes/plan/service/CustomerOrderService.java
@@ -164,10 +164,10 @@ * 同步otc接口 * * @param selectTime * @param pathCode 0:原路径;1:订单所属公司为ZTKJ的订单 * @param orderNo * @return */ R otcCustomerOrderSync(String selectTime, String pathCode); R otcCustomerOrderSync(String selectTime, String orderNo); /** * 自动同步otc接口用于定时任务每个小时1次 mes-plan/src/main/java/com/chinaztt/mes/plan/util/CustomerOrderUtil.java
@@ -61,15 +61,10 @@ public R getOtcCustomerOrderFileList(String contractNumber) { try { String token = getToken(); Map<String, Object> map = new HashMap<>(); map.put("orderNo", contractNumber); map.put("size", 1000); JSONObject result = JSONObject.parseObject(HttpRequest.get(customerOrderClientConfigure.getOtcHost() + customerOrderClientConfigure.getOtcFileUrl()) .contentType("application/json") .header("Authorization", "Bearer " + token).form(map).execute().body()); JSONObject result = JSONObject.parseObject(HttpRequest.get(customerOrderClientConfigure.getOtcHost() + customerOrderClientConfigure.getOtcFileUrl() + contractNumber) .header("Authorization", "Bearer " + token).execute().body()); if (result.getInteger("code") == 0) { JSONObject jsonObject = result.getJSONObject("data"); JSONArray jsonArray = jsonObject.getJSONArray("records"); JSONArray jsonArray = result.getJSONArray("data"); return R.ok(jsonArray); } else { return R.failed("获取失败," + result.getString("msg"));