Commit 1ec5bfb6490a5ab42f5e5fecffdc2db7c40dc0c0
1 parent
637ebf97
bf
Showing
4 changed files
with
15 additions
and
6 deletions
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineAddController.java
| ... | ... | @@ -138,6 +138,7 @@ public class BsthTLineAddController extends BaseController |
| 138 | 138 | User loginUser = ShiroUtils.getSysUser(); |
| 139 | 139 | bsthTLine.setUpdateBy(loginUser.getUserName()); |
| 140 | 140 | bsthTLine.setLineUpdateType("3"); |
| 141 | + bsthTLine.setExamineStatus("0"); | |
| 141 | 142 | return toAjax(bsthTLineService.updateBsthTLineExamine(bsthTLine)); |
| 142 | 143 | } |
| 143 | 144 | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineHistoryController.java
| ... | ... | @@ -115,6 +115,7 @@ public class BsthTLineHistoryController extends BaseController |
| 115 | 115 | BsthTLine bsthTLineExamine=bsthTLineService.selectBsthTLineExamineByLineName(lineName); |
| 116 | 116 | if(bsthTLineExamine!=null){//有没审核的直接覆盖 |
| 117 | 117 | bsthTLine.setId(bsthTLineExamine.getId()); |
| 118 | + bsthTLine.setExamineStatus("0"); | |
| 118 | 119 | ajaxResult= toAjax(bsthTLineService.updateBsthTLineExamine(bsthTLine)); |
| 119 | 120 | }else {//没有新增 |
| 120 | 121 | bsthTLine.setExamineType("1"); | ... | ... |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/service/impl/BsthTLineServiceImpl.java
| 1 | 1 | package com.ruoyi.project.system.line.service.impl; |
| 2 | 2 | |
| 3 | 3 | import java.time.LocalDateTime; |
| 4 | +import java.time.ZoneId; | |
| 4 | 5 | import java.time.format.DateTimeFormatter; |
| 5 | -import java.util.ArrayList; | |
| 6 | -import java.util.Date; | |
| 7 | -import java.util.HashMap; | |
| 8 | -import java.util.List; | |
| 9 | -import java.util.Map; | |
| 6 | +import java.util.*; | |
| 10 | 7 | import java.util.stream.Collectors; |
| 11 | 8 | |
| 12 | 9 | import com.ruoyi.common.utils.DateUtils; |
| ... | ... | @@ -260,7 +257,7 @@ public class BsthTLineServiceImpl implements IBsthTLineService |
| 260 | 257 | lineEditReport.setVehiclesNumber(history.getVehiclesNumber()); |
| 261 | 258 | lineEditReport.setNumberPerson(history.getNumberPerson()); |
| 262 | 259 | if(history.getStartDate()==null){ |
| 263 | - lineEditReport.setStartDate(new Date()); | |
| 260 | + lineEditReport.setStartDate(initDateByDay()); | |
| 264 | 261 | }else { |
| 265 | 262 | lineEditReport.setStartDate(history.getStartDate()); |
| 266 | 263 | } |
| ... | ... | @@ -448,4 +445,13 @@ public class BsthTLineServiceImpl implements IBsthTLineService |
| 448 | 445 | return bsthTLineMapper.selectCompany(); |
| 449 | 446 | } |
| 450 | 447 | |
| 448 | + public static Date initDateByDay(){ | |
| 449 | + Calendar calendar = Calendar.getInstance(); | |
| 450 | + calendar.setTime(new Date()); | |
| 451 | + calendar.set(Calendar.HOUR_OF_DAY, 0); | |
| 452 | + calendar.set(Calendar.MINUTE, 0); | |
| 453 | + calendar.set(Calendar.SECOND, 0); | |
| 454 | + return calendar.getTime(); | |
| 455 | + } | |
| 456 | + | |
| 451 | 457 | } | ... | ... |
bsthLineProfiles/src/main/resources/templates/system/lineAdd/line.html