Commit b6ff605a8f36ef3e70a2cac43c19568f126e581c
1 parent
fc25cfea
fix: 更新提示语
Showing
1 changed file
with
5 additions
and
4 deletions
ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
| @@ -112,6 +112,7 @@ public class SignInServiceImpl implements ISignInService { | @@ -112,6 +112,7 @@ public class SignInServiceImpl implements ISignInService { | ||
| 112 | signIn.setStatus(SIGN_IN_SUCCESS); | 112 | signIn.setStatus(SIGN_IN_SUCCESS); |
| 113 | } else { | 113 | } else { |
| 114 | signIn.setStatus(SIGN_IN_FAIL); | 114 | signIn.setStatus(SIGN_IN_FAIL); |
| 115 | + signIn.setRemark(signIn.getRemark().replaceFirst(",$", "。")); | ||
| 115 | } | 116 | } |
| 116 | signIn.setIp(IpUtils.getIpAddr()); | 117 | signIn.setIp(IpUtils.getIpAddr()); |
| 117 | // base64转图片 | 118 | // base64转图片 |
| @@ -126,8 +127,8 @@ public class SignInServiceImpl implements ISignInService { | @@ -126,8 +127,8 @@ public class SignInServiceImpl implements ISignInService { | ||
| 126 | return result; | 127 | return result; |
| 127 | } | 128 | } |
| 128 | } | 129 | } |
| 129 | - if (SIGN_IN_FAIL.equals(signIn.getStatus())){ | ||
| 130 | - return AjaxResult.error(SIGN_IN_ERROR + signIn.getRemark(), vo); | 130 | + if (SIGN_IN_FAIL.equals(signIn.getStatus())) { |
| 131 | + return AjaxResult.error(SIGN_IN_ERROR + ":" + signIn.getRemark(), vo); | ||
| 131 | } | 132 | } |
| 132 | return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo); | 133 | return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo); |
| 133 | } | 134 | } |
| @@ -220,7 +221,7 @@ public class SignInServiceImpl implements ISignInService { | @@ -220,7 +221,7 @@ public class SignInServiceImpl implements ISignInService { | ||
| 220 | count = redisCache.setIncrementMapValue(key, signIn.getJobCode(), 1); | 221 | count = redisCache.setIncrementMapValue(key, signIn.getJobCode(), 1); |
| 221 | } | 222 | } |
| 222 | if (SIGN_IN_ERROR_COUNT.compareTo(count) <= 0) { | 223 | if (SIGN_IN_ERROR_COUNT.compareTo(count) <= 0) { |
| 223 | - return AjaxResult.warn(SIGN_IN_ERROR + ": "+ signIn.getRemark() + "酒精测试不通过" + count + "次请更换车辆驾驶员。", vo); | 224 | + return AjaxResult.warn(SIGN_IN_ERROR + ": " + signIn.getRemark() + "酒精测试不通过" + count + "次请更换车辆驾驶员。", vo); |
| 224 | } | 225 | } |
| 225 | return null; | 226 | return null; |
| 226 | } | 227 | } |
| @@ -235,7 +236,7 @@ public class SignInServiceImpl implements ISignInService { | @@ -235,7 +236,7 @@ public class SignInServiceImpl implements ISignInService { | ||
| 235 | 236 | ||
| 236 | // 酒精测试校验 确定 且员工工种是驾驶员 | 237 | // 酒精测试校验 确定 且员工工种是驾驶员 |
| 237 | if (ALCOHOL_FLAG_YES.equals(signIn.getAlcoholFlag()) && PERSONNEL_POSTS_DRIVER.equals(driver.getPosts())) { | 238 | if (ALCOHOL_FLAG_YES.equals(signIn.getAlcoholFlag()) && PERSONNEL_POSTS_DRIVER.equals(driver.getPosts())) { |
| 238 | - if (new BigDecimal(20).compareTo(signIn.getAlcoholIntake()) <= 0) { | 239 | + if (new BigDecimal(20).compareTo(signIn.getAlcoholIntake()) <= 0) { |
| 239 | signIn.setRemark(signIn.getRemark() + ALCOHOL_SIGN_IN_ERROR); | 240 | signIn.setRemark(signIn.getRemark() + ALCOHOL_SIGN_IN_ERROR); |
| 240 | result = false; | 241 | result = false; |
| 241 | } | 242 | } |