关务推送增加字段,发测试

This commit is contained in:
秦鸿展
2026-07-06 19:56:54 +08:00
parent 02acda9e23
commit 930894b37e
9 changed files with 26 additions and 37 deletions
@@ -18,7 +18,7 @@ import java.util.Set;
/**
* bms财务结算系统feign调用接口
*/
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface BmsServiceFeign {
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33", fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99", fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface OmsServiceFeign {
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class)
public interface WlhyServiceFeign {
/**
@@ -21,7 +21,7 @@ import java.util.Map;
* @description: TODO
* @date 2024/5/10 8:58
**/
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.32:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.33.0.109:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface WmsServiceFeign {
/**
@@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,fallbackFactory = RemoteBmsFeignFallbackFactory.class,url = "http://10.102.192.33:8018", configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,fallbackFactory = RemoteBmsFeignFallbackFactory.class,url = "http://10.33.0.99:8018", configuration = FeignAutoConfiguration.class)
public interface YmsServiceFeign {
/**
@@ -25,8 +25,7 @@ import com.mhd.oms.domain.gwLog.entity.GwLog;
import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
import com.mhd.oms.domain.documentPushMaterialRecord.entity.DocumentPushMaterialRecord;
import com.mhd.oms.domain.documentPushMaterialRecord.repository.mapper.DocumentPushMaterialRecordMapper;
import com.mhd.oms.domain.erpCountry.entity.ErpCountry;
import com.mhd.oms.domain.erpCountry.repository.mapper.ErpCountryMapper;
import com.mhd.oms.interfaces.dto.businessDocumentAddressMulti.BusinessAuditDTO;
import com.mhd.oms.interfaces.dto.businessDocumentOrder.BusinessDocumentOrderDTO;
import com.mhd.system.api.model.LoginUser;
@@ -96,8 +95,7 @@ public class BusinessDocumentOrderApplicationService {
@Resource
private DocumentPushMaterialRecordMapper documentPushMaterialRecordMapper;
@Resource
private ErpCountryMapper erpCountryMapper;
/**
* 分页查询【请填写功能名称】列表
@@ -252,10 +250,6 @@ public class BusinessDocumentOrderApplicationService {
body.put("goodsType", goodsType != null ? goodsType : "");
body.put("ieFlag", order.getIeType() != null ? order.getIeType() : "");
body.put("corpCode", corpCode != null ? corpCode : "");
// 启运/运抵国地区(收货地→ErpCountry表)
body.put("stshipTrsarvNatcd", lookupErpCountryCode(order.getUnloadAreaId(), order.getUnloadName()));
// 贸易国地区(发货地→ErpCountry表)
body.put("tradeAreaCode", lookupErpCountryCode(order.getLoadingAreaId(), order.getLoadingName()));
List<Map<String, Object>> billList = new ArrayList<>();
if (cargoList != null && !cargoList.isEmpty()) {
@@ -440,29 +434,7 @@ public class BusinessDocumentOrderApplicationService {
}
/** 根据区域ID或名称查ErpCountry表获取国别编码 */
private String lookupErpCountryCode(String areaId, String areaName) {
if (areaId == null && areaName == null) return "";
try {
LambdaQueryWrapper<ErpCountry> qw = new LambdaQueryWrapper<>();
qw.eq(ErpCountry::getDelFlag, 1);
if (areaId != null) {
qw.eq(ErpCountry::getErpCountryCode, areaId);
}
List<ErpCountry> list = erpCountryMapper.selectList(qw);
if (!list.isEmpty()) return list.get(0).getErpCountryCode();
// 按名称模糊匹配
if (areaName != null) {
LambdaQueryWrapper<ErpCountry> qw2 = new LambdaQueryWrapper<>();
qw2.eq(ErpCountry::getDelFlag, 1).like(ErpCountry::getErpCountryName, areaName);
List<ErpCountry> list2 = erpCountryMapper.selectList(qw2);
if (!list2.isEmpty()) return list2.get(0).getErpCountryCode();
}
} catch (Exception e) {
log.warn("查ErpCountry失败 areaId={} areaName={}", areaId, areaName, e);
}
return areaId != null ? areaId : "";
}
private void updatePushStatus(Long id, Integer pushStatus, Date pushTime, String pushBy, String pushByName) {
@@ -825,6 +825,12 @@ public class OrderWithMaterialDTO {
@ApiModelProperty("贸易国地区")
private String tradeAreaCode;
@ApiModelProperty("境内货源地")
private String domesticSourcePlace;
@ApiModelProperty("最终目的国(地区)")
private String destinationCountry;
@ApiModelProperty("企业总价")
private BigDecimal entTotal;
@@ -210,6 +210,15 @@ public class OriginalImportExportDocumentApi extends BaseController {
// 贸易国地区发货地 ErpCountry
dto.setTradeAreaCode(lookupCountryCode(order.getLoadingAreaId(), order.getLoadingName()));
// 最终目的国优先取订单填写未填写则取收货地
if (dto.getDestinationCountry() == null || dto.getDestinationCountry().isEmpty()) {
dto.setDestinationCountry(order.getUnloadName());
}
// 境内货源地优先取订单填写未填写则取发货地
if (dto.getDomesticSourcePlace() == null || dto.getDomesticSourcePlace().isEmpty()) {
dto.setDomesticSourcePlace(order.getLoadingName());
}
// 原产国直接取originCountry
dto.setCountryCode(dto.getOriginCountry());
@@ -247,6 +256,8 @@ public class OriginalImportExportDocumentApi extends BaseController {
}
@ApiOperation("批量推送")
@PostMapping("/batchPushForReviseApply")
public AjaxResult batchPushForReviseApply(@RequestBody BusinessDocumentOrderDTO businessDocumentOrderDTO){
+1 -1
View File
@@ -17,7 +17,7 @@ spring:
nacos:
discovery:
# server-addr: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
# 线上测试环境配置 容器名+端口号
server-addr: 10.33.0.129:6010
# server-addr: 10.102.192.30:6848
username: nacos