关务推送动态url地址;
This commit is contained in:
+20
-3
@@ -30,6 +30,7 @@ import com.mhd.wms.domain.inMaterialDetail.repository.facade.IInMaterialDetailSe
|
||||
import com.mhd.wms.domain.materialMoreDetail.repository.po.MaterialMoreDetailPO;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.entity.PickingMaterialDetail;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.facade.IPickingMaterialDetailService;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.mapper.PickingMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.po.PickingMaterialDetailPO;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.todo.PickingMaterialDetailDO;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.service.PickingMaterialDetailDomainService;
|
||||
@@ -98,6 +99,8 @@ public class PickingOrderApplicationService {
|
||||
private IInMaterialDetailService inMaterialDetailService;
|
||||
@Autowired
|
||||
private ICustomsDeclarationDetailService customsDeclarationDetailService;
|
||||
@Autowired
|
||||
private PickingMaterialDetailMapper pickingMaterialDetailMapper;
|
||||
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_qnBill_e";
|
||||
@@ -728,6 +731,7 @@ public class PickingOrderApplicationService {
|
||||
|
||||
|
||||
public AjaxResult batchPush(List<Long> idList) {
|
||||
|
||||
if (idList == null || idList.isEmpty()) {
|
||||
return AjaxResult.error("没有数据需要推送");
|
||||
}
|
||||
@@ -738,7 +742,7 @@ public class PickingOrderApplicationService {
|
||||
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 = pickingMaterialDetailMapper.getNcUrl("gw", organizationName, organizationId);
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
StringBuilder failMsg = new StringBuilder();
|
||||
@@ -779,7 +783,13 @@ public class PickingOrderApplicationService {
|
||||
customsBodyList.add(customsParam);
|
||||
|
||||
CloseableHttpClient customsHttpClient = HttpClients.createDefault();
|
||||
HttpPost customsHttpPost = new HttpPost(PUSH_API_URL);
|
||||
String url = "";
|
||||
if (ncUrl != null) {
|
||||
url = ncUrl;
|
||||
} else {
|
||||
url = PUSH_API_URL;
|
||||
}
|
||||
HttpPost customsHttpPost = new HttpPost(url);
|
||||
StringEntity customsPostingString = new StringEntity(JSONObject.toJSONString(customsBodyList), "UTF-8");
|
||||
customsHttpPost.setEntity(customsPostingString);
|
||||
customsHttpPost.setHeader("Content-type", "application/json");
|
||||
@@ -943,7 +953,14 @@ public class PickingOrderApplicationService {
|
||||
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");
|
||||
|
||||
+12
-2
@@ -37,6 +37,7 @@ import com.mhd.wms.domain.materialBaseInfo.entity.MaterialBaseInfo;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.facade.IMaterialBaseInfoService;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.mapper.PickingMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.receiptOrderAccount.entity.ReceiptOrderAccount;
|
||||
import com.mhd.wms.domain.receiptOrderAccount.repository.facade.IReceiptOrderAccountService;
|
||||
import com.mhd.wms.domain.stockInOrder.entity.StockInOrder;
|
||||
@@ -113,6 +114,8 @@ public class StockInOrderApplicationService {
|
||||
private IInMaterialDetailService inMaterialDetailService;
|
||||
@Autowired
|
||||
private StockOutOrderMapper stockOutOrderMapper;
|
||||
@Autowired
|
||||
private PickingMaterialDetailMapper pickingMaterialDetailMapper;
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_order_i";
|
||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
@@ -2402,9 +2405,16 @@ public class StockInOrderApplicationService {
|
||||
}
|
||||
|
||||
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
|
||||
|
||||
String ncUrl = pickingMaterialDetailMapper.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(gwStockInOrderList), "UTF-8");
|
||||
httpPost.setEntity(postingString);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
|
||||
+11
-2
@@ -44,6 +44,7 @@ import com.mhd.wms.domain.outMaterialDetail.repository.po.OutStockListMaterialAg
|
||||
import com.mhd.wms.domain.outMaterialDetail.repository.todo.OutMaterialDetailDO;
|
||||
import com.mhd.wms.domain.outMaterialDetail.service.OutMaterialDetailDomainService;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.facade.IPickingMaterialDetailService;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.mapper.PickingMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.po.PickingAggByOutOrderRow;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.po.PickingMaterialDetailPO;
|
||||
import com.mhd.wms.domain.stockInOrder.entity.StockInOrder;
|
||||
@@ -115,6 +116,8 @@ public class StockOutOrderApplicationService {
|
||||
private IMaterialBaseInfoService materialBaseInfoService;
|
||||
@Autowired
|
||||
private StockOutOrderMapper stockOutOrderMapper;
|
||||
@Autowired
|
||||
private PickingMaterialDetailMapper pickingMaterialDetailMapper;
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_order_e";
|
||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
@@ -1685,9 +1688,15 @@ public class StockOutOrderApplicationService {
|
||||
log.error("保存Gwlog失败:{}",e.getMessage());
|
||||
}
|
||||
updatePushStatus(id, 2, new Date(), pushBy,pushByName);
|
||||
|
||||
String ncUrl = pickingMaterialDetailMapper.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 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");
|
||||
|
||||
+19
-3
@@ -24,6 +24,7 @@ import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.inMaterialDetail.repository.facade.IInMaterialDetailService;
|
||||
import com.mhd.wms.domain.inventoryAdjustmentRecord.entity.InventoryAdjustmentRecord;
|
||||
import com.mhd.wms.domain.pickingMaterialDetail.repository.mapper.PickingMaterialDetailMapper;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.po.ReceiptMaterialDetailPO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.repository.todo.ReceiptMaterialDetailDO;
|
||||
import com.mhd.wms.domain.receiptMaterialDetail.service.ReceiptMaterialDetailDomainService;
|
||||
@@ -126,6 +127,8 @@ public class StockShelfOrderApplicationService {
|
||||
private IShelfMaterialDetailService shelfMaterialDetailService;
|
||||
@Autowired
|
||||
private IStockShelfOrderService stockShelfOrderService;
|
||||
@Autowired
|
||||
private PickingMaterialDetailMapper pickingMaterialDetailMapper;
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "save_qnBill_i";
|
||||
private static final String VERIFY = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
@@ -2652,7 +2655,7 @@ public class StockShelfOrderApplicationService {
|
||||
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 = pickingMaterialDetailMapper.getNcUrl("gw", organizationName, organizationId);
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
StringBuilder failMsg = new StringBuilder();
|
||||
@@ -2703,7 +2706,14 @@ public class StockShelfOrderApplicationService {
|
||||
customsBodyList.add(customsParam);
|
||||
|
||||
CloseableHttpClient customsHttpClient = HttpClients.createDefault();
|
||||
HttpPost customsHttpPost = new HttpPost(PUSH_API_URL);
|
||||
String url = "";
|
||||
if (ncUrl != null) {
|
||||
url = ncUrl;
|
||||
} else {
|
||||
url = PUSH_API_URL;
|
||||
}
|
||||
HttpPost customsHttpPost = new HttpPost(url);
|
||||
// HttpPost customsHttpPost = new HttpPost(PUSH_API_URL);
|
||||
StringEntity customsPostingString = new StringEntity(com.alibaba.fastjson.JSONObject.toJSONString(customsBodyList), "UTF-8");
|
||||
customsHttpPost.setEntity(customsPostingString);
|
||||
customsHttpPost.setHeader("Content-type", "application/json");
|
||||
@@ -2858,7 +2868,13 @@ public class StockShelfOrderApplicationService {
|
||||
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 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");
|
||||
|
||||
+2
@@ -72,4 +72,6 @@ public interface PickingMaterialDetailMapper extends BaseMapper<PickingMaterialD
|
||||
@Param("updateByName") String updateByName,
|
||||
@Param("updateTime") java.util.Date updateTime);
|
||||
|
||||
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
|
||||
|
||||
}
|
||||
+8
@@ -345,4 +345,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
pmd.update_by = #{updateBy}, pmd.update_by_name = #{updateByName}, pmd.update_time = #{updateTime}
|
||||
WHERE pmd.out_unique_id = #{outUniqueId} AND pmd.del_flag = 1
|
||||
</update>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user