Commit bc5995c39264bb9d3818d925ee74965d8ad6ea3d
1 parent
e26e27bf
fix: 修改配置文件 ,修改签到返回内容
Showing
6 changed files
with
21 additions
and
10 deletions
ruoyi-admin/src/main/java/com/ruoyi/common/ConstSignInConstSignInProperties.java
| ... | ... | @@ -53,6 +53,7 @@ public interface ConstSignInConstSignInProperties { |
| 53 | 53 | |
| 54 | 54 | String SIGN_IN_SUCCESS_STRING = "签到成功"; |
| 55 | 55 | Integer SIGN_IN_SUCCESS = 1; |
| 56 | + String SIGN_OUT_SUCCESS_STRING = "签退成功"; | |
| 56 | 57 | String SIGN_IN_FAIL_STRING = "签到异常"; |
| 57 | 58 | Integer SIGN_IN_FAIL = 2; |
| 58 | 59 | /** | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/common/ErrorTypeProperties.java
| ... | ... | @@ -5,6 +5,7 @@ package com.ruoyi.common; |
| 5 | 5 | */ |
| 6 | 6 | public interface ErrorTypeProperties { |
| 7 | 7 | String SIGN_IN_ERROR = "签到异常"; |
| 8 | + String SIGN_OUT_ERROR = "签退异常"; | |
| 8 | 9 | String EQUIPMENT_ERROR = "设备异常"; |
| 9 | 10 | String ALCOHOL_SIGN_IN_ERROR = "酒精测试超标,"; |
| 10 | 11 | String WORK_DAY_ERROR = "当天没有排班,"; | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/common/cache/SchedulingCache.java
ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
| ... | ... | @@ -223,7 +223,7 @@ public class SignInServiceImpl implements ISignInService { |
| 223 | 223 | schedulingService.computedSignInBySignIn(dto, signIn, globalIndex); |
| 224 | 224 | |
| 225 | 225 | // 异常保存到异常异常中 |
| 226 | - threadJobService.asyncInsertExceptionRecord(signIn,driver,dto,globalIndex); | |
| 226 | + threadJobService.asyncInsertExceptionRecord(signIn, driver, dto, globalIndex); | |
| 227 | 227 | |
| 228 | 228 | // 驾驶人员二次签到酒精测试异常 |
| 229 | 229 | if (PERSONNEL_POSTS_DRIVER.equals(driver.getPosts()) && SIGN_IN_FAIL.equals(signIn.getStatus()) && signIn.getRemark().contains(ALCOHOL_SIGN_IN_ERROR)) { |
| ... | ... | @@ -232,7 +232,18 @@ public class SignInServiceImpl implements ISignInService { |
| 232 | 232 | return result; |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | - return SIGN_IN_SUCCESS.equals(signIn.getStatus()) ? AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo) : AjaxResult.success(SIGN_IN_ERROR + ":" + signIn.getRemark(), vo); | |
| 235 | + if (SIGN_IN_SUCCESS.equals(signIn.getStatus())) { | |
| 236 | + if (signIn.getType().equals(SIGN_OUT)) { | |
| 237 | + return AjaxResult.success(SIGN_OUT_SUCCESS_STRING, vo); | |
| 238 | + } else { | |
| 239 | + return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo); | |
| 240 | + } | |
| 241 | + } else { | |
| 242 | + if (signIn.getType().equals(SIGN_OUT)) { | |
| 243 | + return AjaxResult.success(SIGN_OUT_ERROR + ":" + signIn.getRemark(), vo); | |
| 244 | + } | |
| 245 | + return AjaxResult.success(SIGN_IN_ERROR + ":" + signIn.getRemark(), vo); | |
| 246 | + } | |
| 236 | 247 | } |
| 237 | 248 | |
| 238 | 249 | @Override |
| ... | ... | @@ -288,7 +299,7 @@ public class SignInServiceImpl implements ISignInService { |
| 288 | 299 | return nextDay.format(formatter); |
| 289 | 300 | } |
| 290 | 301 | |
| 291 | - private String transFormDate(String dateString){ | |
| 302 | + private String transFormDate(String dateString) { | |
| 292 | 303 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| 293 | 304 | LocalDate parse = LocalDate.parse(dateString, formatter); |
| 294 | 305 | DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| ... | ... | @@ -311,7 +322,7 @@ public class SignInServiceImpl implements ISignInService { |
| 311 | 322 | for (SignInResponseVo sign : value) { |
| 312 | 323 | GlobalIndex globalIndex = new GlobalIndex(); |
| 313 | 324 | checkSignIn(sign.getCreateTime().getTime(), resultMap.get(sign.getJobCode()), globalIndex, sign, drivers.get(sign.getJobCode())); |
| 314 | - schedulingService.computedSignInBySignIn(resultMap.get(sign.getJobCode()),sign,globalIndex); | |
| 325 | + schedulingService.computedSignInBySignIn(resultMap.get(sign.getJobCode()), sign, globalIndex); | |
| 315 | 326 | } |
| 316 | 327 | } |
| 317 | 328 | } | ... | ... |
ruoyi-admin/src/main/java/com/ruoyi/service/impl/AttendanceServiceImpl.java
| ... | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 5 | 5 | import com.ruoyi.common.utils.DateUtils; |
| 6 | 6 | import com.ruoyi.common.utils.PageUtils; |
| 7 | 7 | import com.ruoyi.common.utils.SecurityUtils; |
| 8 | +import com.ruoyi.common.utils.StringUtils; | |
| 8 | 9 | import com.ruoyi.domain.*; |
| 9 | 10 | import com.ruoyi.driver.mapper.DriverMapper; |
| 10 | 11 | import com.ruoyi.num.domain.RuleNum; |
| ... | ... | @@ -150,7 +151,8 @@ public class AttendanceServiceImpl implements AttendanceService { |
| 150 | 151 | PageUtils.startPage(); |
| 151 | 152 | List<RuleAttendanceMain> list = attendanceMainService.list(new QueryWrapper<RuleAttendanceMain>() |
| 152 | 153 | .lambda() |
| 153 | - .eq(RuleAttendanceMain::getSchedulingDate, vo.getDate())); | |
| 154 | + .eq(RuleAttendanceMain::getSchedulingDate, vo.getDate()) | |
| 155 | + .eq(StringUtils.isNotEmpty(vo.getJocCode()),RuleAttendanceMain::getJobCode,vo.getJocCode())); | |
| 154 | 156 | return list; |
| 155 | 157 | } |
| 156 | 158 | ... | ... |
ruoyi-admin/src/main/resources/application-druid-dev.yml