|
@@ -54,6 +54,7 @@ public class RoutingInspectionServiceImpl extends BaseServiceImpl<RoutingInspect
|
|
|
RoutingInspection inspection = new RoutingInspection();
|
|
|
BeanUtils.copyProperties(dto,inspection);
|
|
|
inspection.setId(id);
|
|
|
+ inspection.setCreateTime(new Date());
|
|
|
this.save(inspection);
|
|
|
//再保存具体的巡检项目
|
|
|
List<InspectionRectify> list1 = list.stream().map(l -> {
|
|
@@ -96,6 +97,19 @@ public class RoutingInspectionServiceImpl extends BaseServiceImpl<RoutingInspect
|
|
|
public IPage<RoutingInspectionVO> page(Query query, RoutingInspection inspection) {
|
|
|
IPage<RoutingInspectionVO> iPage = new Page<>(query.getCurrent(), query.getSize());
|
|
|
baseMapper.page(iPage,inspection);
|
|
|
+ //设置权限,只能整改人可以点
|
|
|
+ Long userId = AuthUtil.getUserId();
|
|
|
+ List<RoutingInspectionVO> records = iPage.getRecords();
|
|
|
+ for (RoutingInspectionVO record : records) {
|
|
|
+ String rectifyUser = record.getRectifyUser();
|
|
|
+ String[] split = rectifyUser.split("-");
|
|
|
+ Long user = Long.parseLong(split[split.length-1]);
|
|
|
+ if (userId.equals(user)){
|
|
|
+ record.setIsRectifyUser(1);
|
|
|
+ }else {
|
|
|
+ record.setIsRectifyUser(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
return iPage;
|
|
|
}
|
|
|
|
|
@@ -134,7 +148,7 @@ public class RoutingInspectionServiceImpl extends BaseServiceImpl<RoutingInspect
|
|
|
//复检通过,修改复检状态为3通过,修改整改状态为2不用整改
|
|
|
this.update(new LambdaUpdateWrapper<RoutingInspection>()
|
|
|
.set(RoutingInspection::getReviewInspectStatus,3)
|
|
|
- .set(RoutingInspection::getIsRectify,2)
|
|
|
+ .set(RoutingInspection::getIsRectify,3)
|
|
|
.eq(RoutingInspection::getId,id));
|
|
|
}else {
|
|
|
throw new ServiceException("参数错误");
|