Commit 1a39108bb6f2aa4be399cc3fadd1f551035379b9
1 parent
f41bd88c
fix: 修复签退显示无排班
Showing
3 changed files
with
50 additions
and
57 deletions
ruoyi-admin/src/main/java/com/ruoyi/driver/domain/Driver.java
| @@ -8,6 +8,7 @@ import com.ruoyi.common.annotation.Excel; | @@ -8,6 +8,7 @@ import com.ruoyi.common.annotation.Excel; | ||
| 8 | import com.ruoyi.common.core.domain.BaseEntity; | 8 | import com.ruoyi.common.core.domain.BaseEntity; |
| 9 | import org.springframework.format.annotation.DateTimeFormat; | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 10 | 10 | ||
| 11 | +import java.io.Serializable; | ||
| 11 | import java.util.Date; | 12 | import java.util.Date; |
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| @@ -18,7 +19,7 @@ import java.util.Date; | @@ -18,7 +19,7 @@ import java.util.Date; | ||
| 18 | */ | 19 | */ |
| 19 | @Data | 20 | @Data |
| 20 | @ApiModel("驾驶员信息对象") | 21 | @ApiModel("驾驶员信息对象") |
| 21 | -public class Driver extends BaseEntity { | 22 | +public class Driver extends BaseEntity implements Serializable { |
| 22 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| @@ -30,63 +31,54 @@ public class Driver extends BaseEntity { | @@ -30,63 +31,54 @@ public class Driver extends BaseEntity { | ||
| 30 | * 工号 | 31 | * 工号 |
| 31 | */ | 32 | */ |
| 32 | @Excel(name = "工号") | 33 | @Excel(name = "工号") |
| 33 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 34 | private String jobCode; | 34 | private String jobCode; |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * 公司编码 | 37 | * 公司编码 |
| 38 | */ | 38 | */ |
| 39 | @Excel(name = "公司编码") | 39 | @Excel(name = "公司编码") |
| 40 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 41 | private String companyCode; | 40 | private String companyCode; |
| 42 | 41 | ||
| 43 | /** | 42 | /** |
| 44 | * 分公司编码 | 43 | * 分公司编码 |
| 45 | */ | 44 | */ |
| 46 | @Excel(name = "分公司编码") | 45 | @Excel(name = "分公司编码") |
| 47 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 48 | private String brancheCompanyCode; | 46 | private String brancheCompanyCode; |
| 49 | 47 | ||
| 50 | /** | 48 | /** |
| 51 | * 姓名 | 49 | * 姓名 |
| 52 | */ | 50 | */ |
| 53 | @Excel(name = "姓名") | 51 | @Excel(name = "姓名") |
| 54 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 55 | private String personnelName; | 52 | private String personnelName; |
| 56 | 53 | ||
| 57 | /** | 54 | /** |
| 58 | * 运营服务证书号 | 55 | * 运营服务证书号 |
| 59 | */ | 56 | */ |
| 60 | @Excel(name = "运营服务证书号") | 57 | @Excel(name = "运营服务证书号") |
| 61 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 62 | private String papersCode; | 58 | private String papersCode; |
| 63 | 59 | ||
| 64 | /** | 60 | /** |
| 65 | * 一卡通工作卡号 | 61 | * 一卡通工作卡号 |
| 66 | */ | 62 | */ |
| 67 | @Excel(name = "一卡通工作卡号") | 63 | @Excel(name = "一卡通工作卡号") |
| 68 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 69 | private String icCardCode; | 64 | private String icCardCode; |
| 70 | 65 | ||
| 71 | /** | 66 | /** |
| 72 | * 性别 | 67 | * 性别 |
| 73 | */ | 68 | */ |
| 74 | @Excel(name = "性别") | 69 | @Excel(name = "性别") |
| 75 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 76 | private String personnelType; | 70 | private String personnelType; |
| 77 | 71 | ||
| 78 | /** | 72 | /** |
| 79 | * 所属岗位/工种 | 73 | * 所属岗位/工种 |
| 80 | */ | 74 | */ |
| 81 | @Excel(name = "所属岗位/工种") | 75 | @Excel(name = "所属岗位/工种") |
| 82 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 83 | private String posts; | 76 | private String posts; |
| 84 | 77 | ||
| 85 | /** | 78 | /** |
| 86 | * 身份证 | 79 | * 身份证 |
| 87 | */ | 80 | */ |
| 88 | @Excel(name = "身份证") | 81 | @Excel(name = "身份证") |
| 89 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 90 | private String card; | 82 | private String card; |
| 91 | 83 | ||
| 92 | /** | 84 | /** |
| @@ -100,32 +92,27 @@ public class Driver extends BaseEntity { | @@ -100,32 +92,27 @@ public class Driver extends BaseEntity { | ||
| 100 | * RFID 人卡IC号 | 92 | * RFID 人卡IC号 |
| 101 | */ | 93 | */ |
| 102 | @Excel(name = "RFID 人卡IC号") | 94 | @Excel(name = "RFID 人卡IC号") |
| 103 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 104 | private String icRfid; | 95 | private String icRfid; |
| 105 | 96 | ||
| 106 | /** | 97 | /** |
| 107 | * RFID 人卡ID号(10进制) | 98 | * RFID 人卡ID号(10进制) |
| 108 | */ | 99 | */ |
| 109 | @Excel(name = "RFID 人卡ID号", readConverterExp = "1=0进制") | 100 | @Excel(name = "RFID 人卡ID号", readConverterExp = "1=0进制") |
| 110 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 111 | private String idRfid; | 101 | private String idRfid; |
| 112 | /** | 102 | /** |
| 113 | * RFID 标签号 | 103 | * RFID 标签号 |
| 114 | */ | 104 | */ |
| 115 | @Excel(name = "RFID 标签号") | 105 | @Excel(name = "RFID 标签号") |
| 116 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 117 | private String tagRfid; | 106 | private String tagRfid; |
| 118 | /** | 107 | /** |
| 119 | * 线路名称 | 108 | * 线路名称 |
| 120 | */ | 109 | */ |
| 121 | @Excel(name = "线路名称") | 110 | @Excel(name = "线路名称") |
| 122 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 123 | private String lineName; | 111 | private String lineName; |
| 124 | /** | 112 | /** |
| 125 | * 线路编码 | 113 | * 线路编码 |
| 126 | */ | 114 | */ |
| 127 | @Excel(name = "线路编码") | 115 | @Excel(name = "线路编码") |
| 128 | - @JsonIgnoreProperties(ignoreUnknown = true) | ||
| 129 | private String lineCode; | 116 | private String lineCode; |
| 130 | /** | 117 | /** |
| 131 | * 是否人脸注册 | 118 | * 是否人脸注册 |
| @@ -149,5 +136,4 @@ public class Driver extends BaseEntity { | @@ -149,5 +136,4 @@ public class Driver extends BaseEntity { | ||
| 149 | @Excel( name ="车队名称") | 136 | @Excel( name ="车队名称") |
| 150 | private String fleetName; | 137 | private String fleetName; |
| 151 | 138 | ||
| 152 | - | ||
| 153 | } | 139 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| @@ -331,7 +331,7 @@ public class DriverServiceImpl implements IDriverService { | @@ -331,7 +331,7 @@ public class DriverServiceImpl implements IDriverService { | ||
| 331 | DriverResponseVo vo = handleRecommendation(item, now, dto, schedulingFlag, alcoholFlag); | 331 | DriverResponseVo vo = handleRecommendation(item, now, dto, schedulingFlag, alcoholFlag); |
| 332 | // 无排班 | 332 | // 无排班 |
| 333 | if (Objects.isNull(vo)) { | 333 | if (Objects.isNull(vo)) { |
| 334 | - vos.add(new DriverResponseVo(null, item, null, false, false, "", "", "")); | 334 | + vos.add(DriverResponseVo.createDriverResponseVo(null, item, null, false, false, "", "", "")); |
| 335 | } else { | 335 | } else { |
| 336 | vos.add(vo); | 336 | vos.add(vo); |
| 337 | } | 337 | } |
| @@ -339,7 +339,7 @@ public class DriverServiceImpl implements IDriverService { | @@ -339,7 +339,7 @@ public class DriverServiceImpl implements IDriverService { | ||
| 339 | return vos; | 339 | return vos; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | - private DriverResponseVo handleRecommendation(Driver drivers, Long now, List<DriverScheduling> dto, Boolean schedulingFlag, Boolean alcoholFlag) { | 342 | + private DriverResponseVo handleRecommendation(Driver driver, Long now, List<DriverScheduling> dto, Boolean schedulingFlag, Boolean alcoholFlag) { |
| 343 | DriverResponseVo vo = null; | 343 | DriverResponseVo vo = null; |
| 344 | // 给出计划操作 | 344 | // 给出计划操作 |
| 345 | if (!CollectionUtil.isEmpty(dto)) { | 345 | if (!CollectionUtil.isEmpty(dto)) { |
| @@ -347,11 +347,11 @@ public class DriverServiceImpl implements IDriverService { | @@ -347,11 +347,11 @@ public class DriverServiceImpl implements IDriverService { | ||
| 347 | if (BC_TYPE_OUT.equals(recommendation.getBcType())) { | 347 | if (BC_TYPE_OUT.equals(recommendation.getBcType())) { |
| 348 | // 售票员无需酒精测试 | 348 | // 售票员无需酒精测试 |
| 349 | if (recommendation.getPosts().equals(PERSONNEL_POSTS_DRIVER)) | 349 | if (recommendation.getPosts().equals(PERSONNEL_POSTS_DRIVER)) |
| 350 | - vo = new DriverResponseVo(recommendation.getTimestamps(), drivers, SIGN_IN_STRING, alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); | 350 | + vo = DriverResponseVo.createDriverResponseVo(recommendation.getTimestamps(), driver, SIGN_IN_STRING, alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); |
| 351 | else | 351 | else |
| 352 | - vo = new DriverResponseVo(recommendation.getTimestamps(), drivers, SIGN_IN_STRING, !alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); | 352 | + vo = DriverResponseVo.createDriverResponseVo(recommendation.getTimestamps(), driver, SIGN_IN_STRING, !alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); |
| 353 | } else if (BC_TYPE_IN.equals(recommendation.getBcType())) { | 353 | } else if (BC_TYPE_IN.equals(recommendation.getBcType())) { |
| 354 | - vo = new DriverResponseVo(recommendation.getTimestamps(), drivers, SIGN_IN_OUT_STRING, !alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); | 354 | + vo= DriverResponseVo.createDriverResponseVo(recommendation.getTimestamps(), driver, SIGN_IN_OUT_STRING, !alcoholFlag, schedulingFlag, recommendation.getNbbm(), recommendation.getLpName(), recommendation.getLineName()); |
| 355 | } | 355 | } |
| 356 | } | 356 | } |
| 357 | return vo; | 357 | return vo; |
ruoyi-admin/src/main/java/com/ruoyi/pojo/response/DriverResponseVo.java
| 1 | package com.ruoyi.pojo.response; | 1 | package com.ruoyi.pojo.response; |
| 2 | +import java.io.Serializable; | ||
| 2 | import java.util.Date; | 3 | import java.util.Date; |
| 4 | + | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| 3 | import com.google.common.collect.Maps; | 6 | import com.google.common.collect.Maps; |
| 4 | 7 | ||
| 8 | +import com.ruoyi.common.annotation.Excel; | ||
| 5 | import com.ruoyi.driver.domain.Driver; | 9 | import com.ruoyi.driver.domain.Driver; |
| 6 | import io.swagger.annotations.ApiModel; | 10 | import io.swagger.annotations.ApiModel; |
| 7 | import io.swagger.annotations.ApiModelProperty; | 11 | import io.swagger.annotations.ApiModelProperty; |
| @@ -12,7 +16,9 @@ import lombok.Data; | @@ -12,7 +16,9 @@ import lombok.Data; | ||
| 12 | */ | 16 | */ |
| 13 | @Data | 17 | @Data |
| 14 | @ApiModel("驾驶员对象") | 18 | @ApiModel("驾驶员对象") |
| 15 | -public class DriverResponseVo extends Driver { | 19 | +public class DriverResponseVo extends Driver implements Serializable { |
| 20 | + private static final long serialVersionUID = -1L; | ||
| 21 | + | ||
| 16 | 22 | ||
| 17 | @ApiModelProperty("是否需要酒精测试(true:需要 ,false:不需要)") | 23 | @ApiModelProperty("是否需要酒精测试(true:需要 ,false:不需要)") |
| 18 | private Boolean checkAlcohol; | 24 | private Boolean checkAlcohol; |
| @@ -27,41 +33,42 @@ public class DriverResponseVo extends Driver { | @@ -27,41 +33,42 @@ public class DriverResponseVo extends Driver { | ||
| 27 | @ApiModelProperty("路牌") | 33 | @ApiModelProperty("路牌") |
| 28 | private String lpName; | 34 | private String lpName; |
| 29 | 35 | ||
| 30 | - public DriverResponseVo(Long signTime, Driver driver,String planAction,Boolean checkAlcohol,Boolean schedulingFlag,String nbbm,String lpName,String lineName){ | ||
| 31 | - this.setLineName(lineName); | ||
| 32 | - this.setNbbm(nbbm); | ||
| 33 | - this.setLpName(lpName); | ||
| 34 | - this.setSignTime(signTime); | ||
| 35 | - this.setSchedulingFlag(schedulingFlag); | ||
| 36 | - this.setCheckAlcohol(checkAlcohol); | ||
| 37 | - this.setPlanAction(planAction); | ||
| 38 | - this.setId(driver.getId()); | ||
| 39 | - this.setJobCode(driver.getJobCode()); | ||
| 40 | - this.setCompanyCode(driver.getCompanyCode()); | ||
| 41 | - this.setBrancheCompanyCode(driver.getBrancheCompanyCode()); | ||
| 42 | - this.setPersonnelName(driver.getPersonnelName()); | ||
| 43 | - this.setPapersCode(driver.getPapersCode()); | ||
| 44 | - this.setIcCardCode(driver.getIcCardCode()); | ||
| 45 | - this.setPersonnelType(driver.getPersonnelType()); | ||
| 46 | - this.setPosts(driver.getPosts()); | ||
| 47 | - this.setCard(driver.getCard()); | ||
| 48 | - this.setTelphone(driver.getTelphone()); | ||
| 49 | - this.setIcRfid(driver.getIcRfid()); | ||
| 50 | - this.setIdRfid(driver.getIdRfid()); | ||
| 51 | - this.setTagRfid(driver.getTagRfid()); | ||
| 52 | - this.setLineName(driver.getLineName()); | ||
| 53 | - this.setLineCode(driver.getLineCode()); | ||
| 54 | - this.setFaceSignIn(driver.getFaceSignIn()); | ||
| 55 | - this.setImage(driver.getImage()); | ||
| 56 | - this.setUpdateTime(driver.getUpdateTime()); | ||
| 57 | - this.setSignInEquipment(driver.getSignInEquipment()); | ||
| 58 | - this.setFleetName(driver.getFleetName()); | ||
| 59 | - this.setSearchValue(driver.getSearchValue()); | ||
| 60 | - this.setCreateBy(driver.getCreateBy()); | ||
| 61 | - this.setCreateTime(driver.getCreateTime()); | ||
| 62 | - this.setUpdateBy(driver.getUpdateBy()); | ||
| 63 | - this.setUpdateTime(driver.getUpdateTime()); | ||
| 64 | - this.setRemark(driver.getRemark()); | 36 | + |
| 37 | + public static DriverResponseVo createDriverResponseVo(Long signTime, Driver driver,String planAction,Boolean checkAlcohol,Boolean schedulingFlag,String nbbm,String lpName,String lineName){ | ||
| 38 | + DriverResponseVo vo = new DriverResponseVo(); | ||
| 39 | + vo.setLineName(lineName); | ||
| 40 | + vo.setNbbm(nbbm); | ||
| 41 | + vo.setLpName(lpName); | ||
| 42 | + vo.setSignTime(signTime); | ||
| 43 | + vo.setSchedulingFlag(schedulingFlag); | ||
| 44 | + vo.setCheckAlcohol(checkAlcohol); | ||
| 45 | + vo.setPlanAction(planAction); | ||
| 46 | + vo.setId(driver.getId()); | ||
| 47 | + vo.setJobCode(driver.getJobCode()); | ||
| 48 | + vo.setCompanyCode(driver.getCompanyCode()); | ||
| 49 | + vo.setBrancheCompanyCode(driver.getBrancheCompanyCode()); | ||
| 50 | + vo.setPersonnelName(driver.getPersonnelName()); | ||
| 51 | + vo.setPapersCode(driver.getPapersCode()); | ||
| 52 | + vo.setIcCardCode(driver.getIcCardCode()); | ||
| 53 | + vo.setPersonnelType(driver.getPersonnelType()); | ||
| 54 | + vo.setPosts(driver.getPosts()); | ||
| 55 | + vo.setCard(driver.getCard()); | ||
| 56 | + vo.setTelphone(driver.getTelphone()); | ||
| 57 | + vo.setIcRfid(driver.getIcRfid()); | ||
| 58 | + vo.setIdRfid(driver.getIdRfid()); | ||
| 59 | + vo.setTagRfid(driver.getTagRfid()); | ||
| 60 | + vo.setFaceSignIn(driver.getFaceSignIn()); | ||
| 61 | + vo.setImage(driver.getImage()); | ||
| 62 | + vo.setUpdateTime(driver.getUpdateTime()); | ||
| 63 | + vo.setSignInEquipment(driver.getSignInEquipment()); | ||
| 64 | + vo.setSearchValue(driver.getSearchValue()); | ||
| 65 | + vo.setCreateBy(driver.getCreateBy()); | ||
| 66 | + vo.setCreateTime(driver.getCreateTime()); | ||
| 67 | + vo.setUpdateBy(driver.getUpdateBy()); | ||
| 68 | + vo.setUpdateTime(driver.getUpdateTime()); | ||
| 69 | + vo.setRemark(driver.getRemark()); | ||
| 70 | + vo.setFleetName(driver.getFleetName()); | ||
| 71 | + return vo; | ||
| 65 | } | 72 | } |
| 66 | public DriverResponseVo(){} | 73 | public DriverResponseVo(){} |
| 67 | } | 74 | } |