Commit db25de539876e9a7af3b16fc4221860eeabf7b2c
1 parent
1d5f2e04
司机健康信息和司机信息
Showing
18 changed files
with
1413 additions
and
3 deletions
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/DriverHealthy.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy; | ||
| 2 | + | ||
| 3 | +import lombok.Data; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 7 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import lombok.EqualsAndHashCode; | ||
| 10 | +import lombok.experimental.Accessors; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import com.ruoyi.common.annotation.Excel; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +@Slf4j | ||
| 16 | +@Accessors(chain = true) | ||
| 17 | +@EqualsAndHashCode(callSuper = false) | ||
| 18 | +@TableName("driver_healthy") | ||
| 19 | +public class DriverHealthy { | ||
| 20 | + /***ID*/ | ||
| 21 | + @TableId(value = "id", type = IdType.AUTO) | ||
| 22 | + @Excel(name = "ID") | ||
| 23 | + private Long id; | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + /***司机ID*/ | ||
| 27 | + @Excel(name = "司机ID") | ||
| 28 | + private String driverId; | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + /***血压舒张值*/ | ||
| 32 | + @Excel(name = "血压舒张值") | ||
| 33 | + private java.math.BigDecimal systolicPressure; | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + /***血压收缩值*/ | ||
| 37 | + @Excel(name = "血压收缩值") | ||
| 38 | + private java.math.BigDecimal diastolicPressure; | ||
| 39 | + | ||
| 40 | + | ||
| 41 | + /***血氧值*/ | ||
| 42 | + @Excel(name = "血氧值") | ||
| 43 | + private java.math.BigDecimal oxygenValue; | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + /***心率值*/ | ||
| 47 | + @Excel(name = "心率值") | ||
| 48 | + private java.math.BigDecimal heartRate; | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + /***创建人员*/ | ||
| 52 | + @Excel(name = "创建人员") | ||
| 53 | + private String createBy; | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + /***创建时间*/ | ||
| 57 | + @Excel(name = "创建时间") | ||
| 58 | + private java.util.Date createTime; | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + /***修改人员*/ | ||
| 62 | + @Excel(name = "修改人员") | ||
| 63 | + private String updateBy; | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + /***修改时间*/ | ||
| 67 | + @Excel(name = "修改时间") | ||
| 68 | + private java.util.Date updateTime; | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + /***是否删除;0是不删除;1是删除*/ | ||
| 72 | + @Excel(name = "是否删除;0是不删除;1是删除") | ||
| 73 | + private Boolean delFlag; | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + @Override | ||
| 77 | + public String toString() { | ||
| 78 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 79 | + } | ||
| 80 | +} | ||
| 0 | \ No newline at end of file | 81 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/dto/DriverHealthyAddDTO.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverHealthyAddDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 5335925L; | ||
| 15 | + | ||
| 16 | + /***ID*/ | ||
| 17 | + @ApiModelProperty(value = "ID", example = "1") | ||
| 18 | + private Long id; | ||
| 19 | + /***司机ID*/ | ||
| 20 | + @ApiModelProperty(value = "司机ID") | ||
| 21 | + private String driverId; | ||
| 22 | + /***血压舒张值*/ | ||
| 23 | + @ApiModelProperty(value = "血压舒张值") | ||
| 24 | + private java.math.BigDecimal systolicPressure; | ||
| 25 | + /***血压收缩值*/ | ||
| 26 | + @ApiModelProperty(value = "血压收缩值") | ||
| 27 | + private java.math.BigDecimal diastolicPressure; | ||
| 28 | + /***血氧值*/ | ||
| 29 | + @ApiModelProperty(value = "血氧值") | ||
| 30 | + private java.math.BigDecimal oxygenValue; | ||
| 31 | + /***心率值*/ | ||
| 32 | + @ApiModelProperty(value = "心率值") | ||
| 33 | + private java.math.BigDecimal heartRate; | ||
| 34 | + /***创建人员*/ | ||
| 35 | + @ApiModelProperty(value = "创建人员") | ||
| 36 | + private String createBy; | ||
| 37 | + /***创建时间*/ | ||
| 38 | + @ApiModelProperty(value = "创建时间") | ||
| 39 | + private java.util.Date createTime; | ||
| 40 | + /***修改人员*/ | ||
| 41 | + @ApiModelProperty(value = "修改人员") | ||
| 42 | + private String updateBy; | ||
| 43 | + /***修改时间*/ | ||
| 44 | + @ApiModelProperty(value = "修改时间") | ||
| 45 | + private java.util.Date updateTime; | ||
| 46 | + /***是否删除;0是不删除;1是删除*/ | ||
| 47 | + @ApiModelProperty(value = "是否删除;0是不删除;1是删除") | ||
| 48 | + private Boolean delFlag; | ||
| 49 | + /***操作人员*/ | ||
| 50 | + @ApiModelProperty(value = "操作人员") | ||
| 51 | + private String operator; | ||
| 52 | + | ||
| 53 | + public void clearStrEmpty() { | ||
| 54 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.driverId)) { | ||
| 55 | + this.driverId = null; | ||
| 56 | + } | ||
| 57 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.createBy)) { | ||
| 58 | + this.createBy = null; | ||
| 59 | + } | ||
| 60 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.updateBy)) { | ||
| 61 | + this.updateBy = null; | ||
| 62 | + } | ||
| 63 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) { | ||
| 64 | + this.operator = null; | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @Override | ||
| 69 | + public String toString() { | ||
| 70 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 71 | + } | ||
| 72 | +} | ||
| 0 | \ No newline at end of file | 73 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/dto/DriverHealthyQueryDTO.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverHealthyQueryDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 503675795L; | ||
| 15 | + | ||
| 16 | + /***ID*/ | ||
| 17 | + @ApiModelProperty(value = "ID", example = "1") | ||
| 18 | + private Long id; | ||
| 19 | + /***司机ID*/ | ||
| 20 | + @ApiModelProperty(value = "司机ID") | ||
| 21 | + private String driverId; | ||
| 22 | + /***血压舒张值*/ | ||
| 23 | + @ApiModelProperty(value = "血压舒张值") | ||
| 24 | + private java.math.BigDecimal systolicPressure; | ||
| 25 | + /***血压收缩值*/ | ||
| 26 | + @ApiModelProperty(value = "血压收缩值") | ||
| 27 | + private java.math.BigDecimal diastolicPressure; | ||
| 28 | + /***血氧值*/ | ||
| 29 | + @ApiModelProperty(value = "血氧值") | ||
| 30 | + private java.math.BigDecimal oxygenValue; | ||
| 31 | + /***心率值*/ | ||
| 32 | + @ApiModelProperty(value = "心率值") | ||
| 33 | + private java.math.BigDecimal heartRate; | ||
| 34 | + /***创建人员*/ | ||
| 35 | + @ApiModelProperty(value = "创建人员") | ||
| 36 | + private String createBy; | ||
| 37 | + /***创建时间*/ | ||
| 38 | + @ApiModelProperty(value = "创建时间") | ||
| 39 | + private java.util.Date createTime; | ||
| 40 | + /***修改人员*/ | ||
| 41 | + @ApiModelProperty(value = "修改人员") | ||
| 42 | + private String updateBy; | ||
| 43 | + /***修改时间*/ | ||
| 44 | + @ApiModelProperty(value = "修改时间") | ||
| 45 | + private java.util.Date updateTime; | ||
| 46 | + /***是否删除;0是不删除;1是删除*/ | ||
| 47 | + @ApiModelProperty(value = "是否删除;0是不删除;1是删除") | ||
| 48 | + private Boolean delFlag; | ||
| 49 | + | ||
| 50 | + public void clearStrEmpty() { | ||
| 51 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.driverId)) { | ||
| 52 | + this.driverId = null; | ||
| 53 | + } | ||
| 54 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.createBy)) { | ||
| 55 | + this.createBy = null; | ||
| 56 | + } | ||
| 57 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.updateBy)) { | ||
| 58 | + this.updateBy = null; | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @Override | ||
| 63 | + public String toString() { | ||
| 64 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 65 | + } | ||
| 66 | +} | ||
| 0 | \ No newline at end of file | 67 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/dto/DriverHealthyUpdateDTO.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverHealthyUpdateDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 81252070L; | ||
| 15 | + | ||
| 16 | + /***ID*/ | ||
| 17 | + @ApiModelProperty(value = "ID", example = "1") | ||
| 18 | + private Long id; | ||
| 19 | + /***司机ID*/ | ||
| 20 | + @ApiModelProperty(value = "司机ID") | ||
| 21 | + private String driverId; | ||
| 22 | + /***血压舒张值*/ | ||
| 23 | + @ApiModelProperty(value = "血压舒张值") | ||
| 24 | + private java.math.BigDecimal systolicPressure; | ||
| 25 | + /***血压收缩值*/ | ||
| 26 | + @ApiModelProperty(value = "血压收缩值") | ||
| 27 | + private java.math.BigDecimal diastolicPressure; | ||
| 28 | + /***血氧值*/ | ||
| 29 | + @ApiModelProperty(value = "血氧值") | ||
| 30 | + private java.math.BigDecimal oxygenValue; | ||
| 31 | + /***心率值*/ | ||
| 32 | + @ApiModelProperty(value = "心率值") | ||
| 33 | + private java.math.BigDecimal heartRate; | ||
| 34 | + /***创建人员*/ | ||
| 35 | + @ApiModelProperty(value = "创建人员") | ||
| 36 | + private String createBy; | ||
| 37 | + /***创建时间*/ | ||
| 38 | + @ApiModelProperty(value = "创建时间") | ||
| 39 | + private java.util.Date createTime; | ||
| 40 | + /***修改人员*/ | ||
| 41 | + @ApiModelProperty(value = "修改人员") | ||
| 42 | + private String updateBy; | ||
| 43 | + /***修改时间*/ | ||
| 44 | + @ApiModelProperty(value = "修改时间") | ||
| 45 | + private java.util.Date updateTime; | ||
| 46 | + /***是否删除;0是不删除;1是删除*/ | ||
| 47 | + @ApiModelProperty(value = "是否删除;0是不删除;1是删除") | ||
| 48 | + private Boolean delFlag; | ||
| 49 | + /***操作人员*/ | ||
| 50 | + @ApiModelProperty(value = "操作人员") | ||
| 51 | + private String operator; | ||
| 52 | + | ||
| 53 | + public void clearStrEmpty() { | ||
| 54 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.driverId)) { | ||
| 55 | + this.driverId = null; | ||
| 56 | + } | ||
| 57 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.createBy)) { | ||
| 58 | + this.createBy = null; | ||
| 59 | + } | ||
| 60 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.updateBy)) { | ||
| 61 | + this.updateBy = null; | ||
| 62 | + } | ||
| 63 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) { | ||
| 64 | + this.operator = null; | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @Override | ||
| 69 | + public String toString() { | ||
| 70 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 71 | + } | ||
| 72 | +} | ||
| 0 | \ No newline at end of file | 73 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/dto/DriverHealthyUpdateStatusDTO.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverHealthyUpdateStatusDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 883002306L; | ||
| 15 | + | ||
| 16 | + /***ID*/ | ||
| 17 | + @ApiModelProperty(value = "ID", example = "1") | ||
| 18 | + private Long id; | ||
| 19 | + /***司机ID*/ | ||
| 20 | + @ApiModelProperty(value = "司机ID") | ||
| 21 | + private String driverId; | ||
| 22 | + /***血压舒张值*/ | ||
| 23 | + @ApiModelProperty(value = "血压舒张值") | ||
| 24 | + private java.math.BigDecimal systolicPressure; | ||
| 25 | + /***血压收缩值*/ | ||
| 26 | + @ApiModelProperty(value = "血压收缩值") | ||
| 27 | + private java.math.BigDecimal diastolicPressure; | ||
| 28 | + /***血氧值*/ | ||
| 29 | + @ApiModelProperty(value = "血氧值") | ||
| 30 | + private java.math.BigDecimal oxygenValue; | ||
| 31 | + /***心率值*/ | ||
| 32 | + @ApiModelProperty(value = "心率值") | ||
| 33 | + private java.math.BigDecimal heartRate; | ||
| 34 | + /***创建人员*/ | ||
| 35 | + @ApiModelProperty(value = "创建人员") | ||
| 36 | + private String createBy; | ||
| 37 | + /***创建时间*/ | ||
| 38 | + @ApiModelProperty(value = "创建时间") | ||
| 39 | + private java.util.Date createTime; | ||
| 40 | + /***修改人员*/ | ||
| 41 | + @ApiModelProperty(value = "修改人员") | ||
| 42 | + private String updateBy; | ||
| 43 | + /***修改时间*/ | ||
| 44 | + @ApiModelProperty(value = "修改时间") | ||
| 45 | + private java.util.Date updateTime; | ||
| 46 | + /***是否删除;0是不删除;1是删除*/ | ||
| 47 | + @ApiModelProperty(value = "是否删除;0是不删除;1是删除") | ||
| 48 | + private Boolean delFlag; | ||
| 49 | + /***操作人员*/ | ||
| 50 | + @ApiModelProperty(value = "操作人员") | ||
| 51 | + private String operator; | ||
| 52 | + | ||
| 53 | + public void clearStrEmpty() { | ||
| 54 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.driverId)) { | ||
| 55 | + this.driverId = null; | ||
| 56 | + } | ||
| 57 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.createBy)) { | ||
| 58 | + this.createBy = null; | ||
| 59 | + } | ||
| 60 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.updateBy)) { | ||
| 61 | + this.updateBy = null; | ||
| 62 | + } | ||
| 63 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) { | ||
| 64 | + this.operator = null; | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @Override | ||
| 69 | + public String toString() { | ||
| 70 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 71 | + } | ||
| 72 | +} | ||
| 0 | \ No newline at end of file | 73 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/healthy/vo/DriverHealthyVO.java
0 → 100644
| 1 | +package com.ruoyi.domain.driver.healthy.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | + | ||
| 6 | +import lombok.Data; | ||
| 7 | +import lombok.EqualsAndHashCode; | ||
| 8 | +import lombok.experimental.Accessors; | ||
| 9 | + | ||
| 10 | +@Data | ||
| 11 | +@ApiModel | ||
| 12 | +@Accessors(chain = true) | ||
| 13 | +@EqualsAndHashCode(callSuper = false) | ||
| 14 | +public class DriverHealthyVO implements java.io.Serializable { | ||
| 15 | + private static final long serialVersionUID = 552797222L; | ||
| 16 | + | ||
| 17 | + /***ID*/ | ||
| 18 | + @ApiModelProperty(value = "ID", example = "1") | ||
| 19 | + private Long id; | ||
| 20 | + /***司机ID*/ | ||
| 21 | + @ApiModelProperty(value = "司机ID") | ||
| 22 | + private String driverId; | ||
| 23 | + @ApiModelProperty(value = "司机名称") | ||
| 24 | + private String driverName; | ||
| 25 | + /***血压舒张值*/ | ||
| 26 | + @ApiModelProperty(value = "血压舒张值") | ||
| 27 | + private java.math.BigDecimal systolicPressure; | ||
| 28 | + /***血压收缩值*/ | ||
| 29 | + @ApiModelProperty(value = "血压收缩值") | ||
| 30 | + private java.math.BigDecimal diastolicPressure; | ||
| 31 | + /***血氧值*/ | ||
| 32 | + @ApiModelProperty(value = "血氧值") | ||
| 33 | + private java.math.BigDecimal oxygenValue; | ||
| 34 | + /***心率值*/ | ||
| 35 | + @ApiModelProperty(value = "心率值") | ||
| 36 | + private java.math.BigDecimal heartRate; | ||
| 37 | + /***创建人员*/ | ||
| 38 | + @ApiModelProperty(value = "创建人员") | ||
| 39 | + private String createBy; | ||
| 40 | + /***创建时间*/ | ||
| 41 | + @ApiModelProperty(value = "创建时间") | ||
| 42 | + private java.util.Date createTime; | ||
| 43 | + /***修改人员*/ | ||
| 44 | + @ApiModelProperty(value = "修改人员") | ||
| 45 | + private String updateBy; | ||
| 46 | + /***修改时间*/ | ||
| 47 | + @ApiModelProperty(value = "修改时间") | ||
| 48 | + private java.util.Date updateTime; | ||
| 49 | + /***是否删除;0是不删除;1是删除*/ | ||
| 50 | + @ApiModelProperty(value = "是否删除;0是不删除;1是删除") | ||
| 51 | + private Boolean delFlag; | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public String toString() { | ||
| 56 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 57 | + } | ||
| 58 | +} | ||
| 0 | \ No newline at end of file | 59 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/driver/controller/DriverController.java
| @@ -4,8 +4,13 @@ import java.util.List; | @@ -4,8 +4,13 @@ import java.util.List; | ||
| 4 | import javax.servlet.http.HttpServletRequest; | 4 | import javax.servlet.http.HttpServletRequest; |
| 5 | import javax.servlet.http.HttpServletResponse; | 5 | import javax.servlet.http.HttpServletResponse; |
| 6 | 6 | ||
| 7 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 7 | import com.ruoyi.common.global.Result; | 8 | import com.ruoyi.common.global.Result; |
| 8 | import com.ruoyi.common.global.ResultCode; | 9 | import com.ruoyi.common.global.ResultCode; |
| 10 | +import com.ruoyi.driver.domain.dto.DriverAddDTO; | ||
| 11 | +import com.ruoyi.driver.domain.dto.DriverQueryDTO; | ||
| 12 | +import com.ruoyi.driver.domain.dto.DriverUpdateDTO; | ||
| 13 | +import com.ruoyi.driver.domain.vo.DriverVO; | ||
| 9 | import com.ruoyi.pojo.request.DriverRequestVo; | 14 | import com.ruoyi.pojo.request.DriverRequestVo; |
| 10 | import com.ruoyi.pojo.request.DriverSignInRequestVo; | 15 | import com.ruoyi.pojo.request.DriverSignInRequestVo; |
| 11 | import com.ruoyi.pojo.request.FaceRegistrationFeedbackVo; | 16 | import com.ruoyi.pojo.request.FaceRegistrationFeedbackVo; |
| @@ -14,6 +19,7 @@ import com.ruoyi.pojo.response.DriverResponseVo; | @@ -14,6 +19,7 @@ import com.ruoyi.pojo.response.DriverResponseVo; | ||
| 14 | import io.swagger.annotations.Api; | 19 | import io.swagger.annotations.Api; |
| 15 | import io.swagger.annotations.ApiOperation; | 20 | import io.swagger.annotations.ApiOperation; |
| 16 | import io.swagger.annotations.ApiParam; | 21 | import io.swagger.annotations.ApiParam; |
| 22 | +import org.springframework.beans.BeanUtils; | ||
| 17 | import org.springframework.beans.factory.annotation.Autowired; | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | import org.springframework.validation.annotation.Validated; | 24 | import org.springframework.validation.annotation.Validated; |
| 19 | import org.springframework.web.bind.annotation.*; | 25 | import org.springframework.web.bind.annotation.*; |
| @@ -71,6 +77,14 @@ public class DriverController extends BaseController { | @@ -71,6 +77,14 @@ public class DriverController extends BaseController { | ||
| 71 | return getDataTable(list); | 77 | return getDataTable(list); |
| 72 | } | 78 | } |
| 73 | 79 | ||
| 80 | + @PostMapping(value = "list/select") | ||
| 81 | + @ApiOperation("(页面选择)") | ||
| 82 | + public AjaxResult listSelect(DriverQueryDTO request) { | ||
| 83 | + Driver driver = convert(request); | ||
| 84 | + List<Driver> drivers = driverService.selectDriverIdJobCodePersonnelName(driver); | ||
| 85 | + return AjaxResult.success(convert(drivers)); | ||
| 86 | + } | ||
| 87 | + | ||
| 74 | /** | 88 | /** |
| 75 | * 获取驾驶员信息列表 | 89 | * 获取驾驶员信息列表 |
| 76 | * | 90 | * |
| @@ -221,4 +235,57 @@ public class DriverController extends BaseController { | @@ -221,4 +235,57 @@ public class DriverController extends BaseController { | ||
| 221 | return driverService.allUpdateDriverInfo(request); | 235 | return driverService.allUpdateDriverInfo(request); |
| 222 | } | 236 | } |
| 223 | 237 | ||
| 238 | + | ||
| 239 | + private Driver convert(DriverQueryDTO source) { | ||
| 240 | + return java.util.Optional.ofNullable(source).map(sc -> { | ||
| 241 | + Driver target = new Driver(); | ||
| 242 | + BeanUtils.copyProperties(sc, target); | ||
| 243 | + return target; | ||
| 244 | + }).orElse(null); | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + private Driver convert(DriverUpdateDTO source) { | ||
| 248 | + return java.util.Optional.ofNullable(source).map(sc -> { | ||
| 249 | + Driver target = new Driver(); | ||
| 250 | + BeanUtils.copyProperties(sc, target); | ||
| 251 | + return target; | ||
| 252 | + }).orElse(null); | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + | ||
| 256 | + private Driver convert(DriverAddDTO source) { | ||
| 257 | + return java.util.Optional.ofNullable(source).map(sc -> { | ||
| 258 | + Driver target = new Driver(); | ||
| 259 | + BeanUtils.copyProperties(sc, target); | ||
| 260 | + return target; | ||
| 261 | + }).orElseGet(null); | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + private DriverVO convert(Driver source) { | ||
| 265 | + return java.util.Optional.ofNullable(source).map(sc -> { | ||
| 266 | + DriverVO target = new DriverVO(); | ||
| 267 | + BeanUtils.copyProperties(source, target); | ||
| 268 | + return target; | ||
| 269 | + }).orElseGet(null); | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + private List<DriverVO> convert(List<Driver> sources) { | ||
| 273 | + return java.util.Optional.ofNullable(sources).map(scs -> { | ||
| 274 | + return scs.stream().map(source -> { | ||
| 275 | + return convert(source); | ||
| 276 | + }).collect(java.util.stream.Collectors.toList()); | ||
| 277 | + }).orElseGet(null); | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + private IPage<DriverVO> convert(IPage<Driver> sources) { | ||
| 281 | + return java.util.Optional.ofNullable(sources).map(scs -> { | ||
| 282 | + IPage<DriverVO> target = new com.baomidou.mybatisplus.extension.plugins.pagination.Page(); | ||
| 283 | + BeanUtils.copyProperties(scs, target); | ||
| 284 | + List<DriverVO> voNames = convert(scs.getRecords()); | ||
| 285 | + target.setRecords(voNames); | ||
| 286 | + | ||
| 287 | + return target; | ||
| 288 | + }).orElseGet(null); | ||
| 289 | + } | ||
| 290 | + | ||
| 224 | } | 291 | } |
Bsth-admin/src/main/java/com/ruoyi/driver/domain/dto/DriverAddDTO.java
0 → 100644
| 1 | +package com.ruoyi.driver.domain.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverAddDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 758191821L; | ||
| 15 | + | ||
| 16 | + /***主键*/ | ||
| 17 | + @ApiModelProperty(value = "主键", example = "1") | ||
| 18 | + private Integer id; | ||
| 19 | + /***工号*/ | ||
| 20 | + @ApiModelProperty(value = "工号") | ||
| 21 | + private String jobCode; | ||
| 22 | + /***公司编码*/ | ||
| 23 | + @ApiModelProperty(value = "公司编码") | ||
| 24 | + private String companyCode; | ||
| 25 | + /***分公司编码*/ | ||
| 26 | + @ApiModelProperty(value = "分公司编码") | ||
| 27 | + private String brancheCompanyCode; | ||
| 28 | + /***姓名*/ | ||
| 29 | + @ApiModelProperty(value = "姓名") | ||
| 30 | + private String personnelName; | ||
| 31 | + /***运营服务证书号*/ | ||
| 32 | + @ApiModelProperty(value = "运营服务证书号") | ||
| 33 | + private String papersCode; | ||
| 34 | + /***一卡通工作卡号*/ | ||
| 35 | + @ApiModelProperty(value = "一卡通工作卡号") | ||
| 36 | + private String icCardCode; | ||
| 37 | + /***性别*/ | ||
| 38 | + @ApiModelProperty(value = "性别") | ||
| 39 | + private String personnelType; | ||
| 40 | + /***所属岗位/工种*/ | ||
| 41 | + @ApiModelProperty(value = "所属岗位/工种") | ||
| 42 | + private String posts; | ||
| 43 | + /***身份证*/ | ||
| 44 | + @ApiModelProperty(value = "身份证") | ||
| 45 | + private String card; | ||
| 46 | + /***联系电话*/ | ||
| 47 | + @ApiModelProperty(value = "联系电话") | ||
| 48 | + private String telphone; | ||
| 49 | + /***RFID 人卡IC号*/ | ||
| 50 | + @ApiModelProperty(value = "RFID 人卡IC号") | ||
| 51 | + private String icRfid; | ||
| 52 | + /***RFID 人卡ID号(10进制)*/ | ||
| 53 | + @ApiModelProperty(value = "RFID 人卡ID号(10进制)") | ||
| 54 | + private String idRfid; | ||
| 55 | + /***RFID 标签号*/ | ||
| 56 | + @ApiModelProperty(value = "RFID 标签号") | ||
| 57 | + private String tagRfid; | ||
| 58 | + /***备注*/ | ||
| 59 | + @ApiModelProperty(value = "备注") | ||
| 60 | + private String remark; | ||
| 61 | + /***线路名称*/ | ||
| 62 | + @ApiModelProperty(value = "线路名称") | ||
| 63 | + private String lineName; | ||
| 64 | + /***线路编码*/ | ||
| 65 | + @ApiModelProperty(value = "线路编码") | ||
| 66 | + private String lineCode; | ||
| 67 | + /***是否进行人脸注册 1 注册 2 未注册*/ | ||
| 68 | + @ApiModelProperty(value = "是否进行人脸注册 1 注册 2 未注册", example = "1") | ||
| 69 | + private Integer faceSignIn; | ||
| 70 | + /***头像*/ | ||
| 71 | + @ApiModelProperty(value = "头像") | ||
| 72 | + private String image; | ||
| 73 | + /***更新日期*/ | ||
| 74 | + @ApiModelProperty(value = "更新日期") | ||
| 75 | + private java.util.Date updateTime; | ||
| 76 | + /***注册设备列表*/ | ||
| 77 | + @ApiModelProperty(value = "注册设备列表") | ||
| 78 | + private String signInEquipment; | ||
| 79 | + /***车队名称*/ | ||
| 80 | + @ApiModelProperty(value = "车队名称") | ||
| 81 | + private String fleetName; | ||
| 82 | + /***操作人员*/ | ||
| 83 | + @ApiModelProperty(value = "操作人员") | ||
| 84 | + private String operator; | ||
| 85 | + | ||
| 86 | + public void clearStrEmpty() { | ||
| 87 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) { | ||
| 88 | + this.jobCode = null; | ||
| 89 | + } | ||
| 90 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.companyCode)) { | ||
| 91 | + this.companyCode = null; | ||
| 92 | + } | ||
| 93 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.brancheCompanyCode)) { | ||
| 94 | + this.brancheCompanyCode = null; | ||
| 95 | + } | ||
| 96 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelName)) { | ||
| 97 | + this.personnelName = null; | ||
| 98 | + } | ||
| 99 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.papersCode)) { | ||
| 100 | + this.papersCode = null; | ||
| 101 | + } | ||
| 102 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icCardCode)) { | ||
| 103 | + this.icCardCode = null; | ||
| 104 | + } | ||
| 105 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelType)) { | ||
| 106 | + this.personnelType = null; | ||
| 107 | + } | ||
| 108 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.posts)) { | ||
| 109 | + this.posts = null; | ||
| 110 | + } | ||
| 111 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.card)) { | ||
| 112 | + this.card = null; | ||
| 113 | + } | ||
| 114 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.telphone)) { | ||
| 115 | + this.telphone = null; | ||
| 116 | + } | ||
| 117 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icRfid)) { | ||
| 118 | + this.icRfid = null; | ||
| 119 | + } | ||
| 120 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.idRfid)) { | ||
| 121 | + this.idRfid = null; | ||
| 122 | + } | ||
| 123 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.tagRfid)) { | ||
| 124 | + this.tagRfid = null; | ||
| 125 | + } | ||
| 126 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) { | ||
| 127 | + this.remark = null; | ||
| 128 | + } | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) { | ||
| 130 | + this.lineName = null; | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineCode)) { | ||
| 133 | + this.lineCode = null; | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) { | ||
| 136 | + this.image = null; | ||
| 137 | + } | ||
| 138 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.signInEquipment)) { | ||
| 139 | + this.signInEquipment = null; | ||
| 140 | + } | ||
| 141 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) { | ||
| 142 | + this.fleetName = null; | ||
| 143 | + } | ||
| 144 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) { | ||
| 145 | + this.operator = null; | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + @Override | ||
| 150 | + public String toString() { | ||
| 151 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 152 | + } | ||
| 153 | +} | ||
| 0 | \ No newline at end of file | 154 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/driver/domain/dto/DriverQueryDTO.java
0 → 100644
| 1 | +package com.ruoyi.driver.domain.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverQueryDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 385279274L; | ||
| 15 | + | ||
| 16 | + /***主键*/ | ||
| 17 | + @ApiModelProperty(value = "主键", example = "1") | ||
| 18 | + private Integer id; | ||
| 19 | + /***工号*/ | ||
| 20 | + @ApiModelProperty(value = "工号") | ||
| 21 | + private String jobCode; | ||
| 22 | + /***公司编码*/ | ||
| 23 | + @ApiModelProperty(value = "公司编码") | ||
| 24 | + private String companyCode; | ||
| 25 | + /***分公司编码*/ | ||
| 26 | + @ApiModelProperty(value = "分公司编码") | ||
| 27 | + private String brancheCompanyCode; | ||
| 28 | + /***姓名*/ | ||
| 29 | + @ApiModelProperty(value = "姓名") | ||
| 30 | + private String personnelName; | ||
| 31 | + /***运营服务证书号*/ | ||
| 32 | + @ApiModelProperty(value = "运营服务证书号") | ||
| 33 | + private String papersCode; | ||
| 34 | + /***一卡通工作卡号*/ | ||
| 35 | + @ApiModelProperty(value = "一卡通工作卡号") | ||
| 36 | + private String icCardCode; | ||
| 37 | + /***性别*/ | ||
| 38 | + @ApiModelProperty(value = "性别") | ||
| 39 | + private String personnelType; | ||
| 40 | + /***所属岗位/工种*/ | ||
| 41 | + @ApiModelProperty(value = "所属岗位/工种") | ||
| 42 | + private String posts; | ||
| 43 | + /***身份证*/ | ||
| 44 | + @ApiModelProperty(value = "身份证") | ||
| 45 | + private String card; | ||
| 46 | + /***联系电话*/ | ||
| 47 | + @ApiModelProperty(value = "联系电话") | ||
| 48 | + private String telphone; | ||
| 49 | + /***RFID 人卡IC号*/ | ||
| 50 | + @ApiModelProperty(value = "RFID 人卡IC号") | ||
| 51 | + private String icRfid; | ||
| 52 | + /***RFID 人卡ID号(10进制)*/ | ||
| 53 | + @ApiModelProperty(value = "RFID 人卡ID号(10进制)") | ||
| 54 | + private String idRfid; | ||
| 55 | + /***RFID 标签号*/ | ||
| 56 | + @ApiModelProperty(value = "RFID 标签号") | ||
| 57 | + private String tagRfid; | ||
| 58 | + /***备注*/ | ||
| 59 | + @ApiModelProperty(value = "备注") | ||
| 60 | + private String remark; | ||
| 61 | + /***线路名称*/ | ||
| 62 | + @ApiModelProperty(value = "线路名称") | ||
| 63 | + private String lineName; | ||
| 64 | + /***线路编码*/ | ||
| 65 | + @ApiModelProperty(value = "线路编码") | ||
| 66 | + private String lineCode; | ||
| 67 | + /***是否进行人脸注册 1 注册 2 未注册*/ | ||
| 68 | + @ApiModelProperty(value = "是否进行人脸注册 1 注册 2 未注册", example = "1") | ||
| 69 | + private Integer faceSignIn; | ||
| 70 | + /***头像*/ | ||
| 71 | + @ApiModelProperty(value = "头像") | ||
| 72 | + private String image; | ||
| 73 | + /***更新日期*/ | ||
| 74 | + @ApiModelProperty(value = "更新日期") | ||
| 75 | + private java.util.Date updateTime; | ||
| 76 | + /***注册设备列表*/ | ||
| 77 | + @ApiModelProperty(value = "注册设备列表") | ||
| 78 | + private String signInEquipment; | ||
| 79 | + /***车队名称*/ | ||
| 80 | + @ApiModelProperty(value = "车队名称") | ||
| 81 | + private String fleetName; | ||
| 82 | + | ||
| 83 | + public void clearStrEmpty() { | ||
| 84 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) { | ||
| 85 | + this.jobCode = null; | ||
| 86 | + } | ||
| 87 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.companyCode)) { | ||
| 88 | + this.companyCode = null; | ||
| 89 | + } | ||
| 90 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.brancheCompanyCode)) { | ||
| 91 | + this.brancheCompanyCode = null; | ||
| 92 | + } | ||
| 93 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelName)) { | ||
| 94 | + this.personnelName = null; | ||
| 95 | + } | ||
| 96 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.papersCode)) { | ||
| 97 | + this.papersCode = null; | ||
| 98 | + } | ||
| 99 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icCardCode)) { | ||
| 100 | + this.icCardCode = null; | ||
| 101 | + } | ||
| 102 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelType)) { | ||
| 103 | + this.personnelType = null; | ||
| 104 | + } | ||
| 105 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.posts)) { | ||
| 106 | + this.posts = null; | ||
| 107 | + } | ||
| 108 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.card)) { | ||
| 109 | + this.card = null; | ||
| 110 | + } | ||
| 111 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.telphone)) { | ||
| 112 | + this.telphone = null; | ||
| 113 | + } | ||
| 114 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icRfid)) { | ||
| 115 | + this.icRfid = null; | ||
| 116 | + } | ||
| 117 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.idRfid)) { | ||
| 118 | + this.idRfid = null; | ||
| 119 | + } | ||
| 120 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.tagRfid)) { | ||
| 121 | + this.tagRfid = null; | ||
| 122 | + } | ||
| 123 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) { | ||
| 124 | + this.remark = null; | ||
| 125 | + } | ||
| 126 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) { | ||
| 127 | + this.lineName = null; | ||
| 128 | + } | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineCode)) { | ||
| 130 | + this.lineCode = null; | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) { | ||
| 133 | + this.image = null; | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.signInEquipment)) { | ||
| 136 | + this.signInEquipment = null; | ||
| 137 | + } | ||
| 138 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) { | ||
| 139 | + this.fleetName = null; | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + @Override | ||
| 144 | + public String toString() { | ||
| 145 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 146 | + } | ||
| 147 | +} | ||
| 0 | \ No newline at end of file | 148 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/driver/domain/dto/DriverUpdateDTO.java
0 → 100644
| 1 | +package com.ruoyi.driver.domain.dto; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import lombok.Data; | ||
| 6 | +import lombok.EqualsAndHashCode; | ||
| 7 | +import lombok.experimental.Accessors; | ||
| 8 | + | ||
| 9 | +@Data | ||
| 10 | +@ApiModel | ||
| 11 | +@Accessors(chain = true) | ||
| 12 | +@EqualsAndHashCode(callSuper = false) | ||
| 13 | +public class DriverUpdateDTO implements java.io.Serializable { | ||
| 14 | + private static final long serialVersionUID = 793137831L; | ||
| 15 | + | ||
| 16 | + /***主键*/ | ||
| 17 | + @ApiModelProperty(value = "主键", example = "1") | ||
| 18 | + private Integer id; | ||
| 19 | + /***工号*/ | ||
| 20 | + @ApiModelProperty(value = "工号") | ||
| 21 | + private String jobCode; | ||
| 22 | + /***公司编码*/ | ||
| 23 | + @ApiModelProperty(value = "公司编码") | ||
| 24 | + private String companyCode; | ||
| 25 | + /***分公司编码*/ | ||
| 26 | + @ApiModelProperty(value = "分公司编码") | ||
| 27 | + private String brancheCompanyCode; | ||
| 28 | + /***姓名*/ | ||
| 29 | + @ApiModelProperty(value = "姓名") | ||
| 30 | + private String personnelName; | ||
| 31 | + /***运营服务证书号*/ | ||
| 32 | + @ApiModelProperty(value = "运营服务证书号") | ||
| 33 | + private String papersCode; | ||
| 34 | + /***一卡通工作卡号*/ | ||
| 35 | + @ApiModelProperty(value = "一卡通工作卡号") | ||
| 36 | + private String icCardCode; | ||
| 37 | + /***性别*/ | ||
| 38 | + @ApiModelProperty(value = "性别") | ||
| 39 | + private String personnelType; | ||
| 40 | + /***所属岗位/工种*/ | ||
| 41 | + @ApiModelProperty(value = "所属岗位/工种") | ||
| 42 | + private String posts; | ||
| 43 | + /***身份证*/ | ||
| 44 | + @ApiModelProperty(value = "身份证") | ||
| 45 | + private String card; | ||
| 46 | + /***联系电话*/ | ||
| 47 | + @ApiModelProperty(value = "联系电话") | ||
| 48 | + private String telphone; | ||
| 49 | + /***RFID 人卡IC号*/ | ||
| 50 | + @ApiModelProperty(value = "RFID 人卡IC号") | ||
| 51 | + private String icRfid; | ||
| 52 | + /***RFID 人卡ID号(10进制)*/ | ||
| 53 | + @ApiModelProperty(value = "RFID 人卡ID号(10进制)") | ||
| 54 | + private String idRfid; | ||
| 55 | + /***RFID 标签号*/ | ||
| 56 | + @ApiModelProperty(value = "RFID 标签号") | ||
| 57 | + private String tagRfid; | ||
| 58 | + /***备注*/ | ||
| 59 | + @ApiModelProperty(value = "备注") | ||
| 60 | + private String remark; | ||
| 61 | + /***线路名称*/ | ||
| 62 | + @ApiModelProperty(value = "线路名称") | ||
| 63 | + private String lineName; | ||
| 64 | + /***线路编码*/ | ||
| 65 | + @ApiModelProperty(value = "线路编码") | ||
| 66 | + private String lineCode; | ||
| 67 | + /***是否进行人脸注册 1 注册 2 未注册*/ | ||
| 68 | + @ApiModelProperty(value = "是否进行人脸注册 1 注册 2 未注册", example = "1") | ||
| 69 | + private Integer faceSignIn; | ||
| 70 | + /***头像*/ | ||
| 71 | + @ApiModelProperty(value = "头像") | ||
| 72 | + private String image; | ||
| 73 | + /***更新日期*/ | ||
| 74 | + @ApiModelProperty(value = "更新日期") | ||
| 75 | + private java.util.Date updateTime; | ||
| 76 | + /***注册设备列表*/ | ||
| 77 | + @ApiModelProperty(value = "注册设备列表") | ||
| 78 | + private String signInEquipment; | ||
| 79 | + /***车队名称*/ | ||
| 80 | + @ApiModelProperty(value = "车队名称") | ||
| 81 | + private String fleetName; | ||
| 82 | + /***操作人员*/ | ||
| 83 | + @ApiModelProperty(value = "操作人员") | ||
| 84 | + private String operator; | ||
| 85 | + | ||
| 86 | + public void clearStrEmpty() { | ||
| 87 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) { | ||
| 88 | + this.jobCode = null; | ||
| 89 | + } | ||
| 90 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.companyCode)) { | ||
| 91 | + this.companyCode = null; | ||
| 92 | + } | ||
| 93 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.brancheCompanyCode)) { | ||
| 94 | + this.brancheCompanyCode = null; | ||
| 95 | + } | ||
| 96 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelName)) { | ||
| 97 | + this.personnelName = null; | ||
| 98 | + } | ||
| 99 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.papersCode)) { | ||
| 100 | + this.papersCode = null; | ||
| 101 | + } | ||
| 102 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icCardCode)) { | ||
| 103 | + this.icCardCode = null; | ||
| 104 | + } | ||
| 105 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.personnelType)) { | ||
| 106 | + this.personnelType = null; | ||
| 107 | + } | ||
| 108 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.posts)) { | ||
| 109 | + this.posts = null; | ||
| 110 | + } | ||
| 111 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.card)) { | ||
| 112 | + this.card = null; | ||
| 113 | + } | ||
| 114 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.telphone)) { | ||
| 115 | + this.telphone = null; | ||
| 116 | + } | ||
| 117 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.icRfid)) { | ||
| 118 | + this.icRfid = null; | ||
| 119 | + } | ||
| 120 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.idRfid)) { | ||
| 121 | + this.idRfid = null; | ||
| 122 | + } | ||
| 123 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.tagRfid)) { | ||
| 124 | + this.tagRfid = null; | ||
| 125 | + } | ||
| 126 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) { | ||
| 127 | + this.remark = null; | ||
| 128 | + } | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) { | ||
| 130 | + this.lineName = null; | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineCode)) { | ||
| 133 | + this.lineCode = null; | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) { | ||
| 136 | + this.image = null; | ||
| 137 | + } | ||
| 138 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.signInEquipment)) { | ||
| 139 | + this.signInEquipment = null; | ||
| 140 | + } | ||
| 141 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) { | ||
| 142 | + this.fleetName = null; | ||
| 143 | + } | ||
| 144 | + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) { | ||
| 145 | + this.operator = null; | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + @Override | ||
| 150 | + public String toString() { | ||
| 151 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 152 | + } | ||
| 153 | +} | ||
| 0 | \ No newline at end of file | 154 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/driver/domain/vo/DriverVO.java
0 → 100644
| 1 | +package com.ruoyi.driver.domain.vo; | ||
| 2 | + | ||
| 3 | +import io.swagger.annotations.ApiModel; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | + | ||
| 6 | +import lombok.Data; | ||
| 7 | +import lombok.EqualsAndHashCode; | ||
| 8 | +import lombok.experimental.Accessors; | ||
| 9 | +import org.apache.commons.lang3.StringUtils; | ||
| 10 | + | ||
| 11 | +@Data | ||
| 12 | +@ApiModel | ||
| 13 | +@Accessors(chain = true) | ||
| 14 | +@EqualsAndHashCode(callSuper = false) | ||
| 15 | +public class DriverVO implements java.io.Serializable { | ||
| 16 | + private static final long serialVersionUID = 611817920L; | ||
| 17 | + | ||
| 18 | + /***主键*/ | ||
| 19 | + @ApiModelProperty(value = "主键", example = "1") | ||
| 20 | + private Integer id; | ||
| 21 | + /***工号*/ | ||
| 22 | + @ApiModelProperty(value = "工号") | ||
| 23 | + private String jobCode; | ||
| 24 | + /***公司编码*/ | ||
| 25 | + @ApiModelProperty(value = "公司编码") | ||
| 26 | + private String companyCode; | ||
| 27 | + /***分公司编码*/ | ||
| 28 | + @ApiModelProperty(value = "分公司编码") | ||
| 29 | + private String brancheCompanyCode; | ||
| 30 | + /***姓名*/ | ||
| 31 | + @ApiModelProperty(value = "姓名") | ||
| 32 | + private String personnelName; | ||
| 33 | + /***运营服务证书号*/ | ||
| 34 | + @ApiModelProperty(value = "运营服务证书号") | ||
| 35 | + private String papersCode; | ||
| 36 | + /***一卡通工作卡号*/ | ||
| 37 | + @ApiModelProperty(value = "一卡通工作卡号") | ||
| 38 | + private String icCardCode; | ||
| 39 | + /***性别*/ | ||
| 40 | + @ApiModelProperty(value = "性别") | ||
| 41 | + private String personnelType; | ||
| 42 | + /***所属岗位/工种*/ | ||
| 43 | + @ApiModelProperty(value = "所属岗位/工种") | ||
| 44 | + private String posts; | ||
| 45 | + /***身份证*/ | ||
| 46 | + @ApiModelProperty(value = "身份证") | ||
| 47 | + private String card; | ||
| 48 | + /***联系电话*/ | ||
| 49 | + @ApiModelProperty(value = "联系电话") | ||
| 50 | + private String telphone; | ||
| 51 | + /***RFID 人卡IC号*/ | ||
| 52 | + @ApiModelProperty(value = "RFID 人卡IC号") | ||
| 53 | + private String icRfid; | ||
| 54 | + /***RFID 人卡ID号(10进制)*/ | ||
| 55 | + @ApiModelProperty(value = "RFID 人卡ID号(10进制)") | ||
| 56 | + private String idRfid; | ||
| 57 | + /***RFID 标签号*/ | ||
| 58 | + @ApiModelProperty(value = "RFID 标签号") | ||
| 59 | + private String tagRfid; | ||
| 60 | + /***备注*/ | ||
| 61 | + @ApiModelProperty(value = "备注") | ||
| 62 | + private String remark; | ||
| 63 | + /***线路名称*/ | ||
| 64 | + @ApiModelProperty(value = "线路名称") | ||
| 65 | + private String lineName; | ||
| 66 | + /***线路编码*/ | ||
| 67 | + @ApiModelProperty(value = "线路编码") | ||
| 68 | + private String lineCode; | ||
| 69 | + /***是否进行人脸注册 1 注册 2 未注册*/ | ||
| 70 | + @ApiModelProperty(value = "是否进行人脸注册 1 注册 2 未注册", example = "1") | ||
| 71 | + private Integer faceSignIn; | ||
| 72 | + /***头像*/ | ||
| 73 | + @ApiModelProperty(value = "头像") | ||
| 74 | + private String image; | ||
| 75 | + /***更新日期*/ | ||
| 76 | + @ApiModelProperty(value = "更新日期") | ||
| 77 | + private java.util.Date updateTime; | ||
| 78 | + /***注册设备列表*/ | ||
| 79 | + @ApiModelProperty(value = "注册设备列表") | ||
| 80 | + private String signInEquipment; | ||
| 81 | + /***车队名称*/ | ||
| 82 | + @ApiModelProperty(value = "车队名称") | ||
| 83 | + private String fleetName; | ||
| 84 | + | ||
| 85 | + public String getPersonnelNameAndJobCode() { | ||
| 86 | + if (StringUtils.isNotEmpty(this.personnelName) && StringUtils.isNotEmpty(this.jobCode)) { | ||
| 87 | + StringBuilder builder = new StringBuilder(); | ||
| 88 | + builder.append(this.personnelName); | ||
| 89 | + builder.append("("); | ||
| 90 | + builder.append(this.jobCode); | ||
| 91 | + builder.append(")"); | ||
| 92 | + | ||
| 93 | + return builder.toString(); | ||
| 94 | + } else if (StringUtils.isNotEmpty(this.personnelName)) { | ||
| 95 | + return this.personnelName; | ||
| 96 | + } else if (StringUtils.isNotEmpty(this.jobCode)) { | ||
| 97 | + StringBuilder builder = new StringBuilder(); | ||
| 98 | + builder.append("("); | ||
| 99 | + builder.append(this.jobCode); | ||
| 100 | + builder.append(")"); | ||
| 101 | + return builder.toString(); | ||
| 102 | + } | ||
| 103 | + return null; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + @Override | ||
| 107 | + public String toString() { | ||
| 108 | + return com.alibaba.fastjson2.JSON.toJSONString(this); | ||
| 109 | + } | ||
| 110 | +} | ||
| 0 | \ No newline at end of file | 111 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/driver/mapper/DriverMapper.java
| @@ -3,6 +3,7 @@ package com.ruoyi.driver.mapper; | @@ -3,6 +3,7 @@ package com.ruoyi.driver.mapper; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Set; | 4 | import java.util.Set; |
| 5 | 5 | ||
| 6 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 6 | import com.ruoyi.driver.domain.Driver; | 7 | import com.ruoyi.driver.domain.Driver; |
| 7 | import com.ruoyi.pojo.request.DriverRequestVo; | 8 | import com.ruoyi.pojo.request.DriverRequestVo; |
| 8 | import com.ruoyi.pojo.response.DriverResponseVo; | 9 | import com.ruoyi.pojo.response.DriverResponseVo; |
| @@ -16,7 +17,7 @@ import org.apache.ibatis.annotations.Param; | @@ -16,7 +17,7 @@ import org.apache.ibatis.annotations.Param; | ||
| 16 | * @author 古自健 | 17 | * @author 古自健 |
| 17 | * @date 2023-07-04 | 18 | * @date 2023-07-04 |
| 18 | */ | 19 | */ |
| 19 | -public interface DriverMapper | 20 | +public interface DriverMapper extends BaseMapper<Driver> |
| 20 | { | 21 | { |
| 21 | /** | 22 | /** |
| 22 | * 查询驾驶员信息 | 23 | * 查询驾驶员信息 |
Bsth-admin/src/main/java/com/ruoyi/driver/service/IDriverService.java
| @@ -3,6 +3,7 @@ package com.ruoyi.driver.service; | @@ -3,6 +3,7 @@ package com.ruoyi.driver.service; | ||
| 3 | import java.io.IOException; | 3 | import java.io.IOException; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | 5 | ||
| 6 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 6 | import com.ruoyi.common.core.domain.AjaxResult; | 7 | import com.ruoyi.common.core.domain.AjaxResult; |
| 7 | import com.ruoyi.common.exception.file.InvalidExtensionException; | 8 | import com.ruoyi.common.exception.file.InvalidExtensionException; |
| 8 | import com.ruoyi.common.global.Result; | 9 | import com.ruoyi.common.global.Result; |
| @@ -22,7 +23,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -22,7 +23,7 @@ import javax.servlet.http.HttpServletResponse; | ||
| 22 | * @author 古自健 | 23 | * @author 古自健 |
| 23 | * @date 2023-07-04 | 24 | * @date 2023-07-04 |
| 24 | */ | 25 | */ |
| 25 | -public interface IDriverService | 26 | +public interface IDriverService extends IService<Driver> |
| 26 | { | 27 | { |
| 27 | /** | 28 | /** |
| 28 | * 查询驾驶员信息 | 29 | * 查询驾驶员信息 |
| @@ -40,6 +41,8 @@ public interface IDriverService | @@ -40,6 +41,8 @@ public interface IDriverService | ||
| 40 | */ | 41 | */ |
| 41 | public List<Driver> selectDriverList(DriverRequestVo driver); | 42 | public List<Driver> selectDriverList(DriverRequestVo driver); |
| 42 | 43 | ||
| 44 | + List<Driver> selectDriverIdJobCodePersonnelName(Driver driver); | ||
| 45 | + | ||
| 43 | /** | 46 | /** |
| 44 | * 新增驾驶员信息 | 47 | * 新增驾驶员信息 |
| 45 | * | 48 | * |
Bsth-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| @@ -11,6 +11,8 @@ import java.util.stream.Collectors; | @@ -11,6 +11,8 @@ import java.util.stream.Collectors; | ||
| 11 | 11 | ||
| 12 | import cn.hutool.core.collection.CollectionUtil; | 12 | import cn.hutool.core.collection.CollectionUtil; |
| 13 | import cn.hutool.http.HttpUtil; | 13 | import cn.hutool.http.HttpUtil; |
| 14 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 15 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 14 | import com.github.pagehelper.util.StringUtil; | 16 | import com.github.pagehelper.util.StringUtil; |
| 15 | import com.ruoyi.common.cache.NowSchedulingCache; | 17 | import com.ruoyi.common.cache.NowSchedulingCache; |
| 16 | import com.ruoyi.common.cache.SchedulingCache; | 18 | import com.ruoyi.common.cache.SchedulingCache; |
| @@ -68,6 +70,8 @@ import static com.ruoyi.common.ConstSignInConstSignInProperties.*; | @@ -68,6 +70,8 @@ import static com.ruoyi.common.ConstSignInConstSignInProperties.*; | ||
| 68 | import static com.ruoyi.common.redispre.GlobalRedisPreName.DRIVER_SCHEDULING_PRE; | 70 | import static com.ruoyi.common.redispre.GlobalRedisPreName.DRIVER_SCHEDULING_PRE; |
| 69 | import static com.ruoyi.common.redispre.GlobalRedisPreName.REDIS_SIGN_IN_DRIVER_ALCOHOL_OVERFLOW; | 71 | import static com.ruoyi.common.redispre.GlobalRedisPreName.REDIS_SIGN_IN_DRIVER_ALCOHOL_OVERFLOW; |
| 70 | 72 | ||
| 73 | +import com.ruoyi.driver.service.IDriverService; | ||
| 74 | + | ||
| 71 | /** | 75 | /** |
| 72 | * 驾驶员信息Service业务层处理 | 76 | * 驾驶员信息Service业务层处理 |
| 73 | * | 77 | * |
| @@ -75,7 +79,7 @@ import static com.ruoyi.common.redispre.GlobalRedisPreName.REDIS_SIGN_IN_DRIVER_ | @@ -75,7 +79,7 @@ import static com.ruoyi.common.redispre.GlobalRedisPreName.REDIS_SIGN_IN_DRIVER_ | ||
| 75 | * @date 2023-07-04 | 79 | * @date 2023-07-04 |
| 76 | */ | 80 | */ |
| 77 | @Service | 81 | @Service |
| 78 | -public class DriverServiceImpl implements IDriverService { | 82 | +public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements IDriverService { |
| 79 | 83 | ||
| 80 | private Logger log = LoggerFactory.getLogger(DriverServiceImpl.class); | 84 | private Logger log = LoggerFactory.getLogger(DriverServiceImpl.class); |
| 81 | 85 | ||
| @@ -151,6 +155,13 @@ public class DriverServiceImpl implements IDriverService { | @@ -151,6 +155,13 @@ public class DriverServiceImpl implements IDriverService { | ||
| 151 | return drivers; | 155 | return drivers; |
| 152 | } | 156 | } |
| 153 | 157 | ||
| 158 | + @Override | ||
| 159 | + public List<Driver> selectDriverIdJobCodePersonnelName(Driver driver) { | ||
| 160 | + LambdaQueryWrapper<Driver> wrapper = new LambdaQueryWrapper<>(driver); | ||
| 161 | + wrapper.select(Driver::getId, Driver::getJobCode, Driver::getPersonnelName); | ||
| 162 | + return list(wrapper); | ||
| 163 | + } | ||
| 164 | + | ||
| 154 | private DriverSignInRecommendation checkTime(List<DriverScheduling> dto, Long now) { | 165 | private DriverSignInRecommendation checkTime(List<DriverScheduling> dto, Long now) { |
| 155 | Integer index = 0; | 166 | Integer index = 0; |
| 156 | Map<Integer, DriverSignInRecommendation> timeMap = new HashMap<>(); | 167 | Map<Integer, DriverSignInRecommendation> timeMap = new HashMap<>(); |
Bsth-admin/src/main/java/com/ruoyi/mapper/driver/healthy/DriverHealthyMapper.java
0 → 100644
| 1 | +package com.ruoyi.mapper.driver.healthy; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.driver.healthy.DriverHealthy; | ||
| 4 | +import org.apache.ibatis.annotations.Mapper; | ||
| 5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +@Mapper | ||
| 9 | +public interface DriverHealthyMapper extends BaseMapper<DriverHealthy> { | ||
| 10 | + /** | ||
| 11 | + * 插入有值的列 | ||
| 12 | + */ | ||
| 13 | + int insertSelective(DriverHealthy name); | ||
| 14 | +} | ||
| 0 | \ No newline at end of file | 15 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/driver/healthy/DriverHealthyService.java
0 → 100644
| 1 | +package com.ruoyi.service.driver.healthy; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +import com.ruoyi.domain.OrderEntity; | ||
| 9 | +import com.ruoyi.domain.driver.healthy.DriverHealthy; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +public interface DriverHealthyService extends IService<DriverHealthy> { | ||
| 13 | + /** | ||
| 14 | + * 分页查询 | ||
| 15 | + */ | ||
| 16 | + IPage<DriverHealthy> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<DriverHealthy> page, DriverHealthy entity, OrderEntity orderEntity); | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 带条件查询 | ||
| 20 | + */ | ||
| 21 | + List<DriverHealthy> list(DriverHealthy entity); | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 条件查询只返回一条数据的方法 | ||
| 26 | + */ | ||
| 27 | + DriverHealthy getOne(DriverHealthy entity); | ||
| 28 | + | ||
| 29 | + Integer countId(DriverHealthy entity); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 插入有值的列 | ||
| 33 | + */ | ||
| 34 | + int insertSelective(DriverHealthy entity); | ||
| 35 | + | ||
| 36 | + /***插入数据*/ | ||
| 37 | + boolean insert(DriverHealthy entity); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 根据主键修改数据 | ||
| 41 | + */ | ||
| 42 | + boolean updateByPrimaryKey(DriverHealthy entity); | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + public boolean deleteById(Long id); | ||
| 46 | + | ||
| 47 | +} | ||
| 0 | \ No newline at end of file | 48 | \ No newline at end of file |
Bsth-admin/src/main/java/com/ruoyi/service/impl/driver/healthy/DriverHealthyServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.service.impl.driver.healthy; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.mapper.driver.healthy.DriverHealthyMapper; | ||
| 4 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 5 | +import org.springframework.stereotype.Service; | ||
| 6 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 7 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 8 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 9 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 10 | + | ||
| 11 | +import com.github.pagehelper.PageHelper; | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +import java.util.Collections; | ||
| 15 | +import java.util.List; | ||
| 16 | + | ||
| 17 | +import com.ruoyi.domain.OrderEntity; | ||
| 18 | +import com.ruoyi.domain.driver.healthy.DriverHealthy; | ||
| 19 | +import com.ruoyi.service.driver.healthy.DriverHealthyService; | ||
| 20 | + | ||
| 21 | +@Service | ||
| 22 | +public class DriverHealthyServiceImpl extends ServiceImpl<DriverHealthyMapper, DriverHealthy> implements DriverHealthyService { | ||
| 23 | + @Autowired | ||
| 24 | + private DriverHealthyMapper driverHealthyMapper; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 分页查询 | ||
| 28 | + */ | ||
| 29 | + @Override | ||
| 30 | + public IPage<DriverHealthy> pageList(Page<DriverHealthy> page, DriverHealthy entity, OrderEntity orderEntity) { | ||
| 31 | + LambdaQueryWrapper<DriverHealthy> countWrapper = new LambdaQueryWrapper<>(entity); | ||
| 32 | + countWrapper.select(DriverHealthy::getId); | ||
| 33 | + int count = count(countWrapper); | ||
| 34 | + | ||
| 35 | + List<DriverHealthy> lists = Collections.emptyList(); | ||
| 36 | + if (count > 0) { | ||
| 37 | + PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false); | ||
| 38 | + LambdaQueryWrapper<DriverHealthy> selectWrapper = new LambdaQueryWrapper<>(entity); | ||
| 39 | + orderColumn(selectWrapper, orderEntity); | ||
| 40 | + lists = list(selectWrapper); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + IPage<DriverHealthy> returnPage = new Page<DriverHealthy>(); | ||
| 44 | + returnPage.setRecords(lists); | ||
| 45 | + returnPage.setPages(count % page.getSize() == 0 ? count / page.getSize() : count / page.getSize() + 1); | ||
| 46 | + returnPage.setCurrent(page.getCurrent()); | ||
| 47 | + returnPage.setSize(page.getSize()); | ||
| 48 | + returnPage.setTotal(count); | ||
| 49 | + | ||
| 50 | + return returnPage; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Override | ||
| 54 | + public List<DriverHealthy> list(DriverHealthy entity) { | ||
| 55 | + return list(new LambdaQueryWrapper<>(entity)); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + | ||
| 59 | + @Override | ||
| 60 | + public DriverHealthy getOne(DriverHealthy entity) { | ||
| 61 | + return getOne(new LambdaQueryWrapper<>(entity)); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + @Override | ||
| 65 | + public Integer countId(DriverHealthy entity) { | ||
| 66 | + LambdaQueryWrapper<DriverHealthy> wrapper = new LambdaQueryWrapper<>(entity); | ||
| 67 | + wrapper.select(DriverHealthy::getId); | ||
| 68 | + return count(wrapper); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 插入有值的列 | ||
| 74 | + */ | ||
| 75 | + @Override | ||
| 76 | + public int insertSelective(DriverHealthy entity) { | ||
| 77 | + return driverHealthyMapper.insertSelective(entity); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 插入数据 | ||
| 82 | + */ | ||
| 83 | + @Override | ||
| 84 | + public boolean insert(DriverHealthy entity) { | ||
| 85 | + return save(entity); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 根据主键修改数据 | ||
| 90 | + */ | ||
| 91 | + @Override | ||
| 92 | + public boolean updateByPrimaryKey(DriverHealthy entity) { | ||
| 93 | + return updateById(entity); | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + /***根据主键删除数据*/ | ||
| 97 | + @Override | ||
| 98 | + public boolean deleteById(Long id) { | ||
| 99 | + return removeById(id); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + | ||
| 103 | + public static void orderColumn(LambdaQueryWrapper<DriverHealthy> wrapper, OrderEntity orderEntity) { | ||
| 104 | + if (org.apache.commons.lang3.StringUtils.equals("ascending", orderEntity.getOrder())) { | ||
| 105 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 106 | + wrapper.orderByAsc(DriverHealthy::getId); | ||
| 107 | + } | ||
| 108 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "driverId")) { | ||
| 109 | + wrapper.orderByAsc(DriverHealthy::getDriverId); | ||
| 110 | + } | ||
| 111 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "systolicPressure")) { | ||
| 112 | + wrapper.orderByAsc(DriverHealthy::getSystolicPressure); | ||
| 113 | + } | ||
| 114 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "diastolicPressure")) { | ||
| 115 | + wrapper.orderByAsc(DriverHealthy::getDiastolicPressure); | ||
| 116 | + } | ||
| 117 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "oxygenValue")) { | ||
| 118 | + wrapper.orderByAsc(DriverHealthy::getOxygenValue); | ||
| 119 | + } | ||
| 120 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "heartRate")) { | ||
| 121 | + wrapper.orderByAsc(DriverHealthy::getHeartRate); | ||
| 122 | + } | ||
| 123 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) { | ||
| 124 | + wrapper.orderByAsc(DriverHealthy::getCreateBy); | ||
| 125 | + } | ||
| 126 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) { | ||
| 127 | + wrapper.orderByAsc(DriverHealthy::getCreateTime); | ||
| 128 | + } | ||
| 129 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateBy")) { | ||
| 130 | + wrapper.orderByAsc(DriverHealthy::getUpdateBy); | ||
| 131 | + } | ||
| 132 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) { | ||
| 133 | + wrapper.orderByAsc(DriverHealthy::getUpdateTime); | ||
| 134 | + } | ||
| 135 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "delFlag")) { | ||
| 136 | + wrapper.orderByAsc(DriverHealthy::getDelFlag); | ||
| 137 | + } | ||
| 138 | + } else if (org.apache.commons.lang3.StringUtils.equals("descending", orderEntity.getOrder())) { | ||
| 139 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) { | ||
| 140 | + wrapper.orderByDesc(DriverHealthy::getId); | ||
| 141 | + } | ||
| 142 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "driverId")) { | ||
| 143 | + wrapper.orderByDesc(DriverHealthy::getDriverId); | ||
| 144 | + } | ||
| 145 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "systolicPressure")) { | ||
| 146 | + wrapper.orderByDesc(DriverHealthy::getSystolicPressure); | ||
| 147 | + } | ||
| 148 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "diastolicPressure")) { | ||
| 149 | + wrapper.orderByDesc(DriverHealthy::getDiastolicPressure); | ||
| 150 | + } | ||
| 151 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "oxygenValue")) { | ||
| 152 | + wrapper.orderByDesc(DriverHealthy::getOxygenValue); | ||
| 153 | + } | ||
| 154 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "heartRate")) { | ||
| 155 | + wrapper.orderByDesc(DriverHealthy::getHeartRate); | ||
| 156 | + } | ||
| 157 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createBy")) { | ||
| 158 | + wrapper.orderByDesc(DriverHealthy::getCreateBy); | ||
| 159 | + } | ||
| 160 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) { | ||
| 161 | + wrapper.orderByDesc(DriverHealthy::getCreateTime); | ||
| 162 | + } | ||
| 163 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateBy")) { | ||
| 164 | + wrapper.orderByDesc(DriverHealthy::getUpdateBy); | ||
| 165 | + } | ||
| 166 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "updateTime")) { | ||
| 167 | + wrapper.orderByDesc(DriverHealthy::getUpdateTime); | ||
| 168 | + } | ||
| 169 | + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "delFlag")) { | ||
| 170 | + wrapper.orderByDesc(DriverHealthy::getDelFlag); | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | +} | ||
| 0 | \ No newline at end of file | 175 | \ No newline at end of file |
Bsth-admin/src/main/resources/mapper/driver/healthy/DriverHealthyMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.ruoyi.mapper.driver.healthy.DriverHealthyMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.ruoyi.domain.driver.healthy.DriverHealthy"> | ||
| 5 | + <id column="id" jdbcType="BIGINT" property="id"/> | ||
| 6 | + <result column="driver_id" jdbcType="VARCHAR" property="driverId"/> | ||
| 7 | + <result column="systolic_Pressure" jdbcType="DECIMAL" property="systolicPressure"/> | ||
| 8 | + <result column="diastolic_Pressure" jdbcType="DECIMAL" property="diastolicPressure"/> | ||
| 9 | + <result column="Oxygen_Value" jdbcType="DECIMAL" property="oxygenValue"/> | ||
| 10 | + <result column="heart_Rate" jdbcType="DECIMAL" property="heartRate"/> | ||
| 11 | + <result column="create_by" jdbcType="VARCHAR" property="createBy"/> | ||
| 12 | + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | ||
| 13 | + <result column="update_by" jdbcType="VARCHAR" property="updateBy"/> | ||
| 14 | + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | ||
| 15 | + <result column="del_flag" jdbcType="BIT" property="delFlag"/> | ||
| 16 | + </resultMap> | ||
| 17 | + | ||
| 18 | + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" | ||
| 19 | + parameterType="com.ruoyi.domain.driver.healthy.DriverHealthy"> | ||
| 20 | + INSERT INTO driver_healthy <include refid="insertSelectiveColumn"></include> | ||
| 21 | + <include refid="insertSelectiveValue"></include> | ||
| 22 | + </insert> | ||
| 23 | + | ||
| 24 | + <sql id="columns"> | ||
| 25 | + id | ||
| 26 | + , driver_id , systolic_Pressure , diastolic_Pressure , Oxygen_Value , heart_Rate , create_by , create_time , update_by , update_time , del_flag | ||
| 27 | + </sql> | ||
| 28 | + | ||
| 29 | + <sql id="insert_columns"> | ||
| 30 | + id | ||
| 31 | + , driver_id , systolic_Pressure , diastolic_Pressure , Oxygen_Value , heart_Rate , create_by , create_time , update_by , update_time , del_flag | ||
| 32 | + </sql> | ||
| 33 | + | ||
| 34 | + <sql id="insert_values"> | ||
| 35 | + #{id} | ||
| 36 | + , | ||
| 37 | + #{driverId}, | ||
| 38 | + #{systolicPressure}, | ||
| 39 | + #{diastolicPressure}, | ||
| 40 | + #{oxygenValue}, | ||
| 41 | + #{heartRate}, | ||
| 42 | + #{createBy}, | ||
| 43 | + #{createTime}, | ||
| 44 | + #{updateBy}, | ||
| 45 | + #{updateTime}, | ||
| 46 | + #{delFlag} | ||
| 47 | + </sql> | ||
| 48 | + | ||
| 49 | + <sql id="insertSelectiveColumn"> | ||
| 50 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 51 | + <if test="null!=id">id,</if> | ||
| 52 | + <if test="null!=driverId">driver_id,</if> | ||
| 53 | + <if test="null!=systolicPressure">systolic_Pressure,</if> | ||
| 54 | + <if test="null!=diastolicPressure">diastolic_Pressure,</if> | ||
| 55 | + <if test="null!=oxygenValue">Oxygen_Value,</if> | ||
| 56 | + <if test="null!=heartRate">heart_Rate,</if> | ||
| 57 | + <if test="null!=createBy">create_by,</if> | ||
| 58 | + <if test="null!=createTime">create_time,</if> | ||
| 59 | + <if test="null!=updateBy">update_by,</if> | ||
| 60 | + <if test="null!=updateTime">update_time,</if> | ||
| 61 | + <if test="null!=delFlag">del_flag,</if> | ||
| 62 | + </trim> | ||
| 63 | + </sql> | ||
| 64 | + | ||
| 65 | + <sql id="insertSelectiveValue"> | ||
| 66 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 67 | + <if test="null!=id">#{id,jdbcType=BIGINT},</if> | ||
| 68 | + <if test="null!=driverId">#{driverId,jdbcType=VARCHAR},</if> | ||
| 69 | + <if test="null!=systolicPressure">#{systolicPressure,jdbcType=DECIMAL},</if> | ||
| 70 | + <if test="null!=diastolicPressure">#{diastolicPressure,jdbcType=DECIMAL},</if> | ||
| 71 | + <if test="null!=oxygenValue">#{oxygenValue,jdbcType=DECIMAL},</if> | ||
| 72 | + <if test="null!=heartRate">#{heartRate,jdbcType=DECIMAL},</if> | ||
| 73 | + <if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if> | ||
| 74 | + <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if> | ||
| 75 | + <if test="null!=updateBy">#{updateBy,jdbcType=VARCHAR},</if> | ||
| 76 | + <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 77 | + <if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if> | ||
| 78 | + </trim> | ||
| 79 | + </sql> | ||
| 80 | + | ||
| 81 | + <sql id="updateByPrimaryKeySelectiveSql"> | ||
| 82 | + <set> | ||
| 83 | + <if test="null!=id">id = #{id,jdbcType=BIGINT},</if> | ||
| 84 | + <if test="null!=driverId">driver_id = #{driverId,jdbcType=VARCHAR},</if> | ||
| 85 | + <if test="null!=systolicPressure">systolic_Pressure = #{systolicPressure,jdbcType=DECIMAL},</if> | ||
| 86 | + <if test="null!=diastolicPressure">diastolic_Pressure = #{diastolicPressure,jdbcType=DECIMAL},</if> | ||
| 87 | + <if test="null!=oxygenValue">Oxygen_Value = #{oxygenValue,jdbcType=DECIMAL},</if> | ||
| 88 | + <if test="null!=heartRate">heart_Rate = #{heartRate,jdbcType=DECIMAL},</if> | ||
| 89 | + <if test="null!=createBy">create_by = #{createBy,jdbcType=VARCHAR},</if> | ||
| 90 | + <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if> | ||
| 91 | + <if test="null!=updateBy">update_by = #{updateBy,jdbcType=VARCHAR},</if> | ||
| 92 | + <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 93 | + <if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if> | ||
| 94 | + </set> | ||
| 95 | + </sql> | ||
| 96 | + | ||
| 97 | + <sql id="where"> | ||
| 98 | + <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if> | ||
| 99 | + <if test="null!=driverId">AND driver_id = #{driverId,jdbcType=VARCHAR},</if> | ||
| 100 | + <if test="null!=systolicPressure">AND systolic_Pressure = #{systolicPressure,jdbcType=DECIMAL},</if> | ||
| 101 | + <if test="null!=diastolicPressure">AND diastolic_Pressure = #{diastolicPressure,jdbcType=DECIMAL},</if> | ||
| 102 | + <if test="null!=oxygenValue">AND Oxygen_Value = #{oxygenValue,jdbcType=DECIMAL},</if> | ||
| 103 | + <if test="null!=heartRate">AND heart_Rate = #{heartRate,jdbcType=DECIMAL},</if> | ||
| 104 | + <if test="null!=createBy">AND create_by = #{createBy,jdbcType=VARCHAR},</if> | ||
| 105 | + <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if> | ||
| 106 | + <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=VARCHAR},</if> | ||
| 107 | + <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | ||
| 108 | + <if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if> | ||
| 109 | + </sql> | ||
| 110 | +</mapper> | ||
| 0 | \ No newline at end of file | 111 | \ No newline at end of file |