修改推送签名
This commit is contained in:
+3
-1
@@ -56,6 +56,8 @@ public class BusinessDocumentOrderApplicationService {
|
||||
private static final String API_NAME_E = "saveBill_e";
|
||||
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||
private static final String API_NAME = "billAppModify";
|
||||
private static final String VERIFY1 = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -235,7 +237,7 @@ public class BusinessDocumentOrderApplicationService {
|
||||
httpPost.setEntity(postingString);
|
||||
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
httpPost.setHeader("verify", VERIFY);
|
||||
httpPost.setHeader("verify", VERIFY1);
|
||||
if(pushData.getIeType().equals("I"))
|
||||
{
|
||||
httpPost.setHeader("apiName", API_NAME_I);
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ public class BusinessPartnerApplicationService {
|
||||
private static final String PUSH_API_URL = "http://10.33.0.100/nagu-erp-api/transfer/pushData";
|
||||
private static final String API_NAME = "saveCorporation";
|
||||
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||
|
||||
private static final String VERIFY1 = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
|
||||
@Resource
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@@ -120,7 +120,7 @@ public class BusinessPartnerApplicationService {
|
||||
httpPost.setEntity(postingString);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
httpPost.setHeader("apiName", API_NAME);
|
||||
httpPost.setHeader("verify", VERIFY);
|
||||
httpPost.setHeader("verify", VERIFY1);
|
||||
try{
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
String responseString = EntityUtils.toString(response.getEntity());
|
||||
|
||||
+47
-4
@@ -3,6 +3,7 @@ package com.mhd.wms.application.service.pickingOrder;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
@@ -93,7 +94,7 @@ public class PickingOrderApplicationService {
|
||||
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 = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||
|
||||
private static final String VERIFY1 = "ESLuxAmB6VXCgbqP1eFzxTPVRagkQ62BUkfhElrgQ6XmE/g2reHVflY/SiCSU7JD";
|
||||
|
||||
/**
|
||||
* 分页查询拣货单列表
|
||||
@@ -754,6 +755,48 @@ public class PickingOrderApplicationService {
|
||||
failMsg.append("id:").append(id).append("无物料明细;");
|
||||
continue;
|
||||
}
|
||||
// 调用报关回写接口获取核注清单号和行号
|
||||
String bondInvtNo = "";
|
||||
Integer invtRow = null;
|
||||
try {
|
||||
Map<String, Object> customsParam = new HashMap<>();
|
||||
customsParam.put("beginDate", "2020-01-01");
|
||||
customsParam.put("endDate", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
|
||||
customsParam.put("erpBillNo", pickingOrder.getPickingOrderNumber());
|
||||
customsParam.put("pageIndex", 1);
|
||||
customsParam.put("pageSize", 100);
|
||||
|
||||
List<Map<String, Object>> customsBodyList = new ArrayList<>();
|
||||
customsBodyList.add(customsParam);
|
||||
|
||||
CloseableHttpClient customsHttpClient = HttpClients.createDefault();
|
||||
HttpPost customsHttpPost = new HttpPost(PUSH_API_URL);
|
||||
StringEntity customsPostingString = new StringEntity(JSONObject.toJSONString(customsBodyList), "UTF-8");
|
||||
customsHttpPost.setEntity(customsPostingString);
|
||||
customsHttpPost.setHeader("Content-type", "application/json");
|
||||
customsHttpPost.setHeader("apiName", "sendDec");
|
||||
customsHttpPost.setHeader("verify", VERIFY);
|
||||
|
||||
CloseableHttpResponse customsResponse = customsHttpClient.execute(customsHttpPost);
|
||||
String customsResponseString = EntityUtils.toString(customsResponse.getEntity());
|
||||
|
||||
if (customsResponse.getStatusLine().getStatusCode() == 200) {
|
||||
JSONObject customsJson = JSONObject.parseObject(customsResponseString);
|
||||
JSONArray customsData = customsJson.getJSONArray("data");
|
||||
if (customsData != null && customsData.size() > 0) {
|
||||
JSONObject customsItem = customsData.getJSONObject(0);
|
||||
bondInvtNo = customsItem.getString("entry_id");
|
||||
Object erpGNoObj = customsItem.get("erp_g_no");
|
||||
if (erpGNoObj != null) {
|
||||
invtRow = (erpGNoObj instanceof Number) ? ((Number) erpGNoObj).intValue() : Integer.parseInt(erpGNoObj.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
customsResponse.close();
|
||||
customsHttpClient.close();
|
||||
} catch (Exception e) {
|
||||
log.error("调用报关回写接口失败: pickingOrderNumber={}", pickingOrder.getPickingOrderNumber(), e);
|
||||
}
|
||||
|
||||
// 3. 构建主单
|
||||
Map<String, Object> order = new HashMap<>();
|
||||
@@ -792,8 +835,8 @@ public class PickingOrderApplicationService {
|
||||
item.put("dclQty", detail.getPickingQuantity() != null ? detail.getPickingQuantity() : detail.getQuantity()); // 申报数量
|
||||
item.put("orderNo", pickingOrder.getPickingOrderNumber()); // 出仓订单号
|
||||
item.put("orderRow", gNo - 1); // 出仓订单行号
|
||||
item.put("bondInvtNo", ""); // 原进口核注清单号(暂无)
|
||||
item.put("invtRow", ""); // 原进口核注清单行号(暂无)
|
||||
item.put("bondInvtNo", bondInvtNo); // 原进口核注清单号
|
||||
item.put("invtRow", invtRow); // 原进口核注清单行号
|
||||
item.put("whNo", detail.getWarehouseCode() != null ? detail.getWarehouseCode() : ""); // 仓库
|
||||
item.put("seatNo", detail.getStorageLocationCode() != null ? detail.getStorageLocationCode() : ""); // 库位
|
||||
item.put("whNoIn", detail.getWarehouseCode() != null ? detail.getWarehouseCode() : "");
|
||||
@@ -843,7 +886,7 @@ public class PickingOrderApplicationService {
|
||||
httpPost.setEntity(postingString);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
httpPost.setHeader("apiName", API_NAME);
|
||||
httpPost.setHeader("verify", VERIFY);
|
||||
httpPost.setHeader("verify", VERIFY1);
|
||||
|
||||
try {
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
Reference in New Issue
Block a user