技术监督管理bug修改
This commit is contained in:
@@ -161,5 +161,6 @@ public class SupvPlanVO {
|
||||
*/
|
||||
private String effectStatus;
|
||||
|
||||
private String createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -39,6 +41,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -67,6 +70,8 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
|
||||
private final SupvProblemMapper supvProblemMapper;
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addPlan(SupvPlanParam supvPlanParam) {
|
||||
@@ -119,6 +124,13 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
if (CollUtil.isNotEmpty(busIds)) {
|
||||
LambdaQueryWrapper<SupvFile> fileLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
fileLambdaQueryWrapper.in(SupvFile::getBusiId, busIds);
|
||||
|
||||
List<SupvFile> supvFiles = supvFileMapper.selectList(fileLambdaQueryWrapper);
|
||||
|
||||
for(SupvFile supvFile: supvFiles){
|
||||
fileStorageUtil.deleteFile(supvFile.getFileUrl());
|
||||
}
|
||||
|
||||
supvFileMapper.delete(fileLambdaQueryWrapper);
|
||||
}
|
||||
return true;
|
||||
@@ -129,7 +141,11 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
|
||||
LambdaQueryWrapper<SupvPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StrUtil.isNotBlank(supvPlanParam.getSupvOrgId())) {
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getSupvOrgId()).getData();
|
||||
lambdaQueryWrapper.in(SupvPlan::getSupvOrgId, deptIds).between(SupvPlan::getPlanSupvDate, supvPlanParam.getSearchBeginTime(), supvPlanParam.getSearchEndTime());
|
||||
lambdaQueryWrapper.in(SupvPlan::getSupvOrgId, deptIds)
|
||||
.between(SupvPlan::getCreateTime, LocalDateTimeUtil.beginOfDay(LocalDate.parse(supvPlanParam.getSearchBeginTime()).atStartOfDay()), LocalDateTimeUtil.endOfDay(LocalDate.parse(supvPlanParam.getSearchEndTime()).atStartOfDay()))
|
||||
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()),SupvPlan::getSupvType,supvPlanParam.getSupvType())
|
||||
.orderByDesc(SupvPlan::getCreateTime);
|
||||
|
||||
}
|
||||
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
|
||||
|
||||
@@ -39,6 +39,7 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -279,6 +280,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
||||
|
||||
@Override
|
||||
public boolean deletePlan(List<String> planIds) {
|
||||
//判断是否已经取消上送
|
||||
LambdaQueryWrapper<SupvPlan> supvPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
supvPlanLambdaQueryWrapper.in(SupvPlan::getIsUploadHead, Stream.of(0,2).collect(Collectors.toList())).in(SupvPlan::getPlanId,planIds);
|
||||
int count = supvPlanMapper.selectCount(supvPlanLambdaQueryWrapper);
|
||||
if(count>0){
|
||||
throw new BusinessException("请选择已上送计划");
|
||||
}
|
||||
|
||||
List<SupvPlan> supvPlanList = new ArrayList<>();
|
||||
for(String id : planIds) {
|
||||
|
||||
Reference in New Issue
Block a user