Commit fb614af47f052c17e75f3b55feb42429d1c959ae
1 parent
da4006ac
酒测未通过审核
Showing
12 changed files
with
102 additions
and
10 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssFaceController.java
| ... | ... | @@ -87,9 +87,10 @@ public class DssFaceController extends BaseController { |
| 87 | 87 | if (bindingResult.hasErrors()) { |
| 88 | 88 | return ResponseResult.error(bindingResult.getFieldError().getDefaultMessage()); |
| 89 | 89 | } |
| 90 | - NewDriver newDriver = convertNewDriver(dto); | |
| 91 | - TipEnum errorTipEnum = newDriverService.updateClient(newDriver); | |
| 92 | - return new ResponseResult<>(errorTipEnum.getCode(), errorTipEnum.getMsg()); | |
| 90 | + log.info("client data:[{}]",dto); | |
| 91 | +// NewDriver newDriver = convertNewDriver(dto); | |
| 92 | +// TipEnum errorTipEnum = newDriverService.updateClient(newDriver); | |
| 93 | + return ResponseResult.success(); | |
| 93 | 94 | } |
| 94 | 95 | |
| 95 | 96 | @ApiOperation(("人脸注册")) | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/controller/sign/in/exception/report/EquipmentExceptionReportController.java
| ... | ... | @@ -3,6 +3,7 @@ package com.ruoyi.controller.sign.in.exception.report; |
| 3 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; |
| 4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | 5 | import com.ruoyi.common.core.controller.BaseController; |
| 6 | +import com.ruoyi.common.core.domain.ResponseResult; | |
| 6 | 7 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 7 | 8 | import com.ruoyi.domain.OrderEntity; |
| 8 | 9 | import com.ruoyi.domain.driver.NewDriver; |
| ... | ... | @@ -11,6 +12,8 @@ import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportAdd |
| 11 | 12 | import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportQueryDTO; |
| 12 | 13 | import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportUpdateDTO; |
| 13 | 14 | import com.ruoyi.domain.sign.in.exception.report.vo.EquipmentExceptionReportVO; |
| 15 | +import com.ruoyi.in.domain.SignIn; | |
| 16 | +import com.ruoyi.in.service.ISignInService; | |
| 14 | 17 | import com.ruoyi.service.driver.NewDriverService; |
| 15 | 18 | import com.ruoyi.service.sign.in.exception.report.EquipmentExceptionReportService; |
| 16 | 19 | import io.swagger.annotations.Api; |
| ... | ... | @@ -35,6 +38,8 @@ public class EquipmentExceptionReportController extends BaseController { |
| 35 | 38 | private EquipmentExceptionReportService equipmentExceptionReportService; |
| 36 | 39 | @Autowired |
| 37 | 40 | private NewDriverService driverService; |
| 41 | + @Autowired | |
| 42 | + private ISignInService signInService; | |
| 38 | 43 | |
| 39 | 44 | @ApiOperation("分页查询") |
| 40 | 45 | @PreAuthorize("@ss.hasPermi('equipment:exception:report:list:limit:page:limit')") |
| ... | ... | @@ -48,10 +53,13 @@ public class EquipmentExceptionReportController extends BaseController { |
| 48 | 53 | |
| 49 | 54 | @ApiOperation("分页查询-用于对外") |
| 50 | 55 | @PostMapping(value = "/list/limit/contact/{page}/{pageLimit}") |
| 51 | - public IPage<EquipmentExceptionReportVO> listLimitOfContact(@ModelAttribute EquipmentExceptionReportQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) { | |
| 56 | + public IPage<EquipmentExceptionReportVO> listLimitOfContact(@RequestBody EquipmentExceptionReportQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) { | |
| 52 | 57 | IPage<EquipmentExceptionReportVO> voiPage = listLimit(request, orderEntity, page, pageLimit, model); |
| 53 | 58 | if (Objects.nonNull(voiPage) && CollectionUtils.isNotEmpty(voiPage.getRecords())) { |
| 54 | 59 | Set<String> jobs = voiPage.getRecords().stream().map(EquipmentExceptionReportVO::getJobCode).collect(Collectors.toSet()); |
| 60 | + Set<Long> signIds = voiPage.getRecords().stream().map(EquipmentExceptionReportVO::getSignId).collect(Collectors.toSet()); | |
| 61 | + | |
| 62 | + List<SignIn> signIns = signInService.listByIds(signIds); | |
| 55 | 63 | List<NewDriver> drivers = driverService.list(jobs); |
| 56 | 64 | List<EquipmentExceptionReportVO> vos = voiPage.getRecords().stream().map(v -> { |
| 57 | 65 | if (CollectionUtils.isNotEmpty(drivers)) { |
| ... | ... | @@ -60,6 +68,15 @@ public class EquipmentExceptionReportController extends BaseController { |
| 60 | 68 | v.setJobCodeName(optional.get().getPersonnelName()); |
| 61 | 69 | } |
| 62 | 70 | } |
| 71 | + | |
| 72 | + if (CollectionUtils.isNotEmpty(signIns)) { | |
| 73 | + Optional<SignIn> optional = signIns.stream().filter(d -> Objects.equals(d.getId(), v.getSignId())).findFirst(); | |
| 74 | + if (optional.isPresent()) { | |
| 75 | + v.setAlcoholIntake(optional.get().getAlcoholIntake()); | |
| 76 | + v.setCreateTime(optional.get().getCreateTime()); | |
| 77 | + } | |
| 78 | + | |
| 79 | + } | |
| 63 | 80 | return v; |
| 64 | 81 | }).collect(Collectors.toList()); |
| 65 | 82 | voiPage.setRecords(vos); |
| ... | ... | @@ -114,6 +131,20 @@ public class EquipmentExceptionReportController extends BaseController { |
| 114 | 131 | return flag ? com.ruoyi.common.core.domain.ResponseResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.ResponseResult.error("修改数据失败,请稍后再试"); |
| 115 | 132 | } |
| 116 | 133 | |
| 134 | + @ApiOperation("修改状态") | |
| 135 | + @PostMapping(value = "/update/{status}/{id}") | |
| 136 | + public ResponseResult<Boolean> updateStatus(@PathVariable("status") Integer status, @PathVariable("id") Long id) { | |
| 137 | + EquipmentExceptionReport entity = equipmentExceptionReportService.getById(id); | |
| 138 | + if (Objects.isNull(entity)) { | |
| 139 | + return com.ruoyi.common.core.domain.ResponseResult.error("没有要修改的数据"); | |
| 140 | + } | |
| 141 | +// entity.setUpdateBy(getUserId()); | |
| 142 | + entity.setUpdateTime(new Date()); | |
| 143 | + entity.setStatus(status); | |
| 144 | + boolean flag = equipmentExceptionReportService.updateByPrimaryKey(entity); | |
| 145 | + return flag ? com.ruoyi.common.core.domain.ResponseResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.ResponseResult.error("修改数据失败,请稍后再试"); | |
| 146 | + } | |
| 147 | + | |
| 117 | 148 | @PreAuthorize("@ss.hasPermi('equipment:exception:report:del')") |
| 118 | 149 | @ApiOperation("删除数据") |
| 119 | 150 | @GetMapping(value = "/del/{id}") | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/EquipmentExceptionReport.java
| ... | ... | @@ -126,6 +126,10 @@ public class EquipmentExceptionReport { |
| 126 | 126 | @Excel(name = "是否删除,0 未删除;1是删除") |
| 127 | 127 | private java.lang.Boolean delFlag; |
| 128 | 128 | |
| 129 | + /***签到ID*/ | |
| 130 | + @Excel(name = "签到ID") | |
| 131 | + private java.lang.Long signId; | |
| 132 | + | |
| 129 | 133 | |
| 130 | 134 | @Override |
| 131 | 135 | public String toString() { | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportAddDTO.java
| ... | ... | @@ -78,6 +78,10 @@ public class EquipmentExceptionReportAddDTO implements java.io.Serializable { |
| 78 | 78 | @ApiModelProperty(value = "是否删除,0 未删除;1是删除") |
| 79 | 79 | private java.lang.Boolean delFlag; |
| 80 | 80 | |
| 81 | + /***签到ID*/ | |
| 82 | + @ApiModelProperty(value="签到ID",example ="1") | |
| 83 | + private java.lang.Long signId; | |
| 84 | + | |
| 81 | 85 | /***操作人员*/ |
| 82 | 86 | @ApiModelProperty(value = "操作人员") |
| 83 | 87 | private String operator; | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportQueryDTO.java
| ... | ... | @@ -79,6 +79,10 @@ public class EquipmentExceptionReportQueryDTO implements java.io.Serializable { |
| 79 | 79 | @ApiModelProperty(value = "是否删除,0 未删除;1是删除") |
| 80 | 80 | private java.lang.Boolean delFlag; |
| 81 | 81 | |
| 82 | + /***签到ID*/ | |
| 83 | + @ApiModelProperty(value="签到ID",example ="1") | |
| 84 | + private java.lang.Long signId; | |
| 85 | + | |
| 82 | 86 | |
| 83 | 87 | public void clearStrEmpty() { |
| 84 | 88 | if (org.apache.commons.lang3.StringUtils.isEmpty(this.title)) { | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportUpdateDTO.java
| ... | ... | @@ -78,6 +78,11 @@ public class EquipmentExceptionReportUpdateDTO implements java.io.Serializable { |
| 78 | 78 | /***是否删除,0 未删除;1是删除*/ |
| 79 | 79 | @ApiModelProperty(value = "是否删除,0 未删除;1是删除") |
| 80 | 80 | private java.lang.Boolean delFlag; |
| 81 | + | |
| 82 | + /***签到ID*/ | |
| 83 | + @ApiModelProperty(value = "签到ID", example = "1") | |
| 84 | + private java.lang.Long signId; | |
| 85 | + | |
| 81 | 86 | /***操作人员*/ |
| 82 | 87 | @ApiModelProperty(value = "操作人员") |
| 83 | 88 | private String operator; | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/vo/EquipmentExceptionReportVO.java
| ... | ... | @@ -9,6 +9,8 @@ import lombok.experimental.Accessors; |
| 9 | 9 | import lombok.NoArgsConstructor; |
| 10 | 10 | import lombok.AllArgsConstructor; |
| 11 | 11 | |
| 12 | +import java.math.BigDecimal; | |
| 13 | + | |
| 12 | 14 | @Data |
| 13 | 15 | @NoArgsConstructor |
| 14 | 16 | @AllArgsConstructor |
| ... | ... | @@ -83,8 +85,15 @@ public class EquipmentExceptionReportVO implements java.io.Serializable { |
| 83 | 85 | /***是否删除,0 未删除;1是删除*/ |
| 84 | 86 | @ApiModelProperty(value = "是否删除,0 未删除;1是删除") |
| 85 | 87 | private java.lang.Boolean delFlag; |
| 88 | + | |
| 89 | + /***签到ID*/ | |
| 90 | + @ApiModelProperty(value="签到ID",example ="1") | |
| 91 | + private java.lang.Long signId; | |
| 92 | + | |
| 86 | 93 | @ApiModelProperty(value = "上报姓名") |
| 87 | 94 | private String jobCodeName; |
| 95 | + @ApiModelProperty(value = "酒精含量") | |
| 96 | + private BigDecimal alcoholIntake; | |
| 88 | 97 | |
| 89 | 98 | |
| 90 | 99 | @Override | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
| ... | ... | @@ -199,9 +199,12 @@ public class SignInServiceImpl extends ServiceImpl<SignInMapper, SignIn> impleme |
| 199 | 199 | GlobalIndex globalIndex = new GlobalIndex(); |
| 200 | 200 | long now = signIn.getCreateTime().getTime(); |
| 201 | 201 | List<DriverScheduling> dto = schedulingService.queryScheduling(signIn.getJobCode(), now); |
| 202 | + if(CollectionUtils.isEmpty(dto)){ | |
| 203 | + return AjaxResult.error("今天没有签到数据,签到失败"); | |
| 204 | + } | |
| 202 | 205 | handleSignBody(signIn, driver, globalIndex, now, dto); |
| 203 | 206 | |
| 204 | - log.info("签到的数据为:[{}]",dto.get(globalIndex.getIndex())); | |
| 207 | + log.info("签到的数据为:[{}];index为[{}]",dto,globalIndex); | |
| 205 | 208 | if (PERSONNEL_POSTS_DRIVER.equals(driver.getPosts()) && Objects.equals(dto.get(globalIndex.getIndex()).getBcType(), BC_TYPE_OUT)) { |
| 206 | 209 | AjaxResult result = getAjaxResultByDriverSignInfo(signIn, vo); |
| 207 | 210 | if (!Objects.isNull(result)) { | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/impl/sign/in/exception/report/EquipmentExceptionReportServiceImpl.java
| ... | ... | @@ -222,6 +222,7 @@ public class EquipmentExceptionReportServiceImpl extends ServiceImpl<EquipmentEx |
| 222 | 222 | wrapper.orderByDesc(EquipmentExceptionReport::getReportOldStatus); |
| 223 | 223 | } |
| 224 | 224 | } else { |
| 225 | + wrapper.orderByAsc(EquipmentExceptionReport::getStatus); | |
| 225 | 226 | wrapper.orderByDesc(EquipmentExceptionReport::getId); |
| 226 | 227 | } |
| 227 | 228 | } | ... | ... |
Bsth-admin/src/main/resources/application-druid-dev.yml
| ... | ... | @@ -210,5 +210,5 @@ bsth: |
| 210 | 210 | faceFeature: |
| 211 | 211 | url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system |
| 212 | 212 | skip: |
| 213 | - 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;/test/**;login/no/code | |
| 213 | + 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;/test/**;/login/no/code | |
| 214 | 214 | ... | ... |
Bsth-admin/src/main/resources/application-druid-devTest.yml
| ... | ... | @@ -214,4 +214,4 @@ bsth: |
| 214 | 214 | faceFeature: |
| 215 | 215 | url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system |
| 216 | 216 | skip: |
| 217 | - 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;/test/**;login/no/code | |
| 217 | + 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;/test/**;/login/no/code | ... | ... |
Bsth-admin/src/main/resources/mapper/sign/in/exception/report/EquipmentExceptionReportMapper.xml
| ... | ... | @@ -19,6 +19,11 @@ |
| 19 | 19 | <result column="report_id" jdbcType="VARCHAR" property="reportId"/> |
| 20 | 20 | <result column="report_time" jdbcType="VARCHAR" property="reportTime"/> |
| 21 | 21 | <result column="report_old_status" jdbcType="INTEGER" property="reportOldStatus"/> |
| 22 | + <result column="create_by" jdbcType="BIGINT" property="createBy"/> | |
| 23 | + <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | |
| 24 | + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |
| 25 | + <result column="del_flag" jdbcType="BIT" property="delFlag"/> | |
| 26 | + <result column="sign_id" jdbcType="BIGINT" property="signId"/> | |
| 22 | 27 | </resultMap> |
| 23 | 28 | |
| 24 | 29 | <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true" |
| ... | ... | @@ -30,12 +35,12 @@ |
| 30 | 35 | |
| 31 | 36 | <sql id="columns"> |
| 32 | 37 | id |
| 33 | - , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status | |
| 38 | + , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status , create_by , update_by , update_time , del_flag , sign_id | |
| 34 | 39 | </sql> |
| 35 | 40 | |
| 36 | 41 | <sql id="insert_columns"> |
| 37 | 42 | id |
| 38 | - , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status | |
| 43 | + , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status , create_by , update_by , update_time , del_flag , sign_id | |
| 39 | 44 | </sql> |
| 40 | 45 | |
| 41 | 46 | <sql id="insert_values"> |
| ... | ... | @@ -56,7 +61,12 @@ |
| 56 | 61 | #{signType}, |
| 57 | 62 | #{reportId}, |
| 58 | 63 | #{reportTime}, |
| 59 | - #{reportOldStatus} | |
| 64 | + #{reportOldStatus}, | |
| 65 | + #{createBy}, | |
| 66 | + #{updateBy}, | |
| 67 | + #{updateTime}, | |
| 68 | + #{delFlag}, | |
| 69 | + #{signId} | |
| 60 | 70 | </sql> |
| 61 | 71 | |
| 62 | 72 | <sql id="insertSelectiveColumn"> |
| ... | ... | @@ -78,6 +88,11 @@ |
| 78 | 88 | <if test="null!=reportId">report_id,</if> |
| 79 | 89 | <if test="null!=reportTime">report_time,</if> |
| 80 | 90 | <if test="null!=reportOldStatus">report_old_status,</if> |
| 91 | + <if test="null!=createBy">create_by,</if> | |
| 92 | + <if test="null!=updateBy">update_by,</if> | |
| 93 | + <if test="null!=updateTime">update_time,</if> | |
| 94 | + <if test="null!=delFlag">del_flag,</if> | |
| 95 | + <if test="null!=signId">sign_id,</if> | |
| 81 | 96 | </trim> |
| 82 | 97 | </sql> |
| 83 | 98 | |
| ... | ... | @@ -100,6 +115,11 @@ |
| 100 | 115 | <if test="null!=reportId">#{reportId,jdbcType=VARCHAR},</if> |
| 101 | 116 | <if test="null!=reportTime">#{reportTime,jdbcType=VARCHAR},</if> |
| 102 | 117 | <if test="null!=reportOldStatus">#{reportOldStatus,jdbcType=INTEGER},</if> |
| 118 | + <if test="null!=createBy">#{createBy,jdbcType=BIGINT},</if> | |
| 119 | + <if test="null!=updateBy">#{updateBy,jdbcType=BIGINT},</if> | |
| 120 | + <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if> | |
| 121 | + <if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if> | |
| 122 | + <if test="null!=signId">#{signId,jdbcType=BIGINT},</if> | |
| 103 | 123 | </trim> |
| 104 | 124 | </sql> |
| 105 | 125 | |
| ... | ... | @@ -122,6 +142,11 @@ |
| 122 | 142 | <if test="null!=reportId">report_id = #{reportId,jdbcType=VARCHAR},</if> |
| 123 | 143 | <if test="null!=reportTime">report_time = #{reportTime,jdbcType=VARCHAR},</if> |
| 124 | 144 | <if test="null!=reportOldStatus">report_old_status = #{reportOldStatus,jdbcType=INTEGER},</if> |
| 145 | + <if test="null!=createBy">create_by = #{createBy,jdbcType=BIGINT},</if> | |
| 146 | + <if test="null!=updateBy">update_by = #{updateBy,jdbcType=BIGINT},</if> | |
| 147 | + <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | |
| 148 | + <if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if> | |
| 149 | + <if test="null!=signId">sign_id = #{signId,jdbcType=BIGINT},</if> | |
| 125 | 150 | </set> |
| 126 | 151 | </sql> |
| 127 | 152 | |
| ... | ... | @@ -143,5 +168,10 @@ |
| 143 | 168 | <if test="null!=reportId">AND report_id = #{reportId,jdbcType=VARCHAR},</if> |
| 144 | 169 | <if test="null!=reportTime">AND report_time = #{reportTime,jdbcType=VARCHAR},</if> |
| 145 | 170 | <if test="null!=reportOldStatus">AND report_old_status = #{reportOldStatus,jdbcType=INTEGER},</if> |
| 171 | + <if test="null!=createBy">AND create_by = #{createBy,jdbcType=BIGINT},</if> | |
| 172 | + <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=BIGINT},</if> | |
| 173 | + <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if> | |
| 174 | + <if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if> | |
| 175 | + <if test="null!=signId">AND sign_id = #{signId,jdbcType=BIGINT},</if> | |
| 146 | 176 | </sql> |
| 147 | 177 | </mapper> |
| 148 | 178 | \ No newline at end of file | ... | ... |