关务推送增加字段,发测试
This commit is contained in:
@@ -18,7 +18,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* bms财务结算系统feign调用接口
|
* 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 {
|
public interface BmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
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 {
|
public interface OmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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 {
|
public interface WlhyServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
|||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2024/5/10 8:58
|
* @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 {
|
public interface WmsServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
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 {
|
public interface YmsServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+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.gwLog.repository.mapper.GwLogMapper;
|
||||||
import com.mhd.oms.domain.documentPushMaterialRecord.entity.DocumentPushMaterialRecord;
|
import com.mhd.oms.domain.documentPushMaterialRecord.entity.DocumentPushMaterialRecord;
|
||||||
import com.mhd.oms.domain.documentPushMaterialRecord.repository.mapper.DocumentPushMaterialRecordMapper;
|
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.businessDocumentAddressMulti.BusinessAuditDTO;
|
||||||
import com.mhd.oms.interfaces.dto.businessDocumentOrder.BusinessDocumentOrderDTO;
|
import com.mhd.oms.interfaces.dto.businessDocumentOrder.BusinessDocumentOrderDTO;
|
||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
@@ -96,8 +95,7 @@ public class BusinessDocumentOrderApplicationService {
|
|||||||
@Resource
|
@Resource
|
||||||
private DocumentPushMaterialRecordMapper documentPushMaterialRecordMapper;
|
private DocumentPushMaterialRecordMapper documentPushMaterialRecordMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ErpCountryMapper erpCountryMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询【请填写功能名称】列表
|
* 分页查询【请填写功能名称】列表
|
||||||
@@ -252,10 +250,6 @@ public class BusinessDocumentOrderApplicationService {
|
|||||||
body.put("goodsType", goodsType != null ? goodsType : "");
|
body.put("goodsType", goodsType != null ? goodsType : "");
|
||||||
body.put("ieFlag", order.getIeType() != null ? order.getIeType() : "");
|
body.put("ieFlag", order.getIeType() != null ? order.getIeType() : "");
|
||||||
body.put("corpCode", corpCode != null ? corpCode : "");
|
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<>();
|
List<Map<String, Object>> billList = new ArrayList<>();
|
||||||
if (cargoList != null && !cargoList.isEmpty()) {
|
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) {
|
private void updatePushStatus(Long id, Integer pushStatus, Date pushTime, String pushBy, String pushByName) {
|
||||||
|
|||||||
+6
@@ -825,6 +825,12 @@ public class OrderWithMaterialDTO {
|
|||||||
@ApiModelProperty("贸易国地区")
|
@ApiModelProperty("贸易国地区")
|
||||||
private String tradeAreaCode;
|
private String tradeAreaCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("境内货源地")
|
||||||
|
private String domesticSourcePlace;
|
||||||
|
|
||||||
|
@ApiModelProperty("最终目的国(地区)")
|
||||||
|
private String destinationCountry;
|
||||||
|
|
||||||
@ApiModelProperty("企业总价")
|
@ApiModelProperty("企业总价")
|
||||||
private BigDecimal entTotal;
|
private BigDecimal entTotal;
|
||||||
|
|
||||||
|
|||||||
+11
@@ -210,6 +210,15 @@ public class OriginalImportExportDocumentApi extends BaseController {
|
|||||||
// 贸易国地区(发货地 → ErpCountry)
|
// 贸易国地区(发货地 → ErpCountry)
|
||||||
dto.setTradeAreaCode(lookupCountryCode(order.getLoadingAreaId(), order.getLoadingName()));
|
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)
|
// 原产国(直接取originCountry)
|
||||||
dto.setCountryCode(dto.getOriginCountry());
|
dto.setCountryCode(dto.getOriginCountry());
|
||||||
|
|
||||||
@@ -247,6 +256,8 @@ public class OriginalImportExportDocumentApi extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("批量推送")
|
@ApiOperation("批量推送")
|
||||||
@PostMapping("/batchPushForReviseApply")
|
@PostMapping("/batchPushForReviseApply")
|
||||||
public AjaxResult batchPushForReviseApply(@RequestBody BusinessDocumentOrderDTO businessDocumentOrderDTO){
|
public AjaxResult batchPushForReviseApply(@RequestBody BusinessDocumentOrderDTO businessDocumentOrderDTO){
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.30:6848
|
# server-addr: 10.102.192.30:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
|
|||||||
Reference in New Issue
Block a user