Commit 8a227ad26027fc9b13e486f3b4e4bfd29820d37c
1 parent
a2f2b911
排班不做特殊处理
Showing
5 changed files
with
20 additions
and
16 deletions
Bsth-admin/src/main/java/com/ruoyi/driver/controller/DriverController.java
| ... | ... | @@ -149,8 +149,8 @@ public class DriverController extends BaseController { |
| 149 | 149 | * @param request 请求头 |
| 150 | 150 | * @param vo 更新实际数据 |
| 151 | 151 | */ |
| 152 | - @PostMapping("/update/face") | |
| 153 | - @ApiOperation("人脸数据更新接口") | |
| 152 | + // @PostMapping("/update/face") | |
| 153 | + // @ApiOperation("人脸数据更新接口") | |
| 154 | 154 | public Result<?> updateFaceByJob(HttpServletRequest request, @ApiParam @Validated @RequestBody FaceUpdateReqVo vo) { |
| 155 | 155 | try { |
| 156 | 156 | return driverService.updateFaceByJob(request, vo); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceV1Impl.java
| ... | ... | @@ -157,7 +157,7 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i |
| 157 | 157 | |
| 158 | 158 | private AjaxResult saveData(SignIn signIn, DriverScheduling scheduling, CalDriverScheduling calDriverScheduling, Driver driver, SignInV1 signInV1) { |
| 159 | 159 | signIn.setExType1(signIn.getExType()); |
| 160 | - Integer type = Objects.isNull(signIn.getExType()) ? 0 : signIn.getExType() > 0 ? 1 : 0; | |
| 160 | + Integer type = Objects.isNull(signIn.getExType()) ? 0 : bigViewServiceV1.isSignStatusWineEnum(signIn) ? 3 : signIn.getExType() > 0 ? 1 : 0; | |
| 161 | 161 | signIn.setExType(type); |
| 162 | 162 | signInMapper.insertSignIn(signIn); |
| 163 | 163 | // 更新考勤 |
| ... | ... | @@ -274,9 +274,9 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i |
| 274 | 274 | calendar1.set(Calendar.MILLISECOND, 999); |
| 275 | 275 | |
| 276 | 276 | |
| 277 | - boolean flag = Math.abs(calendar.getTime().getTime() - time) > Math.abs(calendar1.getTime().getTime() - time) ? Boolean.FALSE:Boolean.TRUE; | |
| 277 | + boolean flag = Math.abs(calendar.getTime().getTime() - time) > Math.abs(calendar1.getTime().getTime() - time) ? Boolean.FALSE : Boolean.TRUE; | |
| 278 | 278 | String remark = org.apache.commons.lang3.StringUtils.join(ErrorTypeProperties.SIGN_OUT_TIMEOUT, "请在", fcsjHHMM, "到", dzsjHHMM, "之间打卡"); |
| 279 | - return switchAndChooseTime(signIn, dateTime, calendar1.getTime(), calendar.getTime(), remark,flag); | |
| 279 | + return switchAndChooseTime(signIn, dateTime, calendar1.getTime(), calendar.getTime(), remark, flag); | |
| 280 | 280 | } else { |
| 281 | 281 | Date fcsj = new Date(scheduling.getFcsjT()); |
| 282 | 282 | |
| ... | ... | @@ -295,10 +295,10 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i |
| 295 | 295 | calendar1.set(Calendar.SECOND, 0); |
| 296 | 296 | calendar1.set(Calendar.MILLISECOND, 0); |
| 297 | 297 | |
| 298 | - boolean flag = Math.abs(calendar.getTime().getTime() - time) > Math.abs(calendar1.getTime().getTime() - time) ? Boolean.FALSE:Boolean.TRUE; | |
| 298 | + boolean flag = Math.abs(calendar.getTime().getTime() - time) > Math.abs(calendar1.getTime().getTime() - time) ? Boolean.FALSE : Boolean.TRUE; | |
| 299 | 299 | String remark = org.apache.commons.lang3.StringUtils.join(ErrorTypeProperties.SIGN_IN_TIMEOUT, "请在", fcsjHHMM, "到", dzsjHHMM, "之间打卡"); |
| 300 | 300 | |
| 301 | - return switchAndChooseTime(signIn, dateTime, calendar1.getTime(), calendar.getTime(), remark,flag); | |
| 301 | + return switchAndChooseTime(signIn, dateTime, calendar1.getTime(), calendar.getTime(), remark, flag); | |
| 302 | 302 | } |
| 303 | 303 | } |
| 304 | 304 | |
| ... | ... | @@ -327,18 +327,18 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i |
| 327 | 327 | * @author liujun |
| 328 | 328 | * @date 2024/9/20 17:14 |
| 329 | 329 | */ |
| 330 | - private int switchAndChooseTime(SignIn signIn, long dateTime, Date date, Date endDate, String remark,boolean flag) { | |
| 330 | + private int switchAndChooseTime(SignIn signIn, long dateTime, Date date, Date endDate, String remark, boolean flag) { | |
| 331 | 331 | long startTime = date.getTime(); |
| 332 | - // date = org.apache.commons.lang3.time.DateUtils.addMinutes(date, value); | |
| 332 | + // date = org.apache.commons.lang3.time.DateUtils.addMinutes(date, value); | |
| 333 | 333 | long endTime = endDate.getTime(); |
| 334 | 334 | |
| 335 | - if(dateTime < startTime){ | |
| 335 | + if (dateTime < startTime) { | |
| 336 | 336 | signIn.setExType(20); |
| 337 | 337 | signIn.setRemark(remark); |
| 338 | 338 | signIn.setStatus(2); |
| 339 | 339 | |
| 340 | 340 | return 1; |
| 341 | - }else if(dateTime > endTime){ | |
| 341 | + } else if (dateTime > endTime) { | |
| 342 | 342 | signIn.setExType(30); |
| 343 | 343 | signIn.setRemark(remark); |
| 344 | 344 | signIn.setStatus(2); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/job/DriverJob.java
| ... | ... | @@ -26,6 +26,7 @@ import com.ruoyi.service.ThreadJobService; |
| 26 | 26 | import com.ruoyi.utils.ConstDateUtil; |
| 27 | 27 | import com.ruoyi.utils.ListUtils; |
| 28 | 28 | import lombok.extern.slf4j.Slf4j; |
| 29 | +import org.apache.commons.collections4.CollectionUtils; | |
| 29 | 30 | import org.springframework.beans.BeanUtils; |
| 30 | 31 | import org.springframework.beans.factory.InitializingBean; |
| 31 | 32 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -487,6 +488,9 @@ public class DriverJob implements InitializingBean { |
| 487 | 488 | } |
| 488 | 489 | |
| 489 | 490 | public static List<Driver> handlerDrivers(Date date, PersonnelResultResponseVo vo) { |
| 491 | + if(Objects.nonNull(vo) && CollectionUtils.isNotEmpty(vo.getData())){ | |
| 492 | + log.error("refresh driver:[{}]",JSON.toJSONString(vo.getData())); | |
| 493 | + } | |
| 490 | 494 | List<Driver> drivers = vo.getData().stream().map(item -> { |
| 491 | 495 | Driver driver = new Driver(); |
| 492 | 496 | FormData formData = item.getFormData(); | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/ThreadJobService.java
| ... | ... | @@ -649,10 +649,10 @@ public class ThreadJobService { |
| 649 | 649 | if (nowScheduling.get(0).getLineName().equals("虹桥枢纽6路") && nowScheduling.get(0).getLpName().equals("9") && nowScheduling.size() == 5) { |
| 650 | 650 | nowScheduling.remove(3); |
| 651 | 651 | } |
| 652 | - // 处理青浦20路 2号路牌 签到时间调整为07:20 | 5号路牌 签到时间调整为07:05 | |
| 653 | - if (nowScheduling.get(0).getLineName().equals("青浦20路")) { | |
| 654 | - updateQinpu2With5(nowScheduling); | |
| 655 | - } | |
| 652 | +// // 处理青浦20路 2号路牌 签到时间调整为07:20 | 5号路牌 签到时间调整为07:05 | |
| 653 | +// if (nowScheduling.get(0).getLineName().equals("青浦20路")) { | |
| 654 | +// updateQinpu2With5(nowScheduling); | |
| 655 | +// } | |
| 656 | 656 | return nowScheduling; |
| 657 | 657 | } |
| 658 | 658 | ... | ... |