liukangdong
2024-10-12 bf79a36667124868583fcbf47af0e709e088b5e9
Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
已添加1个文件
已修改23个文件
387 ■■■■■ 文件已修改
admin/src/components/business/OperaPlatformWindow.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/platform.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/timer/components/OperaTimerWindow.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application-dev.yml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/Constants.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsConfigCloudController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/DriverPlatformController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/PdaPlatformController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/WmsJobContractVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/SmsConfigService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsJobServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsConfigServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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="请输入LED空闲文案" v-trim />
      <el-form-item label="LED空闲文案:" prop="ledContent">
        <el-input type="text" v-model="form.ledContent" placeholder="请输入LED空闲文案" 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: '',
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}">
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="请输入Bean名称" :maxlength="10" v-trim/>
        <el-input v-model="form.beanName" placeholder="请输入Bean名称"   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="请输入Cron表达式" :maxlength="10" v-trim/>
        <el-input v-model="form.cronExpres" placeholder="请输入Cron表达式"  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/>
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
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}作业超时" ),
        ;
        // æˆå‘˜å˜é‡
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();
}
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("月台作业报警业务");
    }
}
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("操作成功");
    }
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")
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("操作成功");
    }
}
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("操作成功");
    }
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正常 1禁用", example = "1")
    @ExcelColumn(name="状态 0正常 1禁用")
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())
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;
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();
}
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);
    /**
     * æ‰¹é‡ä¸»é”®æ›´æ–°
     *
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():""));
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,
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------------------------------------------------------------------------------------------");
                //如果是LED
                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)
        );
       //如果超时 å¤„理数据 å¹¶å‘送led与广播
        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)
        );
        //如果超时 å¤„理数据 å¹¶å‘送led与广播
        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)
        );
        //如果超时 å¤„理数据 å¹¶å‘送led与广播
        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);
            }
        }
    }
}
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(),"对不起,月台组信息不正确!");
            }
            //如果月台分组发生变化
            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())
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);
            }
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;
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());
                }
                //更新删除的月台信息删正在执行的作业状态为【待签到】状态
                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);
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)){
                //如果是LED
                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();