Commit b6f145b75e26f1df1549180e7fffd687e6f89afa
1 parent
decaea49
酒测复测
Showing
8 changed files
with
42 additions
and
8 deletions
Bsth-admin/sql/DDL.sql
| @@ -4,3 +4,7 @@ ALTER TABLE equipment_exception ADD sign_id INT NULL COMMENT '打卡表ID'; | @@ -4,3 +4,7 @@ ALTER TABLE equipment_exception ADD sign_id INT NULL COMMENT '打卡表ID'; | ||
| 4 | ALTER TABLE equipment_exception_report ADD sign_in varchar(100) NULL COMMENT '签到类型 1 人脸 2 刷卡 3 其他 4 酒精;104 线下酒测'; | 4 | ALTER TABLE equipment_exception_report ADD sign_in varchar(100) NULL COMMENT '签到类型 1 人脸 2 刷卡 3 其他 4 酒精;104 线下酒测'; |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | +ALTER TABLE sign_in ADD exception_Id BIGINT NULL COMMENT '异常ID复测签到'; | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + |
Bsth-admin/src/main/java/com/ruoyi/controller/sign/in/exception/report/EquipmentExceptionReportController.java
| @@ -77,7 +77,7 @@ public class EquipmentExceptionReportController extends BaseController { | @@ -77,7 +77,7 @@ public class EquipmentExceptionReportController extends BaseController { | ||
| 77 | // request.setDriverJobs(driverJobs); | 77 | // request.setDriverJobs(driverJobs); |
| 78 | } | 78 | } |
| 79 | Set<String> notSignIn = new HashSet<>(); | 79 | Set<String> notSignIn = new HashSet<>(); |
| 80 | - notSignIn.add("104"); | 80 | + // notSignIn.add("104"); |
| 81 | request.setNotSignIn(notSignIn); | 81 | request.setNotSignIn(notSignIn); |
| 82 | 82 | ||
| 83 | 83 |
Bsth-admin/src/main/java/com/ruoyi/domain/dss2/driver/dto/DssSignV2DTO.java
| @@ -61,6 +61,8 @@ public class DssSignV2DTO { | @@ -61,6 +61,8 @@ public class DssSignV2DTO { | ||
| 61 | @ApiModelProperty(value = "视频内容Base64") | 61 | @ApiModelProperty(value = "视频内容Base64") |
| 62 | private String videoContent; | 62 | private String videoContent; |
| 63 | 63 | ||
| 64 | + private Long exceptionId; | ||
| 65 | + | ||
| 64 | 66 | ||
| 65 | @Override | 67 | @Override |
| 66 | public String toString() { | 68 | public String toString() { |
Bsth-admin/src/main/java/com/ruoyi/in/domain/SignIn.java
| @@ -14,11 +14,11 @@ import java.util.Date; | @@ -14,11 +14,11 @@ import java.util.Date; | ||
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| 16 | * 签到对象 sign_in | 16 | * 签到对象 sign_in |
| 17 | - * | 17 | + * |
| 18 | * @author guzijian | 18 | * @author guzijian |
| 19 | * @date 2023-07-05 | 19 | * @date 2023-07-05 |
| 20 | */ | 20 | */ |
| 21 | -@ApiModel(value = "签到对象",description = "签到记录参数") | 21 | +@ApiModel(value = "签到对象", description = "签到记录参数") |
| 22 | @Data | 22 | @Data |
| 23 | public class SignIn extends BaseEntity { | 23 | public class SignIn extends BaseEntity { |
| 24 | private static final long serialVersionUID = 1L; | 24 | private static final long serialVersionUID = 1L; |
| @@ -94,7 +94,7 @@ public class SignIn extends BaseEntity { | @@ -94,7 +94,7 @@ public class SignIn extends BaseEntity { | ||
| 94 | @Excel(name = "酒精摄入量") | 94 | @Excel(name = "酒精摄入量") |
| 95 | @ApiModelProperty("酒精摄入量 52.12") | 95 | @ApiModelProperty("酒精摄入量 52.12") |
| 96 | private BigDecimal alcoholIntake; | 96 | private BigDecimal alcoholIntake; |
| 97 | - @Excel(name = "异常类型",readConverterExp = "0=无异常,1=超时异常,2=无排班异常,3=酒精超标异常,44饮酒") | 97 | + @Excel(name = "异常类型", readConverterExp = "0=无异常,1=超时异常,2=无排班异常,3=酒精超标异常,44饮酒") |
| 98 | @ApiModelProperty("异常类型") | 98 | @ApiModelProperty("异常类型") |
| 99 | private Integer exType; | 99 | private Integer exType; |
| 100 | 100 | ||
| @@ -114,5 +114,7 @@ public class SignIn extends BaseEntity { | @@ -114,5 +114,7 @@ public class SignIn extends BaseEntity { | ||
| 114 | 114 | ||
| 115 | @TableField(exist = false) | 115 | @TableField(exist = false) |
| 116 | private Date endCreateTime; | 116 | private Date endCreateTime; |
| 117 | + | ||
| 118 | + private Long exceptionId; | ||
| 117 | } | 119 | } |
| 118 | 120 |
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceV1Impl.java
| @@ -21,6 +21,7 @@ import com.ruoyi.common.utils.ip.IpUtils; | @@ -21,6 +21,7 @@ import com.ruoyi.common.utils.ip.IpUtils; | ||
| 21 | import com.ruoyi.common.utils.uuid.Seq; | 21 | import com.ruoyi.common.utils.uuid.Seq; |
| 22 | import com.ruoyi.common.utils.uuid.UUID; | 22 | import com.ruoyi.common.utils.uuid.UUID; |
| 23 | import com.ruoyi.domain.DriverScheduling; | 23 | import com.ruoyi.domain.DriverScheduling; |
| 24 | +import com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport; | ||
| 24 | import com.ruoyi.domain.sign.in.resource.LinggangSignInResource; | 25 | import com.ruoyi.domain.sign.in.resource.LinggangSignInResource; |
| 25 | import com.ruoyi.driver.domain.Driver; | 26 | import com.ruoyi.driver.domain.Driver; |
| 26 | import com.ruoyi.driver.mapper.DriverMapper; | 27 | import com.ruoyi.driver.mapper.DriverMapper; |
| @@ -38,6 +39,7 @@ import com.ruoyi.scheduling.service.SchedulingServiceV1; | @@ -38,6 +39,7 @@ import com.ruoyi.scheduling.service.SchedulingServiceV1; | ||
| 38 | import com.ruoyi.service.BigViewServiceV1; | 39 | import com.ruoyi.service.BigViewServiceV1; |
| 39 | import com.ruoyi.service.SchedulingService; | 40 | import com.ruoyi.service.SchedulingService; |
| 40 | import com.ruoyi.service.ThreadJobService; | 41 | import com.ruoyi.service.ThreadJobService; |
| 42 | +import com.ruoyi.service.sign.in.exception.report.EquipmentExceptionReportService; | ||
| 41 | import com.ruoyi.service.sign.in.resource.LinggangSignInResourceService; | 43 | import com.ruoyi.service.sign.in.resource.LinggangSignInResourceService; |
| 42 | import com.ruoyi.utils.ConstDateUtil; | 44 | import com.ruoyi.utils.ConstDateUtil; |
| 43 | import com.ruoyi.utils.UploadUtil; | 45 | import com.ruoyi.utils.UploadUtil; |
| @@ -90,6 +92,8 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i | @@ -90,6 +92,8 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i | ||
| 90 | @Autowired | 92 | @Autowired |
| 91 | private ISignInService signInService; | 93 | private ISignInService signInService; |
| 92 | 94 | ||
| 95 | + private EquipmentExceptionReportService equipmentExceptionReportService; | ||
| 96 | + | ||
| 93 | private static final FastDateFormat HHMM = FastDateFormat.getInstance("HH:mm"); | 97 | private static final FastDateFormat HHMM = FastDateFormat.getInstance("HH:mm"); |
| 94 | 98 | ||
| 95 | @Override | 99 | @Override |
| @@ -340,6 +344,13 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i | @@ -340,6 +344,13 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i | ||
| 340 | // 异常保存到异常异常中 | 344 | // 异常保存到异常异常中 |
| 341 | threadJobService.asyncInsertExceptionRecord(signIn, driver, scheduling); | 345 | threadJobService.asyncInsertExceptionRecord(signIn, driver, scheduling); |
| 342 | 346 | ||
| 347 | + if (Objects.nonNull(signIn.getExceptionId())) { | ||
| 348 | + LambdaUpdateWrapper<EquipmentExceptionReport> reportLambdaUpdateWrapper = new LambdaUpdateWrapper<>(); | ||
| 349 | + reportLambdaUpdateWrapper.set(EquipmentExceptionReport::getStatus, 3).set(EquipmentExceptionReport::getUpdateTime, new Date()) | ||
| 350 | + .set(EquipmentExceptionReport::getUpdateBy, signIn.getCreateBy()).eq(EquipmentExceptionReport::getId, signIn.getExceptionId()); | ||
| 351 | + equipmentExceptionReportService.update(reportLambdaUpdateWrapper); | ||
| 352 | + } | ||
| 353 | + | ||
| 343 | return handleAjaxResult(signIn, signInV1); | 354 | return handleAjaxResult(signIn, signInV1); |
| 344 | } | 355 | } |
| 345 | 356 |
Bsth-admin/src/main/java/com/ruoyi/service/ThreadJobService.java
| @@ -205,6 +205,8 @@ public class ThreadJobService { | @@ -205,6 +205,8 @@ public class ThreadJobService { | ||
| 205 | exception.setCreateTime(signIn.getCreateTime()); | 205 | exception.setCreateTime(signIn.getCreateTime()); |
| 206 | exception.setFleetName(driver.getFleetName()); | 206 | exception.setFleetName(driver.getFleetName()); |
| 207 | exception.setSignId(signIn.getId()); | 207 | exception.setSignId(signIn.getId()); |
| 208 | + exception.setCreateTime(signIn.getCreateTime()); | ||
| 209 | + exception.setCreateBy(signIn.getCreateBy()); | ||
| 208 | if (Objects.nonNull(scheduling)) { | 210 | if (Objects.nonNull(scheduling)) { |
| 209 | exception.setNbbm(scheduling.getNbbm()); | 211 | exception.setNbbm(scheduling.getNbbm()); |
| 210 | exception.setLineName(scheduling.getLineName()); | 212 | exception.setLineName(scheduling.getLineName()); |
| @@ -217,10 +219,13 @@ public class ThreadJobService { | @@ -217,10 +219,13 @@ public class ThreadJobService { | ||
| 217 | BeanUtils.copyProperties(exception, exceptionReport); | 219 | BeanUtils.copyProperties(exception, exceptionReport); |
| 218 | exceptionReport.setSignId(signIn.getId()); | 220 | exceptionReport.setSignId(signIn.getId()); |
| 219 | exceptionReport.setSignIn(signIn.getSingnIn()); | 221 | exceptionReport.setSignIn(signIn.getSingnIn()); |
| 222 | + exceptionReport.setStatus(1); | ||
| 220 | equipmentExceptionReportService.save(exceptionReport); | 223 | equipmentExceptionReportService.save(exceptionReport); |
| 221 | 224 | ||
| 222 | - // 发送通知 | ||
| 223 | - sendNotice(signIn, driver, scheduling); | 225 | + if (Objects.isNull(signIn.getExceptionId())) { |
| 226 | + // 发送通知 | ||
| 227 | + sendNotice(signIn, driver, scheduling); | ||
| 228 | + } | ||
| 224 | } | 229 | } |
| 225 | } | 230 | } |
| 226 | 231 | ||
| @@ -369,9 +374,14 @@ public class ThreadJobService { | @@ -369,9 +374,14 @@ public class ThreadJobService { | ||
| 369 | 374 | ||
| 370 | String key = SignatureUtils.generateSignature(map, "your_secret_key_here"); | 375 | String key = SignatureUtils.generateSignature(map, "your_secret_key_here"); |
| 371 | map.put("signature", key); | 376 | map.put("signature", key); |
| 377 | + String result = null; | ||
| 378 | + try { | ||
| 379 | + result = HttpUtil.get(processSignExceptionURL, map, 10000); | ||
| 380 | + log.info("processSignExceptionURL:[{}],paramMap:[{}],result:[{}]", processSignExceptionURL, JSONUtil.toJsonStr(map), result); | ||
| 381 | + } catch (Exception e) { | ||
| 382 | + log.error("processSignExceptionURL:[{}],paramMap:[{}],result:[{}]", processSignExceptionURL, JSONUtil.toJsonStr(map), result, e); | ||
| 383 | + } | ||
| 372 | 384 | ||
| 373 | - String result = HttpUtil.get(processSignExceptionURL, map, 10000); | ||
| 374 | - log.info("processSignExceptionURL:[{}],paramMap:[{}],result:[{}]", processSignExceptionURL, JSONUtil.toJsonStr(map), result); | ||
| 375 | } | 385 | } |
| 376 | 386 | ||
| 377 | } | 387 | } |
Bsth-admin/src/main/resources/application-druid-devTest.yml
| @@ -215,5 +215,8 @@ bsth: | @@ -215,5 +215,8 @@ bsth: | ||
| 215 | # path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64 | 215 | # path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64 |
| 216 | faceFeature: | 216 | faceFeature: |
| 217 | url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system | 217 | url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system |
| 218 | + process: | ||
| 219 | + sign: | ||
| 220 | + url: http://127.0.0.1:9103/commonOpenDataApi/sendAppAndSmsNotice | ||
| 218 | skip: | 221 | skip: |
| 219 | url: /big/view/queryNumberByType;/big/view/queryLineInfo/*;/big/view/querySignDetails;/report/list/**;/system/dict/data/**;/app/version/check/**;/app/checkDeviceHeart;/app/download;"/driver/**;/in/**;/eexception/**;/equipment/**;/report/**;/login;/register;/captchaImage;/dss/Driver/Auth;/login/no/code;/uploadPath/**;/doc.html | 222 | url: /big/view/queryNumberByType;/big/view/queryLineInfo/*;/big/view/querySignDetails;/report/list/**;/system/dict/data/**;/app/version/check/**;/app/checkDeviceHeart;/app/download;"/driver/**;/in/**;/eexception/**;/equipment/**;/report/**;/login;/register;/captchaImage;/dss/Driver/Auth;/login/no/code;/uploadPath/**;/doc.html |
Bsth-admin/src/main/resources/mapper/in/SignInMapper.xml
| @@ -173,6 +173,7 @@ | @@ -173,6 +173,7 @@ | ||
| 173 | <if test="exType != null">ex_type,</if> | 173 | <if test="exType != null">ex_type,</if> |
| 174 | <if test="null!=schedulingId">scheduling_id,</if> | 174 | <if test="null!=schedulingId">scheduling_id,</if> |
| 175 | <if test="null!=exType1">ex_type1,</if> | 175 | <if test="null!=exType1">ex_type1,</if> |
| 176 | + <if test="null!=exceptionId">exception_Id,</if> | ||
| 176 | </trim> | 177 | </trim> |
| 177 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 178 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 178 | <if test="createTime != null">#{createTime},</if> | 179 | <if test="createTime != null">#{createTime},</if> |
| @@ -191,6 +192,7 @@ | @@ -191,6 +192,7 @@ | ||
| 191 | <if test="exType != null">#{exType},</if> | 192 | <if test="exType != null">#{exType},</if> |
| 192 | <if test="null!=schedulingId">#{schedulingId,jdbcType=INTEGER},</if> | 193 | <if test="null!=schedulingId">#{schedulingId,jdbcType=INTEGER},</if> |
| 193 | <if test="null!=exType1">#{exType1,jdbcType=INTEGER},</if> | 194 | <if test="null!=exType1">#{exType1,jdbcType=INTEGER},</if> |
| 195 | + <if test="null!=exceptionId">#{exceptionId},</if> | ||
| 194 | </trim> | 196 | </trim> |
| 195 | </insert> | 197 | </insert> |
| 196 | 198 |