From bf79a36667124868583fcbf47af0e709e088b5e9 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期六, 12 十月 2024 09:09:32 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 6
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java | 3
admin/src/components/business/OperaPlatformWindow.vue | 6
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java | 14 ++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java | 15 ++
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java | 10 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java | 29 +++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java | 7 +
admin/src/views/platform/platform.vue | 2
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java | 11 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java | 2
server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java | 6
server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java | 47 ++++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java | 2
admin/src/views/timer/components/OperaTimerWindow.vue | 8
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java | 14 ++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java | 127 +++++++++++++++++-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 9
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java | 15 ++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java | 13 +
server/system_gateway/src/main/resources/application-dev.yml | 9
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java | 8 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java | 22 +++
24 files changed, 355 insertions(+), 32 deletions(-)
diff --git a/admin/src/components/business/OperaPlatformWindow.vue b/admin/src/components/business/OperaPlatformWindow.vue
index 322b834..dd746de 100644
--- a/admin/src/components/business/OperaPlatformWindow.vue
+++ b/admin/src/components/business/OperaPlatformWindow.vue
@@ -26,8 +26,8 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="LED绌洪棽鏂囨锛�" prop="remark">
- <el-input type="text" v-model="form.remark" placeholder="璇疯緭鍏ED绌洪棽鏂囨" v-trim />
+ <el-form-item label="LED绌洪棽鏂囨锛�" prop="ledContent">
+ <el-input type="text" v-model="form.ledContent" placeholder="璇疯緭鍏ED绌洪棽鏂囨" v-trim />
</el-form-item>
<el-form-item label="鍚屾椂浣滀笟鏁伴噺锛�" prop="workingNum">
<el-input type="number" v-model="form.workingNum" placeholder="璇疯緭鍏ュ悓鏃朵綔涓氭暟閲�" v-trim />
@@ -71,7 +71,7 @@
startTime: '',
endTime: '',
workingNum: 1,
- remark: '',
+ ledContent: '',
workRate: '',
stayTimeoutAlarmTime: '',
workTimeoutAlarmTime: '',
diff --git a/admin/src/views/platform/platform.vue b/admin/src/views/platform/platform.vue
index e5615f6..4d98a5a 100644
--- a/admin/src/views/platform/platform.vue
+++ b/admin/src/views/platform/platform.vue
@@ -50,7 +50,7 @@
</el-table-column> -->
<el-table-column prop="broadcastNames" label="鍏宠仈骞挎挱" min-width="100px"></el-table-column>
<el-table-column prop="ledNames" label="鍏宠仈LED" min-width="100px"></el-table-column>
- <el-table-column prop="remark" label="LED绌洪棽鏂囨" min-width="180px"></el-table-column>
+ <el-table-column prop="ledContent" label="LED绌洪棽鏂囨" min-width="180px"></el-table-column>
<el-table-column prop="hkDate" label="鍚屾鏃堕棿" min-width="150px"></el-table-column>
<el-table-column label="鏈堝彴鐘舵��" fixed="right" width="100px">
<template slot-scope="{row}">
diff --git a/admin/src/views/timer/components/OperaTimerWindow.vue b/admin/src/views/timer/components/OperaTimerWindow.vue
index f3e8b6d..3bf5d10 100644
--- a/admin/src/views/timer/components/OperaTimerWindow.vue
+++ b/admin/src/views/timer/components/OperaTimerWindow.vue
@@ -8,16 +8,16 @@
>
<el-form :model="form" ref="form" :rules="rules" label-width="120px" label-suffix="锛�">
<el-form-item label="Bean鍚嶇О" prop="beanName">
- <el-input v-model="form.beanName" placeholder="璇疯緭鍏ean鍚嶇О" :maxlength="10" v-trim/>
+ <el-input v-model="form.beanName" placeholder="璇疯緭鍏ean鍚嶇О" v-trim/>
</el-form-item>
<el-form-item label="妯″潡鍚嶇О" prop="module">
- <el-input v-model="form.module" placeholder="璇疯緭鍏ユā鍧楀悕绉�" :maxlength="10" v-trim/>
+ <el-input v-model="form.module" placeholder="璇疯緭鍏ユā鍧楀悕绉�" v-trim/>
</el-form-item>
<el-form-item label="Cron琛ㄨ揪寮�" prop="cronExpres">
- <el-input v-model="form.cronExpres" placeholder="璇疯緭鍏ron琛ㄨ揪寮�" :maxlength="10" v-trim/>
+ <el-input v-model="form.cronExpres" placeholder="璇疯緭鍏ron琛ㄨ揪寮�" v-trim/>
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" :maxlength="10" v-trim/>
+ <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" v-trim/>
</el-form-item>
<el-form-item label="鎵ц鍙傛暟" prop="params">
<el-input v-model="form.params" type="textarea" placeholder="璇疯緭鍏ユ墽琛屽弬鏁�" v-trim/>
diff --git a/server/system_gateway/src/main/resources/application-dev.yml b/server/system_gateway/src/main/resources/application-dev.yml
index edb6d82..413edec 100644
--- a/server/system_gateway/src/main/resources/application-dev.yml
+++ b/server/system_gateway/src/main/resources/application-dev.yml
@@ -1,9 +1,12 @@
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://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+# username: doumee
+# password: rtjgfEr@&0c0m
+ url: jdbc:mysql://10.50.250.253: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
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 4c8339d..dd26eaf 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
@@ -773,7 +773,8 @@
public enum PlatformWarnEvent {
STOP_TIMEOUT(0, "鍋滈潬瓒呮椂","${carCode}鏈堝彴鍋滈潬瓒呮椂" ),
- STOP_ERROR(1, "鍋滈潬閿欒","${carCode}鏈堝彴鍋滈潬閿欒" );
+ STOP_ERROR(1, "鍋滈潬閿欒","${carCode}鏈堝彴鍋滈潬閿欒" ),
+ WORK_TIMEOUT(2, "浣滀笟瓒呮椂","${carCode}浣滀笟瓒呮椂" );
// 鎴愬憳鍙橀噺
private int key;
@@ -898,6 +899,7 @@
WORKING(3, "浣滀笟涓�","${param} ${param2} 浣滀笟涓�" ),
WRONG_IN(4, "閿欒鍋滈潬","${param} ${param2} 褰撳墠杞﹁締閿欒鍋滈潬锛岃灏藉揩椹剁" ),
TIMEOUT_IN(5, "瓒呮椂鍋滈潬","${param} ${param2} 褰撳墠杞﹁締瓒呮椂鍋滈潬锛岃灏藉揩椹剁" ),
+ TIMEOUT_WORK(6, "浣滀笟瓒呮椂","${param} ${param2} 褰撳墠杞﹁締浣滀笟瓒呮椂" ),
;
// 鎴愬憳鍙橀噺
@@ -950,12 +952,14 @@
2. 浣滀笟瀹屾垚锛氱殩A12345浣滀笟瀹屾垚锛岃灏藉揩椹剁
3. 閿欒鍋滈潬锛氱殩A12345鏈堝彴鍋滈潬閿欒锛岃灏藉揩椹剁
4. 瓒呮椂鍋滈潬锛氱殩A12345鏈堝彴鍋滈潬瓒呮椂锛岃灏藉揩椹剁璇峰敖蹇┒绂�
+ 5. 浣滀笟瓒呮椂锛氱殩A12345鏈堝彴鍋滈潬瓒呮椂锛岃灏藉揩椹剁璇峰敖蹇┒绂�
*/
public enum PlatformBroadcastContent {
CALLING(1, "鍙彿涓�","${param}璇峰墠寰�${param2}绛夊緟浣滀笟"),
DONE(2, "浣滀笟瀹屾垚","${param}浣滀笟瀹屾垚锛岃灏藉揩椹剁" ),
WRONG_IN(3, "閿欒鍋滈潬","${param}鏈堝彴鍋滈潬閿欒锛岃灏藉揩椹剁" ),
TIMEOUT_IN(4, "瓒呮椂鍋滈潬","${param}鏈堝彴鍋滈潬瓒呮椂锛岃灏藉揩椹剁璇峰敖蹇┒绂�" ),
+ TIMEOUT_WORK(5, "浣滀笟瓒呮椂","${param}浣滀笟瓒呮椂" ),
;
// 鎴愬憳鍙橀噺
diff --git a/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java b/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
index 54fb03b..2292116 100644
--- a/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
+++ b/server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
@@ -66,7 +66,9 @@
ApiResponse syncVistAppointData() ;
@ApiOperation("銆愯瀹㈢郴缁熴�戝畾鏃舵洿鏂板井淇″叕浼楀彿accesstoken")
@GetMapping("/timer/wxtoken/updateWxAccessToken")
- public ApiResponse updateWxAccessToken();
-
+ ApiResponse updateWxAccessToken();
+ @ApiOperation("銆愭暟瀛楀寲鏈堝彴銆戞湀鍙颁綔涓氭姤璀︿笟鍔�")
+ @GetMapping("/timer/platformJob/platformJobTimer")
+ ApiResponse platformJobTimer();
}
diff --git a/server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java b/server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java
new file mode 100644
index 0000000..b259a1f
--- /dev/null
+++ b/server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java
@@ -0,0 +1,47 @@
+package com.doumee.api;
+
+import com.alibaba.fastjson.JSONObject;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.HttpsUtil;
+import com.doumee.core.wx.WXConstant;
+import com.doumee.dao.system.model.SystemDictData;
+import com.doumee.service.business.PlatformJobService;
+import com.doumee.service.system.SystemDictDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.mgt.DefaultSecurityManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+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;
+import java.util.Objects;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2023/11/30 15:33
+ */
+@Api(tags = "鏈堝彴浣滀笟瀹氭椂")
+@RestController
+@RequestMapping("/timer/platformJob")
+public class PlatformJobController extends BaseController {
+
+ @Autowired
+ private PlatformJobService platformJobService;
+
+ @ApiOperation("鏈堝彴浣滀笟鎶ヨ涓氬姟")
+ @GetMapping("/platformJobTimer")
+ public ApiResponse platformJobTimer() {
+ platformJobService.timeOutReport();
+ platformJobService.timeOutCallIn();
+ platformJobService.timeOutWork();
+ return ApiResponse.success("鏈堝彴浣滀笟鎶ヨ涓氬姟");
+ }
+
+
+}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
index ecefdce..6fc1041 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
@@ -19,8 +19,10 @@
import com.doumee.service.business.PlatformJobService;
import com.doumee.service.business.PlatformService;
import com.doumee.service.business.PlatformShowParamService;
+import com.doumee.service.business.third.WmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -47,6 +49,10 @@
@Autowired
private PlatformShowParamService platformShowParamService;
+
+ @Autowired
+ private WmsService wmsService;
+
@PreventRepeat
@ApiOperation("鏂板缓")
@@ -185,6 +191,11 @@
if(Constants.equalsInteger(oldPlatformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
platformJobService.sendInPark(platformJob);
}
+ if(!Constants.equalsInteger(platformJob.getType(),Constants.FOUR)
+ && StringUtils.isNotBlank(platformJob.getBillCode())){
+ //閫氱煡WMS缁戝畾鏈堝彴淇℃伅
+ wmsService.orderPlatformBind(platformJob);
+ }
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java
index 1e05013..5d209a2 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java
@@ -60,6 +60,21 @@
return ApiResponse.success(null);
}
+
+
+ @ApiOperation("鎵归噺绂佸惎鐢�")
+ @GetMapping("/updateStatus/batch")
+ @CloudRequiredPermission("business:smsconfig:update")
+ public ApiResponse updateStatusBatch(@RequestParam String ids,@RequestParam Integer status) {
+ String [] idArray = ids.split(",");
+ List<Integer> idList = new ArrayList<>();
+ for (String id : idArray) {
+ idList.add(Integer.valueOf(id));
+ }
+ smsConfigService.updateStatusByIdInBatch(idList,status);
+ return ApiResponse.success(null);
+ }
+
@ApiOperation("鏍规嵁ID淇敼")
@PostMapping("/updateById")
@CloudRequiredPermission("business:smsconfig:update")
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java
index 6329411..e82d39a 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java
@@ -168,4 +168,18 @@
return ApiResponse.success(platformJobService.getLargeScreenData());
}
+ @LoginNoRequired
+ @ApiOperation("鏈堝彴浠诲姟娴嬭瘯瀹氭椂鏂规硶")
+ @GetMapping("/testTimer")
+ public ApiResponse testTimer(Integer type) {
+ if(Constants.equalsInteger(type ,1)){
+ platformJobService.timeOutWork();
+ }else if(Constants.equalsInteger(type ,2)){
+ platformJobService.timeOutCallIn();
+ }else if(Constants.equalsInteger(type ,3)){
+ platformJobService.timeOutReport();
+ }
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
index 5b7db0f..ca0f84e 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java
@@ -15,11 +15,13 @@
import com.doumee.dao.web.response.LineUpVO;
import com.doumee.dao.web.response.PlatformWorkVO;
import com.doumee.service.business.*;
+import com.doumee.service.business.third.WmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
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.*;
@@ -58,6 +60,9 @@
@Autowired
private PlatformWmsJobService platformWmsJobService;
+
+ @Autowired
+ private WmsService wmsService;
@ApiOperation("鑾峰彇鏈堝彴缁勪俊鎭�")
@PostMapping("/getPlatformGroupList")
@@ -126,6 +131,11 @@
if(Constants.equalsInteger(oldPlatformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
platformJobService.sendInPark(platformJob);
}
+ if(!Constants.equalsInteger(platformJob.getType(),Constants.FOUR)
+ && StringUtils.isNotBlank(platformJob.getBillCode())){
+ //閫氱煡WMS缁戝畾鏈堝彴淇℃伅
+ wmsService.orderPlatformBind(platformJob);
+ }
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java
index 05a3247..f733483 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java
@@ -65,6 +65,9 @@
@ApiModelProperty(value = "澶囨敞")
@ExcelColumn(name="澶囨敞")
private String remark;
+ @ApiModelProperty(value = "led绌洪棽鏂囨")
+ @ExcelColumn(name="led绌洪棽鏂囨")
+ private String ledContent;
@ApiModelProperty(value = "鐘舵�� 0姝e父 1绂佺敤", example = "1")
@ExcelColumn(name="鐘舵�� 0姝e父 1绂佺敤")
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 846bc80..2424691 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
@@ -318,6 +318,9 @@
@TableField(exist = false)
private String platformName ;
+ @ApiModelProperty(value = "鏄惁瓒呮椂锛�0=鏄紱1=鍚�", example = "1")
+ @TableField(exist = false)
+ private Integer isTimeOut;
@ApiModelProperty(value = "浣滀笟閲�" ,hidden = true)
@TableField(exist = false)
@@ -414,6 +417,12 @@
@TableField(exist = false)
private String queryStatus;
+
+ @ApiModelProperty(value = "澶氱姸鎬佹煡璇� 澶氫釜浠�,鍒嗗壊")
+ @TableField(exist = false)
+ private String queryStatusForPower;
+
+
@ApiModelProperty(value = "浣滀笟绫诲瀷鏌ヨ 澶氫釜浠�,鍒嗗壊")
@TableField(exist = false)
private String queryType;
@@ -422,6 +431,11 @@
@TableField(exist = false)
private Integer lockStatus;
+ @ApiModelProperty(value = "绛夊緟鍙彿鏃堕棿(鍒嗭級")
+ @TableField(exist = false)
+ private Integer worktimeOutAlarmTime;
+
+
public void dealTime(){
if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())
|| Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java
index d42123f..93bb26d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java
@@ -1,5 +1,6 @@
package com.doumee.dao.business.vo;
+import com.doumee.core.annotation.excel.ExcelColumn;
import com.doumee.dao.business.model.Approve;
import com.doumee.dao.business.model.Platform;
import com.doumee.dao.business.model.PlatformWmsDetail;
@@ -23,6 +24,12 @@
@ApiModelProperty(value = "鏀惰揣鍦�")
private String address;
+ @ApiModelProperty(value = "0鏈畬鎴� 1宸插畬鎴� 2宸插彇娑�", example = "1")
+ private Integer status;
+
+ @ApiModelProperty(value = "涓婇攣鐘舵�侊細0=鏈笂閿侊紱1=宸蹭笂閿侊紱")
+ private Integer lockStatus;
+
@ApiModelProperty(value = "鏄庣粏淇℃伅")
private List<PlatformWmsDetail> platformWmsDetailList;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
index b5f0c11..195779b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
@@ -216,7 +216,6 @@
*/
PlatformWorkVO getPlatformWorkVOById(Integer platformId);
-
PlatformOrderNumByDateResponse orderNumByDate(PlatformOrderNumByDateRequest param);
List<PlatformDataListResponse> platformWorkingDataList(PlatformDataListRequest param);
@@ -229,5 +228,19 @@
LargeScreenDataVO getLargeScreenData();
+ /**
+ * 瓒呮椂鎶ヨ
+ */
+ void timeOutReport();
+
+ /**
+ * 鑷姩杩囧彿
+ */
+ void timeOutCallIn();
+
+ /**
+ * 浣滀笟瓒呮椂
+ */
+ void timeOutWork();
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java
index 9e137bb..a41d07d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java
@@ -48,6 +48,8 @@
*/
void updateById(SmsConfig smsConfig);
+ void updateStatusByIdInBatch(List<Integer> ids,Integer status);
+
/**
* 鎵归噺涓婚敭鏇存柊
*
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java
index 3741865..0322937 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java
@@ -243,7 +243,7 @@
}
model.setSpeed(speed);
}
- PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(device.getNo(),device.getName(),model.getContent(),model.getSpeed(),1);
+ PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(0,device.getNo(),device.getName(),model.getContent(),model.getSpeed(),1);
platformBroadcastLogMapper.insert(log);
if(log.getHkStatus() == null || !Constants.equalsInteger(log.getHkStatus(), Constants.TWO)){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵逛笉璧凤紝灞忓箷鍐呭璁剧疆澶辫触"+(log!=null?log.getHkInfo():""));
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
index bf59272..3df5317 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
@@ -255,8 +255,10 @@
.select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
.select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
.selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName)
+ .selectAs(PlatformBooks::getId,PlatformJob::getBookId)
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode)
+ .leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.apply(" ( t1.isdeleted = 0 or t.PLATFORM_ID is null ) ")
.in(PlatformJob::getStatus,
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 6341d06..7bdf5a0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -32,7 +32,9 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl;
+import com.doumee.service.business.impl.thrid.WmsServiceImpl;
import com.doumee.service.business.third.EmayService;
+import com.doumee.service.business.third.WmsService;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -107,6 +109,8 @@
@Autowired
private PlatformBroadcastLogMapper platformBroadcastLogMapper;
+ @Autowired
+ private PlatformWarnEventServiceImpl platformWarnEventService;
@Override
public Integer create(PlatformJob platformJob) {
@@ -267,6 +271,7 @@
.eq(pageWrap.getModel().getPlatformGroupId() != null, PlatformJob::getPlatformGroupId, pageWrap.getModel().getPlatformGroupId())
.apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')")
+ .apply(pageWrap.getModel().getQueryStatusForPower() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatusForPower()+"')")
.apply(pageWrap.getModel().getQueryType() != null, " find_in_set(t.TYPE,'"+pageWrap.getModel().getQueryType()+"')")
.ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart()))
.le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd()))
@@ -1024,6 +1029,8 @@
}
platformJob.setEditDate(new Date());
platformJobMapper.updateById(platformJob);
+
+
//瀛樺偍鎿嶄綔鏃ュ織
savePlatformLog(Constants.PlatformJobLogType.CALLED.getKey(),oldPlatformJob,platformJob,
Constants.PlatformJobLogType.CALLED.getInfo().replace("{data}",platform.getName()));
@@ -1039,6 +1046,8 @@
this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.CALLING.getInfo(),
Constants.PlatformBroadcastContent.CALLING.getInfo()
);
+
+ platformJob.setPlatformWmsCode(platform.getCode());
return platformJob;
}
@@ -1053,7 +1062,8 @@
log.error("鏌ヨLED涓庡箍鎾暟鎹�------------------------------------------------------------------------------------------");
List<PlatformDevice> deviceList = platformDeviceMapper.selectList(new QueryWrapper<PlatformDevice>().lambda()
.eq(PlatformDevice::getPlatformId,model.getPlatformId())
- .eq(PlatformDevice::getIsdeleted,Constants.ZERO));
+ .eq(PlatformDevice::getIsdeleted,Constants.ZERO)
+ );
if(deviceList ==null || deviceList.size() == 0){
return;
}
@@ -1084,7 +1094,7 @@
if(Constants.equalsInteger(device.getType(),Constants.ZERO)&&sendLed){
log.error("璋冭捣led------------------------------------------------------------------------------------------");
//濡傛灉鏄疞ED
- PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(device.getHkNo(),device.getName(),ledContent,speed,1);
+ PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(model.getId(),device.getHkNo(),device.getName(),ledContent,speed,1);
logList.add(log);
ledList.add(device.getHkId());
}else if(Constants.equalsInteger(device.getType(),Constants.TWO)&&sendBroadcast){
@@ -1160,6 +1170,12 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName()
);
+
+ platformJob.setPlatformName(platform.getName());
+ this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getRemark())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(),
+ null
+ );
+
}
@@ -1310,7 +1326,6 @@
||Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.EXCEPTION.getKey()) )){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧�,涓氬姟鐘舵�佸凡娴佽浆锛�");
}
-
Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId());
if(Objects.isNull(platform)){
@@ -1718,7 +1733,7 @@
if (Objects.isNull(platformJob.getWorkNum()) || Objects.isNull(platformJob.getWorkRate())) {
platformDataListResponse.setFinishTime(null);
} else {
- Integer workMinute = platformJob.getWorkNum().multiply(new BigDecimal(60)).divide(platformJob.getWorkRate()).intValue();
+ Integer workMinute = platformJob.getWorkNum().multiply(new BigDecimal(60)).divide(platformJob.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
Date overDate = DateUtil.getXMinuteAfterDate(platformJob.getNewStartDate(), workMinute);
platformDataListResponse.setFinishTime(overDate);
}
@@ -1888,10 +1903,13 @@
.selectAll(PlatformJob.class)
.selectAs(Platform::getWorkRate,PlatformJob::getWorkRate)
.selectAs(Platform::getName,PlatformJob::getPlatformName)
+ .selectAs(PlatformGroup::getWaitCallTime,PlatformJob::getWorktimeOutAlarmTime)
.select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end workNum ")
.select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
.select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId)
+ .eq(PlatformJob::getIsdeleted,Constants.ZERO)
.in(PlatformJob::getStatus,
Constants.PlatformJobStatus.WAIT_CALL.getKey(),
Constants.PlatformJobStatus.WORKING.getKey(),
@@ -1910,13 +1928,12 @@
if(Objects.isNull(platformJob.getWorkNum()) || Objects.isNull(platformJob.getWorkRate())){
platformJob.setOptTime(0L);
}else{
- Integer workMinute = platformJob.getWorkNum().multiply(new BigDecimal(60)).divide(platformJob.getWorkRate()).intValue();
+ Integer workMinute = platformJob.getWorkNum().multiply(new BigDecimal(60)).divide(platformJob.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
Date overDate = DateUtil.getXMinuteAfterDate(platformJob.getNewStartDate(),workMinute);
platformJob.setOptTime(overDate.getTime());
}
}else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){
- //璁$畻宸插彨鍙锋椂闂�
- platformJob.dealTime();
+ platformJob.setOptTime(DateUtil.getXMinuteAfterDate(platformJob.getNewCallDate(),platformJob.getWorktimeOutAlarmTime()).getTime());
}
}
largeScreenDataVO.setAllList(platformJobList);
@@ -1929,7 +1946,103 @@
}
+ /**
+ * 浣滀笟瀹屾垚瓒呮椂
+ */
+ @Override
+ public void timeOutReport(){
+ //鏌ヨ瓒呮椂鏁版嵁
+ List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
+ .selectAll(PlatformJob.class)
+ .selectAs(Platform::getName,PlatformJob::getPlatformName)
+ .select(" ( now() > DATE_ADD(t.DONE_DATE ,INTERVAL t1.STAY_TIMEOUT_ALARM_TIME MINUTE) ) as isTimeOut ")
+ .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
+ .eq(PlatformJob::getInOut,Constants.ONE)
+ .isNotNull(PlatformJob::getDoneDate)
+ );
+ //濡傛灉瓒呮椂 澶勭悊鏁版嵁 骞跺彂閫乴ed涓庡箍鎾�
+ for (PlatformJob platformJob:platformJobList) {
+ if(Constants.equalsInteger(platformJob.getIsTimeOut(),Constants.ONE)){
+ //骞挎挱 led閫氱煡
+ this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.TIMEOUT_IN.getInfo(),
+ Constants.PlatformBroadcastContent.TIMEOUT_IN.getInfo());
+ //鏇存柊鐘舵��
+ platformJobJoinMapper.update(new UpdateWrapper<PlatformJob>().lambda().set(PlatformJob::getInOut,Constants.ZERO).eq(PlatformJob::getId,platformJob.getId()));
+ SavePlatformWarnEventDTO savePlatformWarnEventDTO = new SavePlatformWarnEventDTO();
+ savePlatformWarnEventDTO.setPlatformJobId(platformJob.getId());
+ savePlatformWarnEventDTO.setPlatformId(platformJob.getPlatformId());
+ savePlatformWarnEventDTO.setCarCode(platformJob.getCarCodeFront());
+ savePlatformWarnEventDTO.setEventType(Constants.PlatformWarnEvent.STOP_TIMEOUT.getKey());
+ platformWarnEventService.savePlatformWarnEvent(savePlatformWarnEventDTO);
+ }
+ }
+ }
+
+
+ /**
+ * 鑷姩杩囧彿 鑷姩鏇存柊鑷充唬绛惧埌鐘舵��
+ */
+ @Override
+ public void timeOutCallIn(){
+ //鏌ヨ瓒呮椂鏁版嵁
+ List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
+ .selectAll(PlatformJob.class)
+ .selectAs(Platform::getName,PlatformJob::getPlatformName)
+ .select(" ( now() > DATE_ADD( ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) ,INTERVAL t2.WAIT_CALL_TIME MINUTE) ) as isTimeOut ")
+ .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId)
+ .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())
+ .isNotNull(PlatformJob::getCallDate)
+ );
+ //濡傛灉瓒呮椂 澶勭悊鏁版嵁 骞跺彂閫乴ed涓庡箍鎾�
+ for (PlatformJob platformJob:platformJobList) {
+ JobOperateDTO jobOperateDTO = new JobOperateDTO();
+ jobOperateDTO.setJobId(platformJob.getId());
+ this.platformOverNumber(jobOperateDTO);
+ this.cancelInPark(platformJob);
+ }
+ }
+
+
+ /**
+ * 浣滀笟瓒呮椂
+ */
+ @Override
+ public void timeOutWork(){
+ //鏌ヨ瓒呮椂鏁版嵁
+ List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
+ .selectAll(PlatformJob.class)
+ .selectAs(Platform::getName,PlatformJob::getPlatformName)
+ .selectAs(Platform::getWorkRate, PlatformJob::getWorkRate)
+ .selectAs(Platform::getWorkTimeoutAlarmTime, PlatformJob::getWorktimeOutAlarmTime)
+ .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end workNum ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
+ .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey())
+ .eq(PlatformJob::getInOut,Constants.ONE)
+ );
+ //濡傛灉瓒呮椂 澶勭悊鏁版嵁 骞跺彂閫乴ed涓庡箍鎾�
+ for (PlatformJob platformJob:platformJobList) {
+
+ Integer workMinute = platformJob.getWorkNum().multiply(new BigDecimal(60)).divide(platformJob.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
+ Date overDate = DateUtil.getXMinuteAfterDate(platformJob.getNewStartDate(),workMinute + platformJob.getWorktimeOutAlarmTime());
+ if(overDate.getTime() < System.currentTimeMillis() ){
+ //骞挎挱 led閫氱煡
+ this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.TIMEOUT_WORK.getInfo(),
+ Constants.PlatformBroadcastContent.TIMEOUT_WORK.getInfo());
+
+ SavePlatformWarnEventDTO savePlatformWarnEventDTO = new SavePlatformWarnEventDTO();
+ savePlatformWarnEventDTO.setPlatformJobId(platformJob.getId());
+ savePlatformWarnEventDTO.setPlatformId(platformJob.getPlatformId());
+ savePlatformWarnEventDTO.setCarCode(platformJob.getCarCodeFront());
+ savePlatformWarnEventDTO.setEventType(Constants.PlatformWarnEvent.WORK_TIMEOUT.getKey());
+ platformWarnEventService.savePlatformWarnEvent(savePlatformWarnEventDTO);
+ }
+
+ }
+ }
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
index 44a60e9..168b829 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
@@ -9,10 +9,7 @@
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
-import com.doumee.dao.business.DeviceMapper;
-import com.doumee.dao.business.PlatformDeviceMapper;
-import com.doumee.dao.business.PlatformJobMapper;
-import com.doumee.dao.business.PlatformMapper;
+import com.doumee.dao.business.*;
import com.doumee.dao.business.join.PlatformJobJoinMapper;
import com.doumee.dao.business.join.PlatformJoinMapper;
import com.doumee.dao.business.model.*;
@@ -46,6 +43,8 @@
@Autowired
private PlatformMapper platformMapper;
+ @Autowired
+ private PlatformGroupMapper platformGroupMapper;
@Autowired
private PlatformJoinMapper platformJoinMapper;
@Autowired
@@ -135,6 +134,28 @@
public void updateById(Platform platform) {
platform.setEditor(platform.getLoginUserInfo().getId());
platform.setEditDate(new Date());
+ Platform model = platformMapper.selectById(platform.getId());
+ if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(model.getGroupId()!= null && platform.getGroupId()!=null && !Constants.equalsInteger(platform.getGroupId(),model.getGroupId())){
+ PlatformGroup group = platformGroupMapper.selectById(platform.getGroupId());
+ if(group ==null || Constants.equalsInteger(group.getIsdeleted(),Constants.ONE)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝鏈堝彴缁勪俊鎭笉姝g‘锛�");
+ }
+ //濡傛灉鏈堝彴鍒嗙粍鍙戠敓鍙樺寲
+ Long count = platformJobJoinMapper.selectCount( new QueryWrapper<PlatformJob>().lambda()
+ .eq(PlatformJob::getIsdeleted,Constants.ZERO)
+ .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.WART_SIGN_IN.getKey()
+ ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()
+ ,Constants.PlatformJobStatus.DONE.getKey()
+ ,Constants.PlatformJobStatus.LEAVED.getKey()
+ ,Constants.PlatformJobStatus.CANCEL.getKey()
+ ));
+ if(count!=null && count>0){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝褰撳墠鏈堝彴鏈夋鍦ㄤ綔涓氱殑浠诲姟锛屼笉鑳借繘琛屾湀鍙扮粍鍒囨崲鎿嶄綔锛�");
+ }
+ }
//鍒犻櫎LED/骞挎挱鏁版嵁
platformDeviceMapper.delete(new QueryWrapper<PlatformDevice>().lambda()
.eq(PlatformDevice::getPlatformId,platform.getId())
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
index f16a52d..6244579 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
@@ -108,6 +108,14 @@
wmsJobContractVO.setPlatformWmsDetailList(
platformWmsDetailList.stream().filter(i->i.getIocode().equals(ioCode)).collect(Collectors.toList())
);
+ if(Objects.isNull(wmsJobContractVO.getLockStatus())&& com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(wmsJobContractVO.getPlatformWmsDetailList())){
+ wmsJobContractVO.setLockStatus(
+ wmsJobContractVO.getPlatformWmsDetailList().get(Constants.ZERO).getLockStatus()
+ );
+ wmsJobContractVO.setStatus(
+ wmsJobContractVO.getPlatformWmsDetailList().get(Constants.ZERO).getStatus()
+ );
+ }
wmsJobContractVOList.add(wmsJobContractVO);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java
index 1d2e950..3af599e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java
@@ -15,6 +15,7 @@
import org.springframework.util.CollectionUtils;
import java.util.List;
+import java.util.Objects;
/**
* 鐭俊涓氬姟閰嶇疆Service瀹炵幇
@@ -58,6 +59,18 @@
}
@Override
+ public void updateStatusByIdInBatch(List<Integer> ids,Integer status) {
+ if (CollectionUtils.isEmpty(ids) || Objects.isNull(status)) {
+ return;
+ }
+ smsConfigMapper.update(new UpdateWrapper<SmsConfig>()
+ .set("status",status)
+ .in("id",ids)
+ );
+ }
+
+
+ @Override
public void updateByIdInBatch(List<SmsConfig> smsConfigs) {
if (CollectionUtils.isEmpty(smsConfigs)) {
return;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java
index 10e2a89..ec7fc9d 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java
@@ -1,6 +1,7 @@
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.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
@@ -13,10 +14,12 @@
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.dao.business.PlatformDeviceMapper;
+import com.doumee.dao.business.PlatformJobMapper;
import com.doumee.dao.business.PlatformMapper;
import com.doumee.dao.business.model.Device;
import com.doumee.dao.business.model.Platform;
import com.doumee.dao.business.model.PlatformDevice;
+import com.doumee.dao.business.model.PlatformJob;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -35,6 +38,8 @@
public class HkSyncPlatformsServiceImpl extends HkSyncBaseServiceImpl {
@Autowired
private PlatformMapper platformMapper;
+ @Autowired
+ private PlatformJobMapper platformJobMapper;
@Autowired
private PlatformDeviceMapper platformDeviceMapper;
@@ -57,7 +62,7 @@
List<PlatformDevice> deviceList = new ArrayList<>();
Date date = new Date();
//鏌ヨ鍏ㄩ儴闂ㄧ璁惧鏁版嵁
- List<Platform> allList = platformMapper.selectList(null);
+ List<Platform> allList = platformMapper.selectList(new QueryWrapper<Platform>().lambda().eq(Platform::getIsdeleted,Constants.ZERO));
List<PlatformListInfoResponse> allHkList = getAllHkList(param);
/**
* 鑾峰彇澧炲垹鏀规暟鎹泦鍚�
@@ -65,9 +70,24 @@
getDataChangeList(allList,allHkList,addList,deviceList,editList,deleteList,date);
if(deleteList.size()>0){
//閫昏緫鍒犻櫎
+ List<Integer> platIds = new ArrayList<>();
for(Platform d : deleteList){
platformMapper.updateById(d);
+ platIds.add(d.getId());
}
+ //鏇存柊鍒犻櫎鐨勬湀鍙颁俊鎭垹姝e湪鎵ц鐨勪綔涓氱姸鎬佷负銆愬緟绛惧埌銆戠姸鎬�
+ platformJobMapper.update(null, new UpdateWrapper<PlatformJob>().lambda()
+ .eq(PlatformJob::getIsdeleted,Constants.ZERO)
+ .notIn(PlatformJob::getStatus,Constants.PlatformJobStatus.WART_SIGN_IN.getKey()
+ ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()
+ ,Constants.PlatformJobStatus.DONE.getKey()
+ ,Constants.PlatformJobStatus.LEAVED.getKey()
+ ,Constants.PlatformJobStatus.CANCEL.getKey() )
+ .in(PlatformJob::getPlatformId,platIds)
+ .set(PlatformJob::getPlatformId,null)
+ .set(PlatformJob::getPlatforms,null)
+ .set(PlatformJob::getStatus,Constants.PlatformJobStatus.WART_SIGN_IN.getKey())
+ );
}
if(deviceList.size()>0){
platformDeviceMapper.insert(deviceList);
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 d9cf7a7..0047699 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
@@ -1086,7 +1086,7 @@
}
if(Constants.equalsInteger(device.getType(),Constants.ZERO)){
//濡傛灉鏄疞ED
- PlatformBroadcastLog log = dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1);
+ PlatformBroadcastLog log = dealLedContentBiz(model.getId(),device.getHkNo(),device.getName(),content,speed,1);
logList.add(log);
ledList.add(device.getHkId());
}else if(Constants.equalsInteger(device.getType(),Constants.TWO)){
@@ -1115,7 +1115,7 @@
public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames , String content1) {
PlatformBroadcastLog log = new PlatformBroadcastLog();
content1 = content1.replace("${param}",model.getCarCodeFront());
-
+ log.setObjId(model.getId().toString());
log.setCreateDate(new Date());
log.setBizType(Constants.ONE);
log.setHkDate(new Date());
@@ -1139,12 +1139,12 @@
log.setHkInfo("璇锋眰鎴愬姛");
log.setHkStatus(Constants.TWO);
}
- log.setDeviceType(Constants.ONE);
+ log.setDeviceType(Constants.ZERO);
log.setName("鍙戦�佸箍鎾挱鎶ュ唴瀹�");
return log;
}
- public static PlatformBroadcastLog dealLedContentBiz(String hkNo,String hkName, String content,int speed,int color) {
+ public static PlatformBroadcastLog dealLedContentBiz(Integer platformId,String hkNo,String hkName, String content,int speed,int color) {
PlatformBroadcastLog log = new PlatformBroadcastLog();
log.setCreateDate(new Date());
log.setBizType(Constants.ONE);
@@ -1154,6 +1154,7 @@
log.setRemark(hkName);
log.setInfo(content);
log.setNum(Constants.ONE);
+ log.setObjId(platformId.toString());
TransparentChannelBodyRequest body = new TransparentChannelBodyRequest();
TransparentChannelHeadRequest head = new TransparentChannelHeadRequest();
--
Gitblit v1.9.3