From 2b72be7962e44d251fdecc8fdc6465ed7237536e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 02 十二月 2024 10:25:08 +0800
Subject: [PATCH] 最新版本541200007
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 3
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/WmsPushCloudController.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/WmsService.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/GetTodoListResponse.java | 2
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java | 10
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml | 2
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardStockListVO.java | 30 ++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncNoticeServiceImpl.java | 163 +++++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java | 1
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java | 11
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 5
server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/GetTodoListRequest.java | 8
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 10
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java | 3
server/visits/admin_timer/src/main/java/com/doumee/api/HkNoticeTimerController.java | 40 +++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java | 35 ++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TransportMeasureVO.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/response/WmsInventoryJsonResponse.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncDoorsServiceImpl.java | 2
admin/src/views/index.vue | 195 ++++++++-------
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java | 2
admin/src/api/workbench/index.js | 8
server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsBaseRequest.java | 3
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java | 100 +++++++-
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java | 14
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java | 5
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java | 25 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java | 2
31 files changed, 550 insertions(+), 151 deletions(-)
diff --git a/admin/src/api/workbench/index.js b/admin/src/api/workbench/index.js
index e6dcdcb..2340d64 100644
--- a/admin/src/api/workbench/index.js
+++ b/admin/src/api/workbench/index.js
@@ -2,7 +2,7 @@
// 椤堕儴瀵艰埅
export function getAppHeaderNav (data) {
- return request.get('/visitsAdmin/cloudService/business/hksync/getHkMenuLink?type='+ data)
+ return request.post('/visitsAdmin/cloudService/business/hksync/getHkMenuLink/'+data+'?time='+Math.random())
}
// 涓讳綋鏁版嵁
export function getWorkbenchBody (data) {
@@ -24,9 +24,13 @@
export function getWorkbenchTaskHead (data) {
return request.post('/visitsAdmin/cloudService/business/staging/taskCenterHeadPC', data)
}
+// 鍚屾娴峰悍浠e姙鏁版嵁
+export function syncHkNotice (data) {
+ return request.post('/visitsAdmin/cloudService/business/hksync/notice/getList', data)
+}
// pc宸ヤ綔鍙�
export function getWorkbenchData (data) {
return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', {
params: {...data }
})
-}
\ No newline at end of file
+}
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 1aca030..b08c1a4 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -133,7 +133,7 @@
<div class="task">
<div class="header df_sb">
<div class="home_title df">
- <span @click="handleTest">寰呭姙浜嬮」</span>
+ <span @click="getNoticeList">寰呭姙浜嬮」</span>
<span class="num" v-if="taskTotal">{{ taskTotal }}</span>
</div>
<div class="df_ac more" @click="jumpPage('/task/index')">
@@ -202,7 +202,7 @@
import { weeks } from '@/utils/config'
import {
getWorkbenchData,
- getAppHeaderNav
+ getAppHeaderNav, syncHkNotice
} from '@/api'
import { level } from '@/api/business/visits'
import TaskDetail from '@/views/task/visSubDetail.vue'
@@ -223,7 +223,7 @@
OperaHiddenDangerWindow,
OperaVisitsDesWindow
},
- data() {
+ data () {
return {
colors,
nowDate: '',
@@ -244,122 +244,131 @@
isShowDetail: false,
isShowReport: false,
isShowDanger: false,
- isShowDriver: false,
+ isShowDriver: false
}
},
computed: {
- userInfo() {
+ userInfo () {
return this.$store.state.userInfo
}
},
- created() {
+ created () {
this.updateDate()
setInterval(() => {
this.updateDate()
}, 1000 * 60 * 60)
-
},
- mounted() {
+ mounted () {
this.initData()
},
methods: {
- handleTest() {
- const myWindow = window.open('https://10.50.250.253/portal/ui/index?componentId=dfe&componentMenuId=process_apply')
- setTimeout(() => {
- const params = {
- componentId: 'dfe',
- componentMenuId: 'process_apply',
- callback: {
- method: 'dealTlncMsg', argument: {
- "msgId": "98c256b9-aaff-11ef-8347-fa163ee2c57c",
- "moduleId": "dfeFlowTodoModuleId",
- "msgTitle": "璇峰強鏃跺鐞�13856591439鍙戣捣鐨勮鍋囩敵璇�",
- "msgStatus": "0",
- "msgCreateTime": "浠婂ぉ 15:33",
- "msgCreateTimeIso": "2024-11-25T15:33:42.000+08:00",
- "serverTime": 1732531014591,
- "menuCode": "process_apply",
- "msgStatusStr": "寰呭鐞�",
- "comId": "dfe",
- "userId": "13856591439",
- "extendNoShow": "{\"processInstanceId\":\"98a57fe0-aaff-11ef-8347-fa163ee2c57c\",\"processId\":\"process_dabcfdd39f1b6f46d36a9f4ff6ce1080\",\"param\":{\"sourceType\":\"todo\",\"modelCode\":\"tb_leave_dfe_for_dfe_runtime\",\"processNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\"},\"process.param.appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"appId\":\"32ca8770-6f85-11ec-b5a3-991864da52a6\",\"name\":\"璇峰亣鐢宠\",\"taskId\":\"98c256b9-aaff-11ef-8347-fa163ee2c57c\",\"taskNodeId\":\"UserTask_dde7d83377343a2d5fa1f60c23b023ef\",\"url\":\"/dfe-form/process/tlnc/apply\"}",
- "targetComId": "dfe",
- "moduleName": "娴佺▼寰呭姙",
- "tid": "99cad778-aaff-11ef-9dbf-ff08ba71965c",
- "msgEndTime": null,
- "msgEndTimeIso": "",
- "picUrl": "",
- "extendJson": "{\"key1\":\"璇峰強鏃跺鐞嗛檲楦块鍙戣捣鐨勮鍋囩敵璇穃"}",
- "extendParam": null,
- "extendCascade": null,
- "createUser": "13856591439",
- "webCascadeUrl": null,
- "h5CascadeUrl": null,
- "cascadeTodoOpenType": null,
- "cascadeSourceConfigId": null,
- "h5Url": "/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true",
- "segmentId": "dfe-form",
- "lastUsers": "闄堥缚椋�",
- "currentUsers": "闄堥缚椋�",
- "todoTypeCode": "dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId",
- "currentUserIds": "13856591439",
- "lastUserIds": "13856591439",
- "msgDesc": null,
- "widgetUrl": null,
- "detailType": null,
- "widgetWidth": null,
- "widgetHeight": null,
- "userIdList": null,
- "statusName": null,
- "arriveTime": null,
- "stayTime": null,
- "todoType": null,
- "cascadePort": null,
- "openMode": null
- }
- },
- msgType: 'tlnc'
- }
- let argus = JSON.stringify(params)
- myWindow.postMessage('{"method":"goToApp","argument":' + argus + '}', '*')
- }, 3000)
+ getNoticeList(){
+ syncHkNotice().then(res => {
+
+ })
},
- SubSuccess(str) {
+ handleTest (row) {
+ getAppHeaderNav(5).then(res => {
+ if (res == undefined || res == null) {
+ return
+ }
+ const myWindow = window.open(res)
+ setTimeout(() => {
+ const params = {
+ componentId: 'dfe',
+ componentMenuId: 'process_apply',
+ callback: {
+ method: 'dealTlncMsg',
+ argument: {
+ msgId: '98c256b9-aaff-11ef-8347-fa163ee2c57c',
+ moduleId: 'dfeFlowTodoModuleId',
+ msgTitle: '璇峰強鏃跺鐞�13856591439鍙戣捣鐨勮鍋囩敵璇�',
+ msgStatus: '0',
+ msgCreateTime: '浠婂ぉ 15:33',
+ msgCreateTimeIso: '2024-11-25T15:33:42.000+08:00',
+ serverTime: 1732531014591,
+ menuCode: 'process_apply',
+ msgStatusStr: '寰呭鐞�',
+ comId: 'dfe',
+ userId: '13856591439',
+ extendNoShow: '{"processInstanceId":"98a57fe0-aaff-11ef-8347-fa163ee2c57c","processId":"process_dabcfdd39f1b6f46d36a9f4ff6ce1080","param":{"sourceType":"todo","modelCode":"tb_leave_dfe_for_dfe_runtime","processNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c"},"process.param.appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","appId":"32ca8770-6f85-11ec-b5a3-991864da52a6","name":"璇峰亣鐢宠","taskId":"98c256b9-aaff-11ef-8347-fa163ee2c57c","taskNodeId":"UserTask_dde7d83377343a2d5fa1f60c23b023ef","url":"/dfe-form/process/tlnc/apply"}',
+ targetComId: 'dfe',
+ moduleName: '娴佺▼寰呭姙',
+ tid: '99cad778-aaff-11ef-9dbf-ff08ba71965c',
+ msgEndTime: null,
+ msgEndTimeIso: '',
+ picUrl: '',
+ extendJson: '{"key1":"璇峰強鏃跺鐞嗛檲楦块鍙戣捣鐨勮鍋囩敵璇�"}',
+ extendParam: null,
+ extendCascade: null,
+ createUser: '13856591439',
+ webCascadeUrl: null,
+ h5CascadeUrl: null,
+ cascadeTodoOpenType: null,
+ cascadeSourceConfigId: null,
+ h5Url: '/h5/pages/form-page/form-page?returnPath=-1&appId=32ca8770-6f85-11ec-b5a3-991864da52a6&taskId=98c256b9-aaff-11ef-8347-fa163ee2c57c&processNodeId=UserTask_dde7d83377343a2d5fa1f60c23b023ef&modelCode=tb_leave_dfe_for_dfe_runtime&type=flowHandle&component=form-apply&_sn=true',
+ segmentId: 'dfe-form',
+ lastUsers: '闄堥缚椋�',
+ currentUsers: '闄堥缚椋�',
+ todoTypeCode: 'dfe@@tlnc_placeholder_tlnc@@dfeFlowTodoModuleId',
+ currentUserIds: '13856591439',
+ lastUserIds: '13856591439',
+ msgDesc: null,
+ widgetUrl: null,
+ detailType: null,
+ widgetWidth: null,
+ widgetHeight: null,
+ userIdList: null,
+ statusName: null,
+ arriveTime: null,
+ stayTime: null,
+ todoType: null,
+ cascadePort: null,
+ openMode: null
+ }
+ },
+ msgType: 'tlnc'
+ }
+ // const argus = JSON.stringify(params)
+ myWindow.postMessage('{"method":"goToApp","argument":' + row.param5 + '}', '*')
+ }, 3000)
+ })
+ },
+ SubSuccess (str) {
this[str] = false
this.getTaskList()
},
- funcClick(item) {
+ funcClick (item) {
if (item.name == '鑰冨嫟宸ヤ綔鍙�') {
getAppHeaderNav(4).then(res => {
- window.open(res, "_blank")
- return
+ window.open(res, '_blank')
})
}
this.$router.push(item.path)
},
- updateDate() {
+ updateDate () {
this.nowDate = dayjs().format('YYYY骞碝鏈圖鏃�')
this.nowWeek = weeks[new Date().getDay()]
},
- initData() {
+ initData () {
this.getWorkHead()
this.getWorkBody()
this.getTaskList()
this.getWarningList()
},
- getWarningList() {
+ getWarningList () {
getWorkbenchData({ queryType: 4 }).then(res => {
this.warningList = res.timeOutVisitList || []
this.warningTotal = res.timeOutVisitNum || 0
})
},
- getTaskList() {
+ getTaskList () {
getWorkbenchData({ queryType: 3 }).then(res => {
this.taskList = res.noticesList || []
this.taskTotal = res.noticesNum || 0
})
},
- getWorkBody() {
+ getWorkBody () {
getWorkbenchData({ queryType: 2 }).then(res => {
this.staticData = res || {}
this.initEchart2()
@@ -367,10 +376,10 @@
this.initEchart4()
})
},
- getWorkHead() {
+ getWorkHead () {
getWorkbenchData({ queryType: 1 }).then(res => {
this.headerData = res || {}
- let arr = []
+ const arr = []
arr.push({ name: '璁垮', value: this.headerData.inParkVisitUserNum })
arr.push({ name: '鍐呴儴鍛樺伐', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum })
arr.push({ name: '闀挎湡鐩稿叧鏂�', value: this.headerData.inParkLwUserNum })
@@ -379,10 +388,10 @@
this.initEchart1()
})
},
- jumpPage(page) {
+ jumpPage (page) {
this.$router.push(page)
},
- departure(id) {
+ departure (id) {
this.$confirm('纭畾绂诲巶鍚�, 鏄惁缁х画?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -396,7 +405,11 @@
})
},
- handleDetail(row) {
+ handleDetail (row) {
+ if (row.type === 7) {
+ this.handleTest(row);
+ return
+ }
if (row.objType === 2) {
this.$refs.OperaDetailsWindow.open('鍏姟杞︾敵璇疯鎯�', { ...row, id: row.objId })
return
@@ -437,9 +450,9 @@
})
}
},
- initEchart1() {
+ initEchart1 () {
const myChart = echarts.init(document.getElementById('echart1'))
- let that = this
+ const that = this
const option = {
tooltip: {
@@ -471,9 +484,9 @@
myChart.resize()
})
},
- initEchart2() {
+ initEchart2 () {
const myChart = echarts.init(document.getElementById('echart2'))
- let that = this
+ const that = this
myChart.setOption({
grid: {
top: '4%',
@@ -516,7 +529,7 @@
{ offset: 0, color: '#56abf8' },
{ offset: 1, color: '#407ff0' }
]
- ),
+ )
// barBorderRadius: [0, 10, 10, 0]
}
}
@@ -527,9 +540,9 @@
myChart.resize()
})
},
- initEchart3() {
+ initEchart3 () {
const myChart = echarts.init(document.getElementById('echart3'))
- let that = this
+ const that = this
myChart.setOption({
tooltip: {
trigger: 'axis',
@@ -627,9 +640,9 @@
myChart.resize()
})
},
- initEchart4() {
+ initEchart4 () {
const myChart = echarts.init(document.getElementById('echart4'))
- let that = this
+ const that = this
myChart.setOption({
tooltip: {
trigger: 'axis',
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 5a66940..03ca63c 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
@@ -144,6 +144,7 @@
public static final String MYSQL_BACKUP_DIR ="MYSQL_BACKUP_DIR" ;
public static final String EVENT_FILES_PRIVATE_DOMAIN ="EVENT_FILES_PRIVATE_DOMAIN" ;
public static final String EVENT_FILES_PUBLIC_DOMAIN ="EVENT_FILES_PUBLIC_DOMAIN" ;
+ public static final String WMS_TOTAL_STOCK_NUM ="WMS_TOTAL_STOCK_NUM" ;
public static boolean DEALING_HK_SYNCPRIVILEGE= false;
public static boolean DEALING_HK_SYNCDEVICE = false;
public static boolean DEALING_HK_SYNCPLATFORM = false;
@@ -156,6 +157,7 @@
public static boolean DEALING_HK_DEL_USER = false;
public static boolean DEALING_HK_VISIT = false;
public static boolean DEALING_HK_VISIT_EXPIRE = false;
+ public static boolean DEALING_HK_NOTICE_LIST = false;
public static boolean DEALING_FROM_HK_VISIT = false;
public static boolean DEALING_HK_EMPOWER = false;
public static boolean DEALING_HK_EMPOWER_DETAIL = false;
@@ -562,6 +564,7 @@
int logisticsCarUse = 4;//鐗╂祦杞﹀鎵�
int system = 5;//绯荤粺娑堟伅
int reason = 6;//鍏ュ洯鍘熷洜
+ int hknotice = 7;//娴峰悍鑰冨嫟浠e姙
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java b/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
index 1feeb42..1e9dfa6 100644
--- a/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
+++ b/server/system_service/src/main/java/com/doumee/dao/system/model/Notices.java
@@ -79,8 +79,8 @@
@ExcelColumn(name="鍏宠仈瀵硅薄鍚嶇О")
private String objName;
- @ApiModelProperty(value = "绫诲瀷 0璁垮瀹℃壒 1璁垮鎶ュ 2鐢ㄨ溅瀹℃壒 3闅愭偅澶勭悊 4鐗╂祦杞﹀鎵� 5绯荤粺绯荤粺")
- @ExcelColumn(name="绫诲瀷 0璁垮瀹℃壒 1璁垮鎶ュ 2鐢ㄨ溅瀹℃壒 3闅愭偅澶勭悊 4鐗╂祦杞﹀鎵� 5绯荤粺绯荤粺")
+ @ApiModelProperty(value = "绫诲瀷 0璁垮瀹℃壒 1璁垮鎶ュ 2鐢ㄨ溅瀹℃壒 3闅愭偅澶勭悊 4鐗╂祦杞﹀鎵� 5绯荤粺绯荤粺 6鍏ュ洯鍘熷洜 7娴峰悍鑰冨嫟浠e姙")
+ @ExcelColumn(name="绫诲瀷 0璁垮瀹℃壒 1璁垮鎶ュ 2鐢ㄨ溅瀹℃壒 3闅愭偅澶勭悊 4鐗╂祦杞﹀鎵� 5绯荤粺绯荤粺 6鍏ュ洯鍘熷洜 7娴峰悍鑰冨嫟浠e姙")
private Integer type;
@ApiModelProperty(value = "绫诲瀷鎻忚堪")
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/HkNoticeTimerController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/HkNoticeTimerController.java
new file mode 100644
index 0000000..5059704
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/HkNoticeTimerController.java
@@ -0,0 +1,40 @@
+package com.doumee.api;
+
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
+import com.doumee.service.business.VisitsService;
+import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
+import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "娴峰悍浠e姙瀹氭椂鎶撳彇鎺ュ彛")
+@RestController
+@RequestMapping("/timer/hkNotice")
+public class HkNoticeTimerController extends BaseController {
+ @Autowired
+ private HkSyncVisitServiceImpl hkSyncVisitService;
+ @Autowired
+ private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService;
+ @Autowired
+ private VisitsService visitsService;
+
+ @ApiOperation("寮�鍚畾鏃舵煡璇㈡渶鏂颁汉鍛樹唬鍔炴暟鎹姸鎬�")
+ @GetMapping("/getNoticeList")
+ public ApiResponse getNoticeList() {
+ hkSyncVisitService.syncVisitData();
+ return ApiResponse.success("寮�鍚畾鏃朵笅鍙戣瀹㈤绾︾敵璇锋垚鍔�");
+ }
+
+
+}
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 fb6eeb0..04f82da 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
@@ -33,6 +33,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.Cacheable;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -60,6 +61,8 @@
private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService;
@Autowired
private HkSyncPushServiceImpl hkSyncPushService;
+ @Autowired
+ private HkSyncNoticeServiceImpl hkSyncNoticeService;
@Autowired
private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService;
@@ -231,11 +234,11 @@
* @return
*/
@ApiOperation(value = "鑾峰彇瀹夐槻骞冲彴绯荤粺鍏嶅瘑鑿滃崟璋冩暣鍦板潃" )
- @GetMapping("/getHkMenuLink")
+ @PostMapping("/getHkMenuLink/{type}")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type",example = "0",value = "鑿滃崟绫诲瀷", required = true),
})
- public ApiResponse<String> getHkMenuLink(Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ public ApiResponse<String> getHkMenuLink(@PathVariable Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
LoginUserInfo loginUserInfo = this.getLoginUser(token);
String hkToken = DESUtil.generateTokenToHk(loginUserInfo.getUsername(),Integer.valueOf(
systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_TOKEN_VALIDITY).getCode()
@@ -267,7 +270,12 @@
}
-
+ @ApiOperation("銆愭捣搴枫�戜唬鍔炴秷鎭暟鎹泦鍚堝鎺ュ鐞嗘帴鍙�")
+ @PostMapping("/notice/getList")
+ public ApiResponse getNoticeList( HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token ){
+ String result = hkSyncNoticeService.syncHkNotices(this.getLoginUser(token).getUsername());
+ return ApiResponse.success(result);
+ }
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
index 2678112..a88c653 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
@@ -12,6 +12,7 @@
import com.doumee.dao.web.reqeust.JobDetailDTO;
import com.doumee.dao.web.reqeust.SignInDTO;
import com.doumee.service.business.PlatformJobService;
+import com.doumee.service.business.third.WmsService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -32,6 +33,8 @@
@Autowired
private PlatformJobService platformJobService;
+ @Autowired
+ private WmsService wmsService;
@PreventRepeat
@ApiOperation("鏂板缓")
@@ -56,6 +59,13 @@
platformJobService.deleteByIdInBatch(this.getIdList(ids));
return ApiResponse.success(null);
}
+ @ApiOperation("鎵归噺鏇存柊wms鍚堝悓鎬昏繍杈撻噺")
+ @GetMapping("/updateTotalNum")
+ @CloudRequiredPermission("business:platformjob:update")
+ public ApiResponse updateTotalNum(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ wmsService.computjobTotalNum(this.getIdList(ids));
+ return ApiResponse.success(null);
+ }
@ApiOperation("鏍规嵁ID淇敼")
@PostMapping("/updateById")
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
index ffe7792..99f287c 100644
--- 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
@@ -42,6 +42,7 @@
WmsBaseResponse result =null;
try {
result = wmsService.inboundNotice(param);
+ wmsService.computjobTotalNum(param.getJobIdList());
}catch (BusinessException e){
log.error("銆怶MS銆戞帹閫佸叆搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
success = Constants.ONE;
@@ -64,6 +65,7 @@
WmsBaseResponse result =null;
try {
result = wmsService.outboundNotice(param);
+ wmsService.computjobTotalNum(param.getJobIdList());
}catch (BusinessException e){
log.error("銆怶MS銆戞帹閫佸嚭搴撳崟閫氱煡浠诲姟===澶辫触锛�"+e.getMessage());
success = Constants.ONE;
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
index d990173..3e5d286 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
@@ -141,15 +141,8 @@
@LoginNoRequired
@ApiOperation("搴撳瓨鎯呭喌")
@GetMapping("/stockList")
- public ApiResponse<List<GeneralVO>> stockList() {
- List<GeneralVO> list = new ArrayList<>();
- for (int i = 1; i < 10; i++) {
- Random random = new Random();
- GeneralVO data = new GeneralVO();
- data.setName("鍚嶇О"+i);
- data.setNum(BigDecimal.valueOf(random.nextInt(1000)));
- list.add(data);
- }
+ public ApiResponse< BoardStockListVO > stockList() {
+ BoardStockListVO list = boardService.stockList();
return ApiResponse.success(list);
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java
index 68ad75d..a1533a7 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunController.java
@@ -88,7 +88,7 @@
}
for (String str:dayList) {
TransportMeasureVO data = new TransportMeasureVO();
- data.setPlanDate(str);
+ data.setPlanDateStr(str);
data.setPlanTimes(random.nextInt(200));
data.setPlanTaskNum(new BigDecimal(random.nextInt(1000)));
data.setFinishTaskNum(new BigDecimal(data.getPlanTaskNum().intValue()));
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 2df12af..9dc10e9 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: pro
+ active: dev
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 da546e4..8f197ab 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
@@ -39,11 +39,13 @@
* 3銆佽兘绠′腑蹇冿細ngzx
*/
public interface MenuPageId{
+ String[] componentIds = new String[]{"Infovision iPark Platform","dfe"};
String afzx = "afzx";//瀹夐槻涓績
String xkzx = "xkzx";//娑堟帶涓績
String ngzx = "ngzx";//鑳界涓績
String jsc = "jsc";//鐗╀笟鍚庡嫟
String kqgzt = "attendance_workstand";//鑰冨嫟绠$悊
+ String kqdbcl = "process_apply";//鑰冨嫟浠e姙澶勭悊
}
/**
@@ -126,7 +128,8 @@
String[] iccmAppointmentRecords= new String[]{"/api/iccm/v2/appointment/records","iccm鏌ヨ宸查绾︾櫥璁�"};//iccm鏌ヨ宸查绾︾櫥璁�
String[] wxAccessToken= new String[]{"/api/wx/v1/oa/get/accessToken","鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken"};//1.9.1鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken
String[] getWxConfig= new String[]{"/api/wx/v1/oa/get/config","鏍规嵁閰嶇疆寰俊鍏紬鍙风紪鍙锋煡璇㈠井淇″叕浼楀彿淇℃伅"};//鏍规嵁閰嶇疆寰俊鍏紬鍙风紪鍙锋煡璇㈠井淇″叕浼楀彿淇℃伅
- String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=Infovision iPark Platform&componentMenuId=${menuId}&token=${token}","宸ヤ綔鍙拌彍鍗曡烦杞湴鍧�"};
+ String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=${componentId}&componentMenuId=${menuId}&token=${token}","宸ヤ綔鍙拌彍鍗曡烦杞湴鍧�"};
+// String[] goNoticeMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=dfe&componentMenuId={menuId}&token=${token}","宸ヤ綔鍙拌�冨嫟浠e姙澶勭悊璺宠浆鍦板潃"};
String[] nhEventPageList= new String[]{"/api/ecm/warning/event/v1/pageList","鍒嗛〉鑾峰彇鍛婅浜嬩欢"};//鍒嗛〉鑾峰彇鍛婅浜嬩欢
String[] nhRegionDataRanking= new String[]{"/api/ecm/v1/energy/regionDataRanking","鏍规嵁鏃堕棿缁村害鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕"};//1.8.5鏍规嵁鏃堕棿缁村害鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕
String[] nhEnergyDistribution= new String[]{"/api/ecm/v1/energy/energyDistribution","鏍规嵁鏃堕棿缁村害鑾峰彇鑳借�楀垎甯�"};// 鏍规嵁鏃堕棿缁村害鑾峰彇鑳借�楀垎甯�
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 e033aac..0762b6a 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
@@ -994,9 +994,9 @@
return startDoPostStringArtemis(HKConstants.InterfacePath.applyST,body);
}
- public static String getMenuUrl(String menuId, String token) {
+ public static String getMenuUrl(String componentId,String menuId, String token) {
String url = HKConstants.InterfacePath.goMenuUrl[0];
- url = url.replace("${menuId}", menuId).replace("${token}",token);
+ url = url.replace("${componentId}",componentId).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/GetTodoListRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/GetTodoListRequest.java
index 5c94e1a..e1b81b7 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/GetTodoListRequest.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/GetTodoListRequest.java
@@ -6,12 +6,12 @@
public class GetTodoListRequest {
private String comId;// Query String false 缁勪欢id
- private int pageSize ;// Query Number false 鍒嗛〉澶у皬锛�1~999锛�
- private int cascade ;// Query Number false 绾ц仈鏁版嵁鏉ユ簮0:涓嬬骇骞冲彴鏉ユ簮锛�1:闈炰笅绾у钩鍙版潵婧愶紝涓虹┖榛樿鏌ヨ鎵�鏈夋暟鎹潵婧�
+ private Integer pageSize ;// Query Number false 鍒嗛〉澶у皬锛�1~999锛�
+ private Integer cascade ;// Query Number false 绾ц仈鏁版嵁鏉ユ簮0:涓嬬骇骞冲彴鏉ユ簮锛�1:闈炰笅绾у钩鍙版潵婧愶紝涓虹┖榛樿鏌ヨ鎵�鏈夋暟鎹潵婧�
private String messageId;// Query String false messageId
- private int pageNo;// Query Number false 褰撳墠椤电爜(1~100000)
+ private Integer pageNo;// Query Number false 褰撳墠椤电爜(1~100000)
private String localeType;// Query String false 璇█绫诲瀷zh_CN:涓枃en_US:鑻辨枃
- private int status;// Query Number false 涓氬姟鐘舵�佺被鍨�,1-寰呭鐞嗭紝2-瀹℃壒涓紝3-宸插畬鎴愶紝4-鎶勯�佹垜锛�5-鎴戝鎵�,榛樿寰呭鐞�
+ private Integer status;// Query Number false 涓氬姟鐘舵�佺被鍨�,1-寰呭鐞嗭紝2-瀹℃壒涓紝3-宸插畬鎴愶紝4-鎶勯�佹垜锛�5-鎴戝鎵�,榛樿寰呭鐞�
private String userId;// Query String false 鐢ㄦ埛id
private String clientType;// Query String false 璋冪敤鏂圭被鍨�0:鍏朵粬锛�1锛欰PP锛屼负绌烘椂榛樿涓�1锛�2锛氶棬鎴�
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/GetTodoListResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/GetTodoListResponse.java
index bf7f72f..e5b710b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/GetTodoListResponse.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/GetTodoListResponse.java
@@ -10,7 +10,7 @@
private String comId;// String false 缁勪欢鏍囪瘑
private String moduleId;// String false 妯″潡鏍囪瘑
private String msgTitle;// String false 淇℃伅鏍囬
- private String msgStatus ;//String false 淇℃伅鐘舵��
+ private String msgStatus ;//String false 淇℃伅鐘舵�� 涓氬姟鐘舵�佺被鍨�,1-寰呭鐞嗭紝2-瀹℃壒涓紝3-宸插畬鎴愶紝4-鎶勯�佹垜锛�5-鎴戝鎵�,榛樿寰呭鐞�
private String msgStatusStr;// String false 淇℃伅鐘舵�佸悕绉�
private String msgCreateTime;// String false 娑堟伅鍒涘缓鏃堕棿,浼樺厛浣跨敤msgCreateTimeIso
private String msgCreateTimeIso;// String false 娑堟伅鍒涘缓鏃堕棿,ISO鏃堕棿
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 fe7905c..92f8e4f 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
@@ -1086,6 +1086,7 @@
* @return
*/
public static String getMenuUrl(Integer type,String token){
+ String componentId = HKConstants.MenuPageId.componentIds[0];
String menuId = HKConstants.MenuPageId.afzx;
if(Constants.equalsInteger(type,Constants.ONE)){
menuId = HKConstants.MenuPageId.xkzx;
@@ -1095,10 +1096,13 @@
menuId = HKConstants.MenuPageId.jsc;
}else if(Constants.equalsInteger(type,Constants.FOUR)){
menuId = HKConstants.MenuPageId.kqgzt;
+ }else if(Constants.equalsInteger(type,Constants.FIVE)){
+ componentId = HKConstants.MenuPageId.componentIds[1];
+ menuId = HKConstants.MenuPageId.kqdbcl;
}
log.info("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================寮�濮�====menuId:"+menuId+"==token:"+token);
try {
- String res = HKTools.getMenuUrl(menuId,token);
+ String res = HKTools.getMenuUrl(componentId,menuId,token);
return res;
}catch (Exception e){
log.error("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================澶辫触====锛歕n"+ e.getMessage());
@@ -1404,7 +1408,9 @@
Class<?> clazz = obj.getClass();
for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true); // 浣垮緱绉佹湁瀛楁涔熷彲浠ヨ闂�
- map.put(field.getName(), (String) field.get(obj));
+ if(field.get(obj)!=null){
+ map.put(field.getName(), String.valueOf( field.get(obj)));
+ }
}
return map;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsBaseRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsBaseRequest.java
index 498350c..823ac23 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsBaseRequest.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/wms/model/request/WmsBaseRequest.java
@@ -1,5 +1,6 @@
package com.doumee.core.wms.model.request;
+import com.doumee.dao.business.model.PlatformJob;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -16,5 +17,5 @@
@ApiModelProperty(value = "data" )
private List<T> data;
-
+ private List<Integer> jobIdList;
}
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
index 2d72b76..b286b9a 100644
--- 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
@@ -19,9 +19,9 @@
private String item_code;
@ApiModelProperty(value = "娑堟伅鎻忚堪" ,example = "1")
private String item_name;
- @ApiModelProperty(value = "鍐呭璇︽儏闆嗗悎" ,example = "1")
+ @ApiModelProperty(value = "qty" ,example = "1")
private BigDecimal qty;
- @ApiModelProperty(value = "鍐呭璇︽儏闆嗗悎" ,example = "1")
+ @ApiModelProperty(value = "supplier_code" ,example = "1")
private String supplier_code;
@ApiModelProperty(value = "g" ,example = "1")
private String supplier_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 a4809fe..99e6b30 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
@@ -43,6 +43,8 @@
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
private Integer isdeleted;
+ @ApiModelProperty(value = "浣滀笟鏉ユ簮锛�0鑷缓 1wms鎺ㄩ��", example = "1")
+ private Integer origin;
@ApiModelProperty(value = "鍚嶇О")
private String name;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java
index af71293..13d4b25 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java
@@ -51,6 +51,9 @@
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
@ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
+ @ApiModelProperty(value = "浣滀笟鏉ユ簮锛�0鑷缓 1wms鎺ㄩ��", example = "1")
+ @ExcelColumn(name="浣滀笟鏉ユ簮锛�0鑷缓 1wms鎺ㄩ��")
+ private Integer origin;
@ApiModelProperty(value = "澶囨敞")
@ExcelColumn(name="澶囨敞")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardStockListVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardStockListVO.java
new file mode 100644
index 0000000..69a3ac4
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/BoardStockListVO.java
@@ -0,0 +1,30 @@
+package com.doumee.dao.web.response.platformReport;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 閫氱敤
+ *
+ * @Author : Rk
+ * @create 2024/10/25 10:59
+ */
+@Data
+public class BoardStockListVO {
+
+ @ApiModelProperty(value = "搴撳瓨鏄庣粏闆嗗悎")
+ private List<GeneralVO> stockList;
+ @ApiModelProperty(value = "鍖哄煙搴撳瓨姹囨�婚泦鍚�")
+ private List<GeneralVO> areaTotalList;
+
+ @ApiModelProperty(value = "搴撳瓨宸插埄鐢�")
+ private BigDecimal num;
+ @ApiModelProperty(value = "搴撳瓨鍒╃敤鐜�")
+ private BigDecimal useRate;
+ @ApiModelProperty(value = "搴撳瓨鎬婚噺")
+ private BigDecimal totalNum;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TransportMeasureVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TransportMeasureVO.java
index 5c74ad7..d802b6f 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TransportMeasureVO.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TransportMeasureVO.java
@@ -26,5 +26,7 @@
@ApiModelProperty(value = "鏃ユ湡")
private Date planDate;
+ @ApiModelProperty(value = "鏃ユ湡Str")
+ private String planDateStr;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
index b091b73..dff2631 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
@@ -26,6 +26,7 @@
* @return
*/
String syncHkDevices(Device param);
+ String syncHkNotices(String username);
/**
* 鍚屾娴峰悍鍋滆溅搴�
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
index f423fd2..09ac819 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -1661,25 +1661,28 @@
pcWorkPlatformDataVO.setLwList(lwList );
}else if(Constants.equalsInteger(queryType,Constants.THREE)) {
- MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>();
- queryWrapper.selectAll(Notices.class);
if (Objects.isNull(loginUserInfo.getMemberId())) {
- queryWrapper.eq("1", "2");
+ pcWorkPlatformDataVO.setNoticesList(new ArrayList<>());
+ pcWorkPlatformDataVO.setNoticesNum(0);
+// queryWrapper.eq("1", "2");
} else {
+ MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>();
+ queryWrapper.selectAll(Notices.class);
queryWrapper.eq(Notices::getStatus, Constants.ZERO);
queryWrapper.eq(Notices::getSendacopy, Constants.ZERO);
queryWrapper.eq(Notices::getParam2, Constants.ZERO);
queryWrapper.eq(Notices::getUserId, loginUserInfo.getMemberId());
- }
- queryWrapper.orderByDesc(Notices::getCreateDate);
- List<Notices> noticesList = noticesJoinMapper.selectList(queryWrapper);
- pcWorkPlatformDataVO.setNoticesList(noticesList);
- pcWorkPlatformDataVO.setNoticesNum(noticesList.size());
- if(noticesList.size() > 5 ){
- pcWorkPlatformDataVO.setNoticesList(noticesList.subList(0,5));
- }else{
+ queryWrapper.orderByDesc(Notices::getCreateDate);
+ List<Notices> noticesList = noticesJoinMapper.selectList(queryWrapper);
pcWorkPlatformDataVO.setNoticesList(noticesList);
+ pcWorkPlatformDataVO.setNoticesNum(noticesList.size());
+ if(noticesList.size() > 5 ){
+ pcWorkPlatformDataVO.setNoticesList(noticesList.subList(0,5));
+ }else{
+ pcWorkPlatformDataVO.setNoticesList(noticesList);
+ }
}
+
}else{
String code= systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.TIMEOUT_WARNING).getCode();
MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>();
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
index ed0f1fc..c7307aa 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
@@ -67,6 +67,11 @@
return null;
}
@Override
+ public String syncHkNotices(String username){
+
+ return null;
+ }
+ @Override
public String syncHkLed(Device param){
return null;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncDoorsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncDoorsServiceImpl.java
index 4aa1d11..2cd7505 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncDoorsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncDoorsServiceImpl.java
@@ -48,10 +48,10 @@
List<Device> deleteList = new ArrayList<>();
List<Device> addList = new ArrayList<>();
List<Device> editList = new ArrayList<>();
- List<DoorsInfoResponse> allHkList = new ArrayList<>();
Date date = new Date();
//鏌ヨ鍏ㄩ儴闂ㄧ璁惧鏁版嵁
List<Device> allList = deviceMapper.selectList(null);
+ List<DoorsInfoResponse> allHkList = new ArrayList<>();
boolean hasNext = true;
int curTotal = 0;
int curPage = 1;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncNoticeServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncNoticeServiceImpl.java
new file mode 100644
index 0000000..34f2c0d
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncNoticeServiceImpl.java
@@ -0,0 +1,163 @@
+package com.doumee.service.business.impl.hksync;
+
+import com.alibaba.fastjson.JSONObject;
+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.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.haikang.model.HKConstants;
+import com.doumee.core.haikang.model.param.BaseListPageResponse;
+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.haikang.service.HKService;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DESUtil;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.core.utils.ImageBase64Util;
+import com.doumee.core.wx.wxPlat.WxPlatNotice;
+import com.doumee.dao.business.DeviceRoleMapper;
+import com.doumee.dao.business.MemberMapper;
+import com.doumee.dao.business.RetentionMapper;
+import com.doumee.dao.business.join.VisitsJoinMapper;
+import com.doumee.dao.business.model.DeviceRole;
+import com.doumee.dao.business.model.Member;
+import com.doumee.dao.business.model.Retention;
+import com.doumee.dao.business.model.Visits;
+import com.doumee.dao.system.SystemUserMapper;
+import com.doumee.dao.system.join.NoticesJoinMapper;
+import com.doumee.dao.system.model.Notices;
+import com.doumee.dao.system.model.SystemUser;
+import com.doumee.service.system.NoticesService;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * 娴峰悍璁垮涓氬姟Service瀹炵幇
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Service
+@Slf4j
+public class HkSyncNoticeServiceImpl extends HkSyncBaseServiceImpl {
+ @Autowired
+ private NoticesJoinMapper noticesJoinMapper;
+ @Autowired
+ private MemberMapper memberMapper;
+
+ @Override
+ public String syncHkNotices(String username){
+ if(Constants.DEALING_HK_NOTICE_LIST){
+ return null;
+ }
+ Constants.DEALING_HK_NOTICE_LIST =true;
+ try {
+ Date date = new Date();
+ List<GetTodoListResponse> allHkList = new ArrayList<>();
+ boolean hasNext = true;
+ int curTotal = 0;
+ int curPage = 1;
+ while (hasNext){
+ //鍒嗛〉閬嶅巻寰幆鏌ヨ鎵�鏈夐棬绂佽澶囨暟鎹�
+ GetTodoListRequest param = new GetTodoListRequest();
+ param.setComId("dfe");
+ param.setUserId(username);
+ param.setStatus(1);//鍙煡寰呭鐞嗙殑鏁版嵁
+ param.setPageNo(curPage);
+ param.setLocaleType("zh_CN");
+ param.setPageSize(100);
+ BaseResponse<BaseListPageResponse<GetTodoListResponse>> response = HKService.getTodoListPage(param);
+ if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){
+ throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵逛笉璧凤紝娴峰悍鍚屾鏁版嵁澶辫触~");
+ }
+ BaseListPageResponse<GetTodoListResponse> r = response.getData();
+ curTotal += 100;
+ if(curTotal >= r.getTotal()){
+ hasNext = false;
+ }
+ if(r.getList() == null || r.getList().size()==0){
+ hasNext =false;
+ }else{
+ allHkList.addAll(r.getList());
+ }
+ curPage++;
+ }
+ if(allHkList!=null && allHkList.size()>0){
+ List<Notices> list = new ArrayList<>();
+ List<String> users = new ArrayList<>();
+ for(GetTodoListResponse data :allHkList){
+ users.add(data.getUserId());
+ }
+ List<Integer> userIds = new ArrayList<>();
+ List<Member > userList = memberMapper.selectList(new QueryWrapper<Member>().lambda()
+ .in(Member::getPhone,users)
+ .eq(Member::getIsdeleted,Constants.ZERO));
+ for(GetTodoListResponse data :allHkList){
+ Member u = getFromUserList(data.getUserId(),userList);
+ if(u==null){
+ continue;
+ }
+ userIds.add(u.getId());
+ JSONObject param = new JSONObject();
+
+ param.put("componentId","dfe");
+ param.put("msgType","tlnc");
+ param.put("componentMenuId", data.getMenuCode());
+ JSONObject c = new JSONObject();
+ c.put("method","dealTlncMsg");
+ c.put("argument",JSONObject.toJSONString(data));
+ param.put("callback",c);
+ Notices notices = new Notices();
+ notices.setCreateDate(DateUtil.getISO8601DateByStr(data.getMsgCreateTimeIso()));
+ notices.setUserId(u.getId());
+ notices.setStatus(Constants.ZERO);
+ notices.setSendacopy(Constants.ZERO);
+ //涓氬姟鐘舵�佷俊鎭� 0 =寰呭鐞�;1=宸插悓鎰�/宸插鐞�;2=宸叉嫆缁�/宸查��鍥�;3=宸茶浆浜�;4=宸叉挙閿�
+ notices.setParam1(JSONObject.toJSONString(data));
+ notices.setParam2(Constants.ZERO+"");
+ notices.setTitle(data.getMsgTitle());
+ if(notices.getCreateDate() == null){
+ notices.setCreateDate(date);
+ }
+ notices.setIsdeleted(Constants.ZERO);
+ notices.setParam4(data.getMsgCreateTimeIso());
+ notices.setParam3(data.getMsgCreateTime());
+ notices.setParam5(JSONObject.toJSONString(param));
+ notices.setType(Constants.noticesObjectType.hknotice);
+ list.add(notices);
+ }
+ if(list.size()>0){
+ //娓呯┖娴峰悍鍏ㄩ儴鐨勪唬鍔炴暟鎹�
+ noticesJoinMapper.delete(new UpdateWrapper<Notices>().lambda()
+ .eq(Notices::getType, Constants.noticesObjectType.hknotice)
+ .in(Notices::getUserId, userIds));
+ noticesJoinMapper.insert(list);//鎵归噺鎻掑叆璁板綍
+ }
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }finally {
+ Constants.DEALING_HK_NOTICE_LIST =false;
+ }
+ return null;
+ }
+
+ private Member getFromUserList(String userId, List<Member> userList) {
+ if(userList!=null ){
+ for(Member u :userList){
+ if(StringUtils.equals(u.getPhone(),userId)){
+ return u;
+ }
+ }
+ }
+ return null;
+ }
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index f4dfa03..ad1dc0c 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -20,6 +20,9 @@
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
+import com.doumee.core.wms.model.response.WmsBaseResponse;
+import com.doumee.core.wms.model.response.WmsInventoryDataResponse;
+import com.doumee.core.wms.model.response.WmsInventoryJsonResponse;
import com.doumee.dao.business.*;
import com.doumee.dao.business.join.VisitsJoinMapper;
import com.doumee.dao.business.model.*;
@@ -30,6 +33,7 @@
import com.doumee.service.business.impl.PlatformJobServiceImpl;
import com.doumee.service.business.impl.VisitsServiceImpl;
import com.doumee.service.business.third.BoardService;
+import com.doumee.service.business.third.WmsService;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@@ -55,6 +59,8 @@
@Autowired
private PlatformLogMapper platformLogMapper;
@Autowired
+ private WmsService wmsService;
+ @Autowired
private HiddenDangerMapper hiddenDangerMapper;
@Autowired
private PlatformWaterGasMapper platformWaterGasMapper;
@@ -76,6 +82,44 @@
private RetentionMapper retentionMapper;
@Autowired
private PlatformGroupMapper platformGroupMapper;
+ /**
+ * 鑾峰彇鍖哄煙鏍戝舰缁撴瀯鏁版嵁
+ * @return
+ */
+ @Override
+ public BoardStockListVO stockList( ){
+ BoardStockListVO data = new BoardStockListVO();
+ double toatalNum = 1d;
+ BigDecimal num = new BigDecimal(0);
+ List<GeneralVO> list = new ArrayList<>();
+ try {
+ toatalNum =Double.parseDouble(systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_TOTAL_STOCK_NUM).getCode()) ;
+ }catch (Exception e){
+
+ }
+ WmsBaseResponse<WmsInventoryDataResponse> response = wmsService.getInventoryList();
+ if(response!=null && response.getData()!=null && response.getData().size()>=0){
+ List<WmsInventoryJsonResponse> t= response.getData().get(0).getJson();
+ if(t!=null &&t.size()>0){
+ for(WmsInventoryJsonResponse j :t){
+ num = num.add (Constants.formatBigdecimal( j.getQty()));
+ GeneralVO d = new GeneralVO();
+ d.setNum(Constants.formatBigdecimal(j.getQty()));
+ d.setName(j.getItem_name());
+ list.add(d);
+ }
+ }
+ }
+ data.setStockList(list);
+ data.setNum(num);
+ if(toatalNum<=0){
+ toatalNum =1;
+ }
+ data.setTotalNum(new BigDecimal(toatalNum));
+ data.setUseRate(data.getTotalNum().divide(data.getNum(),2,BigDecimal.ROUND_UP));
+ return data;
+
+ }
/**
* 鑾峰彇鍖哄煙鏍戝舰缁撴瀯鏁版嵁
* @return
@@ -551,7 +595,7 @@
new MPJLambdaWrapper<PlatformJob>()
.selectAs(PlatformJob::getId,PlatformJob::getId)
.selectAs(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.apply(queryType==0,"to_days(create_date) >= to_days(now()) -7")
.apply(queryType==1,"year(create_date) = year(now()) and month(create_date) = month(now())")
@@ -559,9 +603,35 @@
for (Date date : dayList) {
TransportMeasureVO data = new TransportMeasureVO();
data.setPlanDate(date);
- data.setPlanTimes(random.nextInt(200));
- data.setPlanTaskNum(new BigDecimal(random.nextInt(1000)));
- data.setFinishTaskNum(new BigDecimal(data.getPlanTaskNum().intValue()));
+ data.setPlanTimes(0);
+ data.setPlanTaskNum(new BigDecimal(random.nextInt(0)));
+ data.setFinishTaskNum(new BigDecimal(0));
+ for(PlatformJob job :dataList){
+ if(queryType == 2){
+ if(DateUtil.formatDate(date,"yyyy-MM").equals(DateUtil.formatDate(job.getCreateDate(),"yyyy-MM"))){
+ data.setPlanTimes( data.getPlanTimes() +1);
+ data.setPlanTaskNum( data.getPlanTaskNum().add(Constants.formatBigdecimal(job.getTotalNum())));
+ if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey())
+ ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey())
+ ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){
+ //瀹屾垚鏁�
+ data.setFinishTaskNum( data.getFinishTaskNum().add(Constants.formatBigdecimal(job.getTotalNum())));
+ }
+ }
+ }else{
+ if(DateUtil.formatDate(date,"yyyy-MM-dd").equals(DateUtil.formatDate(job.getCreateDate(),"yyyy-MM-dd"))){
+ data.setPlanTimes( data.getPlanTimes() +1);
+ data.setPlanTaskNum( data.getPlanTaskNum().add(Constants.formatBigdecimal(job.getTotalNum())));
+ if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey())
+ ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey())
+ ||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){
+ //瀹屾垚鏁�
+ data.setFinishTaskNum( data.getFinishTaskNum().add(Constants.formatBigdecimal(job.getTotalNum())));
+ }
+ }
+ }
+ }
+
list.add(data);
}
return list;
@@ -704,7 +774,7 @@
new MPJLambdaWrapper<PlatformJob>()
.selectAs(PlatformJob::getId,PlatformJob::getId)
.select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
// .in(PlatformJob::getType,Constants.ONE,Constants.THREE)
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
@@ -712,7 +782,7 @@
List<PlatformJob> monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class,
new MPJLambdaWrapper<PlatformJob>()
.selectAs(PlatformJob::getId,PlatformJob::getId)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getType,Constants.ONE,Constants.THREE)
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
@@ -722,7 +792,7 @@
.selectAs(PlatformJob::getId,PlatformJob::getId)
.select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
.selectCount(PlatformJob::getPlatformId,PlatformJob::getCountum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getType,Constants.ONE,Constants.THREE)
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
@@ -731,7 +801,7 @@
new MPJLambdaWrapper<PlatformJob>()
.selectAs(PlatformJob::getId,PlatformJob::getId)
.select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getType,Constants.ONE,Constants.THREE)
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
@@ -751,7 +821,7 @@
.selectAs(PlatformJob::getStatus,PlatformJob::getStatus)
.selectAs(PlatformJob::getType,PlatformJob::getType)
.select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),Constants.PlatformJobStatus.CALLED.getKey())
.apply(" and to_days(create_date) <to_days(now())"));
@@ -763,7 +833,7 @@
.selectAs(PlatformJob::getStatus,PlatformJob::getStatus)
.selectAs(PlatformJob::getType,PlatformJob::getType)
.select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
- .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",PlatformJob::getIoQty)
+// .select("select sum(io_qty) from platform_wms_details a where a.isdeleted=0 and a.job_id=t.id",create_date)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())
.apply("year(create_date) = year("+DateUtil.getPlusTime2(lastYear)+") and to_days(create_date)<= "+DateUtil.getPlusTime2(lastYear)));
@@ -866,11 +936,11 @@
||Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()))){
continue;
}
- if(Constants.formatBigdecimal(job.getIoQty()).compareTo(new BigDecimal(0)) >0){
- r.add( job.getIoQty());
- }else{
+// if(Constants.formatBigdecimal(job.getIoQty()).compareTo(new BigDecimal(0)) >0){
+// r.add( job.getIoQty());
+// }else{
r.add(Constants.formatBigdecimal(job.getTotalNum()));
- }
+// }
}
return Constants.formatBigdecimal0Float(r);
}
@@ -1442,7 +1512,7 @@
List<WorkEfficiencyVO> workEfficiencyVOList = new ArrayList<>();
List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>()
.selectAll( PlatformJob.class)
- .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", PlatformJob::getIoQty)
+// .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", create_date)
.apply("to_days(t.create_date) = to_days(now())")
.eq(Platform::getIsdeleted, Constants.ZERO)
.in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
index 9ed7e62..018ff70 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
@@ -28,6 +28,7 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
+import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@@ -261,6 +262,7 @@
job.setPlateNumber(param.getPlateNumber());
job.setType(Constants.ZERO);
job.setIoCreatedate(param.getCreateDate());
+ job.setOrigin(Constants.ONE);
job.setJobId(model.getId());
job.setDriverPhone(param.getDriverPhone());
platformWmsJobMapper.insert(job);
@@ -416,6 +418,7 @@
return returnFailReuslt("璇锋眰鍙傛暟涓嶆纭紝鍙傛暟涓嶈兘涓虹┖");
}
List<PlatformJob> jobList = new ArrayList<>();
+ List<Integer> jobIdList = new ArrayList<>();
List<PlatformWmsDetail> details = new ArrayList<>();
List<String> iocodeList = new ArrayList<>();
for(WmsOutboundNoticeRequest param : list.getData()){
@@ -450,9 +453,10 @@
job.setContractNum(param.getContractNum());
job.setDriverPhone(param.getDriverPhone());
job.setDriverName(param.getDriverName());
+ job.setOrigin(Constants.ONE);
platformWmsJobMapper.insert(job);
- jobList.add(model);
}
+ jobIdList.add(job.getId());
if(param.getDetails()!=null && param.getDetails().size()>0){
for(WmsOutboundDetailRequest d :param.getDetails()){
PlatformWmsDetail entity = new PlatformWmsDetail();
@@ -479,12 +483,14 @@
.in(PlatformWmsDetail::getIocode,iocodeList)
);
}
+ jobIdList.add(job.getId());
}
}
if(details.size()>0){
platformWmsDetailMapper.insert(details);
}
if(jobList.size()>0){
+ list.setJobIdList(jobIdList);
startEndNoticeToDriver(jobList);
}
}catch (Exception e){
@@ -616,6 +622,33 @@
return returnSuccessReuslt(null);
}
/**
+ * 澶勭悊浣滀笟琛屾暟鎹殑杩愯緭鎬婚噺淇℃伅
+ * @param jobList 鍙傛暟
+ * @return
+ */
+ @Override
+ public void computjobTotalNum(List<Integer> jobList) {
+ if(jobList==null || jobList.size()==0){
+ return;
+ }
+ for(Integer jobId : jobList){
+ BigDecimal num = new BigDecimal(0);
+ List<PlatformWmsDetail> details = platformWmsDetailMapper.selectList( new QueryWrapper<PlatformWmsDetail>().lambda()
+ .eq(PlatformWmsDetail::getJobId,jobId)
+ .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO));
+ if(details!=null && details.size()>0){
+ for(PlatformWmsDetail d :details){
+ num.add(Constants.formatBigdecimal(d.getIoQty()));
+ }
+ platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda()
+ .set(PlatformJob::getTotalNum,num)
+ .eq(PlatformJob::getOrigin, Constants.ZERO)
+ .eq(PlatformJob::getId, jobId));
+ }
+
+ }
+ }
+ /**
* 浣滀笟瀹屾垚閫氱煡浠诲姟涓氬姟澶勭悊
* @param list 鍙傛暟
* @return
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
index 0e07eb7..45ab758 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
@@ -90,4 +90,6 @@
CarsJobAndContractVO getCarsJobDetails(CarsJobAndContractDTO param);
List<TransportMeasureVO> transportMeasure(Integer queryType);
+
+ BoardStockListVO stockList();
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/WmsService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/WmsService.java
index ff305ea..ee20ede 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/WmsService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/WmsService.java
@@ -5,6 +5,7 @@
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.core.wms.model.response.WmsInventoryDataResponse;
import com.doumee.dao.business.model.PlatformJob;
import java.util.List;
@@ -21,7 +22,7 @@
* @return WmsBaseResponse
*/
WmsBaseResponse orderPlatformBind(PlatformJob job);
- WmsBaseResponse getInventoryList();
+ WmsBaseResponse<WmsInventoryDataResponse> getInventoryList();
void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type);
/**
* 鍏ュ簱鍗曟壒閲忛�氱煡
@@ -57,4 +58,5 @@
WmsBaseResponse doneTask(WmsBaseRequest<WmsActionNoticeRequest> list);
+ void computjobTotalNum(List<Integer> jobList);
}
--
Gitblit v1.9.3