rk
11 小时以前 f7167562105604f1e7656983d120f145db6edd12
钥匙柜大屏
已添加2个文件
已修改16个文件
431 ■■■■ 文件已修改
server/system_gateway/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/Constants.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/JiandaoyunCloudController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/SyncCabinetDTO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/SyncGridDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/CarUseBook.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinetGrid.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/WarningEvent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetGridService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetGridServiceImpl.java 203 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application.yml
@@ -1,6 +1,6 @@
# é¡¹ç›®ä¿¡æ¯é…ç½®
project:
  name: å®‰æ³°ç‰©æµè®¿å®¢ç³»ç»Ÿ
  name: å…¬åŠ¡è½¦é’¥åŒ™æ™ºèƒ½æŸœç®¡ç†ç³»ç»Ÿ
  version: 1.0.0
  env: development
#  env: production
server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -130,6 +130,8 @@
    public static final String USE_CAR_TAKE_CARE = "USE_CAR_TAKE_CARE";
    public static final String PUSH_URL_KEYS = "PUSH_URL_KEYS";
    public static final String CAR_SECRET = "CAR_SECRET";
    public static final String SECRET = "SECRET";
@@ -1530,7 +1532,7 @@
    public  enum WarningConfig {
        ALARM_TEST(10002, "【钥匙柜】酒精测试异常",0),
        GRID_TIME_OUT_INFO(10003, "【钥匙柜】开门超时未关闭",0),
        GRID_TIME_OUT_INFO(10003, "【钥匙柜】开门柜格未关闭",0),
        KEY_TIME_OUT_BACK(10004, "【钥匙柜】钥匙超时未归还",0),
        ;
        // æˆå‘˜å˜é‡
server/system_timer/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: pro
    active: dev
  application:
    name: systemTimer
    # å®‰å…¨é…ç½®
server/visits/admin_timer/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: pro
    active: test
  application:
    name: visitsTimer
    # å®‰å…¨é…ç½®
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/JiandaoyunCloudController.java
@@ -100,7 +100,7 @@
            Map<String, String> parameterMap = parseParameter(request.getQueryString());
            String nonce = parameterMap.get("nonce");
            String timestamp = parameterMap.get("timestamp");
            String signature = getSignature(nonce, payload, LOCAl_SECRET, timestamp);
            String signature = getSignature(nonce, payload, systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.SECRET).getCode(), timestamp);
            log.error("【简道云】 ç”¨è½¦ç”³è¯· =========nonce:"+nonce);
            log.error("【简道云】 ç”¨è½¦ç”³è¯· =========timestamp:"+timestamp);
            log.error("【简道云】 ç”¨è½¦ç”³è¯· =========payload:"+payload);
@@ -146,7 +146,10 @@
            Map<String, String> parameterMap = parseParameter(request.getQueryString());
            String nonce = parameterMap.get("nonce");
            String timestamp = parameterMap.get("timestamp");
            String signature = getSignature(nonce, payload, LLCAL_CARINFO_SECRET, timestamp);
            String signature = getSignature(nonce, payload,
                    //LOCAl_SECRET
                    systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.CAR_SECRET).getCode()
                    , timestamp);
            log.error("【简道云】 è½¦è¾†ä¿¡æ¯=========nonce:"+nonce);
            log.error("【简道云】 è½¦è¾†ä¿¡æ¯=========timestamp:"+timestamp);
            log.error("【简道云】 è½¦è¾†ä¿¡æ¯=========payload:"+payload);
@@ -198,11 +201,12 @@
*/
        String url = "https://lcdp.ahyc.com.cn:30443/api/v1/automation/tenant/6756636b8ff4da34799c9f92/hooks/69042b5d6d7269265c7732a41a461aec9135f0641f0156dc";
//        String url = "https://api.jiandaoyun.com/api/v1/automation/tenant/6909b792324dc197821895d1/hooks/6909d0fbdb93690af97e41d1b068192dc4a9705aca3321e2";
        //https://lcdp.ahyc.com.cn:30443/api/v1/automation/tenant/6756636b8ff4da34799c9f92/hooks/69042b5d6d7269265c7732a41a461aec9135f0641f0156dc
        JSONObject object = new JSONObject();
        object.put("create_date","20251104160000");
        object.put("start_date","20251104160000" );
        object.put("end_date", "20251204160000");
        object.put("id","10000020251105");//
        object.put("id","202511260016");//
        object.put("type",1);//0=领用;1=归还
        String result = HttpsUtil.postJson(url,JSONObject.toJSONString(object));
        System.out.println(result);
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java
@@ -19,6 +19,7 @@
import com.doumee.dao.business.vo.CabinetInfoVO;
import com.doumee.dao.web.response.DriverHomeVO;
import com.doumee.service.business.*;
import com.doumee.service.business.impl.JkCabinetGridServiceImpl;
import com.doumee.service.business.third.model.ApiResponse;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import io.swagger.annotations.Api;
@@ -51,6 +52,9 @@
    @Autowired
    private JkCabinetGridService jkCabinetGridService;
    @Autowired
    private JkCabinetLogService jkCabinetLogService;
    @Autowired
    private JkInterfaceLogService interfaceLogService;
@@ -171,6 +175,7 @@
        return ApiResponse.success(jkCabinetGridList);
    }
    @LoginNoRequired
    @ApiOperation("开启柜格 - å¸æœº")
    @PostMapping("/openGridDriver")
@@ -205,6 +210,7 @@
    @PostMapping("/alcoholTestAlarm")
    public ApiResponse alcoholTestAlarm(@RequestBody AlcoholTestAlarmDTO dto) {
        jkCabinetGridService.alcoholTestAlarm(dto);
        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"酒精检测告警","酒精检测告警");
        return ApiResponse.success("操作成功");
    }
@@ -215,8 +221,41 @@
    @PostMapping("/timeOutUnCloseAlarm")
    public ApiResponse timeOutUnCloseAlarm(@RequestBody TimeOutCloseGridDTO dto) {
        jkCabinetGridService.timeOutUnCloseAlarm(dto);
        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"timeOutUnCloseAlarm","柜格开门超时未关闭告警");
        return ApiResponse.success("操作成功");
    }
    @LoginNoRequired
    @ApiOperation("钥匙柜心跳接口")
    @GetMapping("/heartbeat")
    public ApiResponse heartbeat() {
        return ApiResponse.success("链接成功");
    }
    @LoginNoRequired
    @ApiOperation("同步柜格实际钥匙数据")
    @PostMapping("/syncGridData")
    public ApiResponse syncGridData(@RequestBody SyncCabinetDTO dto) {
        jkCabinetGridService.syncGridData(dto);
        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"syncGridData","同步柜格实际钥匙数据");
        return ApiResponse.success("操作成功");
    }
    @Autowired
    private JkCabinetGridServiceImpl impl;
    @LoginNoRequired
    @ApiOperation("testTimeOutBackAlarm")
    @GetMapping("/testTimeOutBackAlarm")
    public ApiResponse testTimeOutBackAlarm() {
        jkCabinetLogService.timeOutUnBackAlarm(impl);
        return ApiResponse.success("操作成功");
    }
}
server/visits/dmvisit_admin/src/main/resources/application.yml
@@ -1,6 +1,6 @@
# é¡¹ç›®ä¿¡æ¯é…ç½®
project:
  name: è®¿å®¢ç³»ç»Ÿ
  name: å…¬åŠ¡è½¦é’¥åŒ™æ™ºèƒ½æŸœç®¡ç†ç³»ç»Ÿ
  version: 1.0.0
  env: development
#  env: production
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/SyncCabinetDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.doumee.dao.business.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2025/10/11 16:01
 */
@Data
public class SyncCabinetDTO {
    @ApiModelProperty(value = "钥匙柜编号")
    private String code;
    @ApiModelProperty(value = "柜格信息")
    private List<SyncGridDTO> gridDTOList;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/SyncGridDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.dao.business.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2025/10/11 16:01
 */
@Data
public class SyncGridDTO {
    @ApiModelProperty(value = "板号")
    private String boardCode;
    @ApiModelProperty(value = "通道号")
    private String channelCode;
    @ApiModelProperty(value = "实际钥匙编码")
    private String actualLable;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/CarUseBook.java
@@ -159,6 +159,8 @@
    @ApiModelProperty(value = "简道云业务主键")
    private String jdyId;
    @ApiModelProperty(value = "简道云单号")
    private String jdyNo;
    @ApiModelProperty(value = "钥匙领取状态:0=待领取;1=已领取;2=已归还;")
    private Integer keyStatus;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinetGrid.java
@@ -85,6 +85,9 @@
    @ExcelColumn(name="通道号")
    private String channelCode;
    @ApiModelProperty(value = "实际钥匙编码(如:7B7A092F ï¼‰")
    @ExcelColumn(name="实际钥匙编码(如:7B7A092F ï¼‰")
    private String actualLable;
    @ApiModelProperty(value = "绑定状态 0未绑定;1已绑定", example = "1")
    @TableField(exist = false)
@@ -106,9 +109,13 @@
    @TableField(exist = false)
    private Integer carId;
    @ApiModelProperty(value = "钥匙状态 0未绑定 1在位 2借出 3维修保养", example = "1")
    @ApiModelProperty(value = "钥匙状态 0未绑定 1在位 2借出 3维修保养 4绑定错误", example = "1")
    @TableField(exist = false)
    private Integer keyStatus;
    @ApiModelProperty(value = "错误信息", example = "1")
    @TableField(exist = false)
    private String errInfo;
    @ApiModelProperty(value = "派车申请单主键", example = "1")
    @TableField(exist = false)
@@ -118,4 +125,8 @@
    @TableField(exist = false)
    private Integer getKeyWay;
    @ApiModelProperty(value = "实际钥匙")
    @TableField(exist = false)
    private String actualCode;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/WarningEvent.java
@@ -32,7 +32,7 @@
    @ApiModelProperty(value = "创建时间")
    //@ExcelColumn(name="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @ApiModelProperty(value = "更新人编码", example = "1")
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetGridService.java
@@ -150,5 +150,11 @@
    CabinetBoardDataVO getCabinetGridData();
    /**
     * åŒæ­¥æŸœæ ¼å®žé™…钥匙编号
     * @param dto
     */
    void syncGridData(SyncCabinetDTO dto);
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -627,21 +627,21 @@
            //审批通过,但是 å·²åˆ°å‘车时间,不可以撤销
            return Constants.ZERO;
        }
        if((Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO))
                ||Constants.equalsInteger(carUseBook.getStatus(),Constants.ONE)
                ||Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){
            //审批人可以撤销 è‡ªå·±å®¡æ‰¹çš„申请记录
            Approve approve = approveJoinMapper.selectOne(new QueryWrapper<Approve>().lambda()
                    .eq(Approve::getIsdeleted,Constants.ZERO)
                    .ge(Approve::getLevel,Constants.ZERO)
                    .eq(Approve::getChekorId,loginUserInfo.getMemberId())
                    .eq(Approve::getObjId,carUseBook.getId())
                    .eq(Approve::getObjType,carUseBook.getType()==0?3:4)
                    .last("limit 1"));
            if(approve!=null){
                return Constants.ONE;
            }
        }
//        if((Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO))
//                ||Constants.equalsInteger(carUseBook.getStatus(),Constants.ONE)
//                ||Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){
//            //审批人可以撤销 è‡ªå·±å®¡æ‰¹çš„申请记录
//            Approve approve = approveJoinMapper.selectOne(new QueryWrapper<Approve>().lambda()
//                    .eq(Approve::getIsdeleted,Constants.ZERO)
//                    .ge(Approve::getLevel,Constants.ZERO)
//                    .eq(Approve::getChekorId,loginUserInfo.getMemberId())
//                    .eq(Approve::getObjId,carUseBook.getId())
//                    .eq(Approve::getObjType,carUseBook.getType()==0?3:4)
//                    .last("limit 1"));
//            if(approve!=null){
//                return Constants.ONE;
//            }
//        }
        return Constants.ZERO;
    }
@@ -657,16 +657,19 @@
        if(StringUtils.isEmpty(op)){
            return;
        }
        JSONObject dataJSON = dataInfoJSON.getJSONObject("data");
        String no = dataJSON.getString("no");
        if(StringUtils.isEmpty(no)){
        if(op.equals("data_test")){
            return;
        }
        JSONObject dataJSON = dataInfoJSON.getJSONObject("data");
        String id = dataJSON.getString("_id");
        if(op.equals("data_remove")){
            carUseBookJoinMapper.update(new UpdateWrapper<CarUseBook>().lambda()
                            .set(CarUseBook::getEditDate,DateUtil.getCurrDateTime())
                    .set(CarUseBook::getIsdeleted,Constants.ONE).eq(CarUseBook::getJdyId,no));
                    .set(CarUseBook::getIsdeleted,Constants.ONE).eq(CarUseBook::getJdyId,id));
            return;
        }
        String no = dataJSON.getString("no");
        if(StringUtils.isEmpty(no)){
            return;
        }
        Integer status = dataJSON.getInteger("flowState");
@@ -687,7 +690,8 @@
            carUseBook = new CarUseBook();
            carUseBook.setCreateDate(new Date());
            carUseBook.setEditDate(new Date());
            carUseBook.setJdyId(no);
            carUseBook.setJdyNo(no);
            carUseBook.setJdyId(id);
        }else{
            carUseBook.setEditDate(new Date());
        }
@@ -699,14 +703,15 @@
                    .eq(Cars::getCode,carCode).last("limit 1"));
            carUseBook.setCarId(Objects.nonNull(cars)?cars.getId():null);
        }
        carUseBook.setStartTime(StringUtils.isBlank(startDate)?null:DateUtil.getISO8601DateByStr(startDate));
        carUseBook.setEndTime(StringUtils.isBlank(endDate)?null:DateUtil.getISO8601DateByStr(endDate));
        carUseBook.setStartTime(StringUtils.isBlank(startDate)?null:DateUtil.getXMinuteAfterDate(DateUtil.getISO8601DateByStr(startDate),480));
        carUseBook.setEndTime(StringUtils.isBlank(endDate)?null:DateUtil.getXMinuteAfterDate(DateUtil.getISO8601DateByStr(endDate),480));
        carUseBook.setTypeInfo(StringUtils.isBlank(typeInfo)?null:typeInfo);
        carUseBook.setContent(StringUtils.isBlank(typeInfo)?null:reason);
        carUseBook.setAddr(StringUtils.isBlank(typeInfo)?null:addr);
        carUseBook.setContent(StringUtils.isBlank(reason)?null:reason);
        carUseBook.setAddr(StringUtils.isBlank(addr)?null:addr);
        carUseBook.setStatus(Constants.TWO);
        JSONObject driverJSON = dataJSON.getJSONObject("driver");
        if(!driverJSON.isEmpty()){
        if(Objects.nonNull(driverJSON)){
            String driverName = driverJSON.getString("name");
            String driverUserName = driverJSON.getString("username");
            if(StringUtils.isNotBlank(driverUserName)){
@@ -717,7 +722,7 @@
            }
        }
        JSONObject createJSON = dataJSON.getJSONObject("creator");
        if(!driverJSON.isEmpty()){
        if(Objects.nonNull(createJSON)){
            String createName = createJSON.getString("name");
            String createUserName = createJSON.getString("username");
            if(StringUtils.isNotBlank(createUserName)){
@@ -729,13 +734,13 @@
        }
        JSONArray usersArray =   dataJSON.getJSONArray("users");
        if(!usersArray.isEmpty()){
        if(Objects.nonNull(usersArray)){
            String names = "";
            List<String> userDDIdList = new ArrayList<>();
            for (int i = 0; i < usersArray.size(); i++) {
                JSONObject userJSON = usersArray.getJSONObject(i);
                String name = createJSON.getString("name");
                String userName = createJSON.getString("username");
                String name = userJSON.getString("name");
                String userName = userJSON.getString("username");
                userDDIdList.add(userName);
                names = names +
                        (StringUtils.isNotBlank(names)?",":"")
@@ -758,7 +763,7 @@
    @Override
    public List<InterestedListVO> getCarUseStatistics(Integer type){
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM月dd日");
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM-dd");
        MPJLambdaWrapper<CarUseBook> wrapper = new MPJLambdaWrapper<CarUseBook>()
                .selectAll(CarUseBook.class)
                .eq(CarUseBook::getIsdeleted, Constants.ZERO)
@@ -774,7 +779,7 @@
            vo.setNextNum(Constants.ZERO);
            if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)) {
                vo.setNum(
                        carUseBookList.stream().filter(i->DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                        carUseBookList.stream().filter(i->DateUtil.dateToString(i.getCreateDate(),"MM-dd").equals(days))
                                .collect(Collectors.toList()).size()
                );
            }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
@@ -727,6 +727,9 @@
        if(StringUtils.isEmpty(op)){
            return;
        }
        if(op.equals("data_test")){
            return;
        }
        JSONObject dataJSON = dataInfoJSON.getJSONObject("data");
        String no = dataJSON.getString("_id");
        if(StringUtils.isEmpty(no)){
@@ -755,7 +758,7 @@
        cars.setCode(StringUtils.isBlank(carCode)?null:carCode);
        cars.setStatus(StringUtils.isNotBlank(status)&&StringUtils.equals(status,"可用")?0:1);
        JSONObject driverJSON = dataJSON.getJSONObject("driver");
        if(!driverJSON.isEmpty()){
        if(Objects.nonNull(driverJSON)){
            String driverName = driverJSON.getString("name");
            String driverUserName = driverJSON.getString("username");
            if(StringUtils.isNotBlank(driverUserName)){
@@ -766,7 +769,7 @@
            }
        }
        JSONObject createJSON = dataJSON.getJSONObject("creator");
        if(!createJSON.isEmpty()){
        if(Objects.nonNull(createJSON)){
            String createName = createJSON.getString("name");
            String createUserName = createJSON.getString("username");
            if(StringUtils.isNotBlank(createUserName)){
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetGridServiceImpl.java
@@ -31,6 +31,7 @@
import com.doumee.service.business.third.model.PageWrap;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.sun.corba.se.impl.orbutil.concurrent.Sync;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -142,9 +143,9 @@
            //更新钥匙柜信息
            jkCabinetGridMapper.update(new UpdateWrapper<JkCabinetGrid>().lambda()
                    .set(JkCabinetGrid::getKeyId,jkCabinetGrid.getKeyId())
                    .set(JkCabinetGrid::getActualLable,keysModel.getRfidLable())
                    .set(JkCabinetGrid::getEditor,loginUserInfo.getId())
                    .set(JkCabinetGrid::getEditDate,DateUtil.getCurrDateTime())
                    .set(JkCabinetGrid::getEditDate, DateUtil.getCurrDateTime())
                    .eq(JkCabinetGrid::getId,jkCabinetGrid.getId()));
            //标记钥匙信息
            jkKeysMapper.update(new UpdateWrapper<JkKeys>().lambda()
@@ -201,8 +202,11 @@
                .selectAll(JkCabinetGrid.class)
                .selectAs(JkCabinet::getName,JkCabinetGrid::getCabinetName)
                .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode)
                .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus)
                .select("k.code",JkCabinetGrid::getActualCode)
                .leftJoin(JkCabinet.class,JkCabinet::getId,JkCabinetGrid::getCabinetId)
                .leftJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId)
                .leftJoin(" jk_keys k on k.RFID_LABLE = t.ACTUAL_LABLE ")
                .eq(JkCabinetGrid::getIsdeleted,Constants.ZERO)
                .eq(Objects.nonNull(model.getCabinetId()),JkCabinetGrid::getCabinetId,model.getCabinetId())
                .eq(Objects.nonNull(model.getStatus()),JkCabinetGrid::getStatus,model.getStatus())
@@ -215,6 +219,19 @@
        IPage<JkCabinetGrid> iPage = jkCabinetGridMapper.selectJoinPage(page,JkCabinetGrid.class,wrapper);
        for (JkCabinetGrid jkCabinetGrid:iPage.getRecords()) {
            jkCabinetGrid.setBindStatus(Objects.isNull(jkCabinetGrid.getKeyId())?Constants.ZERO:Constants.ONE);
            jkCabinetGrid.setKeyStatus(Objects.isNull(jkCabinetGrid.getKeyStatus())?Constants.ZERO:jkCabinetGrid.getKeyStatus());
            if(!Constants.equalsInteger(jkCabinetGrid.getKeyStatus(),Constants.ZERO)){
                if(StringUtils.isBlank(jkCabinetGrid.getKeyCode())||StringUtils.isBlank(jkCabinetGrid.getActualLable())
                        || !StringUtils.equals(jkCabinetGrid.getKeyCode(),jkCabinetGrid.getActualLable())){
                    jkCabinetGrid.setKeyStatus(Constants.FOUR);
                    if(StringUtils.isBlank(jkCabinetGrid.getActualCode())){
                        jkCabinetGrid.setErrInfo("未知钥匙 å¼‚常");
                    }else{
                        jkCabinetGrid.setErrInfo(jkCabinetGrid.getActualCode()+" å¼‚常");
                    }
                }
            }
        }
        return PageData.from(iPage);
    }
@@ -256,6 +273,7 @@
                //更新钥匙柜信息
                jkCabinetGridMapper.update(new UpdateWrapper<JkCabinetGrid>().lambda()
                        .set(JkCabinetGrid::getKeyId,null)
                        .set(JkCabinetGrid::getActualLable,null)
                        .set(JkCabinetGrid::getEditDate, DateUtil.getCurrDateTime())
                        .eq(JkCabinetGrid::getId,model.getId()));
                JkKeys keysModel = jkKeysMapper.selectById(model.getKeyId());
@@ -274,6 +292,7 @@
            if(CollectionUtils.isNotEmpty(jkCabinetGridList)){
                jkCabinetGridMapper.update(new UpdateWrapper<JkCabinetGrid>().lambda()
                        .set(JkCabinetGrid::getKeyId,null)
                        .set(JkCabinetGrid::getActualLable,null)
                        .set(JkCabinetGrid::getEditDate, DateUtil.getCurrDateTime())
                        .in(JkCabinetGrid::getId,jkCabinetGridList.stream().map(i->i.getId()).collect(Collectors.toList())));
                List<Integer> keyIdList = jkCabinetGridList.stream().filter(i->Objects.nonNull(i.getKeyId())).map(i->i.getKeyId()).collect(Collectors.toList());
@@ -485,27 +504,39 @@
                                .set(JkKeys::getStatus,dto.getKeyStatus())
                                .eq(JkKeys::getId,jkKeys.getId())
                        );
                        if(Constants.equalsInteger(dto.getKeyStatus(),Constants.ONE)&&
                                (StringUtils.isBlank(jkCabinetGrid.getActualLable())||!StringUtils.equals(jkCabinetGrid.getActualLable(),jkKeys.getRfidLable()))){
                            //更新钥匙实际编码
                            jkCabinetGridMapper.update(null,new UpdateWrapper<JkCabinetGrid>().lambda()
                                    .set(JkCabinetGrid::getActualLable,jkKeys.getRfidLable())
                                    .eq(JkCabinetGrid::getId,jkCabinetGrid.getId())
                            );
                        }
                        //归还钥匙/借出钥匙 éƒ½è¦åŽ»æŸ¥è¯¢æœ€åŽä¸€æ¬¡å¼€é—¨è®°å½• èŽ·å–å…·ä½“çš„å¼€é—¨çš„æ–¹å¼ æ˜¯éšè½¦/派车/保洁 èµ‹äºˆå½“前关门记录内 å¦‚果是派车单数据 éœ€è¦è°ƒèµ·ç®€é“云推送
                        JkCabinetLog lastOutLog = jkCabinetLogMapper.selectOne(new QueryWrapper<JkCabinetLog>().lambda()
                                .eq(JkCabinetLog::getKeyId,jkCabinetLog.getKeyId())
                                .eq(JkCabinetLog::getType,Constants.ZERO)
                                .orderByDesc(JkCabinetLog::getId)
                                .last( "limit 1 "));
                        if(Objects.nonNull(lastOutLog)){
                            jkCabinetLog.setOpenWay(lastOutLog.getOpenWay());
                            jkCabinetLog.setCarUseBookId(lastOutLog.getCarUseBookId());
                            if(Objects.nonNull(lastOutLog.getCarUseBookId())) {
                                CarUseBook carUseBook = carUseBookMapper.selectById(lastOutLog.getCarUseBookId());
                                if (Objects.nonNull(carUseBook) && Constants.equalsInteger(carUseBook.getKeyStatus(), Constants.ZERO)) {
                                if (Objects.nonNull(carUseBook)) {
                                    carUseBookMapper.update(new UpdateWrapper<CarUseBook>().lambda()
                                            .set(CarUseBook::getKeyStatus, Constants.ONE)
                                            .set(CarUseBook::getKeyStatus, Constants.equalsInteger(dto.getKeyStatus(),Constants.TWO)?Constants.ONE:Constants.TWO)
                                            .eq(CarUseBook::getId, carUseBook.getId())
                                    );
                                    //推送简道云 æ ‡è®°ä¸šåŠ¡æ•°æ®å·²è¢«é¢†å–é’¥åŒ™
                                    if (StringUtils.isNotBlank(carUseBook.getJdyId())) {
                                        JDYKeyUseByBookDTO jdyKeyUseByBookDTO = new JDYKeyUseByBookDTO();
                                        jdyKeyUseByBookDTO.setCreate_date(System.currentTimeMillis());
                                        jdyKeyUseByBookDTO.setStart_date(Constants.equalsInteger(dto.getKeyStatus(),Constants.TWO)?System.currentTimeMillis():null);
                                        jdyKeyUseByBookDTO.setStart_date(System.currentTimeMillis());
                                        jdyKeyUseByBookDTO.setEnd_date(Constants.equalsInteger(dto.getKeyStatus(),Constants.ONE)?System.currentTimeMillis():null);
                                        jdyKeyUseByBookDTO.setType(Constants.equalsInteger(dto.getKeyStatus(),Constants.TWO)?Constants.ZERO:Constants.ONE);
                                        jdyKeyUseByBookDTO.setId(carUseBook.getJdyId());
                                        jdyKeyUseByBookDTO.setId(carUseBook.getJdyNo());
                                        this.pushJDYKeyInfo(jdyKeyUseByBookDTO);
                                    }
                                }
@@ -611,9 +642,21 @@
                                .in(JkKeys::getStatus,Constants.TWO,Constants.THREE)
                                .isNotNull(JkCabinetGrid::getKeyId)
                                .apply("t1.car_id in ( select c.id from  cars c  where c.ISDELETED = 0 and  c.MEMBER_ID = "+dto.getMemberId()+" )")
                                .orderByAsc(JkCabinetGrid::getCode)
                );
                for (JkCabinetGrid jkCabinetGrid:jkCabinetGridList) {
                    JkCabinetLog log = jkCabinetLogMapper.selectOne(new QueryWrapper<JkCabinetLog>().lambda()
                            .eq(JkCabinetLog::getGridId,jkCabinetGrid.getId())
                            .eq(JkCabinetLog::getType,Constants.ZERO)
                            .orderByDesc(JkCabinetLog::getId)
                            .last("limit 1")
                    );
                    jkCabinetGrid.setGetKeyWay(Constants.ZERO);
                    if(Objects.nonNull(log)){
                        jkCabinetGrid.setGetKeyWay(log.getOpenWay());
                        jkCabinetGrid.setCarUseBookId(log.getCarUseBookId());
                    }
                }
            }else{
                //判断当前时间是否处于保洁时段内
                String cleanConfig =  systemDictDataBiz.queryByCode(Constants.CABINET_CONFIG,Constants.CLEAN_TIME).getCode();
@@ -621,29 +664,67 @@
                Boolean isCleanTime = Constants.betweenTimeConfig(cleanConfig);
                List<Integer> girdIdList = new ArrayList<>();
                //查询根据任务可以领取的数据
//                jkCabinetGridList = jkCabinetGridMapper.selectJoinList(JkCabinetGrid.class,
//                        new MPJLambdaWrapper<JkCabinetGrid>().selectAll(JkCabinetGrid.class)
//                                .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode)
//                                .selectAs(JkKeys::getCarCode,JkCabinetGrid::getCarCode)
//                                .selectAs(JkKeys::getCarId,JkCabinetGrid::getCarId)
//                                .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus)
//                                .selectAs(CarUseBook::getId,JkCabinetGrid::getCarUseBookId)
//                                .select("1",JkCabinetGrid::getGetKeyWay)
//                                .innerJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId)
//                                .innerJoin(CarUseBook.class,CarUseBook::getCarCode,JkKeys::getCarCode)
//                                .innerJoin(Cars.class,Cars::getCode,CarUseBook::getCarCode)
//                                .eq(JkCabinetGrid::getIsdeleted,Constants.ZERO)
//                                .eq(CarUseBook::getIsdeleted,Constants.ZERO)
//                                .eq(Cars::getIsdeleted,Constants.ZERO)
//                                .eq(JkCabinetGrid::getWorkingStatus,Constants.ZERO)
//                                .eq(JkCabinetGrid::getStatus,Constants.ZERO)
//                                .eq(JkCabinetGrid::getCabinetId,dto.getCabinetId())
//                                .in(JkKeys::getStatus,Constants.ONE)
//                                .eq(JkKeys::getRoleType,Constants.ONE)
//                                .isNotNull(JkCabinetGrid::getKeyId)
//                                .apply(" NOW() > DATE_SUB(t2.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < t2.end_time and t3.MEMBER_ID = "+dto.getMemberId()+" ")
//                );
                jkCabinetGridList = jkCabinetGridMapper.selectJoinList(JkCabinetGrid.class,
                        new MPJLambdaWrapper<JkCabinetGrid>().selectAll(JkCabinetGrid.class)
                                .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode)
                                .selectAs(JkKeys::getCarCode,JkCabinetGrid::getCarCode)
                                .selectAs(JkKeys::getCarId,JkCabinetGrid::getCarId)
                                .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus)
                                .selectAs(CarUseBook::getId,JkCabinetGrid::getCarUseBookId)
                                .select("1",JkCabinetGrid::getGetKeyWay)
                                .innerJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId)
                                .innerJoin(CarUseBook.class,CarUseBook::getCarCode,JkKeys::getCarCode)
                                .innerJoin(Cars.class,Cars::getCode,CarUseBook::getCarCode)
                                .innerJoin(Cars.class,Cars::getId,JkKeys::getCarId)
                                .eq(JkCabinetGrid::getIsdeleted,Constants.ZERO)
                                .eq(CarUseBook::getIsdeleted,Constants.ZERO)
                                .eq(Cars::getIsdeleted,Constants.ZERO)
                                .eq(JkCabinetGrid::getWorkingStatus,Constants.ZERO)
                                .eq(JkCabinetGrid::getStatus,Constants.ZERO)
                                .eq(JkCabinetGrid::getCabinetId,dto.getCabinetId())
                                .in(JkKeys::getStatus,Constants.ONE)
                                .eq(JkKeys::getRoleType,Constants.ONE)
                                .eq(Cars::getMemberId,dto.getMemberId())
                                .isNotNull(JkCabinetGrid::getKeyId)
                                .apply("and NOW() > DATE_SUB(t2.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < t2.end_time and t3.MEMBER_ID = "+dto.getMemberId()+" )")
                                .apply(" t2.code in ( select c.car_code from car_use_book c left join cars c1 on c.car_code = c1.code  where c.isdeleted = 0 and c1.isdeleted =0  and NOW() > DATE_SUB(c.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < c.end_time  and c1.MEMBER_ID = "+dto.getMemberId()+" ) ")
                );
                for (JkCabinetGrid jkCabinetGrid:jkCabinetGridList) {
                    List<CarUseBook> carUseBookList = carUseBookMapper.selectJoinList(CarUseBook.class,new MPJLambdaWrapper<CarUseBook>()
                                    .selectAll(CarUseBook.class)
                                    .leftJoin(Cars.class,Cars::getCode,CarUseBook::getCarCode)
                            .eq(CarUseBook::getIsdeleted,Constants.ZERO)
                            .eq(Cars::getIsdeleted,Constants.ZERO)
                            .eq(CarUseBook::getCarCode,jkCabinetGrid.getCarCode())
                            .eq(Cars::getMemberId,dto.getMemberId())
                            .apply("  NOW() > DATE_SUB(t.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < t.end_time  ")
                    );
                    if(CollectionUtils.isNotEmpty(carUseBookList)) {
                        jkCabinetGrid.setCarUseBookId(carUseBookList.get(Constants.ZERO).getId());
                    }
                }
                if(CollectionUtils.isNotEmpty(jkCabinetGridList)){
                    girdIdList = jkCabinetGridList.stream().map(i->i.getId()).collect(Collectors.toList());
                }
@@ -662,7 +743,7 @@
                                    .eq(!isCleanTime,JkKeys::getRoleType,Constants.ZERO)
                                    .in(JkKeys::getStatus,Constants.ONE)
                                    .isNotNull(JkCabinetGrid::getKeyId)
                                    .notIn(CollectionUtils.isNotEmpty(girdIdList),JkCabinetGrid::getId,jkCabinetGridList)
                                    .notIn(CollectionUtils.isNotEmpty(girdIdList),JkCabinetGrid::getId,girdIdList)
                                    .apply("t1.car_id in ( select c.id from  cars c  where c.ISDELETED = 0 and  c.MEMBER_ID = "+dto.getMemberId()+" ) ")
                    )
                );
@@ -788,7 +869,7 @@
                        return;
                    }
                    String content = "【钥匙柜-"+jkCabinetGrid.getCabinetName()+"】下【柜格-"+jkCabinetGrid.getCode()+"】超时未关闭";
                    String content = "【钥匙柜-"+jkCabinetGrid.getCabinetName()+"】下【柜格-"+jkCabinetGrid.getCode()+"】柜格未关闭";
                    JkCabinet jkCabinet = jkCabinetMapper.selectById(dto.getCabinetId());
                    //存储报警异常记录
@@ -796,6 +877,7 @@
                    warningEvent.setCreateDate(new Date());
                    warningEvent.setCreator(Objects.nonNull(systemUser)?systemUser.getId():null);
                    warningEvent.setWarningId(warning.getId());
                    warningEvent.setIsdeleted(Constants.ZERO);
                    warningEvent.setTitle(warningConfig.getInfo());
                    warningEvent.setContent(content );
                    warningEvent.setStatus(Constants.ZERO);
@@ -878,8 +960,8 @@
                //无任何规则 ç›´æŽ¥è·³è¿‡
                if(CollectionUtils.isEmpty(warningRuleDetails)){
                    return resultList;
                }else if(!Constants.equalsInteger(warningRuleDetails.stream().filter(i->!i.getCode().equals(warningConfig.getKey())).collect(Collectors.toList()).size(),Constants.ZERO)){
                    List<WarningRuleDetail> wList = warningRuleDetails.stream().filter(i->!i.getCode().equals(warningConfig.getKey())).collect(Collectors.toList());
                }else if(!Constants.equalsInteger(warningRuleDetails.stream().filter(i->!i.getCode().equals(warningConfig.getKey()+"")).collect(Collectors.toList()).size(),Constants.ZERO)){
                    List<WarningRuleDetail> wList = warningRuleDetails.stream().filter(i->!i.getCode().equals(warningConfig.getKey()+"")).collect(Collectors.toList());
                    //获取所有其他所有事件主键信息
                    List<Integer> warningIdList = wList.stream().map(i->i.getWarningId()).collect(Collectors.toList());
                    Set<Integer> setWarningIdList = new HashSet<>(warningIdList);
@@ -887,25 +969,30 @@
                    List<WarningEvent> warningEventList = warningEventMapper.selectList(new QueryWrapper<WarningEvent>().lambda()
                            .eq(WarningEvent::getIsdeleted,Constants.ZERO)
                            .in(WarningEvent::getWarningId,setWarningIdList)
                            .apply(" DATE_ADD(CREATE_DATE , INTERVAL "+warningRule.getIntervalSec()+" SECOND) > now() ")
                            .apply(Objects.nonNull(warningRule.getIntervalSec())," DATE_ADD(CREATE_DATE , INTERVAL "+warningRule.getIntervalSec()+" SECOND) > now() ")
                    );
                    if(this.processWarnFlag(wList,warningEventList)){
                        resultList.add(ruleId);
                    };
                }else{
                    List<WarningRuleDetail> wList = warningRuleDetails.stream().filter(i->i.getCode().equals(warningConfig.getKey())).collect(Collectors.toList());
                    List<WarningRuleDetail> wList = warningRuleDetails.stream().filter(i->i.getCode().equals(warningConfig.getKey()+"")).collect(Collectors.toList());
                    //获取本次事件主键信息
                    List<Integer> warningIdList = wList.stream().map(i->i.getWarningId()).collect(Collectors.toList());
                    Set<Integer> setWarningIdList = new HashSet<>(warningIdList);
                    //获取时间内所有事件信息
                    List<WarningEvent> warningEventList = warningEventMapper.selectList(new QueryWrapper<WarningEvent>().lambda()
                            .eq(WarningEvent::getIsdeleted,Constants.ZERO)
                            .in(WarningEvent::getWarningId,setWarningIdList)
                            .apply(" DATE_ADD(CREATE_DATE , INTERVAL "+warningRule.getIntervalSec()+" SECOND) > now() ")
                    );
                    if(this.processWarnFlag(wList,warningEventList)){
                    if(Objects.isNull(warningRule.getIntervalSec())){
                        resultList.add(ruleId);
                    }else{
                        //获取时间内所有事件信息
                        List<WarningEvent> warningEventList = warningEventMapper.selectList(new QueryWrapper<WarningEvent>().lambda()
                                .eq(WarningEvent::getIsdeleted,Constants.ZERO)
                                .in(WarningEvent::getWarningId,setWarningIdList)
                                .apply(Objects.nonNull(warningRule.getIntervalSec())," DATE_ADD(CREATE_DATE , INTERVAL "+warningRule.getIntervalSec()+" SECOND) > now() ")
                        );
                        if(this.processWarnFlag(wList,warningEventList)){
                            resultList.add(ruleId);
                        }
                    }
                } 
            }
            return resultList;
@@ -991,15 +1078,15 @@
                String content = "";
                if(Objects.nonNull(systemUser.getRealname())){
                    content = content + systemUser.getRealname();
                    content = content +"【"+ systemUser.getRealname()+"】";
                }
                if(Objects.nonNull(jkCabinet)){
                    content = content + "于"+jkCabinet.getName()+"钥匙柜";
                    content = content + "于【"+jkCabinet.getName()+"】钥匙柜";
                }
                content = content + "酒精检测异常";
                if(Objects.nonNull(dto.getAlcoholNum())){
                    content = content + ",酒精度数【"+dto.getAlcoholNum()+"°】";
                }
//                if(Objects.nonNull(dto.getAlcoholNum())){
//                    content = content + ",酒精度数【"+dto.getAlcoholNum()+"°】";
//                }
                //存储报警异常记录
                WarningEvent warningEvent = new WarningEvent();
@@ -1007,6 +1094,7 @@
                warningEvent.setCreator(Objects.nonNull(systemUser)?systemUser.getId():null);
                warningEvent.setWarningId(warning.getId());
                warningEvent.setTitle(warningConfig.getInfo());
                warningEvent.setIsdeleted(Constants.ZERO);
                warningEvent.setContent(content );
                warningEvent.setStatus(Constants.ZERO);
                warningEvent.setRegion(Objects.nonNull(jkCabinet)&&StringUtils.isNotBlank(jkCabinet.getLocation())?jkCabinet.getLocation():"未知位置");
@@ -1097,4 +1185,59 @@
    }
    @Override
    public void syncGridData(SyncCabinetDTO dto){
        if(Objects.isNull(dto)
            ||StringUtils.isBlank(dto.getCode())
            || CollectionUtils.isEmpty(dto.getGridDTOList())){
            return;
        }
        List<JkCabinetGrid> jkCabinetGridList =
                jkCabinetGridMapper.selectJoinList(JkCabinetGrid.class, new MPJLambdaWrapper<JkCabinetGrid>()
                        .selectAll(JkCabinetGrid.class)
                        .selectAs(JkKeys::getCarCode,JkCabinetGrid::getCarCode)
                        .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode)
                        .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus)
                        .leftJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId)
                        .leftJoin(JkCabinet.class,JkCabinet::getId,JkCabinetGrid::getCabinetId)
                        .eq(JkCabinet::getCode,dto.getCode())
                        .eq(JkCabinetGrid::getIsdeleted,Constants.ZERO)
                        .isNotNull(JkCabinetGrid::getBoardCode)
                        .isNotNull(JkCabinetGrid::getChannelCode)
                        .orderByAsc(JkCabinetGrid::getCode)
                );
        if(CollectionUtils.isEmpty(jkCabinetGridList)){
            return;
        }
        List<SyncGridDTO> gridDTOList = dto.getGridDTOList();
        for (JkCabinetGrid jkCabinetGrid:jkCabinetGridList) {
            List<SyncGridDTO> gridSyncList = gridDTOList.stream().filter(i->StringUtils.isNotBlank(i.getBoardCode())&&
                    StringUtils.isNotBlank(i.getChannelCode())&&StringUtils.isNotBlank(i.getActualLable())&&i.getBoardCode().equals(jkCabinetGrid.getBoardCode())
            && i.getChannelCode().equals(jkCabinetGrid.getChannelCode())).collect(Collectors.toList());
            if(CollectionUtils.isEmpty(gridDTOList)){
                continue;
            }
            SyncGridDTO syncGridDTO = gridSyncList.get(Constants.ZERO);
            if(StringUtils.isBlank(jkCabinetGrid.getKeyCode())
            || (!jkCabinetGrid.getKeyCode().equals(syncGridDTO.getActualLable())
                    && !jkCabinetGrid.getActualLable().equals(syncGridDTO.getActualLable()))){
                //更新数据 æ ‡è®°å¯¹åº”code
                jkCabinetGridMapper.update(null,new UpdateWrapper<JkCabinetGrid>().lambda()
                        .set(JkCabinetGrid::getActualLable,syncGridDTO.getActualLable())
                        .eq(JkCabinetGrid::getId,jkCabinetGrid.getId())
                );
            }
        }
    }
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java
@@ -252,15 +252,14 @@
                                .last(" limit 1 ")
                        );
                    }
                    String content = "【车辆-"+jkCabinetLog.getCarCode()+"钥匙】由+"+(StringUtils.isNotBlank(jkCabinetLog.getMemberName())?jkCabinetLog.getMemberName():"未知人员")+"借出,超时未归还";
                    String content = "【车辆-"+jkCabinetLog.getKeyInfo()+"钥匙】由"+(StringUtils.isNotBlank(jkCabinetLog.getMemberName())?jkCabinetLog.getMemberName():"未知人员")+"借出,超时未归还";
                    //存储报警异常记录
                    WarningEvent warningEvent = new WarningEvent();
                    warningEvent.setCreateDate(new Date());
                    warningEvent.setCreator(Objects.nonNull(systemUser)?systemUser.getId():null);
                    warningEvent.setWarningId(warning.getId());
                    warningEvent.setTitle(warningConfig.getInfo());
                    warningEvent.setIsdeleted(Constants.ZERO);
                    warningEvent.setContent(content );
                    warningEvent.setStatus(Constants.ZERO);
                    warningEvent.setRegion( StringUtils.isNotBlank(jkCabinetLog.getLocation())?jkCabinetLog.getLocation():"未知位置");
@@ -295,6 +294,10 @@
                        warningPushMapper.insert(warningPush);
                        warningEvent.setStatus(Constants.ONE);
                        warningEventMapper.updateById(warningEvent);
                        jkCabinetLogMapper.update(null,new UpdateWrapper<JkCabinetLog>().lambda()
                                .set(JkCabinetLog::getIsNotice,Constants.ONE)
                                .eq(JkCabinetLog::getId,jkCabinetLog.getId())
                        );
                    }catch (Exception e){
                        warningEvent.setStatus(Constants.TWO);
                        warningEventMapper.updateById(warningEvent);
@@ -356,7 +359,7 @@
    @Override
    public List<InterestedListVO> getKeyUseStatistics(Integer type){
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM月dd日");
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM-dd");
        MPJLambdaWrapper<JkCabinetLog> wrapper = new MPJLambdaWrapper<JkCabinetLog>()
                .selectAll(JkCabinetLog.class)
                .selectAs(Member::getName,JkCabinetLog::getMemberName)
@@ -386,11 +389,11 @@
            if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(jkCabinetLogs)) {
                vo.setNum(
                        jkCabinetLogs.stream().filter(i->Constants.equalsInteger(i.getKeyStatus(),Constants.TWO)
                                                &&DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                                                &&DateUtil.dateToString(i.getCreateDate(),"MM-dd").equals(days))
                                .collect(Collectors.toList()).size()
                );
                vo.setNextNum(jkCabinetLogs.stream().filter(i->Constants.equalsInteger(i.getKeyStatus(),Constants.ONE)
                                &&DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                                &&DateUtil.dateToString(i.getCreateDate(),"MM-dd").equals(days))
                        .collect(Collectors.toList()).size());
            }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -960,7 +960,7 @@
        updateMember.setEditor(loginUserInfo.getId());
        updateMember.setEditDate(new Date());
        //海康人员新增业务
        if(dealHkUserForUpdateBiz(updateMember)){
//        if(dealHkUserForUpdateBiz(updateMember)){
            updateMember.setHkId(null);
            updateMember.setAuthStatus(Constants.ZERO);
            memberMapper.update(null,new UpdateWrapper<Member>().lambda()
@@ -993,9 +993,9 @@
            cancelAllMemberEmpower(updateMember,memberRoleMapper,empowerMapper);
            //记录操作日志
            saveUserActionBiz(updateMember,loginUserInfo,Constants.UserActionType.EDIT,userActionJoinMapper,null);
        }else{
            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,员工信息同步安防平台失败,请稍后重试!");
        }
//        }else{
//            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,员工信息同步安防平台失败,请稍后重试!");
//        }
    }
    private void dealTrainTIme(Member updateMember, int i,LoginUserInfo loginUserInfo) {