| | |
| | | .contentType("application/json") |
| | | .header("Authorization", "Bearer " + token).form(map).execute().body(); |
| | | JSONObject result = JSONObject.parseObject(str); |
| | | log.info("主表长度============================================>"+result.getJSONArray("data").size()); |
| | | //jsonArray.forEach(); |
| | | //return null; |
| | | //主表参数表 |
| | | List<OrderParam> orderParams = orderParamService.list(); |
| | | if (result.getInteger("code") == 0) { |
| | |
| | | customerOrder = new CustomerOrder(); |
| | | } |
| | | //如果这个单子在OTC中取消状态 那就删除 |
| | | if (otcOrderStatus.equals("已取消")) { |
| | | if (otcOrderStatus.equals(OTC_MAIN_STATUS_CANCEL)) { |
| | | if (customerOrder.getId() != null) { |
| | | baseMapper.deleteById(customerOrder.getId()); |
| | | } |
| | |
| | | } else { |
| | | customerOrder.setCoState(CustomerOrderStateStringValues.PARTUNCHECKED); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.equals("已下达", otcMainStatus)) { |
| | | if (org.apache.commons.lang3.StringUtils.equals(OTC_MAIN_STATUS_TRANSMIT, otcMainStatus)) { |
| | | customerOrder.setCoState(CustomerOrderStateStringValues.TECHNOLOGYUNCHECK); |
| | | customerOrder.setOtcPartSync(Boolean.TRUE); |
| | | } |
| | |
| | | customerOrder.setCoState(CustomerOrderStateStringValues.TECHNOLOGYUNCHECK); |
| | | customerOrder.setOtcPartSync(Boolean.TRUE); |
| | | } |
| | | //审核状态为 01draft 草稿 |
| | | customerOrder.setIsAudit(AuditStateStringValues.DRAFT); |
| | | //审核状态为 03accepted 通过 |
| | | customerOrder.setIsAudit(AuditStateStringValues.ACCEPTED); |
| | | baseMapper.insert(customerOrder); |
| | | } |
| | | addCustomerPara(customerJSONObject, customerOrderJSONObject, customerOrder, orderParamList); |