Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
王奎兴
2026-07-03 17:49:55 +08:00
9 changed files with 53 additions and 7 deletions
@@ -18,7 +18,7 @@ import java.util.Set;
/**
* bms财务结算系统feign调用接口
*/
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3: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.33.0.99:8017", fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017", 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.33.0.129:8014",configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30: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.33.0.109:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.3: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.33.0.99:8018", configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,fallbackFactory = RemoteBmsFeignFallbackFactory.class,url = "http://10.102.192.4:8018", configuration = FeignAutoConfiguration.class)
public interface YmsServiceFeign {
/**
@@ -5,6 +5,9 @@ import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.oss.ServiceException;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -185,6 +188,7 @@ public class BusinessDocumentOrderDomainService {
String appointShipperId = businessDocumentOrderDO.getAppointShipperId();
String isCheckCredit = reservationStockInOrderMapper.getIsCheckCredit(Long.valueOf(appointShipperId));
String customerNcCode = reservationStockInOrderMapper.getCustomerNcCode(Long.valueOf(appointShipperId));
String orgCode = reservationStockInOrderMapper.getCustomerOrgCode(Long.valueOf(appointShipperId));
if(isCheckCredit != null&&"1".equals(isCheckCredit)){
UserShipperFeignDTO userShipperFeignDTO = new UserShipperFeignDTO();
List<UserShipperEntityFeign> userShipperEntityFeigns = new ArrayList<>();
@@ -209,6 +213,23 @@ public class BusinessDocumentOrderDomainService {
tmsOrder.setSettlementStatus(1L);//未出账
tmsOrder.setAuditStatus(0L);//未审核
tmsOrder.setCustomerCodeNc(customerNcCode);
String orgId = businessDocumentOrderDO.getOrgId();
if (orgCode != null) {
JSONArray orgCodeArray = JSON.parseArray(orgCode);
if (orgCodeArray != null && !orgCodeArray.isEmpty()) {
for (int i = 0; i < orgCodeArray.size(); i++) {
JSONObject obj = orgCodeArray.getJSONObject(i);
if (obj != null && String.valueOf(obj.getInteger("code")).equals(orgId)) {
String ncCustomer = obj.getString("ncCustomer");
if (StringUtils.isNotBlank(ncCustomer)) {
customerNcCode = ncCustomer;
tmsOrder.setCustomerCodeNc(customerNcCode);
}
break;
}
}
}
}
tmsOrder.setSzwlUserId(Long.valueOf(u.getUserid()));
if (tmsOrder.getLoadingDate() != null && tmsOrder.getUnloadingData() != null) {
if (tmsOrder.getUnloadingData().before(tmsOrder.getLoadingDate())) {
@@ -552,6 +573,27 @@ public class BusinessDocumentOrderDomainService {
* 生成货源单信息
*/
BeanUtils.copyProperties(businessDocumentOrderDO, tmsOrder);
// 根据orgId匹配orgCode中的ncCustomer赋值给customerCodeNc
String updateAppointShipperId = businessDocumentOrderDO.getAppointShipperId();
if (StringUtils.isNotBlank(updateAppointShipperId)) {
String updateOrgCode = reservationStockInOrderMapper.getCustomerOrgCode(Long.valueOf(updateAppointShipperId));
String updateOrgId = businessDocumentOrderDO.getOrgId();
if (updateOrgCode != null && updateOrgId != null) {
JSONArray orgCodeArray = JSON.parseArray(updateOrgCode);
if (orgCodeArray != null && !orgCodeArray.isEmpty()) {
for (int i = 0; i < orgCodeArray.size(); i++) {
JSONObject obj = orgCodeArray.getJSONObject(i);
if (obj != null && String.valueOf(obj.getInteger("code")).equals(updateOrgId)) {
String ncCustomer = obj.getString("ncCustomer");
if (StringUtils.isNotBlank(ncCustomer)) {
tmsOrder.setCustomerCodeNc(ncCustomer);
}
break;
}
}
}
}
}
tmsOrder.setSzwlUserId(Long.valueOf(u.getUserid()));
if (tmsOrder.getLoadingDate() != null && tmsOrder.getUnloadingData() != null) {
if (tmsOrder.getUnloadingData().before(tmsOrder.getLoadingDate())) {
@@ -66,4 +66,5 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
String getCustomerOrgCode(@Param("id") Long id);
}
@@ -646,4 +646,7 @@
and organization_name = #{organizationName}
and interface_type = #{interfaceType} limit 1
</select>
<select id="getCustomerOrgCode" resultType="java.lang.String">
select ORG_CODE from "NGWL_TEST_USER".USER_SHIPPER where 1 = 1 and DEL_FLAG = 1 and USER_ID = #{id}
</select>
</mapper>
@@ -21,7 +21,7 @@ spring:
# server-addr: 127.0.0.1:8848
# 线上测试环境配置使用ip+端口号
# server-addr: 10.33.0.129:6010
server-addr: 10.102.192.31:6848
server-addr: 10.102.192.30:6848
username: nacos
password: manhuoda@2023
#线上正式环境
@@ -33,7 +33,7 @@ spring:
config:
# server-addr: 127.0.0.1:8848
# 线上测试环境配置使用ip+端口号
server-addr: 10.102.192.31:6848
server-addr: 10.102.192.30:6848
username: nacos
password: manhuoda@2023
#线上正式环境