From 112db9dc43275c991e824eba1abfeb37d9bab3a1 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 11 十月 2024 18:56:15 +0800
Subject: [PATCH] 代码初始化

---
 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/PlatformJob.java                     |    6 ++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java                |    5 +
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java                   |    4 +
 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                                 |   10 +--
 server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java                              |   17 +----
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java                  |    2 
 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       |   65 ++++++++++++++++++---
 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/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java    |    3 +
 14 files changed, 135 insertions(+), 36 deletions(-)

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 9aee2f0..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
@@ -67,12 +67,8 @@
     @ApiOperation("銆愯瀹㈢郴缁熴�戝畾鏃舵洿鏂板井淇″叕浼楀彿accesstoken")
     @GetMapping("/timer/wxtoken/updateWxAccessToken")
     ApiResponse updateWxAccessToken();
-    @ApiOperation("鏈堝彴浠诲姟瓒呮椂鎶ヨ")
-    @GetMapping("/timer/platformJob/platformJobTimeOut")
-    ApiResponse platformJobTimeOut();
-    @ApiOperation("鏈堝彴浠诲姟鑷姩杩囧彿")
-    @GetMapping("/timer/platformJob/timeOutCallIn")
-    ApiResponse timeOutCallIn();
-
+    @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
index 433cdd1..b259a1f 100644
--- 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
@@ -34,21 +34,14 @@
     @Autowired
     private PlatformJobService platformJobService;
 
-    @ApiOperation("瓒呮椂鎶ヨ鏁版嵁")
-    @GetMapping("/platformJobTimeOut")
-    public ApiResponse platformJobTimeOut() {
+    @ApiOperation("鏈堝彴浣滀笟鎶ヨ涓氬姟")
+    @GetMapping("/platformJobTimer")
+    public ApiResponse platformJobTimer() {
         platformJobService.timeOutReport();
-        return ApiResponse.success("瓒呮椂鎶ヨ鏁版嵁");
-    }
-
-
-    @ApiOperation("瓒呮椂鑷姩杩囧彿")
-    @GetMapping("/timeOutCallIn")
-    public ApiResponse timeOutCallIn() {
         platformJobService.timeOutCallIn();
-        return ApiResponse.success("鑷姩杩囧彿");
+        platformJobService.timeOutWork();
+        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_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 ab179ae..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
@@ -417,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;
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 2a4c704..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,9 @@
     @ApiModelProperty(value = "鏀惰揣鍦�")
     private String address;
 
+    @ApiModelProperty(value = "0鏈畬鎴� 1宸插畬鎴� 2宸插彇娑�", example = "1")
+    private Integer status;
+
     @ApiModelProperty(value = "涓婇攣鐘舵�侊細0=鏈笂閿侊紱1=宸蹭笂閿侊紱")
     private Integer lockStatus;
 
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 66e0703..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
@@ -238,4 +238,9 @@
      */
     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/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 9a6b9e0..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
@@ -271,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()))
@@ -1093,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){
@@ -1170,8 +1171,9 @@
                 SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName()
         );
 
-        this.broadcastAndLEed(platformJob,null,
-                StringUtils.isBlank(oldPlatform.getRemark())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getRemark()
+        platformJob.setPlatformName(platform.getName());
+        this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getRemark())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(),
+                null
         );
 
     }
@@ -1731,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);
                 }
@@ -1926,12 +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.setOptTime(DateUtil.getXMinuteAfterDate(platformJob.getCallDate(),platformJob.getWorktimeOutAlarmTime()).getTime());
+                    platformJob.setOptTime(DateUtil.getXMinuteAfterDate(platformJob.getNewCallDate(),platformJob.getWorktimeOutAlarmTime()).getTime());
                 }
             }
             largeScreenDataVO.setAllList(platformJobList);
@@ -1942,9 +1944,11 @@
         return largeScreenDataVO;
 
     }
-    
-    
 
+
+    /**
+     * 浣滀笟瀹屾垚瓒呮椂
+     */
     @Override
     public void timeOutReport(){
         //鏌ヨ瓒呮椂鏁版嵁
@@ -1953,7 +1957,7 @@
                 .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,Constants.PlatformJobStatus.AUTHED_LEAVE)
+                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                 .eq(PlatformJob::getInOut,Constants.ONE)
                 .isNotNull(PlatformJob::getDoneDate)
         );
@@ -1986,10 +1990,10 @@
         List<PlatformJob> platformJobList =  platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
                 .selectAll(PlatformJob.class)
                 .selectAs(Platform::getName,PlatformJob::getPlatformName)
-                .select(" ( now() > DATE_ADD(t.CALL_DATE ,INTERVAL t2.WAIT_CALL_TIME MINUTE) ) as isTimeOut   ")
+                .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)
+                .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())
                 .isNotNull(PlatformJob::getCallDate)
         );
         //濡傛灉瓒呮椂 澶勭悊鏁版嵁 骞跺彂閫乴ed涓庡箍鎾�
@@ -2002,4 +2006,43 @@
     }
 
 
+    /**
+     * 浣滀笟瓒呮椂
+     */
+    @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/PlatformWmsJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java
index ddf50fd..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
@@ -112,6 +112,9 @@
                     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/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