From 0ece5214b89d81e8856c620a73fa5db798050127 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 12 Jun 2025 10:30:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?demand:=20=E5=AF=B9=E6=8E=A5=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E6=9B=B4=E6=96=B0/=E6=9F=A5=E8=AF=A2=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=AF=B9=E6=8E=A5=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E5=AF=BC=E5=87=BA=E8=BF=9B=E4=BB=93=E5=8D=95=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=89=A9=E6=B5=81=E8=BD=A8=E8=BF=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/web/emis/EmisCommonController.java | 322 ++++++++++++++- .../erp/emis/mapper/EmisWaybillMapper.java | 14 +- .../erp/emis/service/IEmisWaybillService.java | 28 ++ .../impl/EmisTmsScanRecordServiceImpl.java | 4 + .../service/impl/EmisWaybillServiceImpl.java | 315 +++++++++++++++ .../resources/mapper/EmisWaybillMapper.xml | 373 ++++++++++++++++++ 6 files changed, 1053 insertions(+), 3 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommonController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommonController.java index 55b0102a3..5e8404ecf 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommonController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisCommonController.java @@ -1317,6 +1317,55 @@ public class EmisCommonController extends EmisBaseController } + /** + * 导出进仓单-对接外部 + * + * @param response HTTP响应对象 + * @param queryInfo 查询参数JSON对象 + * @return JSONObject 统一格式的响应 + */ + @Log(title = "导出进仓单", businessType = BusinessType.EXPORT) + @RequestMapping("/exportCustomerWarehouse") + public void exportCustomerWarehouse(HttpServletResponse response, @RequestBody JSONObject queryInfo) { + try { + // 1. 参数校验 + if (queryInfo == null) { + log.error("查询参数不能为空"); + } + + // 2. 获取参数 + String logisticNo = queryInfo.getString("logisticNo"); + String fileType = queryInfo.getString("fileType"); + String appId = queryInfo.getString("appId"); + String appKey = queryInfo.getString("appKey"); + String sign = queryInfo.getString("sign"); + + // 3. 参数完整性校验 + if (StringUtils.isAnyEmpty(logisticNo, fileType, appId, appKey, sign)) { + log.error("参数不完整"); + } + + // 4. 验证签名 + if (!emisCustomerSignService.verifySign(appId, appKey, logisticNo, sign)) { + log.error("签名验证失败"); + } + + EmisWaybill emisWaybill = emisWaybillService.selectCustEmisWaybillByBillCode(logisticNo, appId); + if (emisWaybill == null) { + log.error("运单号不存在"); + } + + // 5. 调用service处理导出 + emisWaybillService.genWarehouseInTplFile(response, emisWaybill.getOrderSn(), fileType); + log.debug("导出成功"); + + } catch (EmisBizError ex) { + log.error("导出异常", ex.getMessage()); + } catch (Exception ex) { + log.error("导出异常,请联系客服", ex); + } + } + /** * 对接外部接口-根据订单信息生成运单 */ @@ -1418,10 +1467,281 @@ public class EmisCommonController extends EmisBaseController } } + /** + * 对接外部接口-查询运单信息 + */ + @PostMapping("/queryWaybillInfo") + @ResponseBody + public JSONObject queryWaybillInfo(@RequestBody JSONObject queryInfo) { + try { + if (queryInfo == null) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "查询信息不能为空"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 1. 获取参数 + String appId = queryInfo.getString("appId"); + String appKey = queryInfo.getString("appKey"); + String logisticNo = queryInfo.getString("logisticNo"); + String sign = queryInfo.getString("sign"); + + // 2. 参数校验 + if (StringUtils.isAnyEmpty(appId, appKey, logisticNo, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "参数不完整"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 3. 验证签名 + if (!emisCustomerSignService.verifySign(appId, appKey, logisticNo, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "签名验证失败"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 4. 解码查询数据 + + // 5. 调用service处理查询 + Map result = emisWaybillService.queryWaybillInfo(logisticNo, appId); + + // 6. 转换返回结果 + JSONObject response = new JSONObject(); + List> resultList = (List>) result.get("result"); + + // 构建返回的data数据 + JSONArray dataArray = new JSONArray(); + if (resultList != null) { + for (Map item : resultList) { + JSONObject dataItem = new JSONObject(); + // 订单基本信息 + dataItem.put("orderNo", item.get("orderNo")); + dataItem.put("logisticNo", item.get("logisticNo")); + dataItem.put("orderDate", item.get("orderDate")); + dataItem.put("intoWarehouseBillCode", item.get("intoWarehouseBillCode")); + dataItem.put("intoWarehouseName", item.get("intoWarehouseName")); + dataItem.put("intoWarehouseContact", item.get("intoWarehouseContact")); + dataItem.put("intoWarehousePhone", item.get("intoWarehousePhone")); + dataItem.put("intoWarehouseAddress", item.get("intoWarehouseAddress")); + dataItem.put("pickStartDate", item.get("pickStartDate")); + dataItem.put("sendDate", item.get("sendDate")); + dataItem.put("blSign", item.get("blSign")); + dataItem.put("orderStatus", item.get("orderStatus")); + + // 运输信息 + dataItem.put("transLine", item.get("transLine")); + dataItem.put("productType", item.get("productType")); + dataItem.put("customsClear", item.get("customsClear")); + dataItem.put("customsEclaration", item.get("customsEclaration")); + dataItem.put("pickupMethod", item.get("pickupMethod")); + dataItem.put("dispatchMethod", item.get("dispatchMethod")); + dataItem.put("packType", item.get("packType")); + dataItem.put("paymentType", item.get("paymentType")); + dataItem.put("custNo", item.get("custNo")); + dataItem.put("salemen", item.get("salemen")); + + // 收件人信息 + dataItem.put("country", item.get("country")); + dataItem.put("province", item.get("province")); + dataItem.put("city", item.get("city")); + dataItem.put("district", item.get("district")); + dataItem.put("consignee", item.get("consignee")); + dataItem.put("company", item.get("company")); + dataItem.put("tel", item.get("tel")); + dataItem.put("address", item.get("address")); + dataItem.put("postCode", item.get("postCode")); + + // 寄件人信息 + dataItem.put("sender", item.get("sender")); + dataItem.put("senderCountry", item.get("senderCountry")); + dataItem.put("senderProvince", item.get("senderProvince")); + dataItem.put("senderCity", item.get("senderCity")); + dataItem.put("senderDistrict", item.get("senderDistrict")); + dataItem.put("senderCompany", item.get("senderCompany")); + dataItem.put("senderTel", item.get("senderTel")); + dataItem.put("senderAddress", item.get("senderAddress")); + + // 包裹信息 + dataItem.put("batchNumber", item.get("batchNumber")); + dataItem.put("parcelQty", item.get("parcelQty")); + dataItem.put("weight", item.get("weight")); + dataItem.put("volume", item.get("volume")); + dataItem.put("goodsInfo", item.get("goodsInfo")); + + // 其他信息 + dataItem.put("estimateFreight", item.get("estimateFreight")); + dataItem.put("signDate", item.get("signDate")); + dataItem.put("signMan", item.get("signMan")); + dataItem.put("remark", item.get("remark")); + + dataArray.add(dataItem); + } + } + + // 设置返回状态 + response.put("code", 0); // 查询成功 + response.put("message", "查询成功"); + response.put("data", dataArray.toJSONString()); + + return response; + } catch (Exception ex) { + ex.printStackTrace(); + JSONObject response = new JSONObject(); + response.put("code", 1); + response.put("message", ex instanceof EmisBizError ? ex.getMessage() : "查询异常,请联系客服"); + response.put("data", "[]"); + return response; + } + } + + /** + * 对接客户接口-查询物流轨迹信息 + */ + @PostMapping("/queryCustomerTraceInfo") + @ResponseBody + public JSONObject queryCustomerTraceInfo(@RequestBody JSONObject queryInfo) { + try { + if (queryInfo == null) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "查询信息不能为空"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 1. 获取参数 + String appId = queryInfo.getString("appId"); + String appKey = queryInfo.getString("appKey"); + String logisticNo = queryInfo.getString("logisticNo"); + String lang = queryInfo.getString("lang"); + String sign = queryInfo.getString("sign"); + + // 2. 参数校验 + if (StringUtils.isAnyEmpty(appId, appKey, logisticNo, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "参数不完整"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 3. 验证签名 + if (!emisCustomerSignService.verifySign(appId, appKey, logisticNo, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "签名验证失败"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 4. 调用service处理查询 + EmisWaybill emisWaybill = emisWaybillService.selectCustEmisWaybillByBillCode(logisticNo, appId); + if (emisWaybill == null) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "运单不存在"); + errorResponse.put("data", "[]"); + return errorResponse; + } + + // 获取轨迹信息 + List stepList = emisTmsScanRecordService.queryWaybillTraceInfo(logisticNo, lang, false); + + // 构建返回数据 + JSONObject response = new JSONObject(); + JSONArray dataArray = new JSONArray(); + + JSONObject dataItem = new JSONObject(); + dataItem.put("logisticNo", logisticNo); + dataItem.put("sendCountry", emisWaybill.getSendCountryName()); + dataItem.put("country", emisWaybill.getReceiveCountryName()); + dataItem.put("steps", stepList); + dataArray.add(dataItem); + + // 设置返回状态 + response.put("code", 0); // 查询成功 + response.put("message", "查询成功"); + response.put("data", dataArray.toJSONString()); + + return response; + } catch (Exception ex) { + ex.printStackTrace(); + JSONObject response = new JSONObject(); + response.put("code", 1); + response.put("message", ex instanceof EmisBizError ? ex.getMessage() : "查询异常,请联系客服"); + response.put("data", "[]"); + return response; + } + } + + /** + * 对接外部接口-更新运单信息 + */ + @PostMapping("/updateWaybillInfo") + @ResponseBody + public JSONObject updateWaybillInfo(@RequestBody JSONObject orderInfo) { + try { + if (orderInfo == null) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "订单信息不能为空"); + return errorResponse; + } + + // 1. 获取参数 + String appId = orderInfo.getString("appId"); + String appKey = orderInfo.getString("appKey"); + String orderBase64Data = orderInfo.getString("orderBase64Data"); + String sign = orderInfo.getString("sign"); + + // 2. 参数校验 + if (StringUtils.isAnyEmpty(appId, appKey, orderBase64Data, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "参数不完整"); + return errorResponse; + } + + // 3. 验证签名 + if (!emisCustomerSignService.verifySign(appId, appKey, orderBase64Data, sign)) { + JSONObject errorResponse = new JSONObject(); + errorResponse.put("code", 1); + errorResponse.put("message", "签名验证失败"); + return errorResponse; + } + + // 4. 解码订单数据 + String orderDataStr = new String(Base64.getDecoder().decode(orderBase64Data), StandardCharsets.UTF_8); + JSONObject orderData = JSONObject.parseObject(orderDataStr); + + // 5. 调用service处理更新 + emisWaybillService.updateWaybillInfo(orderData, appId); + + // 6. 返回成功响应 + JSONObject response = new JSONObject(); + response.put("code", 0); + response.put("message", "更新成功"); + return response; + + } catch (Exception ex) { + ex.printStackTrace(); + JSONObject response = new JSONObject(); + response.put("code", 1); + response.put("message", ex instanceof EmisBizError ? ex.getMessage() : "处理异常,请联系客服"); + return response; + } + } + public static void main(String[] args) { String appId = "APP17490075851304001"; String appKey = "sDAbUqxjsWCbHGJlEi0bL3OXgB9SoyK4"; - String orderBase64Data = "W3sKICAib3JkZXJObyI6ICIxOTIxMDMwNzI3Njc2MTk4OTE0IiwKICAidHJhbnNMaW5lIjogIuafrOWflOWvqOmZhui/kCIsCiAgInByb2R1Y3RUeXBlIjogIumZhui/kOeJueaDoOi+viIsCiAgImN1c3RvbXNDbGVhciI6ICIzIiwKICAiY3VzdG9tc0VjbGFyYXRpb24iOiAiMyIsCiAgInBpY2t1cE1ldGhvZCI6ICIxIiwKICAiZGlzcGF0Y2hNZXRob2QiOiAiMSIsCiAgInBhY2tUeXBlIjogIjIiLAogICJwYXltZW50VHlwZSI6ICIyIiwKICAiY3VzdE5vIjogIlRMWjA1MTIzMDE2IiwKICAic2FsZW1lbiI6ICLnlLDlsI/ovokiLAogICJjb3VudHJ5IjogIu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Um9hZCAjNCBTYW5na3JvcyBjaGVhdCB2aWxsYWdlLCBUcmFwZWFuZyBLb25nIGNvbW11bmUsIFNhbXJhb25nIFRvbmcgZGlzdHJpY3QgS2FtcG9uZyBTcGV1IHByb3ZpbmNlLENhbWJvZGlhIiwKICAicG9zdENvZGUiOiAiIiwKICAic2VuZGVyIjogIum7hOWTjeaDoDEiLAogICJzZW5kZXJDb3VudHJ5IjogIuS4reWbvSIsCiAgInNlbmRlclByb3ZpbmNlIjogIuWuieW+veecgSIsCiAgInNlbmRlclRlbCI6ICIxMjM0NTYiLAogICJzZW5kZXJBZGRyZXNzIjogIuaxn+iLj+ecgeW8oOWutua4r+W4guS6uuawkei3rzEyNeWPt+WbveazsOaWsOS4lue6quW5v+WcujI35qW8MSIsCiAgInBhcmNlbFF0eSI6IDEsCiAgIndlaWdodCI6IDEwMDAsCiAgImdvb2RzSW5mbyI6ICLpnaLovoXmlpkiCn0="; String securityKey = "M7SGAUenMSkYfBZR8t9FQjwqwbZCDaGY"; String signStr = appId + appKey + orderBase64Data + securityKey; String generatedSign = DigestUtils.md5Hex(signStr); diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillMapper.java index 406885b55..d22f59ab1 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillMapper.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillMapper.java @@ -57,6 +57,14 @@ public interface EmisWaybillMapper extends BaseMapper */ public List selectEmisWaybillList(EmisWaybill emisWaybill); + /** + * 查询列表 + * + * @param emisWaybill + * @return 集合 + */ + public List selectEmisWaybillListByExternal(EmisWaybill emisWaybill); + /** * 查询订单列表 * @param emisWaybill @@ -290,10 +298,12 @@ public interface EmisWaybillMapper extends BaseMapper List selectWaybillListBySiteBatchStatus(@Param("offset") int offset, @Param("pageSize") int pageSize); /** - * 根据客户单号查运单 + * 查询客户运单信息 * - * @param custOrderId + * @param queryWaybill * @return */ + EmisWaybill selectCustEmisWaybillByBillCode(EmisWaybill queryWaybill); + EmisWaybill selectEmisWaybillByCustOrderId(String custOrderId); } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java index 7e95ea237..023557730 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.xdadan.erp.common.core.audit.IDataAuditService; import com.xdadan.erp.emis.domain.EmisWaybill; import com.xdadan.erp.emis.domain.exception.EmisBizError; @@ -261,4 +262,31 @@ public interface IEmisWaybillService extends IDataAuditService */ Map processOrderToWaybill(JSONArray orderInfo, String appId) throws EmisBizError; + /** + * 查询运单信息 + * + * @param logisticNo 运单号 + * @param appId 应用ID + * @return 查询结果 + * @throws EmisBizError 业务异常 + */ + Map queryWaybillInfo(String logisticNo, String appId) throws EmisBizError; + + /** + * 查询客户运单信息 + * + * @param logisticNo + * @param appId + * @return + */ + EmisWaybill selectCustEmisWaybillByBillCode(String logisticNo, String appId); + + /** + * 更新运单信息 + * + * @param orderData 订单数据 + * @param appId 应用ID + * @throws EmisBizError 业务异常 + */ + void updateWaybillInfo(JSONObject orderData, String appId) throws EmisBizError; } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java index 59b480743..535e26516 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java @@ -31,6 +31,7 @@ import com.xdadan.erp.emis.mapper.*; import com.xdadan.erp.emis.service.EmisBaseService; import com.xdadan.erp.emis.utils.Kd100Helper; import com.xdadan.erp.emis.utils.WaybillHelper; +import jodd.util.StringUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -2661,6 +2662,9 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm Map step = new HashMap<>(); step.put("time", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,scanRecord.getScanDate())); step.put("status",scanRecord.getScanType()); + if (StringUtil.isNotBlank(scanRecord.getScanType())) { + step.put("scanType", DictUtils.getDictLabel("emis_scan_type", scanRecord.getScanType())); + } step.put("content", content); stepList.add(step); } diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index e741cca8f..0df86280e 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -49,6 +49,7 @@ package com.xdadan.erp.emis.service.impl; import org.apache.commons.collections.MapUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; + import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; import org.springframework.scheduling.annotation.Async; @@ -60,6 +61,7 @@ package com.xdadan.erp.emis.service.impl; import java.awt.image.BufferedImage; import java.io.*; import java.math.BigDecimal; + import java.math.RoundingMode; import java.net.URLEncoder; import java.text.DecimalFormat; import java.time.LocalDate; @@ -5026,6 +5028,87 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb // } } + private void cvtWaybillByUpdateExternal(EmisWaybill emisWaybillSave) throws EmisBizError { + + // 线路转换 + EmisTransLine transLine = getTransLineByName(emisWaybillSave.getTransLineType()); + if (transLine == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "线路不正确"); + } + emisWaybillSave.setTransLineType(transLine.getLineCode()); + + // 产品转换 + EmisTransProduct transProduct = getTransProductByName(transLine.getLineCode(), + emisWaybillSave.getProductType()); + if (transProduct == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "产品不正确"); + } + emisWaybillSave.setProductType(transProduct.getProdCode()); + + // 收件国家省市区转换 + String receiveCountryCode = getCountryCodeByName(emisWaybillSave.getReceiveCountry()); + if (receiveCountryCode == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "收件国家不正确"); + } + + String rcvProviceCode = getChildRegionCodeByName(receiveCountryCode, null, + emisWaybillSave.getReceiveProvince()); + if (rcvProviceCode == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "收件省不正确"); + } + + String rcvCityCode = null; + if (!StringUtils.isEmpty(emisWaybillSave.getReceiveCity())) { + rcvCityCode = getChildRegionCodeByName(receiveCountryCode, rcvProviceCode, + emisWaybillSave.getReceiveCity()); + } + + String rcvDistrictCode = null; + if (!StringUtils.isEmpty(emisWaybillSave.getReceiveCounty())) { + rcvDistrictCode = getChildRegionCodeByName(receiveCountryCode, rcvCityCode, + emisWaybillSave.getReceiveCounty()); + } + + emisWaybillSave.setReceiveCountry(receiveCountryCode); + emisWaybillSave.setReceiveProvince(rcvProviceCode); + emisWaybillSave.setReceiveCity(rcvCityCode); + emisWaybillSave.setReceiveCounty(rcvDistrictCode); + + // 寄件国家省市区 + String sendCountryCode = getCountryCodeByName(emisWaybillSave.getSendCountry()); + if (sendCountryCode == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "寄件国家不正确"); + } + String sendProviceCode = getChildRegionCodeByName(sendCountryCode, null, emisWaybillSave.getSendProvince()); + if (sendProviceCode == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "寄件省不正确"); + } + + String sendCityCode = null; + if (!StringUtils.isEmpty(emisWaybillSave.getSendCity())) { + sendCityCode = getChildRegionCodeByName(sendCountryCode, sendProviceCode, emisWaybillSave.getSendCity()); + } + String sendDistrictCode = null; + if (!StringUtils.isEmpty(emisWaybillSave.getSendCounty())) { + sendDistrictCode = getChildRegionCodeByName(sendCountryCode, sendCityCode, emisWaybillSave.getSendCounty()); + } + + emisWaybillSave.setSendCountry(sendCountryCode); + emisWaybillSave.setSendProvince(sendProviceCode); + emisWaybillSave.setSendCity(sendCityCode); + emisWaybillSave.setSendCounty(sendDistrictCode); + +// // 获取月结客户的编码和名称 +// EmisCustomerUser emisCustomerUser = getCustomerUserByMonthlyPayCode(emisWaybillSave.getCustNo()); +// if (emisCustomerUser == null) { +// throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "月结客户不存在"); +// } +// emisWaybillSave.setCustomerCode(emisCustomerUser.getCustomerCode()); +// emisWaybillSave.setPayee(emisCustomerUser.getPayee()); +// emisWaybillSave.setSalesmen(emisCustomerUser.getSalesmen()); + + } + /** * 新开单-外部 * @@ -5498,6 +5581,238 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb return result; } + @Override + public Map queryWaybillInfo(String logisticNo, String appId) throws EmisBizError { + // 1. 构建查询条件 + EmisWaybill queryWaybill = new EmisWaybill(); + + EmisCustomerSign emisCustomerSign = emisCustomerSignMapper.selectEmisCustomerSignByAppId(appId); + queryWaybill.setCustNo(emisCustomerSign.getCustNo()); + queryWaybill.setBillCode(logisticNo); + + // 2. 执行查询 + List waybillList = emisWaybillMapper.selectEmisWaybillListByExternal(queryWaybill); + + // 3. 转换结果 + List> resultList = new ArrayList<>(); + for (EmisWaybill waybill : waybillList) { + Map resultItem = new HashMap<>(); + + // 订单基本信息 + resultItem.put("orderNo", waybill.getCustOrderId()); + resultItem.put("logisticNo", waybill.getBillCode()); + resultItem.put("orderDate", + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, waybill.getOrderDate())); + resultItem.put("intoWarehouseBillCode", waybill.getIntoWarehouseBillCode()); + + // 获取仓库信息 + if (StringUtils.isNotEmpty(waybill.getIntoWarehouseCode())) { + EmisSite warehouse = getSiteByCode(waybill.getIntoWarehouseCode()); + if (warehouse != null) { + resultItem.put("intoWarehouseName", warehouse.getSiteName()); + resultItem.put("intoWarehouseContact", warehouse.getManager()); + resultItem.put("intoWarehousePhone", warehouse.getManagerPhone()); + resultItem.put("intoWarehouseAddress", warehouse.getAddress()); + } + } + + resultItem.put("blSign", waybill.getBlSign()); + resultItem.put("orderStatus", waybill.getOrderStatus()); + + // 运输信息 + resultItem.put("transLine", waybill.getTransLineTypeName()); + resultItem.put("productType", waybill.getProductTypeName()); + // resultItem.put("customsClear", DictUtils.getDictLabel("emis_customs_clear", + // waybill.getCustomsClear())); + // resultItem.put("customsEclaration", + // DictUtils.getDictLabel("emis_declare_mode", waybill.getCustomsEclaration())); + // resultItem.put("pickupMethod", DictUtils.getDictLabel("emis_qujian_fangshi", + // waybill.getPickupMethod())); + // resultItem.put("dispatchMethod", + // DictUtils.getDictLabel("emis_tab_dispatch_mode", + // waybill.getDispatchMethod())); + // resultItem.put("packType", DictUtils.getDictLabel("emis_tab_packing_type", + // waybill.getPackType())); + // resultItem.put("paymentType", DictUtils.getDictLabel("emis_payment_type", + // waybill.getPaymentType())); + resultItem.put("customsClear", waybill.getCustomsClear()); + resultItem.put("customsEclaration", waybill.getCustomsEclaration()); + resultItem.put("pickupMethod", waybill.getPickupMethod()); + resultItem.put("dispatchMethod", waybill.getDispatchMethod()); + resultItem.put("packType", waybill.getPackType()); + resultItem.put("paymentType", waybill.getPaymentType()); + resultItem.put("custNo", waybill.getCustNo()); + resultItem.put("salemen", waybill.getSalesmen()); + + // 收件人信息 + resultItem.put("country", waybill.getReceiveCountryName()); + resultItem.put("province", waybill.getReceiveProvinceName()); + resultItem.put("city", waybill.getReceiveCityName()); + resultItem.put("district", waybill.getReceiveCountyName()); + resultItem.put("consignee", waybill.getReceiveName()); + resultItem.put("company", waybill.getReceiveCompany()); + resultItem.put("tel", waybill.getReceiveMobile()); + resultItem.put("address", waybill.getReceiveAddress()); + resultItem.put("postCode", waybill.getReceivePostcode()); + + // 寄件人信息 + resultItem.put("sender", waybill.getSendName()); + resultItem.put("senderCountry", waybill.getSendCountryName()); + resultItem.put("senderProvince", waybill.getSendProvinceName()); + resultItem.put("senderCity", waybill.getSendCityName()); + resultItem.put("senderDistrict", waybill.getSendCountyName()); + resultItem.put("senderCompany", waybill.getSendCompany()); + resultItem.put("senderTel", waybill.getSendMobile()); + resultItem.put("senderAddress", waybill.getSendAddress()); + + // 包裹信息 + resultItem.put("parcelQty", waybill.getParcelQty()); + if (waybill.getBillWeight() != null) { + resultItem.put("weight", waybill.getBillWeight().setScale(2, RoundingMode.HALF_UP)); + + } + if (waybill.getSettlementWeight() != null) { + resultItem.put("settlementWeight", waybill.getSettlementWeight().setScale(2, RoundingMode.HALF_UP)); + } + if (waybill.getTotalVolume() != null) { + resultItem.put("volume", waybill.getTotalVolume().setScale(2, RoundingMode.HALF_UP)); + } + resultItem.put("goodsInfo", waybill.getGoodsInfo()); + + // 其他信息 + resultItem.put("estimateFreight", waybill.getFreight().setScale(2, RoundingMode.HALF_UP)); + if (waybill.getSignDate() != null) { + resultItem.put("signDate", + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, waybill.getSignDate())); + } + resultItem.put("signMan", waybill.getSignMan()); + resultItem.put("remark", waybill.getRemark()); + + resultList.add(resultItem); + } + + // 4. 返回结果 + Map result = new HashMap<>(); + result.put("result", resultList); + return result; + } + + @Override + public EmisWaybill selectCustEmisWaybillByBillCode(String logisticNo, String appId) { + if (StringUtils.isAnyBlank(logisticNo, appId)) { + return null; + } + EmisCustomerSign emisCustomerSign = emisCustomerSignMapper.selectEmisCustomerSignByAppId(appId); + if (emisCustomerSign == null) { + return null; + } + EmisWaybill queryWaybill = new EmisWaybill(); + queryWaybill.setCustNo(emisCustomerSign.getCustNo()); + queryWaybill.setBillCode(logisticNo); + return emisWaybillMapper.selectCustEmisWaybillByBillCode(queryWaybill); + } + + @Override + public void updateWaybillInfo(JSONObject orderData, String appId) throws EmisBizError { + // 1. 获取订单号 + String logisticNo = orderData.getString("logisticNo"); + if (StringUtils.isEmpty(logisticNo)) { + throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "运单号不能为空"); + } + + // 2. 查询原运单信息 + EmisWaybill oldWaybill = selectCustEmisWaybillByBillCode(logisticNo,appId); + if (oldWaybill == null) { + throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "运单不存在"); + } + + // 3. 检查运单状态 + if (OrderStatus.CANCEL.statusCode.equals(oldWaybill.getOrderStatus())) { + throw new EmisBizError(EmisBizErrorType.FAIL, "已取消,不能修改"); + } + if (!"0".equals(oldWaybill.getOrderStatus())) { + throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "已揽件,不能修改!"); + } + + // 4. 构建更新对象 + EmisWaybill waybillUpdate = new EmisWaybill(); + BeanUtils.copyProperties(oldWaybill, waybillUpdate); + + // 5. 更新基本信息 + waybillUpdate.setTransLineType(orderData.getString("transLine")); + waybillUpdate.setProductType(orderData.getString("productType")); + waybillUpdate.setCustomsClear(orderData.getString("customsClear")); + waybillUpdate.setCustomsEclaration(orderData.getString("customsEclaration")); + waybillUpdate.setPickupMethod(orderData.getString("pickupMethod")); + waybillUpdate.setDispatchMethod(orderData.getString("dispatchMethod")); + waybillUpdate.setPackType(orderData.getString("packType")); + waybillUpdate.setPaymentType(orderData.getString("paymentType")); +// waybillUpdate.setCustNo(orderData.getString("custNo")); +// waybillUpdate.setSalesmen(orderData.getString("salemen")); + + // 6. 更新收件人信息 + waybillUpdate.setReceiveCountry(orderData.getString("country")); + waybillUpdate.setReceiveProvince(orderData.getString("province")); + waybillUpdate.setReceiveCity(orderData.getString("city")); + waybillUpdate.setReceiveCounty(orderData.getString("district")); + waybillUpdate.setReceiveName(orderData.getString("consignee")); + waybillUpdate.setReceiveCompany(orderData.getString("company")); + waybillUpdate.setReceiveTel(orderData.getString("tel")); + waybillUpdate.setReceiveAddress(orderData.getString("address")); + waybillUpdate.setReceivePostcode(orderData.getString("postCode")); + + // 7. 更新寄件人信息 + waybillUpdate.setSendName(orderData.getString("sender")); + waybillUpdate.setSendCountry(orderData.getString("senderCountry")); + waybillUpdate.setSendProvince(orderData.getString("senderProvince")); + waybillUpdate.setSendCity(orderData.getString("senderCity")); + waybillUpdate.setSendCounty(orderData.getString("senderDistrict")); + waybillUpdate.setSendCompany(orderData.getString("senderCompany")); + waybillUpdate.setSendTel(orderData.getString("senderTel")); + waybillUpdate.setSendAddress(orderData.getString("senderAddress")); + + // 8. 更新包裹信息 + waybillUpdate.setParcelQty(orderData.getInteger("parcelQty")); + waybillUpdate.setBillWeight(orderData.getBigDecimal("weight")); + waybillUpdate.setTotalVolume(orderData.getBigDecimal("volume")); + waybillUpdate.setGoodsInfo(orderData.getString("goodsInfo")); + waybillUpdate.setOrderRemark(orderData.getString("remark")); + + // 9. 更新货物信息 + String goods = orderData.getString("goods"); + // 处理goods信息 + List declareGoodsList = new ArrayList<>(); + if (StringUtils.isNotEmpty(goods)) { + JSONArray goodsArray = JSON.parseArray(goods); + if (CollectionUtil.isNotEmpty(goodsArray)) { + for (int j = 0; j < goodsArray.size(); j++) { + JSONObject goodsItem = goodsArray.getJSONObject(j); + EmisWaybillDeclareGoods declareGoods = new EmisWaybillDeclareGoods(); + declareGoods.setHscode(goodsItem.getString("itemNo")); + declareGoods.setGoodsName(goodsItem.getString("name")); + declareGoods.setBrand(goodsItem.getString("brand")); + declareGoods.setGoodsModel(goodsItem.getString("model")); + declareGoods.setBarcode(goodsItem.getString("barcode")); + declareGoods.setHscode(goodsItem.getString("hscode")); + declareGoods.setCargoQty(BigDecimal.valueOf(goodsItem.getInteger("qty"))); + declareGoods.setPrice(goodsItem.getBigDecimal("price")); + declareGoods.setUnit(goodsItem.getString("unit")); + declareGoods.setMaterial(goodsItem.getString("texture")); + declareGoods.setPurpose(goodsItem.getString("purpose")); + declareGoods.setNationArea(goodsItem.getString("nativeCountry")); + declareGoodsList.add(declareGoods); + } + } + } + waybillUpdate.setDeclareGoodsList(declareGoodsList); + + cvtWaybillByUpdateExternal(waybillUpdate); + + waybillUpdate.setId(oldWaybill.getId()); + waybillUpdate.setCustomerCode(oldWaybill.getCustomerCode()); + reUpdateWayBillByOms(oldWaybill, waybillUpdate); + } + diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 75171053b..f7db99301 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1482,6 +1482,362 @@ createDay + + + + + + \ No newline at end of file From 7dfc212251588d56a891baf0e1238e2883cb5b65 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 12 Jun 2025 10:33:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?demand:=20=E5=AF=B9=E6=8E=A5=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E6=9B=B4=E6=96=B0/=E6=9F=A5=E8=AF=A2=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=AF=B9=E6=8E=A5=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E5=AF=BC=E5=87=BA=E8=BF=9B=E4=BB=93=E5=8D=95=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=89=A9=E6=B5=81=E8=BD=A8=E8=BF=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/web/emis/EmisTmsSiteBatchMissController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchMissController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchMissController.java index aae21306f..71a8d05dc 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchMissController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTmsSiteBatchMissController.java @@ -37,7 +37,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 查询TMS漏组批次信息列表 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:list')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:list')") @GetMapping("/list") public TableDataInfo list(EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) { startPage(); @@ -73,7 +73,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 导出TMS漏组批次信息列表 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:export')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:export')") @Log(title = "TMS漏组批次信息", businessType = BusinessType.EXPORT) @GetMapping("/export") public AjaxResult export(EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) { @@ -86,7 +86,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 获取TMS漏组批次信息详细信息 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:query')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(emisTmsSiteBatchMissService.selectEmisTmsSiteBatchMissById(id)); @@ -95,7 +95,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 新增TMS漏组批次信息 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:add')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:add')") @Log(title = "TMS漏组批次信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) { @@ -105,7 +105,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 修改TMS漏组批次信息 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:edit')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:edit')") @Log(title = "TMS漏组批次信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody EmisTmsSiteBatchMiss emisTmsSiteBatchMiss) { @@ -115,7 +115,7 @@ public class EmisTmsSiteBatchMissController extends BaseController { /** * 删除TMS漏组批次信息 */ - @PreAuthorize("@ss.hasPermi('emis:tms:site:batch:miss:remove')") + @PreAuthorize("@ss.hasPermi('emis:emisTmsSiteBatchMiss:remove')") @Log(title = "TMS漏组批次信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) {