Commit aba59a0df6d9abac2275dc8820ecf3632f37eacd

Authored by liujun001
1 parent 02e1576d

设备和场地

Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssDriverController.java
... ... @@ -355,7 +355,7 @@ public class DssDriverController extends BaseController {
355 355 SignIn signIn = new SignIn();
356 356 Boolean flag = Boolean.TRUE;
357 357 if (Objects.nonNull(dto.getCheckTime())) {
358   - signIn.setCreateTime(dto.getCheckTime());
  358 + signIn.setStartCreateTime(dto.getCheckTime());
359 359 flag = false;
360 360 }
361 361  
... ... @@ -527,6 +527,10 @@ public class DssDriverController extends BaseController {
527 527 GetBusPlanListVo vo = new GetBusPlanListVo();
528 528 vo.setDriverName(scheduling.getName());
529 529 vo.setSelfCode(scheduling.getNbbm());
  530 + vo.setStartStation(scheduling.getQdzname());
  531 +
  532 + String upDown = Objects.equals(0,scheduling.getUpdown())?"1":Objects.equals(1,scheduling.getUpdown())?"2":null;
  533 + vo.setUpDown(upDown);
530 534 if (CollectionUtils.isNotEmpty(carInfos)) {
531 535 Optional<CarInfo> optional = carInfos.stream().filter(c -> Objects.equals(c.getNbbm(), scheduling.getNbbm())).findFirst();
532 536 if (optional.isPresent()) {
... ... @@ -555,6 +559,7 @@ public class DssDriverController extends BaseController {
555 559 Optional<LinggangScheduling> optional = schedulings.stream().filter(sc -> Objects.equals(sc.getId(), s.getSchedulingId())).findFirst();
556 560 if (optional.isPresent()) {
557 561 vo.setRouteName(optional.get().getLineName());
  562 + vo.setYarnName(optional.get().getQdzname());
558 563 }
559 564 }
560 565  
... ... @@ -576,6 +581,17 @@ public class DssDriverController extends BaseController {
576 581 vo.setCheckResult(Convert.toStr(s.getStatus()));
577 582 vo.setDrunkNum(Convert.toStr(s.getAlcoholIntake()));
578 583  
  584 + switch (s.getExType()){
  585 + case 44:
  586 + vo.setDrunkStatus("11");
  587 + break;
  588 + case 3:
  589 + vo.setDrunkStatus("12");
  590 + break;
  591 + default:
  592 + vo.setDrunkStatus("0");
  593 + }
  594 +
579 595 return vo;
580 596 }).collect(Collectors.toList());
581 597 }
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/dss/driver/dto/GetBusPlanListDTO.java
... ... @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
8 8 import lombok.experimental.Accessors;
9 9  
10 10 import javax.validation.constraints.NotEmpty;
  11 +import javax.validation.constraints.NotNull;
11 12  
12 13 /**
13 14 * @author liujun
... ... @@ -27,17 +28,17 @@ public class GetBusPlanListDTO implements java.io.Serializable{
27 28  
28 29 @NotEmpty(message = "卡号不能为空")
29 30 @ApiModelProperty(value = "卡号",required = true)
30   - private Integer driverCode;
  31 + private String driverCode;
31 32  
32   - @NotEmpty(message = "数据类型为空")
  33 + @NotNull(message = "数据类型为空")
33 34 @ApiModelProperty(value = "数据类型;0今天,1明天,2/null全部",required = true,example = "1")
34 35 private Integer dateType;
35 36  
36   - @NotEmpty(message = "第几页为空")
  37 + @NotNull(message = "第几页为空")
37 38 @ApiModelProperty(value = "第几页",required = true,example = "1")
38 39 private Integer pageNumber;
39 40  
40   - @NotEmpty(message = "每页条数为空")
  41 + @NotNull(message = "每页条数为空")
41 42 @ApiModelProperty(value = "每页条数",required = true,example = "1")
42 43 private Integer pageRow;
43 44  
... ...
Bsth-admin/src/main/java/com/ruoyi/in/domain/SignIn.java
... ... @@ -10,6 +10,7 @@ import lombok.Data;
10 10 import javax.validation.constraints.NotBlank;
11 11 import javax.validation.constraints.NotNull;
12 12 import java.math.BigDecimal;
  13 +import java.util.Date;
13 14  
14 15 /**
15 16 * 签到对象 sign_in
... ... @@ -94,7 +95,6 @@ public class SignIn extends BaseEntity {
94 95 @ApiModelProperty("酒精摄入量 52.12")
95 96 private BigDecimal alcoholIntake;
96 97 @Excel(name = "异常类型",readConverterExp = "0=无异常,1=超时异常,2=无排班异常,3=酒精超标异常,44饮酒")
97   -
98 98 @ApiModelProperty("异常类型")
99 99 private Integer exType;
100 100  
... ... @@ -105,5 +105,11 @@ public class SignIn extends BaseEntity {
105 105 /***资源类型:1图片;2视频*/
106 106 @Excel(name = "资源类型:1图片;2视频")
107 107 private java.lang.Integer resourceType;
  108 +
  109 + @TableField(exist = false)
  110 + private Date startCreateTime;
  111 +
  112 + @TableField(exist = false)
  113 + private Date endCreateTime;
108 114 }
109 115  
... ...
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
... ... @@ -117,6 +117,14 @@ public class SignInServiceImpl extends ServiceImpl&lt;SignInMapper, SignIn&gt; impleme
117 117 if (CollectionUtils.isNotEmpty(jobCodes)) {
118 118 wrapper.in(SignIn::getJobCode, jobCodes);
119 119 }
  120 +
  121 + if(Objects.nonNull(signIn.getStartCreateTime()) && Objects.nonNull(signIn.getEndCreateTime())){
  122 + wrapper.between(SignIn::getCreateTime,signIn.getStartCreateTime(),signIn.getEndCreateTime());
  123 + }else if(Objects.nonNull(signIn.getStartCreateTime())){
  124 + wrapper.ge(SignIn::getCreateTime,signIn.getStartCreateTime());
  125 + }else if(Objects.nonNull(signIn.getEndCreateTime())){
  126 + wrapper.le(SignIn::getCreateTime,signIn.getEndCreateTime());
  127 + }
120 128 return list(wrapper);
121 129 }
122 130  
... ...
Bsth-admin/src/main/java/com/ruoyi/service/ThreadJobService.java
... ... @@ -2,6 +2,7 @@ package com.ruoyi.service;
2 2  
3 3  
4 4 import cn.hutool.core.collection.CollectionUtil;
  5 +import cn.hutool.core.convert.Convert;
5 6 import cn.hutool.http.HttpUtil;
6 7 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
7 8 import com.ruoyi.common.cache.NowSchedulingCache;
... ... @@ -523,6 +524,7 @@ public class ThreadJobService {
523 524 .map(item -> {
524 525 DriverScheduling scheduling = new DriverScheduling();
525 526 BeanUtils.copyProperties(item, scheduling, "id");
  527 + scheduling.setUpDown(Convert.toInt(item.getUpDown()));
526 528 return scheduling;
527 529 })
528 530 .sorted(Comparator.comparing(DriverScheduling::getFcsjT))
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/key/location/LinggangKeyWorkLocationServiceImpl.java
... ... @@ -411,7 +411,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl&lt;LinggangKeyW
411 411 Objects.equals(d.getDevice(), l.getDevice()) && DateUtils.isSameDay(d.getScheduleDate(), l.getScheduleDate())).findFirst();
412 412 if (optional.isPresent()) {
413 413 l.setId(optional.get().getId());
414   - if (Objects.equals(l.getEventType(), optional.get().getEventType())) {
  414 + if (Objects.equals(l.getType(), optional.get().getType())) {
415 415 locationList.add(l);
416 416 return null;
417 417 }
... ...