关务推送动态url地址;

This commit is contained in:
王奎兴
2026-06-23 18:11:16 +08:00
parent caac89e3db
commit e84adc2d6f
10 changed files with 99 additions and 15 deletions
@@ -55,4 +55,6 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
public String getCustomerNcCode(@Param("id") Long id);
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
}
@@ -2060,9 +2060,16 @@ public class ReservationStockInOrderApplicationService {
gwLogMapper.insert(gwLog);
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
String ncUrl = reservationStockInOrderMapper.getNcUrl("gw", organizationName, organizationId);
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(PUSH_API_URL);
String url = "";
if (ncUrl != null) {
url = ncUrl;
} else {
url = PUSH_API_URL;
}
// HttpPost customsHttpPost = new HttpPost(url);
HttpPost httpPost = new HttpPost(url);
StringEntity postingString = new StringEntity(com.alibaba.fastjson.JSONObject.toJSONString(list), "UTF-8");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
@@ -1319,7 +1319,7 @@ public class ReservationStockOutOrderApplicationService {
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
String ncUrl = reservationStockInOrderMapper.getNcUrl("gw", organizationName, organizationId);
int successCount = 0;
int failCount = 0;
StringBuilder failMsg = new StringBuilder();
@@ -1476,7 +1476,14 @@ public class ReservationStockOutOrderApplicationService {
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(PUSH_API_URL);
String url = "";
if (ncUrl != null) {
url = ncUrl;
} else {
url = PUSH_API_URL;
}
// HttpPost customsHttpPost = new HttpPost(url);
HttpPost httpPost = new HttpPost(url);
StringEntity postingString = new StringEntity(com.alibaba.fastjson.JSONObject.toJSONString(bodyList), "UTF-8");
httpPost.setEntity(postingString);
httpPost.setHeader("Content-type", "application/json");
@@ -616,5 +616,11 @@
<select id="getCustomerNcCode" parameterType="java.lang.Long" resultType="java.lang.String">
select CUSTOMER_NC_CODE from "NGWL_TEST_USER".USER_SHIPPER where 1 = 1 and DEL_FLAG = 1 and USER_ID = #{id}
</select>
<select id="getNcUrl" resultType="java.lang.String">
SELECT INTERFACE_TYPE_VALUE FROM NGWL_TEST_THIRDPARTY."SYS_DEPART_INTERFACE_INFO"
where DEL_FLAG = '1'
and organization_id = #{organizationId}
and organization_name = #{organizationName}
and interface_type = #{interfaceType} limit 1
</select>
</mapper>