From aab7e50231c3502c7ea9b3cf942fb572e02c54f2 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 6 Jun 2023 10:40:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8B=89=E5=8F=96=E5=B7=A5=E5=8E=82=E5=B9=B6?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=95=B0=E6=8D=AE=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/jobhandler/FactoryXxlJob.java | 2 +- .../snm/service/impl/OrderServiceImpl.java | 106 +++++++++--------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java index 0847e26c2..3016b73c5 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java @@ -238,7 +238,7 @@ public class FactoryXxlJob { advanceEntity.setSenderMobile("");//发货人电话 可以为空 advanceEntity.setSenderAddress(""); //发货地址 可以为空 advanceEntity.setSenderName(""); //发货工厂名称 可以为空 - advanceEntity.setAdministratorsId(851);// 导入人 + advanceEntity.setAdministratorsId(1073);// 导入人 advanceEntity.setCreateTime(LocalDate.now()); //添加时间 advanceEntity.setCarsNum(v.getTcWla001()); //派车单--snm 可以为空 advanceEntity.setDeleteTime(0); // 删除时间 diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java index 285685ed2..48cef8aa1 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/snm/service/impl/OrderServiceImpl.java @@ -253,14 +253,14 @@ public class OrderServiceImpl implements IOrderService { * @param tc_wla001 派车单号 * @return */ - private ResponseStaorderPackagesVo orderPackageInfo (String statinLineNum, String packageNum, String tc_wla001) - { - RequestVo requestVo = new RequestVo(); - requestVo.setMethod("snimay.crm.externalinterface.package.order.get"); - - RequestOrderPackageInfoVo requestOrderPackageInfoVo = new RequestOrderPackageInfoVo(); - requestOrderPackageInfoVo.setLogistics_line_number(statinLineNum); - requestOrderPackageInfoVo.setPackage_num(packageNum); + private ResponseStaorderPackagesVo orderPackageInfo (String statinLineNum, String packageNum, String tc_wla001) + { + RequestVo requestVo = new RequestVo(); + requestVo.setMethod("snimay.crm.externalinterface.package.order.get"); + + RequestOrderPackageInfoVo requestOrderPackageInfoVo = new RequestOrderPackageInfoVo(); + requestOrderPackageInfoVo.setLogistics_line_number(statinLineNum); + requestOrderPackageInfoVo.setPackage_num(packageNum); // requestOrderPackageInfoVo.setMerge_number(mergeNumber); requestOrderPackageInfoVo.setSend_car_number(tc_wla001); Date date = new Date(); @@ -284,63 +284,63 @@ public class OrderServiceImpl implements IOrderService { } - /** - * 检查订单中存在的需要请求包条码详情的内容 - * - * @param responseStationOrderVo - */ - private void staorderPackageInfo (ResponseStationOrderVo responseStationOrderVo){ - responseStationOrderVo.getData().forEach(responseStationOrderInfoVo -> { - ResponseStaorderPackagesVo responseStaorderPackagesVo = orderPackageInfo(responseStationOrderInfoVo.getTC_WLB005(), null, responseStationOrderInfoVo.getTC_WLA001()); - if (responseStaorderPackagesVo.getCode() == 0) { - responseStationOrderInfoVo.setPACKAGE_LIST(responseStaorderPackagesVo.getData()); - } - }); - } + /** + * 检查订单中存在的需要请求包条码详情的内容 + * + * @param responseStationOrderVo + */ + private void staorderPackageInfo (ResponseStationOrderVo responseStationOrderVo){ + responseStationOrderVo.getData().forEach(responseStationOrderInfoVo -> { + ResponseStaorderPackagesVo responseStaorderPackagesVo = orderPackageInfo(responseStationOrderInfoVo.getTC_WLB005(), null, responseStationOrderInfoVo.getTC_WLA001()); + if (responseStaorderPackagesVo.getCode() == 0) { + responseStationOrderInfoVo.setPACKAGE_LIST(responseStaorderPackagesVo.getData()); + } + }); + } - /** - * 加密顺序:privateKey + data + publicKey + timestamp + publicKey + privateKey 加密方式:MD5 - * - * @return - */ - private String makeSystemSign (RequestSecBaseVo requestlLneNumberVo, Date date) throws + /** + * 加密顺序:privateKey + data + publicKey + timestamp + publicKey + privateKey 加密方式:MD5 + * + * @return + */ + private String makeSystemSign (RequestSecBaseVo requestlLneNumberVo, Date date) throws NoSuchFieldException, IllegalAccessException { - StringBuffer md5Source = new StringBuffer(); + StringBuffer md5Source = new StringBuffer(); - JSONObject json = new JSONObject(); + JSONObject json = new JSONObject(); - Class classTemp = null; - if (requestlLneNumberVo instanceof RequestLineNumberVo) { - classTemp = RequestLineNumberVo.class; - } else if (requestlLneNumberVo instanceof RequestOrderPackageInfoVo) { - classTemp = RequestOrderPackageInfoVo.class; - } + Class classTemp = null; + if (requestlLneNumberVo instanceof RequestLineNumberVo) { + classTemp = RequestLineNumberVo.class; + } else if (requestlLneNumberVo instanceof RequestOrderPackageInfoVo) { + classTemp = RequestOrderPackageInfoVo.class; + } - Field[] declaredFields = classTemp.getDeclaredFields(); + Field[] declaredFields = classTemp.getDeclaredFields(); - for (Field f : declaredFields) { - String fieldName = f.getName(); // 取出实体类中的属性名称 - Field declared = classTemp.getDeclaredField(fieldName); // 取出实体类中属性信息 - declared.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 - Object value = declared.get(requestlLneNumberVo); // 获取实体类中属性的值 - if (!ObjectUtils.isEmpty(value)) { - json.put(fieldName, value); - } + for (Field f : declaredFields) { + String fieldName = f.getName(); // 取出实体类中的属性名称 + Field declared = classTemp.getDeclaredField(fieldName); // 取出实体类中属性信息 + declared.setAccessible(true); //抑制java语言访问检查,反射访问private访问权限的属性值 + Object value = declared.get(requestlLneNumberVo); // 获取实体类中属性的值 + if (!ObjectUtils.isEmpty(value)) { + json.put(fieldName, value); } + } - md5Source.append(factorySnmdataProperties.getPrivateKey()).append(json.toJSONString()).append(date.getTime()).append(factorySnmdataProperties.getPublicKey()).append(factorySnmdataProperties.getPrivateKey()); - String md5 = null; - try { - md5 = DigestUtils.md5DigestAsHex(md5Source.toString().getBytes("utf-8")); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - return md5; + md5Source.append(factorySnmdataProperties.getPrivateKey()).append(json.toJSONString()).append(date.getTime()).append(factorySnmdataProperties.getPublicKey()).append(factorySnmdataProperties.getPrivateKey()); + String md5 = null; + try { + md5 = DigestUtils.md5DigestAsHex(md5Source.toString().getBytes("utf-8")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); } + return md5; } + +}