关务推送增加字段,发测试
This commit is contained in:
+3
-31
@@ -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) {
|
||||
|
||||
+6
@@ -825,6 +825,12 @@ public class OrderWithMaterialDTO {
|
||||
@ApiModelProperty("贸易国地区")
|
||||
private String tradeAreaCode;
|
||||
|
||||
@ApiModelProperty("境内货源地")
|
||||
private String domesticSourcePlace;
|
||||
|
||||
@ApiModelProperty("最终目的国(地区)")
|
||||
private String destinationCountry;
|
||||
|
||||
@ApiModelProperty("企业总价")
|
||||
private BigDecimal entTotal;
|
||||
|
||||
|
||||
+11
@@ -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){
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user