Merge branch 'dev_WMS20260401' into dev
# Conflicts: # mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java # mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java # mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java # mhd_oms/src/main/resources/bootstrap.yml
This commit is contained in:
+1
-1
@@ -557,7 +557,7 @@ public class RemoteWlhyFallbackFactory implements FallbackFactory<WlhyServiceFei
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExchangeRatePushStatus(String id, Integer pushStatus, String pushTime, Long pushBy, String pushByName) {
|
||||
public void updateExchangeRatePushStatus(String id, Integer pushStatus, String pushTime, Long pushBy, String pushByName, String organization) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@ public class BusinessDocumentOrderApplicationService {
|
||||
public AjaxResult batchPushForOriginalImportExportDocument(List<Long> idList) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public class BusinessPartnerApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ public class ErpCountryApplicationService{
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ public class ErpEnterpriseUnitApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+8
-8
@@ -95,7 +95,7 @@ public class ExchangeRateApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
@@ -133,7 +133,7 @@ public class ExchangeRateApplicationService {
|
||||
gwLogMapper.insert(gwLog);
|
||||
|
||||
// 更新为推送中
|
||||
updateExchangeRatePushStatus(dto.getId(), 2, new Date(), pushBy, pushByName);
|
||||
updateExchangeRatePushStatus(dto.getId(), 2, new Date(), pushBy, pushByName, organizationId, organizationName);
|
||||
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(pushUrl);
|
||||
@@ -156,19 +156,19 @@ public class ExchangeRateApplicationService {
|
||||
|
||||
if (dataCode != null && dataCode == 200) { // 业务也成功
|
||||
gwLog.setStatus(2);
|
||||
updateExchangeRatePushStatus(dto.getId(), 3, new Date(), pushBy, pushByName);
|
||||
updateExchangeRatePushStatus(dto.getId(), 3, new Date(), pushBy, pushByName, organizationId, organizationName);
|
||||
successCount++;
|
||||
} else {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(responseString);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName, organizationId, organizationName);
|
||||
failCount++;
|
||||
failMsg.append("erpCurrCode:").append(dto.getErpCurrCode()).append("失败;");
|
||||
}
|
||||
} else {
|
||||
gwLog.setStatus(3);
|
||||
gwLog.setErrorMsg(responseString);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName, organizationId, organizationName);
|
||||
failCount++;
|
||||
failMsg.append("erpCurrCode:").append(dto.getErpCurrCode()).append("失败;");
|
||||
}
|
||||
@@ -179,7 +179,7 @@ public class ExchangeRateApplicationService {
|
||||
gwLog.setErrorMsg(e.getMessage());
|
||||
gwLog.setResponseBody("请求异常:" + e.getMessage());
|
||||
gwLogMapper.updateById(gwLog);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName);
|
||||
updateExchangeRatePushStatus(dto.getId(), 4, new Date(), pushBy, pushByName, organizationId, organizationName);
|
||||
failCount++;
|
||||
failMsg.append("erpCurrCode:").append(dto.getErpCurrCode()).append("异常:").append(e.getMessage()).append(";");
|
||||
log.error("汇率推送异常: id={}, error={}", dto.getId(), e.getMessage());
|
||||
@@ -199,10 +199,10 @@ public class ExchangeRateApplicationService {
|
||||
return AjaxResult.success(resultMsg);
|
||||
}
|
||||
|
||||
private void updateExchangeRatePushStatus(String id, Integer pushStatus, Date pushTime, Long pushBy, String pushByName) {
|
||||
private void updateExchangeRatePushStatus(String id, Integer pushStatus, Date pushTime, Long pushBy, String pushByName, Long organizationId, String organizationName) {
|
||||
try {
|
||||
String pushTimeStr = pushTime != null ? DateUtil.format(pushTime, "yyyy-MM-dd HH:mm:ss") : null;
|
||||
wlhyServiceFeign.updateExchangeRatePushStatus(id, pushStatus, pushTimeStr, pushBy, pushByName);
|
||||
wlhyServiceFeign.updateExchangeRatePushStatus(id, pushStatus, pushTimeStr, pushBy, pushByName, String.valueOf(organizationId));
|
||||
} catch (Exception e) {
|
||||
log.error("更新汇率推送状态失败: id={}, error={}", id, e.getMessage());
|
||||
}
|
||||
|
||||
+2
-2
@@ -56,8 +56,8 @@ public class GwLogApplicationService {
|
||||
if(po1.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
// 商业合作伙伴按组织隔离,只返回当前组织的报文
|
||||
if ("商业合作伙伴".equals(gwLog.getType())) {
|
||||
// 商业合作伙伴/企业币值(汇率管理)按组织隔离,只返回当前组织的报文
|
||||
if ("商业合作伙伴".equals(gwLog.getType()) || "汇率管理".equals(gwLog.getType())) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||
Long orgId = loginUser.getUserPo().getOrganizationId();
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public class MaterialInfoApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+1
-1
@@ -1975,7 +1975,7 @@ public class ReservationStockInOrderApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
+2
-2
@@ -1113,7 +1113,7 @@ public class ReservationStockOutOrderApplicationService {
|
||||
idList.add(one.getOutOrderId());
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
@@ -1315,7 +1315,7 @@ public class ReservationStockOutOrderApplicationService {
|
||||
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||
String pushByName = loginUser != null ? loginUser.getUserPo().getUserName() : null;
|
||||
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||
|
||||
@@ -16,4 +16,10 @@ public class ExchangeRateDTO {
|
||||
|
||||
@ApiModelProperty(value = "币种名称(ERP名称)")
|
||||
private String erpCurrName;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
}
|
||||
|
||||
+3
-3
@@ -767,10 +767,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and CREATE_COMPANY_ID = #{createCompanyId}
|
||||
</if>
|
||||
<if test="createStartTime != null">
|
||||
and CREATE_TIME >= #{createStartTime}
|
||||
and o.CREATE_TIME >= #{createStartTime}
|
||||
</if>
|
||||
<if test="createEndTime != null">
|
||||
and CREATE_TIME <= #{createEndTime} + 1 - 1/86400
|
||||
and o.CREATE_TIME <= #{createEndTime} + 1 - 1/86400
|
||||
</if>
|
||||
|
||||
<!-- <if test="updateTime != null ">-->
|
||||
@@ -1122,7 +1122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and SALESMAN_ID = #{salesmanId}
|
||||
</if>
|
||||
<if test="isDeclare != null ">
|
||||
and IS_DECLARE = #{isDeclare}
|
||||
and o.IS_DECLARE = #{isDeclare}
|
||||
</if>
|
||||
<if test="route != null and route != ''">
|
||||
and ROUTE = #{route}
|
||||
|
||||
Reference in New Issue
Block a user