技术监督管理bug修改

This commit is contained in:
2023-07-06 08:59:20 +08:00
parent e19555075d
commit 8feb7b00ab
4 changed files with 28 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
deptGetBase.setUnitId(it.getCode());
deptGetBase.setUnitName(it.getName());
List<String> deptChildren = deptDTOList.stream().filter(deptDTO -> deptDTO.getPids().contains(it.getId())).map(DeptDTO::getCode).collect(Collectors.toList());
deptChildren.add(it.getId());
deptChildren.add(it.getCode());
deptGetBase.setUnitChildrenList(deptChildren);
deptGetBase.setDeptLevel(it.getPids().split(StrUtil.COMMA).length);
result.add(deptGetBase);

View File

@@ -161,5 +161,6 @@ public class SupvPlanVO {
*/
private String effectStatus;
private String createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
}

View File

@@ -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()));

View File

@@ -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) {