Commit 577addc5 authored by hkl's avatar hkl

feat:1.站名bug

parent 2523344a
...@@ -115,7 +115,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -115,7 +115,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
List<WorkBatchSaveOrUpdateDetailDTO> transfiniteList = dto.getDetailList(); List<WorkBatchSaveOrUpdateDetailDTO> transfiniteList = dto.getDetailList();
//获取当前登录人信息 //获取当前登录人信息
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String realname = user.getRealname(); String username = user.getUsername();
for (WorkBatchSaveOrUpdateDetailDTO detailDTO : transfiniteList) { for (WorkBatchSaveOrUpdateDetailDTO detailDTO : transfiniteList) {
WorkBatchDetail workBatchDetail = new WorkBatchDetail(); WorkBatchDetail workBatchDetail = new WorkBatchDetail();
workBatchDetail.setId(UUIDGenerator.generate()); workBatchDetail.setId(UUIDGenerator.generate());
...@@ -134,8 +134,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -134,8 +134,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setRemark(detailDTO.getRemark()); workBatchDetail.setRemark(detailDTO.getRemark());
workBatchDetail.setUpdateTime(new Date()); workBatchDetail.setUpdateTime(new Date());
workBatchDetail.setCreateTime(new Date()); workBatchDetail.setCreateTime(new Date());
workBatchDetail.setCreateBy(realname); workBatchDetail.setCreateBy(username);
workBatchDetail.setUpdateBy(realname); workBatchDetail.setUpdateBy(username);
workBatchDetail.setWorkStatus(0); workBatchDetail.setWorkStatus(0);
workBatchDetailMapper.insert(workBatchDetail); workBatchDetailMapper.insert(workBatchDetail);
} }
...@@ -167,7 +167,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -167,7 +167,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
// 保存明细 // 保存明细
//获取当前登录人信息 //获取当前登录人信息
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String realname = user.getRealname(); String username = user.getUsername();
List<DispatchDTO> transfiniteList = dto.getDetailList(); List<DispatchDTO> transfiniteList = dto.getDetailList();
List<WorkBatchDetail> workBatchDetailList = new ArrayList<>(); List<WorkBatchDetail> workBatchDetailList = new ArrayList<>();
for (DispatchDTO transfiniteDTO : transfiniteList) { for (DispatchDTO transfiniteDTO : transfiniteList) {
...@@ -192,8 +192,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -192,8 +192,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setWorkStatus(0); workBatchDetail.setWorkStatus(0);
workBatchDetail.setUpdateTime(new Date()); workBatchDetail.setUpdateTime(new Date());
workBatchDetail.setCreateTime(new Date()); workBatchDetail.setCreateTime(new Date());
workBatchDetail.setCreateBy(realname); workBatchDetail.setCreateBy(username);
workBatchDetail.setUpdateBy(realname); workBatchDetail.setUpdateBy(username);
workBatchDetailList.add(workBatchDetail); workBatchDetailList.add(workBatchDetail);
......
...@@ -81,6 +81,11 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain ...@@ -81,6 +81,11 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
if (record.getId().equals(dto.getId())) { if (record.getId().equals(dto.getId())) {
continue; continue;
} }
if(record.getStationName().equals(dto.getStationName())){
throw JeecgBootException.error("同一线路,线别下已存在该站名");
}
BigDecimal currentStartMileage = record.getStartingMileage(); BigDecimal currentStartMileage = record.getStartingMileage();
BigDecimal currentEndMileage = record.getEndMileage(); BigDecimal currentEndMileage = record.getEndMileage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment