Commit 9d4184004de0f1a7f97db5217232c809e88fbd87

Authored by guzijian
1 parent 9c617f46

fix: 修复没有地址bug

ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
@@ -147,6 +147,10 @@ public class SignInServiceImpl implements ISignInService { @@ -147,6 +147,10 @@ public class SignInServiceImpl implements ISignInService {
147 signInMapper.insertSignIn(signIn); 147 signInMapper.insertSignIn(signIn);
148 // TODO 驾驶人员二次签到酒精测试异常 148 // TODO 驾驶人员二次签到酒精测试异常
149 if (true) { 149 if (true) {
  150 + Equipment equipment = equipmentMapper.selectEquipmentByDeviceId(signIn.getDeviceId());
  151 + SignInResponseVo vo = new SignInResponseVo();
  152 + vo.setAddress(equipment.getAddress());
  153 + vo.setDeviceId(signIn.getDeviceId());
150 Integer count = redisCache.getCacheMapValue(ConstDateUtil.formatDate("yyyyMMdd") + REDIS_SIGN_IN, signIn.getJobCode()); 154 Integer count = redisCache.getCacheMapValue(ConstDateUtil.formatDate("yyyyMMdd") + REDIS_SIGN_IN, signIn.getJobCode());
151 if (Objects.isNull(count)) { 155 if (Objects.isNull(count)) {
152 redisCache.setCacheMapValue(ConstDateUtil.formatDate("yyyyMMdd") + REDIS_SIGN_IN, signIn.getJobCode(), 0); 156 redisCache.setCacheMapValue(ConstDateUtil.formatDate("yyyyMMdd") + REDIS_SIGN_IN, signIn.getJobCode(), 0);
@@ -155,7 +159,7 @@ public class SignInServiceImpl implements ISignInService { @@ -155,7 +159,7 @@ public class SignInServiceImpl implements ISignInService {
155 } 159 }
156 if (count.compareTo(2) >= 0) { 160 if (count.compareTo(2) >= 0) {
157 // TODO 161 // TODO
158 - return SIGN_IN_SUCCESS.equals(signIn.getStatus()) ? AjaxResult.success(SIGN_IN_SUCCESS_STRING) : AjaxResult.error(SIGN_IN_ERROR + signIn.getRemark() + ",酒精测试不通过两次请更换车辆驾驶员"); 162 + return SIGN_IN_SUCCESS.equals(signIn.getStatus()) ? AjaxResult.success(SIGN_IN_SUCCESS_STRING,vo) : AjaxResult.error(SIGN_IN_ERROR + signIn.getRemark() + ",酒精测试不通过两次请更换车辆驾驶员",vo);
159 } 163 }
160 } 164 }
161 165