rk
10 小时以前 1fb6ce7f165e85cb9458d6e8d1b6bf7debc1e665
功能开发
已修改20个文件
219 ■■■■■ 文件已修改
server/system_gateway/src/main/resources/application-pro.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/resources/application-pro.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_timer/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/java/com/doumee/api/JkCabinetTimerController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/admin_timer/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinet.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinetLog.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/CabinetInfoVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetGridService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetGridServiceImpl.java 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetServiceImpl.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/resources/application-pro.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
  datasource:
    url: jdbc:mysql://localhost:3306/maanshanyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: Whyc@2025
    password: Masyc@2025
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  redis:
@@ -18,7 +18,7 @@
debug_model: true
debug_model: false
captcha_check: true
server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: dev
    active: pro
  application:
    name: system_gateway
  # 安全配置
server/system_timer/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
  datasource:
    url: jdbc:mysql://localhost:3306/maanshanyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: Whyc@2025
    password: Masyc@2025
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
server/system_timer/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: dev
    active: pro
  application:
    name: systemTimer
    # 安全配置
server/visits/admin_timer/src/main/java/com/doumee/api/JkCabinetTimerController.java
@@ -1,11 +1,13 @@
package com.doumee.api;
import com.doumee.core.utils.DateUtil;
import com.doumee.service.business.JkCabinetLogService;
import com.doumee.service.business.JkCustomerService;
import com.doumee.service.business.impl.JkCabinetGridServiceImpl;
import com.doumee.service.business.third.model.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.springframework.beans.factory.annotation.Autowired;
@@ -19,6 +21,7 @@
 */
@Api(tags = "钥匙柜定时器")
@RestController
@Slf4j
@RequestMapping("/timer/jkCabinet")
public class JkCabinetTimerController extends BaseController {
    @Autowired
@@ -31,7 +34,9 @@
    @ApiOperation("定时发送钥匙未及时归还通知")
    @PostMapping("/timeOutUnBackAlarm")
    public ApiResponse timeOutUnBackAlarm() {
        log.error("定时发送钥匙未及时归还通知开始" + DateUtil.getCurrDateTime() );
        jkCabinetLogService.timeOutUnBackAlarm(impl);
        log.error("定时发送钥匙未及时归还通知结束" + DateUtil.getCurrDateTime() );
        return ApiResponse.success("定时发送钥匙未及时归还通知");
    }
server/visits/admin_timer/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: test
    active: pro
  application:
    name: visitsTimer
    # 安全配置
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java
@@ -29,10 +29,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * Created by IntelliJ IDEA.
@@ -143,7 +140,11 @@
    @ApiOperation("关闭柜门")
    @PostMapping("/closeGrid")
    public ApiResponse closeGrid(@RequestBody CloseGridDTO dto) {
        jkCabinetGridService.closeGrid(dto);
        JDYKeyUseByBookDTO jdyKeyUseByBookDTO = jkCabinetGridService.closeGrid(dto);
        //推送简道云 取还信息
        if(Objects.nonNull(jdyKeyUseByBookDTO)&&Objects.nonNull(jdyKeyUseByBookDTO.getId())){
            jkCabinetGridService.pushJDYKeyInfo(jdyKeyUseByBookDTO);
        }
        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"closeGrid","关闭柜门");
        return ApiResponse.success("操作成功");
    }
@@ -157,7 +158,6 @@
        return ApiResponse.success("操作成功");
    }
    @LoginNoRequired
    @ApiOperation("获取钥匙柜人脸数据")
    @GetMapping("/getCabinetFaceVO")
@@ -167,8 +167,6 @@
        return ApiResponse.success(cabinetFaceVO);
    }
    @LoginNoRequired
    @ApiOperation("获取可操作柜格 - 司机")
    @PostMapping("/getDriverGrid")
@@ -177,7 +175,6 @@
        this.saveInterfaceLog(JSONObject.toJSONString(dto), JSONObject.toJSONString(jkCabinetGridList),"getDriverGrid","获取可操作柜格 - 司机");
        return ApiResponse.success(jkCabinetGridList);
    }
    @LoginNoRequired
    @ApiOperation("开启柜格 - 司机")
@@ -232,7 +229,8 @@
    @LoginNoRequired
    @ApiOperation("钥匙柜心跳接口")
    @GetMapping("/heartbeat")
    public ApiResponse heartbeat() {
    public ApiResponse heartbeat(@RequestParam String code) {
        jkCabinetService.updHeartbeat(code);
        return ApiResponse.success("链接成功");
    }
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: dev
    active: test
  application:
    name: visitsAdmin
    # 安全配置
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinet.java
@@ -148,6 +148,9 @@
    @ExcelColumn(name="起始编码")
    private Integer noIndex;
    @ApiModelProperty(value = "酒精检测开启:0=开启;1=关闭", example = "1")
    private Integer alcoholStatus;
    @ApiModelProperty(value = "经纬度信息 参数值:经度,纬度")
    @TableField(exist = false)
    private String jwd;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/JkCabinetLog.java
@@ -138,4 +138,8 @@
    @TableField(exist = false)
    private String location;
    @ApiModelProperty(value = "业务类型:1=开关门记录;2=酒精检测;", example = "1",hidden = true)
    @TableField(exist = false)
    private Integer bizType;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/CabinetInfoVO.java
@@ -61,6 +61,8 @@
    @ApiModelProperty(value = "联系人电话")
    private String linkPhone;
    @ApiModelProperty(value = "酒精检测开启:0=开启;1=关闭", example = "1")
    private Integer alcoholStatus;
    @ApiModelProperty(value = "轮播图地址", example = "1")
    private List<String> bannerList;
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetGridService.java
@@ -125,7 +125,7 @@
    /**
     * 钥匙柜关门
     */
    void closeGrid(CloseGridDTO dto);
    JDYKeyUseByBookDTO closeGrid(CloseGridDTO dto);
    /**
     * 司机获取可操作的钥匙柜柜格
@@ -156,5 +156,5 @@
     */
    void syncGridData(SyncCabinetDTO dto);
    void pushJDYKeyInfo(JDYKeyUseByBookDTO dto);
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/JkCabinetService.java
@@ -132,4 +132,6 @@
    void updateRunStatusById(Integer id);
    void updHeartbeat(String code);
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -157,6 +157,7 @@
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(this.carUseBookList(carUseBook))){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在车辆预约时间与已预约时间冲突~");
        }
        carUseBook.setTypeInfo(Constants.equalsInteger(carUseBook.getType(),Constants.ZERO)?"市内":"室外");
        carUseBookMapper.insert(carUseBook);
        //用车申请 审批记录创建
        approveService.createApproveFlow(carUseBook.getType()==0?3:4,carUseBook.getId(),carUseBook.getMemberId(),null);
@@ -685,7 +686,7 @@
        String addr =   dataJSON.getString("addr");
        CarUseBook carUseBook = carUseBookJoinMapper.selectOne(new QueryWrapper<CarUseBook>()
                .lambda().eq(CarUseBook::getJdyId,no).last("limit 1"));
                .lambda().eq(CarUseBook::getJdyNo,no).last("limit 1"));
        if(Objects.isNull(carUseBook)){
            carUseBook = new CarUseBook();
            carUseBook.setCreateDate(new Date());
@@ -710,6 +711,7 @@
        carUseBook.setContent(StringUtils.isBlank(reason)?null:reason);
        carUseBook.setAddr(StringUtils.isBlank(addr)?null:addr);
        carUseBook.setStatus(Constants.TWO);
        carUseBook.setKeyStatus(Constants.ZERO);
        JSONObject driverJSON = dataJSON.getJSONObject("driver");
        if(Objects.nonNull(driverJSON)){
            String driverName = driverJSON.getString("name");
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
@@ -768,17 +768,17 @@
                }
            }
        }
        JSONObject createJSON = dataJSON.getJSONObject("creator");
        if(Objects.nonNull(createJSON)){
            String createName = createJSON.getString("name");
            String createUserName = createJSON.getString("username");
            if(StringUtils.isNotBlank(createUserName)){
                Member createMember = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getIsdeleted,Constants.ZERO).eq(Member::getDdId,createUserName).last("limit 1 "));
                if(Objects.nonNull(createMember)){
                    cars.setMemberId(createMember.getId());
                }
            }
        }
//        JSONObject createJSON = dataJSON.getJSONObject("creator");
//        if(Objects.nonNull(createJSON)){
//            String createName = createJSON.getString("name");
//            String createUserName = createJSON.getString("username");
//            if(StringUtils.isNotBlank(createUserName)){
//                Member createMember = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getIsdeleted,Constants.ZERO).eq(Member::getDdId,createUserName).last("limit 1 "));
//                if(Objects.nonNull(createMember)){
//                    cars.setMemberId(createMember.getId());
//                }
//            }
//        }
        carsMapper.insertOrUpdate(cars);
    }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetGridServiceImpl.java
@@ -36,10 +36,12 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@@ -461,7 +463,7 @@
     */
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public void closeGrid(CloseGridDTO dto){
    public JDYKeyUseByBookDTO closeGrid(CloseGridDTO dto){
        if(Objects.isNull(dto)
            || Objects.isNull(dto.getGridId())
            || Objects.isNull(dto.getCabinetId())
@@ -475,6 +477,7 @@
                .eq(JkCabinetGrid::getId,dto.getGridId())
                .last(" limit 1 ")
        );
        JDYKeyUseByBookDTO jdyKeyUseByBookDTO = new JDYKeyUseByBookDTO();
        if(Objects.nonNull(jkCabinetGrid)){
            JkCabinetLog jkCabinetLog = new JkCabinetLog();
            jkCabinetLog.setCreateDate(new Date());
@@ -495,10 +498,10 @@
                        jkCabinetLog.setKeyInfo(jkKeys.getCarCode() + "_" + jkKeys.getCode() );
                    }
                    jkCabinetLog.setRoleType(jkKeys.getRoleType());
                    jkCabinetLog.setKeyStatus(dto.getKeyStatus());
                    //钥匙状态与当前操作状态不一致,则进行更新钥匙状态
                    if(!Constants.equalsInteger(jkKeys.getStatus(),dto.getKeyStatus())
                     && (Constants.equalsInteger(dto.getKeyStatus(),Constants.ONE)||Constants.equalsInteger(dto.getKeyStatus(),Constants.TWO))){
                        jkCabinetLog.setKeyStatus(dto.getKeyStatus());
                        jkKeysMapper.update(null,new UpdateWrapper<JkKeys>().lambda()
                                .set(JkKeys::getEditDate,DateUtil.getCurrDateTime())
                                .set(JkKeys::getStatus,dto.getKeyStatus())
@@ -521,7 +524,6 @@
                        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)) {
@@ -529,15 +531,15 @@
                                            .set(CarUseBook::getKeyStatus, Constants.equalsInteger(dto.getKeyStatus(),Constants.TWO)?Constants.ONE:Constants.TWO)
                                            .eq(CarUseBook::getId, carUseBook.getId())
                                    );
                                    String carUseBookId = carUseBook.getJdyNo();
                                    //推送简道云 标记业务数据已被领取钥匙
                                    if (StringUtils.isNotBlank(carUseBook.getJdyId())) {
                                        JDYKeyUseByBookDTO jdyKeyUseByBookDTO = new JDYKeyUseByBookDTO();
                                        jdyKeyUseByBookDTO.setCreate_date(System.currentTimeMillis());
                                        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.getJdyNo());
                                        this.pushJDYKeyInfo(jdyKeyUseByBookDTO);
//                                        this.pushJDYKeyInfo(jdyKeyUseByBookDTO);
                                    }
                                }
                            }
@@ -561,7 +563,10 @@
            }
        }
        return jdyKeyUseByBookDTO;
    }
@@ -641,7 +646,8 @@
                                .eq(JkCabinetGrid::getCabinetId,dto.getCabinetId())
                                .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()+" )")
                                .apply(" ( t1.car_id in ( select c.id from  cars c  where c.ISDELETED = 0 and  c.MEMBER_ID = "+dto.getMemberId()+" ) " +
                                        " or   t1.car_code in ( select c.car_code from car_use_book c   where c.isdeleted = 0  and c.KEY_STATUS = 1    and c.DRIVER_ID = "+dto.getMemberId()+" ) ) ")
                                .orderByAsc(JkCabinetGrid::getCode)
                );
                for (JkCabinetGrid jkCabinetGrid:jkCabinetGridList) {
@@ -664,29 +670,6 @@
                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)
@@ -703,9 +686,9 @@
                                .eq(JkCabinetGrid::getCabinetId,dto.getCabinetId())
                                .in(JkKeys::getStatus,Constants.ONE)
                                .eq(JkKeys::getRoleType,Constants.ONE)
                                .eq(Cars::getMemberId,dto.getMemberId())
//                                .eq(Cars::getMemberId,dto.getMemberId())
                                .isNotNull(JkCabinetGrid::getKeyId)
                                .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()+" ) ")
                                .apply(" t2.code in ( select c.car_code from car_use_book c   where c.isdeleted = 0   and NOW() > DATE_SUB(c.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < c.end_time  and c.DRIVER_ID = "+dto.getMemberId()+" ) ")
                );
                for (JkCabinetGrid jkCabinetGrid:jkCabinetGridList) {
@@ -715,7 +698,7 @@
                            .eq(CarUseBook::getIsdeleted,Constants.ZERO)
                            .eq(Cars::getIsdeleted,Constants.ZERO)
                            .eq(CarUseBook::getCarCode,jkCabinetGrid.getCarCode())
                            .eq(Cars::getMemberId,dto.getMemberId())
                            .eq(CarUseBook::getDriverId,dto.getMemberId())
                            .apply("  NOW() > DATE_SUB(t.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < t.end_time  ")
                    );
                    if(CollectionUtils.isNotEmpty(carUseBookList)) {
@@ -801,6 +784,8 @@
    }
    @Async
    @Override
    public void pushJDYKeyInfo(JDYKeyUseByBookDTO dto){
        String url = systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.PUSH_URL_KEYS).getCode();
//        JSONObject object = new JSONObject();
@@ -812,9 +797,6 @@
        log.error("【简道云】推送派车单数据领用与归还信息-请求入参:"+JSONObject.toJSONString(dto));
        String result = HttpsUtil.postJson(url,JSONObject.toJSONString(dto));
        log.error("【简道云】推送派车单数据领用与归还信息-请求结果:"+JSONObject.toJSONString(result));
    }
@@ -1058,6 +1040,34 @@
            if(Objects.isNull(warning)){
                return;
            }
            if(StringUtils.isNotBlank(dto.getAlcoholNum())){
                try{
                    //存储酒精检测日志
                    Integer threshold = Integer.valueOf(systemDictDataBiz.queryByCode(Constants.CABINET_CONFIG,Constants.THRESHOLD).getCode());
                    //检测标准值
                    BigDecimal concentration = new BigDecimal( systemDictDataBiz.queryByCode(Constants.CABINET_CONFIG,Constants.CONCENTRATION).getCode());
                    //检测值
                    BigDecimal alcoholNum = new BigDecimal(dto.getAlcoholNum());
                    JkCabinetLog jkCabinetLog = new JkCabinetLog();
                    jkCabinetLog.setCreator(systemUser.getId());
                    jkCabinetLog.setCreateDate(new Date());
                    jkCabinetLog.setCabinetName(jkCabinet.getName());
                    jkCabinetLog.setMemberId(dto.getMemberId());
                    jkCabinetLog.setCabinetId(dto.getCabinetId());
                    jkCabinetLog.setIsdeleted(Constants.ZERO);
                    jkCabinetLog.setType(Constants.TWO);
                    //1=mg/100ml;2=mg/L;3=%BAC  检测值:400mg/100ml,标准值500mg/100ml
                    jkCabinetLog.setStatus(alcoholNum.compareTo(concentration)<Constants.ZERO?Constants.ONE:Constants.ZERO);
                    String thresholdStr = (Constants.equalsInteger(threshold,Constants.ONE)?"mg/100ml":Constants.equalsInteger(threshold,Constants.TWO)?"mg/L":"%BAC");
                    jkCabinetLog.setKeyInfo("检测值:"+alcoholNum+thresholdStr+";标准值:"+concentration+thresholdStr+";");
                    jkCabinetLogMapper.insert(jkCabinetLog);
                    if(alcoholNum.compareTo(concentration)<Constants.ZERO){
                        return;
                    }
                }catch (Exception e){
                }
            }
            List<Integer> ruleIdList =  this.processWarnFront(warningConfig);
            if(CollectionUtils.isEmpty(ruleIdList)){
                return;
@@ -1223,11 +1233,7 @@
                        .eq(JkCabinetGrid::getId,jkCabinetGrid.getId())
                );
            }
        }
    }
    
    
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java
@@ -140,6 +140,8 @@
                .eq(Objects.nonNull(model.getAuthType()),JkCabinetLog::getAuthType,model.getAuthType())
                .eq(Objects.nonNull(model.getStatus()),JkCabinetLog::getStatus,model.getStatus())
                .eq(Objects.nonNull(model.getType()),JkCabinetLog::getType,model.getType())
                .ne(Objects.nonNull(model.getBizType())&&Constants.equalsInteger(model.getBizType(),Constants.ONE),JkCabinetLog::getType,Constants.TWO)
                .eq(Objects.nonNull(model.getBizType())&&Constants.equalsInteger(model.getBizType(),Constants.TWO),JkCabinetLog::getType,Constants.TWO)
                .in(Objects.nonNull(model.getType())&&Constants.equalsInteger(model.getType(),Constants.ONE),JkCabinetLog::getType,"1,2")
                .eq(JkCabinetLog::getIsdeleted, Constants.ZERO)
                .orderByDesc(JkCabinetLog::getCreateDate);
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetServiceImpl.java
@@ -6,9 +6,7 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.dao.business.CategoryMapper;
import com.doumee.dao.business.JkCabinetGridMapper;
import com.doumee.dao.business.JkKeysMapper;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dao.MemberMapper;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.*;
@@ -19,7 +17,6 @@
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.JkCabinetMapper;
import com.doumee.service.business.JkCabinetService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -67,6 +64,9 @@
    @Autowired
    private MultifileMapper multifileMapper;
    @Autowired
    private CarUseBookMapper carUseBookMapper;
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public Integer create(JkCabinet jkCabinet) {
@@ -81,6 +81,7 @@
            || CollectionUtils.isEmpty(jkCabinet.getManagerIdList())
            || CollectionUtils.isEmpty(jkCabinet.getAuthMemberIdList())
            || Objects.isNull(jkCabinet.getDoubleAuth())
            || Objects.isNull(jkCabinet.getAlcoholStatus())
            || Objects.isNull(jkCabinet.getRowNum())
            || jkCabinet.getRowNum() <= Constants.ZERO
@@ -213,6 +214,7 @@
                || CollectionUtils.isEmpty(jkCabinet.getAuthMemberIdList())
                || Objects.isNull(jkCabinet.getPort())
                || Objects.isNull(jkCabinet.getDoubleAuth())
                || Objects.isNull(jkCabinet.getAlcoholStatus())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -522,10 +524,11 @@
                    .isNotNull(JkKeys::getCarId)
                    .eq(JkCabinetGrid::getCabinetId,jkCabinet.getId())
            );
            List<Member> driverList = new ArrayList<>();
            if(CollectionUtils.isNotEmpty(jkCabinetGridList)){
                List<Integer> carIdList = jkCabinetGridList.stream().map(i->i.getKeyId()).collect(Collectors.toList());
                //查询车辆所有人员信息
                List<Member> memberList = memberMapper.selectJoinList(Member.class,new MPJLambdaWrapper<Member>()
                driverList.addAll(memberMapper.selectJoinList(Member.class,new MPJLambdaWrapper<Member>()
                        .selectAll(Member.class)
                        .leftJoin(Cars.class,Cars::getMemberId,Member::getId)
                        .leftJoin(JkKeys.class,JkKeys::getCarId,Cars::getId)
@@ -533,10 +536,32 @@
                        .eq(CarDriver::getIsdeleted,Constants.ZERO)
                        .eq(CarDriver::getStatus,Constants.ZERO)
                        .isNotNull(Member::getFaceImg)
                        .in(JkKeys::getId,carIdList)
                        .in(JkKeys::getId,carIdList))
                );
                if(CollectionUtils.isNotEmpty(memberList)){
                    Set<Member> memberSet = new HashSet<>(memberList);
            }
            //派车单司机信息
            String earlyConfig =  systemDictDataBiz.queryByCode(Constants.CABINET_CONFIG,Constants.EARLY_CONFIG).getCode();
            List<CarUseBook> carUseBookList = carUseBookMapper.selectList(new QueryWrapper<CarUseBook>().lambda()
                    .eq(CarUseBook::getIsdeleted,Constants.ZERO)
                            .isNotNull(CarUseBook::getDriverId)
                            .apply(" car_id in ( SELECT k.CAR_ID FROM  jk_cabinet_grid j inner join jk_keys k on j.KEY_ID = k.ID where j.isdeleted = 0 and k.isdeleted = 0  ) ")
                    .apply(" (" +
                            "( NOW() > DATE_SUB(START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < end_time and KEY_STATUS = 0  ) " +
                            "or" +
                            "  KEY_STATUS = 1 " +
                            ") ")
            );
            if(CollectionUtils.isNotEmpty(carUseBookList)){
                driverList.addAll(memberMapper.selectList(new QueryWrapper<Member>().lambda()
                        .eq(Member::getIsdeleted,Constants.ZERO)
                        .isNotNull(Member::getFaceImg)
                        .in(Member::getId,carUseBookList.stream().map(i->i.getDriverId()).collect(Collectors.toList()))
                ));
            }
            if(CollectionUtils.isNotEmpty(driverList)){
                if(CollectionUtils.isNotEmpty(driverList)){
                    Set<Member> memberSet = new HashSet<>(driverList);
                    for (Member member:memberSet) {
                        CabinetFaceInfoVO cabinetFaceInfoVO = new CabinetFaceInfoVO();
                        cabinetFaceInfoVO.setMemberId(member.getId());
@@ -659,4 +684,12 @@
    }
    @Override
    public void updHeartbeat(String code){
        jkCabinetMapper.update(null,new UpdateWrapper<JkCabinet>()
                .lambda()
                .set(JkCabinet::getHaertTime, DateUtil.getCurrDateTime())
                .eq(JkCabinet::getCode,code));
    }
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -66,6 +66,7 @@
import com.doumee.service.system.SystemLoginService;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.taobao.api.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
@@ -92,6 +93,7 @@
 * @author 江蹄蹄
 * @date 2023/11/30 15:33
 */
@Slf4j
@Service
public class MemberServiceImpl implements MemberService {
@@ -2427,6 +2429,8 @@
            if(CollectionUtils.isEmpty(list)){
                return;
            }
            log.error("钉钉人员信息同步行数:"+ list.size());
            log.error("钉钉人员信息同步内容:"+ JSONObject.toJSONString(list));
            List<Member> addList = new ArrayList<>();
            List<Member> updateList = new ArrayList<>();
            List<String> delIds = new ArrayList<>();//修改为使用钉钉id  erpId
server/visits/dmvisit_service/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
  datasource:
    url: jdbc:mysql://localhost:3306/maanshanyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: Whyc@2025
    password: Masyc@2025
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  redis: