From c47f7b9c4899036c52ad0e4f46c4aff7102110bc Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 09 九月 2024 19:56:07 +0800
Subject: [PATCH] 最新版本
---
admin/.env | 2
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 4
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/WmsPushCloudController.java | 75 ++++++
server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml | 6
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/WmsService.java | 11
server/visits/dmvisit_service/src/main/resources/application-pro.yml | 6
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml | 2
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsInterfaceLogController.java | 10
server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java | 4
admin/.env.production | 2
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformRequest.java | 20 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsBaseResponse.java | 8
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformInfoRequest.java | 20 +
server/system_gateway/src/main/resources/bootstrap-pro.yml | 6
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 17 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 41 +++
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsPushController.java | 89 +++++++
admin/src/api/index.js | 2
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java | 18 +
server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/WxAccessTokenRequest.java | 11
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryJsonResponse.java | 43 +++
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryDataResponse.java | 24 ++
server/system_gateway/src/main/resources/application-pro.yml | 44 --
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 9
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java | 157 ++++++++++++
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java | 18 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 22 +
server/system_gateway/src/main/resources/application.yml | 1
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformGroupCloudController.java | 2
30 files changed, 592 insertions(+), 84 deletions(-)
diff --git a/admin/.env b/admin/.env
index f63f7ba..3cdd7a8 100644
--- a/admin/.env
+++ b/admin/.env
@@ -7,7 +7,7 @@
VUE_APP_CONTEXT_PATH = '/admin'
# 鎺ュ彛鍓嶇紑
-VUE_APP_API_PREFIX = '/admin_interface'
+VUE_APP_API_PREFIX = '/gateway_interface'
# 椤圭洰鍚嶇О
VUE_APP_TITLE = '瀹夋嘲鏅烘収鍥尯绯荤粺'
diff --git a/admin/.env.production b/admin/.env.production
index 5e90ea5..fb08007 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -1,4 +1,4 @@
# 鐢熶骇鐜閰嶇疆
NODE_ENV = 'production'
-VUE_APP_API_URL = 'http://localhost:10010'
+VUE_APP_API_URL = 'http://192.168.5.13/gateway_interface'
diff --git a/admin/src/api/index.js b/admin/src/api/index.js
index bfb4e76..7d20266 100644
--- a/admin/src/api/index.js
+++ b/admin/src/api/index.js
@@ -1,4 +1,4 @@
-export const uploadFile = '/admin_interface/visitsAdmin/cloudService/public/upload'
+export const uploadFile = '/gateway_interface/visitsAdmin/cloudService/public/upload'
export * from './business/index'
export * from './platform'
diff --git a/server/system_gateway/src/main/resources/application-pro.yml b/server/system_gateway/src/main/resources/application-pro.yml
index af1432e..033cb47 100644
--- a/server/system_gateway/src/main/resources/application-pro.yml
+++ b/server/system_gateway/src/main/resources/application-pro.yml
@@ -1,29 +1,21 @@
spring:
# 鏁版嵁婧愰厤缃�
datasource:
- url: jdbc:mysql://localhost:3306/smart_meeting?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://localhost:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
- password: Znhys@168.com
+ password: Atwl@2024
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
- redis:
- # database: 0
- host: 127.0.0.1
- port: 6379
- password:
- timeout: 5000 # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+
+ jackson:
+ time-zone: GMT+8
+ date-format: yyyy-MM-dd HH:mm:ss
-#knife4j:
-# enable: true
-# basic:
-# enable: true
-# username: admin
-# password: doumee@168.com
-debug_model: true
+debug_model: false
-captcha_check: false
+captcha_check: true
# Swagger閰嶇疆
swagger:
@@ -34,24 +26,6 @@
# 绂佺敤swagger鏃剁殑閲嶅畾鍚戝湴鍧�
redirect-uri: /
-
-########################寰俊鏀粯鐩稿叧閰嶇疆########################
-wx:
- pay:
- appId: wxfab6da18632e28de
- appSecret: 4ee3b22afa90287834319fc3c1635271
- mchId: 1229817002
- mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
- notifyUrl: https://dmtest.ahapp.net/smartmeeting_interface/web/api/wxPayNotify
- keyPath: /usr/local/apiclient_cert.p12
-
-tencent:
- map:
- remoteHost: https://apis.map.qq.com
- appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ
-
-
-########################瀹氭椂寮�鍚厤缃�########################
timing: true
-des_pwd: 123456SDFKDJF
\ No newline at end of file
+des_pwd: 123456SDFKDJF
diff --git a/server/system_gateway/src/main/resources/application.yml b/server/system_gateway/src/main/resources/application.yml
index a5edc83..6503fa3 100644
--- a/server/system_gateway/src/main/resources/application.yml
+++ b/server/system_gateway/src/main/resources/application.yml
@@ -83,6 +83,7 @@
enabled: true
mime-types: application/json
port: 10010
+
tomcat:
max-swallow-size: -1
servlet:
diff --git a/server/system_gateway/src/main/resources/bootstrap-pro.yml b/server/system_gateway/src/main/resources/bootstrap-pro.yml
index 409373d..3768d91 100644
--- a/server/system_gateway/src/main/resources/bootstrap-pro.yml
+++ b/server/system_gateway/src/main/resources/bootstrap-pro.yml
@@ -1,12 +1,12 @@
spring:
cloud:
nacos:
- server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
username: nacos
password: nacos
discovery:
- server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
+ namespace: dmvisit
# namespace: dev_renkang
username: nacos
password: nacos
diff --git a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
index 868ae70..38ce34c 100644
--- a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
+++ b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
@@ -109,7 +109,7 @@
@GetMapping("/getVisitConfigDTO")
public ApiResponse<VisitConfigDTO> getVisitConfigDTO(){
return ApiResponse.success(systemDictDataService.getVisitConfigDTO());
- };
+ }
/**
* 淇敼璁垮鏉ヨ閰嶇疆
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index 9a829ed..57c23f5 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -118,6 +118,10 @@
public static final String HK_NGINX_URL = "HK_NGINX_URL";
public static final String PLATFORM_BOOKING_TIPS = "PLATFORM_BOOKING_TIPS";
public static final String PLATFORM_GUIDEMAP = "PLATFORM_GUIDEMAP";
+ public static final String WSM_PARAM ="WSM_PARAM" ;
+ public static final String WMS_INBOUND_PLATFROM_URL ="WMS_INBOUND_PLATFROM_URL" ;
+ public static final String WMS_GET_INVENTORYLIST_URL ="WMS_GET_INVENTORYLIST_URL" ;
+ public static final String WMS_OUTBOUND_PLATFROM_URL ="WMS_OUTBOUND_PLATFROM_URL" ;
public static boolean DEALING_HK_SYNCPRIVILEGE= false;
public static boolean DEALING_HK_SYNCDEVICE = false;
public static boolean DEALING_HK_SYNCPLATFORM = false;
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsInterfaceLogController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsInterfaceLogController.java
index 07aa390..b3df154 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsInterfaceLogController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsInterfaceLogController.java
@@ -1,26 +1,22 @@
package com.doumee.api.business;
+import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
-import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
-import com.doumee.dao.business.WmsInterfaceLogMapper;
-import com.doumee.dao.business.model.InterfaceLog;
+import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.WmsInterfaceLog;
-import com.doumee.service.business.InterfaceLogService;
import com.doumee.service.business.WmsInterfaceLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
-
-import com.doumee.api.BaseController;
/**
* @author 姹熻箘韫�
* @date 2023/11/30 15:33
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsPushController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsPushController.java
index 026283a..b526e8e 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsPushController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/WmsPushController.java
@@ -1,7 +1,9 @@
package com.doumee.api.business;
+import com.alibaba.fastjson.JSONObject;
import com.doumee.api.BaseController;
import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest;
import com.doumee.core.haikang.model.param.request.EventSubRequest;
import com.doumee.core.haikang.model.param.request.ParkListRequest;
@@ -10,6 +12,7 @@
import com.doumee.core.haikang.model.param.request.event.parks.EventParkRequest;
import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest;
import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
import com.doumee.core.wms.model.request.WmsActionNoticeRequest;
import com.doumee.core.wms.model.request.WmsInboundNoticeRequest;
import com.doumee.core.wms.model.request.WmsOutboundNoticeRequest;
@@ -21,6 +24,8 @@
import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@@ -39,6 +44,7 @@
@Api(tags = "WMS骞冲彴鏁版嵁鎺ㄩ�佹帴鍙�")
@RestController
@RequestMapping("/wms")
+@Slf4j
public class WmsPushController extends BaseController {
@Autowired
@@ -48,7 +54,23 @@
@ApiOperation("銆怌MS銆戞帹閫佸叆搴撳崟閫氱煡浠诲姟")
@PostMapping("/push/inboundNotice")
public WmsBaseResponse inboundNotice(@RequestBody List<WmsInboundNoticeRequest> param) {
- WmsBaseResponse result = wmsService.inboundNotice(param);
+
+ int success = Constants.ZERO;
+ WmsBaseResponse result =null;
+ try {
+ result = wmsService.inboundNotice(param);
+ }catch (BusinessException e){
+ log.error("銆怌MS銆戞帹閫佸叆搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ success = Constants.ONE;
+ }catch (Exception e){
+ log.error("銆怌MS銆戞帹閫佸叆搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ e.printStackTrace();
+ success = Constants.ONE;
+ }finally {
+ wmsService.saveInterfaceLog("/wms/push/inboundNotice", "鎺ㄩ�佸叆搴撳崟閫氱煡浠诲姟",JSONObject.toJSONString(param),
+ success, JSONObject.toJSONString(result),Constants.ONE);
+ }
+
return result;
}
@@ -56,28 +78,85 @@
@ApiOperation("銆怌MS銆戞帹閫佸嚭搴撳崟閫氱煡浠诲姟")
@PostMapping("/push/outboundNotice")
public WmsBaseResponse outboundNotice(@RequestBody List<WmsOutboundNoticeRequest> param) {
- WmsBaseResponse result = wmsService.outboundNotice(param);
+ int success = Constants.ZERO;
+ WmsBaseResponse result =null;
+ try {
+ result = wmsService.outboundNotice(param);
+ }catch (BusinessException e){
+ log.error("銆怌MS銆戞帹閫佸嚭搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ success = Constants.ONE;
+ }catch (Exception e){
+ log.error("銆怌MS銆戞帹閫佸嚭搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ e.printStackTrace();
+ success = Constants.ONE;
+ }finally {
+ wmsService.saveInterfaceLog("/wms/push/outboundNotice", "鎺ㄩ�佸嚭搴撳崟閫氱煡浠诲姟",JSONObject.toJSONString(param),success
+ , JSONObject.toJSONString(result),Constants.ONE);
+ }
+
return result;
}
@PreventRepeat
@ApiOperation("銆怌MS銆戞帹閫佸彇娑堝叆搴撳崟閫氱煡浠诲姟")
@PostMapping("/push/cancelInbound")
public WmsBaseResponse cancelInbound(@RequestBody List<WmsActionNoticeRequest> param) {
- WmsBaseResponse result = wmsService.cancelInbound(param);
+ int success = Constants.ZERO;
+ WmsBaseResponse result =null;
+ try {
+ result = wmsService.cancelInbound(param);
+ }catch (BusinessException e){
+ log.error("銆怌MS銆戞帹閫佸彇娑堝叆搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ success = Constants.ONE;
+ }catch (Exception e){
+ log.error("銆怌MS銆戞帹閫佸彇娑堝叆搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ e.printStackTrace();
+ success = Constants.ONE;
+ }finally {
+ wmsService.saveInterfaceLog("/wms/push/cancelInbound", "鎺ㄩ�佸彇娑堝叆搴撳崟閫氱煡浠诲姟",JSONObject.toJSONString(param),
+ success, JSONObject.toJSONString(result),Constants.ONE);
+ }
return result;
}
@PreventRepeat
@ApiOperation("銆怌MS銆戞帹閫佸彇娑堝嚭搴撳崟閫氱煡浠诲姟")
@PostMapping("/push/cancelOutbound")
public WmsBaseResponse cancelOutbound(@RequestBody List<WmsActionNoticeRequest> param) {
- WmsBaseResponse result = wmsService.cancelOutbound(param);
+ int success = Constants.ZERO;
+ WmsBaseResponse result =null;
+ try {
+ result = wmsService.cancelOutbound(param);
+ }catch (BusinessException e){
+ log.error("銆怌MS銆戞帹閫佸彇娑堝嚭搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ success = Constants.ONE;
+ }catch (Exception e){
+ log.error("銆怌MS銆戞帹閫佸彇娑堝嚭搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ e.printStackTrace();
+ success = Constants.ONE;
+ }finally {
+ wmsService.saveInterfaceLog("/wms/push/cancelOutbound", "鎺ㄩ�佸彇娑堝嚭搴撳崟閫氱煡浠诲姟",
+ JSONObject.toJSONString(param), success, JSONObject.toJSONString(result),Constants.ONE);
+ }
return result;
}
@PreventRepeat
@ApiOperation("銆怌MS銆戞帹閫佸嚭鍏ュ簱浣滀笟瀹屾垚閫氱煡浠诲姟")
@PostMapping("/push/doneTask")
public WmsBaseResponse doneTask(@RequestBody List<WmsActionNoticeRequest> param) {
- WmsBaseResponse result = wmsService.doneTask(param);
+ int success = Constants.ZERO;
+ WmsBaseResponse result =null;
+ try {
+ result = wmsService.doneTask(param);
+ }catch (BusinessException e){
+ log.error("銆怌MS銆戞帹閫佸嚭鍏ュ簱浣滀笟瀹屾垚閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ success = Constants.ONE;
+ }catch (Exception e){
+ log.error("銆怌MS銆戞帹閫佸嚭鍏ュ簱浣滀笟瀹屾垚閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
+ e.printStackTrace();
+ success = Constants.ONE;
+ }finally {
+ wmsService.saveInterfaceLog("/wms/push/doneTask", "鎺ㄩ�佸嚭鍏ュ簱浣滀笟瀹屾垚閫氱煡浠诲姟",JSONObject.toJSONString(param),
+ success, JSONObject.toJSONString(result),Constants.ONE);
+ }
return result;
}
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
index 847cb74..0b00a66 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
@@ -11,11 +11,14 @@
import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformRequest;
import com.doumee.core.haikang.model.param.request.event.visit.EventVisitIccmRequest;
import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest;
+import com.doumee.core.haikang.service.HKService;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Device;
import com.doumee.service.business.impl.hksync.*;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
@@ -154,4 +157,19 @@
hkSyncPushService.cancelEventSub();
return ApiResponse.success(null);
}
+
+ /**
+ * 璁垮鏉ヨ閰嶇疆
+ * @return
+ */
+ @ApiOperation(value = "鑾峰彇瀹夐槻骞冲彴绯荤粺鍏嶅瘑鑿滃崟璋冩暣鍦板潃" )
+ @GetMapping("/getHkMenuLink")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type",example = "0",value = "鑿滃崟绫诲瀷", required = true),
+ })
+ public ApiResponse<String> getHkMenuLink(Integer type){
+ String token = "";//------------TODO----------搴峰悍缁х画鍐�
+ return ApiResponse.success( HKService.getMenuUrl(type,token));
+ }
+
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformGroupCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformGroupCloudController.java
index c4a02f9..598439a 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformGroupCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformGroupCloudController.java
@@ -12,8 +12,6 @@
import com.doumee.dao.web.reqeust.PlatformDataDTO;
import com.doumee.service.business.PlatformGroupService;
import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/WmsPushCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/WmsPushCloudController.java
new file mode 100644
index 0000000..828af42
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/WmsPushCloudController.java
@@ -0,0 +1,75 @@
+package com.doumee.cloud.admin;
+
+import com.doumee.api.BaseController;
+import com.doumee.config.annotation.LoginNoRequired;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.wms.model.request.WmsActionNoticeRequest;
+import com.doumee.core.wms.model.request.WmsInboundNoticeRequest;
+import com.doumee.core.wms.model.request.WmsOutboundNoticeRequest;
+import com.doumee.core.wms.model.response.WmsBaseResponse;
+import com.doumee.service.business.WmsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "WMS骞冲彴鏁版嵁鎺ㄩ�佹帴鍙�")
+@RestController
+@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/wms")
+public class WmsPushCloudController extends BaseController {
+
+ @Autowired
+ private WmsService wmsService;
+
+ @PreventRepeat
+ @ApiOperation("銆怌MS銆戞帹閫佸叆搴撳崟閫氱煡浠诲姟")
+ @PostMapping("/push/inboundNotice")
+ @LoginNoRequired
+ public WmsBaseResponse inboundNotice(@RequestBody List<WmsInboundNoticeRequest> param) {
+ WmsBaseResponse result = wmsService.inboundNotice(param);
+ return result;
+ }
+
+ @PreventRepeat
+ @ApiOperation("銆怌MS銆戞帹閫佸嚭搴撳崟閫氱煡浠诲姟")
+ @PostMapping("/push/outboundNotice")
+ @LoginNoRequired
+ public WmsBaseResponse outboundNotice(@RequestBody List<WmsOutboundNoticeRequest> param) {
+ WmsBaseResponse result = wmsService.outboundNotice(param);
+ return result;
+ }
+ @PreventRepeat
+ @ApiOperation("銆怌MS銆戞帹閫佸彇娑堝叆搴撳崟閫氱煡浠诲姟")
+ @PostMapping("/push/cancelInbound")
+ @LoginNoRequired
+ public WmsBaseResponse cancelInbound(@RequestBody List<WmsActionNoticeRequest> param) {
+ WmsBaseResponse result = wmsService.cancelInbound(param);
+ return result;
+ }
+ @PreventRepeat
+ @ApiOperation("銆怌MS銆戞帹閫佸彇娑堝嚭搴撳崟閫氱煡浠诲姟")
+ @PostMapping("/push/cancelOutbound")
+ @LoginNoRequired
+ public WmsBaseResponse cancelOutbound(@RequestBody List<WmsActionNoticeRequest> param) {
+ WmsBaseResponse result = wmsService.cancelOutbound(param);
+ return result;
+ }
+ @PreventRepeat
+ @ApiOperation("銆怌MS銆戞帹閫佸嚭鍏ュ簱浣滀笟瀹屾垚閫氱煡浠诲姟")
+ @PostMapping("/push/doneTask")
+ @LoginNoRequired
+ public WmsBaseResponse doneTask(@RequestBody List<WmsActionNoticeRequest> param) {
+ WmsBaseResponse result = wmsService.doneTask(param);
+ return result;
+ }
+}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
index 1b99528..be7e9e7 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
@@ -52,8 +52,8 @@
.apiInfo(this.getApiInfo()).groupName("default")
.host(host)
.select()
-// .apis( basePackage("com.doumee.cloud.openapi;com.doumee.api.common"))
- .apis( basePackage("com.doumee.cloud.openapi;"))
+ .apis( basePackage("com.doumee.cloud.openapi;com.doumee.api.common"))
+// .apis( basePackage("com.doumee.cloud.openapi;"))
// 璁剧疆闇�瑕佽鎵弿鐨勭被锛岃繖閲岃缃负娣诲姞浜咢Api娉ㄨВ鐨勭被
// .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any())
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
index 9b992cf..7a8e489 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
@@ -10,7 +10,7 @@
# 鏆傛椂鍏抽棴缂撳瓨
enabled: false
nacos:
- server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
+ server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
username: nacos
password: nacos
# config:
@@ -22,7 +22,7 @@
# group: dev
# data-id: com.doumee.meeting.admin
discovery:
- server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
- namespace: dmvisit_test
+ server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
+ namespace: dmvisit
username: nacos
password: nacos
\ No newline at end of file
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 9dc10e9..2df12af 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: dev
+ active: pro
application:
name: visitsAdmin
# 瀹夊叏閰嶇疆
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
index cf0970f..2844c21 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -27,6 +27,21 @@
public static final String ARTEMIS_PATH = "/artemis";
/**
+ * 蹇嵎鑿滃崟璺宠浆椤甸潰鍙傛暟
+ * 1銆佺患鍚堝畨闃诧細zhaf
+ * 2銆佺墿涓氬悗鍕わ細wyhq
+ * 3銆佽鏀垮姙鍏細xzbg
+ * 4銆佽繍钀ヤ腑蹇冿細yyzx
+ */
+ public interface MenuPageId{
+ String zhaf = "zhaf";//缁煎悎瀹夐槻
+ String wyhq = "wyhq";//鐗╀笟鍚庡嫟
+ String xzbg = "xzbg";//琛屾斂鍔炲叕
+ String yyzx = "yyzx";//杩愯惀涓績
+
+ }
+
+ /**
* 鎺ュ彛鍦板潃闆嗗悎
*/
public interface InterfacePath{
@@ -105,6 +120,8 @@
String[] privilegIccmeGroup= new String[]{"/api/iccm/v1/privilege/groups","鏌ヨ璁垮鏉冮檺缁�"};//鏌ヨ璁垮鏉冮檺缁�
String[] iccmAppointmentRecords= new String[]{"/api/iccm/v2/appointment/records","iccm鏌ヨ宸查绾︾櫥璁�"};//iccm鏌ヨ宸查绾︾櫥璁�
+ String[] wxAccessToken= new String[]{"/api/wx/v1/oa/get/accessToken","iccm鏌ヨ宸查绾︾櫥璁�"};//1.9.1鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken
+ String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=Infovision iPark Platform&componentMenuId=${menuId}&token=${token}","宸ヤ綔鍙拌彍鍗曡烦杞湴鍧�"};
}
/**
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index 4a50aaf..b230c6a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -529,6 +529,14 @@
}
/**
+ * 鑾峰彇鍏ㄩ噺缁勭粐淇℃伅
+ * @param body
+ * @return
+ */
+ public static String orgAllList(String body) {
+ return startDoPostStringArtemis(HKConstants.InterfacePath.orgAllList,body);
+ }
+ /**
* 鑾峰彇璁垮棰勭害璁板綍鍒楄〃
* @param body
* @return
@@ -546,12 +554,13 @@
return startDoPostStringArtemis(HKConstants.InterfacePath.iccmAppointmentRecords,body);
}
/**
- * 鑾峰彇鍏ㄩ噺缁勭粐鍒楄〃
- * @param body
+ * 鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken
* @return
*/
- public static String orgAllList(String body) {
- return startDoPostStringArtemis(HKConstants.InterfacePath.orgAllList,body);
+ public static String wxAccessToken(String configId,String tagId) {
+ String[] wxAccessToken= HKConstants.InterfacePath.wxAccessToken;
+ wxAccessToken[0] = HKConstants.InterfacePath.wxAccessToken+"?tagId="+tagId+"&configId"+configId;
+ return startDoPostStringArtemis(wxAccessToken,"");
}
/**
* 鑾峰彇鍏ㄩ噺鐢ㄦ埛鍒楄〃
@@ -720,4 +729,9 @@
return startDoPostStringArtemis(HKConstants.InterfacePath.applyST,body);
}
+ public static String getMenuUrl(String menuId, String token) {
+ String url = HKConstants.InterfacePath.goMenuUrl[0];
+ url = url.replace("${menuId}", menuId).replace("${token}",token);
+ return url;
+ }
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/WxAccessTokenRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/WxAccessTokenRequest.java
new file mode 100644
index 0000000..e95c42a
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/WxAccessTokenRequest.java
@@ -0,0 +1,11 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class WxAccessTokenRequest {
+ private String configId;// Query String false 寰俊鍏紬鍙烽厤缃紪鍙�
+ private String tagId;//Query String false 鏍囩
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index 2b59378..45f38c0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -9,6 +9,7 @@
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.*;
import com.doumee.core.haikang.model.param.respose.*;
+import com.doumee.core.utils.Constants;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -878,6 +879,24 @@
return null;
}
/**
+ *1.9.1鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken锛堝垎椤碉級
+ * @return
+ */
+ public static BaseResponse<String> wxAccessToken(String configId,String tagId){
+ log.info("銆愭捣搴锋牴鎹井淇″叕浼楀彿淇℃伅鑾峰彇AccessToken銆�================寮�濮�====configId:"+configId+" && tagId:"+tagId);
+ try {
+ String res = HKTools.wxAccessToken(configId,tagId);
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<String>>(){};
+ BaseResponse<String> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋牴鎹井淇″叕浼楀彿淇℃伅鑾峰彇AccessToken銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
*鏌ヨ璁垮鏉ヨ璁板綍锛堝凡鐧昏锛夛紙鍒嗛〉锛�
* @return
*/
@@ -914,6 +933,28 @@
return null;
}
/**
+ *鑾峰彇宸ヤ綔鍙拌彍鍗曞厤瀵嗙櫥闄嗚皟鏁村湴鍧�
+ * @return
+ */
+ public static String getMenuUrl(Integer type,String token){
+ String menuId = HKConstants.MenuPageId.zhaf;
+ if(Constants.equalsInteger(type,Constants.ONE)){
+
+ }else if(Constants.equalsInteger(type,Constants.TWO)){
+
+ }else if(Constants.equalsInteger(type,Constants.THREE)){
+
+ }
+ log.info("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================寮�濮�====menuId:"+menuId+"==token:"+token);
+ try {
+ String res = HKTools.getMenuUrl(menuId,token);
+ return res;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
*澧為噺缁勭粐鏌ヨ锛堝垎椤碉級
* @return
*/
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformInfoRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformInfoRequest.java
new file mode 100644
index 0000000..1700d25
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformInfoRequest.java
@@ -0,0 +1,20 @@
+package com.doumee.core.wms.model.request;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/23 14:03
+ */
+@Data
+@ApiModel("WMS鍑哄叆搴撲綔涓氬崟缁戝畾鏈堝彴淇℃伅鍙傛暟")
+public class WmsOrderPlatformInfoRequest extends WmsBaseRequest {
+ @ApiModelProperty(value = "閫氱煡鍗曞彿" ,example = "1")
+ private String carrierBillCode;
+ @ApiModelProperty(value = "鏈堝彴缂栧彿" ,example = "1")
+ private String railwayNo;
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformRequest.java
new file mode 100644
index 0000000..36ba227
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsOrderPlatformRequest.java
@@ -0,0 +1,20 @@
+package com.doumee.core.wms.model.request;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/23 14:03
+ */
+@Data
+@ApiModel("WMS鍑哄叆搴撲綔涓氬崟缁戝畾鏈堝彴淇℃伅瀵硅薄")
+public class WmsOrderPlatformRequest extends WmsBaseRequest {
+ @ApiModelProperty(value = "鍗曞彿鏁版嵁瀵硅薄" )
+ private List<WmsOrderPlatformInfoRequest> data;
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsBaseResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsBaseResponse.java
index 89f9764..1ac7965 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsBaseResponse.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsBaseResponse.java
@@ -14,8 +14,8 @@
*/
@Data
@ApiModel("WMS鎺ュ彛澶勭悊杩斿洖鍙傛暟")
-public class WmsBaseResponse {
- @ApiModelProperty(value = "杩斿洖鍙傛暟" ,example = "1")
- private List<WmsBaseDataResponse> data;
-
+public class WmsBaseResponse<T> {
+ public static final String CODE_SUCCESS = "1";
+ @ApiModelProperty(value = "杩斿洖鍙傛暟" )
+ private List<T> data;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryDataResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryDataResponse.java
new file mode 100644
index 0000000..25e1c01
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryDataResponse.java
@@ -0,0 +1,24 @@
+package com.doumee.core.wms.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/23 14:03
+ */
+@Data
+@ApiModel("WMS鎺ュ彛澶勭悊杩斿洖data鍙傛暟")
+public class WmsInventoryDataResponse {
+
+ @ApiModelProperty(value = "鏄惁鎺ユ敹鎴愬姛 1鎴愬姛 -1 澶辫触" ,example = "1")
+ private String success;
+ @ApiModelProperty(value = "娑堟伅鎻忚堪" ,example = "1")
+ private String msgDescr;
+ @ApiModelProperty(value = "娑堟伅鎻忚堪" ,example = "1")
+ private List<WmsInventoryJsonResponse> json;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryJsonResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryJsonResponse.java
new file mode 100644
index 0000000..2d72b76
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryJsonResponse.java
@@ -0,0 +1,43 @@
+package com.doumee.core.wms.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/23 14:03
+ */
+@Data
+@ApiModel("WMS鎺ュ彛澶勭悊杩斿洖data鍙傛暟")
+public class WmsInventoryJsonResponse {
+
+ @ApiModelProperty(value = "鏄惁鎺ユ敹鎴愬姛 1鎴愬姛 -1 澶辫触" ,example = "1")
+ private String item_code;
+ @ApiModelProperty(value = "娑堟伅鎻忚堪" ,example = "1")
+ private String item_name;
+ @ApiModelProperty(value = "鍐呭璇︽儏闆嗗悎" ,example = "1")
+ private BigDecimal qty;
+ @ApiModelProperty(value = "鍐呭璇︽儏闆嗗悎" ,example = "1")
+ private String supplier_code;
+ @ApiModelProperty(value = "g" ,example = "1")
+ private String supplier_name;
+ @ApiModelProperty(value = "owner_code" ,example = "1")
+ private String owner_code;
+ @ApiModelProperty(value = "owner_name" ,example = "1")
+ private String owner_name;
+ @ApiModelProperty(value = "package_type" ,example = "1")
+ private String package_type;
+ @ApiModelProperty(value = "package_name" ,example = "1")
+ private String package_name;
+ @ApiModelProperty(value = "itemType_code" ,example = "1")
+ private String itemType_code;
+ @ApiModelProperty(value = "ItemStatus_Production" ,example = "1")
+ private String ItemStatus_Production;
+ @ApiModelProperty(value = "itemType_name" ,example = "1")
+ private String itemType_name;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
index cce09ae..c916a3d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
@@ -98,6 +98,21 @@
@ApiModelProperty(value = "绛惧埌鏂瑰紡 0app绛惧埌 1鎵爜绛惧埌", example = "1")
@ExcelColumn(name="绛惧埌鏂瑰紡 0app绛惧埌 1鎵爜绛惧埌")
private Integer singType;
+ @ApiModelProperty(value = "閫氱煡WMS浣滀笟缁戝畾鏈堝彴鏃堕棿")
+ @ExcelColumn(name="閫氱煡WMS浣滀笟缁戝畾鏈堝彴鏃堕棿")
+ private Date wmsSendDate;
+ @ApiModelProperty(value = "閫氱煡WMS浣滀笟缁戝畾鏈堝彴鐘舵�� 0寰呴�氱煡 1閫氱煡鎴愬姛 2閫氱煡澶辫触", example = "1")
+ @ExcelColumn(name="閫氱煡WMS浣滀笟缁戝畾鏈堝彴鐘舵�� 0寰呴�氱煡 1閫氱煡鎴愬姛 2閫氱煡澶辫触")
+ private Integer wmsSendStatus;
+ @ApiModelProperty(value = "閫氱煡WMS浣滀笟缁戝畾鏈堝彴绶ㄧ⒓", example = "1")
+ @ExcelColumn(name="閫氱煡WMS浣滀笟缁戝畾鏈堝彴绶ㄧ⒓")
+ private String wmsSendPlatformCode;
+ @ApiModelProperty(value = "閫氱煡WMS浣滀笟缁戝畾鏈堝彴澶囨敞", example = "1")
+ @ExcelColumn(name="閫氱煡WMS浣滀笟缁戝畾鏈堝彴澶囨敞")
+ private String wmsSendInfo;
+ @ApiModelProperty(value = "閫氱煡WMS浣滀笟缁戝畾鏈堝彴娆℃暟", example = "1")
+ @ExcelColumn(name="閫氱煡WMS浣滀笟缁戝畾鏈堝彴娆℃暟")
+ private Integer wmsSendNum;
@ApiModelProperty(value = "绛惧埌璺濈(绫筹級", example = "1")
@ExcelColumn(name="绛惧埌璺濈(绫筹級")
@@ -313,6 +328,9 @@
@ApiModelProperty(value = "鏀惰揣鍦帮紙鐩殑鍦帮級")
@TableField(exist = false)
private String repertotyAddress;
+ @ApiModelProperty(value = "wms鏈堝彴缂栧彿")
+ @TableField(exist = false)
+ private String platformWmsCode;
@ApiModelProperty(value = "鍙彿绫诲瀷锛�1=鍙彿鍏ュ洯 锛� 2=鏈堝彴鍙彿 锛� 3=鎺掗槦鎯呭喌", example = "1")
@TableField(exist = false)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/WmsService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/WmsService.java
index a04670b..ebd0ed7 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/WmsService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/WmsService.java
@@ -1,12 +1,10 @@
package com.doumee.service.business;
-import com.doumee.core.model.PageData;
-import com.doumee.core.model.PageWrap;
import com.doumee.core.wms.model.request.WmsActionNoticeRequest;
import com.doumee.core.wms.model.request.WmsInboundNoticeRequest;
import com.doumee.core.wms.model.request.WmsOutboundNoticeRequest;
import com.doumee.core.wms.model.response.WmsBaseResponse;
-import com.doumee.dao.business.model.Platform;
+import com.doumee.dao.business.model.PlatformJob;
import java.util.List;
@@ -18,6 +16,13 @@
public interface WmsService {
/**
+ * 鍑哄叆搴撲綔涓氬垎閰嶆湀鍙�
+ * @return WmsBaseResponse
+ */
+ WmsBaseResponse orderPlatformBind(PlatformJob job);
+ WmsBaseResponse getInventoryList();
+ void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type);
+ /**
* 鍏ュ簱鍗曟壒閲忛�氱煡
* @param list 鍙傛暟
* @return WmsBaseResponse
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
index 9cbfcec..c7b56b4 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -890,8 +890,8 @@
update.setId(job.getId());
update.setEditDate(new Date());
if(StringUtils.equals(status.getMotionStatus(),"leave")){
- //濡傛灉鏄溅杈嗙寮�
- if(job ==null && !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
+ //濡傛灉鏄溅杈嗙寮�,涓嶅仛鐩稿叧鑷姩瀹屾垚浣滀笟涓氬姟澶勭悊
+ /* if(job ==null && !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
continue;//濡傛灉娌℃煡鍒板搴旂殑浣滀笟鎴栬�呬綔涓氬苟闈炰綔涓氫腑锛屼笉鍋氫笟鍔″鐞�
}
if(Constants.equalsInteger(job.getType(), Constants.THREE) || Constants.equalsInteger(job.getType(), Constants.TWO)){
@@ -905,7 +905,7 @@
}
//濡傛灉鏄鍦ㄤ綔涓氱殑鐘舵�侊紝鏍囪浣滀笟宸插畬鎴�
update.setStatus(Constants.PlatformJobStatus.DONE.getKey());//浣滀笟宸插畬鎴�
- update.setDoneDate(update.getEditDate());
+ update.setDoneDate(update.getEditDate());*/
}else if(StringUtils.equals(status.getMotionStatus(),"enter")){
//濡傛灉鏄溅杈嗚繘鍏�
if(job ==null || !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){
@@ -919,7 +919,8 @@
}else{
continue;//鍏朵粬鐘舵�佷笉澶勭悊锛岃烦杩�
}
- dealPlatformJobLogBiz(update,status);//璁板綍浣滀笟鏃ュ織
+ //鏆傛椂涓嶅仛鐩稿叧鑷姩瀹屾垚浣滀笟涓氬姟澶勭悊
+// dealPlatformJobLogBiz(update,status);//璁板綍浣滀笟鏃ュ織
}
break;//鍙鐞嗙涓�涓暟鎹姸鎬�
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
index d7064fe..b8ee494 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
@@ -1,22 +1,26 @@
package com.doumee.service.business.impl.wms;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.HttpsUtil;
import com.doumee.core.wms.model.request.*;
import com.doumee.core.wms.model.response.WmsBaseDataResponse;
import com.doumee.core.wms.model.response.WmsBaseResponse;
+import com.doumee.core.wms.model.response.WmsInventoryDataResponse;
import com.doumee.dao.business.*;
import com.doumee.dao.business.model.*;
import com.doumee.service.business.WmsService;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
/**
* WMS骞冲彴瀵规帴Service瀹炵幇
@@ -24,6 +28,7 @@
* @date 2023/11/30 15:33
*/
@Service
+@Slf4j
public class WmsServiceImpl implements WmsService {
@Autowired
private PlatformWmsJobMapper platformWmsJobMapper;
@@ -35,7 +40,150 @@
private PlatformJobMapper platformJobMapper;
@Autowired
private PlatformWmsDetailMapper platformWmsDetailMapper;
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+ @Autowired
+ private WmsInterfaceLogMapper wmsInterfaceLogMapper;
+ /**
+ * 鍏ュ簱閫氱煡浠诲姟涓氬姟澶勭悊
+ * @param job 鍙傛暟
+ * @return
+ */
+ @Override
+ public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job) {
+ if(StringUtils.isBlank(job.getBillCode()) || StringUtils.isBlank(job.getPlatformWmsCode())){
+
+ return null;
+ }
+ int type = 0;
+ if(Constants.equalsInteger(job.getType(),Constants.ONE)
+ || Constants.equalsInteger(job.getType(),Constants.THREE)){
+ //濡傛灉鏄璐э紙鍑哄簱锛�
+ type =1 ;
+ }else if(Constants.equalsInteger(job.getType(),Constants.ZERO)
+ || Constants.equalsInteger(job.getType(),Constants.TWO)){
+ //濡傛灉鏄璐э紙鍑哄簱锛�
+ type =0 ;
+ }else{
+ return null;
+ }
+ WmsOrderPlatformRequest param = new WmsOrderPlatformRequest();
+ param.setData(new ArrayList<>());
+ WmsOrderPlatformInfoRequest o = new WmsOrderPlatformInfoRequest();
+ o.setCarrierBillCode(job.getBillCode());
+ o.setRailwayNo(job.getPlatformWmsCode());
+ param.getData().add(o);
+ String url = type == 0?systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_INBOUND_PLATFROM_URL).getCode():systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_OUTBOUND_PLATFROM_URL).getCode();;
+ String name = type ==0?"銆怶MS銆戝叆搴綔涓氬崟鍒嗛厤鏈堝彴":"銆怶MS銆戝嚭搴撲綔涓氱殑鍒嗛厤鏈堝彴";
+ WmsBaseResponse<WmsBaseDataResponse> response = sendHttpRequest(url,name,JSONObject.toJSONString(param),new TypeReference< WmsBaseResponse<WmsBaseDataResponse>>(){});
+ PlatformJob update = new PlatformJob();
+ update.setId(job.getId());
+ update.setWmsSendDate(new Date());
+ update.setWmsSendNum(job.getWmsSendNum() + 1);
+ update.setWmsSendPlatformCode(job.getPlatformWmsCode());
+ if(response!=null && response.getData() !=null
+ && response.getData().size()>0 && StringUtils.equals(response.getData().get(0).getSuccess(),WmsBaseResponse.CODE_SUCCESS)){
+ //濡傛灉鎴愬姛
+ update.setWmsSendStatus(Constants.ONE);
+ update.setWmsSendInfo("閫氱煡WMS浣滀笟鍗曞垎閰嶆湀鍙版垚鍔�");
+ }else{
+ //濡傛灉澶辫触
+ update.setWmsSendStatus(Constants.TWO);
+ update.setWmsSendInfo("閫氱煡WMS浣滀笟鍗曞垎閰嶆湀鍙板け璐�:"+(response!=null?JSONObject.toJSONString(response):"鎺ュ彛璋冪敤澶辫触"));
+ }
+ platformJobMapper.updateById(update);
+ return response;
+
+ }
+ /**
+ * 鍏ュ簱閫氱煡浠诲姟涓氬姟澶勭悊
+ * @return
+ */
+ @Override
+ public WmsBaseResponse<WmsInventoryDataResponse> getInventoryList(){
+ String url = systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_GET_INVENTORYLIST_URL).getCode() ;
+ String name = "銆怶MS銆戝簱瀛樻煡璇�" ;
+ WmsBaseResponse<WmsInventoryDataResponse> response = sendHttpRequest(url,name,JSONObject.toJSONString(new JSONObject()),new TypeReference< WmsBaseResponse<WmsInventoryDataResponse>>(){});
+ if(response!=null
+ && response.getData() !=null
+ && response.getData().size()>0
+ && StringUtils.equals(response.getData().get(0).getSuccess(),WmsBaseResponse.CODE_SUCCESS)){
+ //濡傛灉璇锋眰鎴愬姛
+
+ }else{
+ //濡傛灉澶辫触
+ if(response ==null){
+ response = new WmsBaseResponse();
+ response.setData(new ArrayList<>());
+ }
+ if(response.getData() == null){
+ response.setData(new ArrayList<>());
+ }
+ }
+ return response;
+
+ }
+ @Override
+ public void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type){
+ if(wmsInterfaceLogMapper ==null){
+ return;
+ }
+ WmsInterfaceLog log = new WmsInterfaceLog();
+ log.setCreateDate(new Date());
+ log.setUrl(url);
+ log.setEditDate(log.getCreateDate());
+ log.setPlat(Constants.ZERO);
+ log.setName(name);
+ log.setIsdeleted(Constants.ZERO);
+ log.setRequest(param);
+ log.setType(type);
+ log.setSuccess(success);
+ log.setRepose(respone);
+ wmsInterfaceLogMapper.insert(log);
+ }
+
+ /**
+ * 鍙戣捣wms鎺ュ彛璇锋眰
+ * @param url
+ * @param name
+ * @param param
+ * @param typeReference
+ * @return
+ * @param <T>
+ */
+ public <T> WmsBaseResponse<T> sendHttpRequest(String url, String name, String param,TypeReference<WmsBaseResponse<T>> typeReference){
+ log.info("銆�"+name+"銆�================寮�濮�===="+ JSONObject.toJSONString(param));
+ if ( StringUtils.isNotBlank(url)) {
+ String res = null;
+ int success = 0;
+ try {
+ Map<String,String> headers = new HashMap<>();
+ res = HttpsUtil.postJson(url,param);
+ WmsBaseResponse result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,name);
+ if(result!=null && result.getData() !=null ){
+
+ }else{
+ success =1;
+ }
+ return result;
+ }catch (Exception e){
+ success = 1;
+ log.error("銆�"+name+"銆�================澶辫触===="+ JSONObject.toJSONString(param));
+ }finally {
+ saveInterfaceLog(url,name,param,success,res,Constants.ZERO);
+ }
+ }
+ return null;
+ }
+ private static void logResult(WmsBaseResponse<WmsBaseDataResponse> res,String name) {
+ if(StringUtils.equals(res.getData().get(0).getSuccess(), WmsBaseResponse.CODE_SUCCESS)){
+ log.info("銆怶MS鎺ュ彛锛�"+name+"銆�================鎴愬姛====\n"+res);
+ }else{
+ log.error("銆怶MS鎺ュ彛锛�"+name+"銆�================澶辫触====锛歕n"+ res);
+ }
+ }
/**
* 鍏ュ簱閫氱煡浠诲姟涓氬姟澶勭悊
* @param list 鍙傛暟
@@ -43,7 +191,7 @@
*/
@Override
@Transactional
- public WmsBaseResponse inboundNotice(List<WmsInboundNoticeRequest> list) {
+ public WmsBaseResponse<WmsBaseDataResponse> inboundNotice(List<WmsInboundNoticeRequest> list) {
if(list ==null || list.size() ==0){
return returnFailReuslt("璇锋眰鍙傛暟涓嶆纭紝鍙傛暟涓嶈兘涓虹┖");
}
@@ -342,6 +490,7 @@
* @return
*/
+
private WmsBaseResponse returnSuccessReuslt(String msg) {
WmsBaseResponse response = new WmsBaseResponse();
response.setData(new ArrayList<>());
diff --git a/server/visits/dmvisit_service/src/main/resources/application-pro.yml b/server/visits/dmvisit_service/src/main/resources/application-pro.yml
index 2371a18..e5da850 100644
--- a/server/visits/dmvisit_service/src/main/resources/application-pro.yml
+++ b/server/visits/dmvisit_service/src/main/resources/application-pro.yml
@@ -1,9 +1,9 @@
spring:
# 鏁版嵁婧愰厤缃�
datasource:
- url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
- username: doumee
- password: rtjgfEr@&0c0m
+ url: jdbc:mysql://localhost:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+ username: root
+ password: Atwl@2024
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
redis:
--
Gitblit v1.9.3