|
|
|
@ -4,63 +4,62 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.util.StringUtils; |
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
|
|
|
|
|
import com.alibaba.excel.write.metadata.WriteSheet; |
|
|
|
|
|
|
|
import com.alibaba.excel.write.metadata.fill.FillConfig; |
|
|
|
|
|
|
|
import com.alibaba.excel.write.metadata.fill.FillWrapper; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.biutag.supervision.common.UserContextHolder; |
|
|
|
import com.biutag.supervision.common.UserContextHolder; |
|
|
|
import com.biutag.supervision.constants.AppConstants; |
|
|
|
import com.biutag.supervision.constants.AppConstants; |
|
|
|
import com.biutag.supervision.constants.enums.RoleCodeEnum; |
|
|
|
import com.biutag.supervision.constants.enums.RoleCodeEnum; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.InformMessageMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.Invest.InvertRecordMapper; |
|
|
|
import com.biutag.supervision.mapper.Report.ReportFileMapper; |
|
|
|
import com.biutag.supervision.mapper.Report.ReportFileMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.Report.ReportFlowMapper; |
|
|
|
import com.biutag.supervision.mapper.Report.ReportProjectMapper; |
|
|
|
import com.biutag.supervision.mapper.Report.ReportProjectMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.Report.ReportReviewMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.Warning.WarningContentMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.Warning.WarningRecordMapper; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.InformMessage; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.InvertRecord; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportFile; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportFile; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportFlow; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportFlow; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportReview; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportReview; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.warning.WarningContent; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.warning.WarningRecord; |
|
|
|
import com.biutag.supervision.pojo.enums.FlowEnum; |
|
|
|
import com.biutag.supervision.pojo.enums.FlowEnum; |
|
|
|
import com.biutag.supervision.pojo.enums.FlowStateEnum; |
|
|
|
import com.biutag.supervision.pojo.enums.FlowStateEnum; |
|
|
|
import com.biutag.supervision.pojo.model.UserAuth; |
|
|
|
import com.biutag.supervision.pojo.model.UserAuth; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.Report.ReportDeleteParam; |
|
|
|
import com.biutag.supervision.pojo.param.Report.ReportProjectQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.Report.ReportProjectQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.Work.ProjectWorkQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.Work.ProjectWorkQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.entryWindow.EntryWindowQueryParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.FileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.FileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.entryWindow.EntryWindowVo; |
|
|
|
import com.biutag.supervision.pojo.vo.entryWindow.EntryWindowVo; |
|
|
|
import com.biutag.supervision.pojo.vo.excel.ExcelControlPriceVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportFileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportFileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportHomeVo; |
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportHomeVo; |
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportProjectVo; |
|
|
|
import com.biutag.supervision.pojo.vo.report.ReportProjectVo; |
|
|
|
import com.biutag.supervision.pojo.vo.statement.ConditionVo; |
|
|
|
import com.biutag.supervision.pojo.vo.statement.ConditionVo; |
|
|
|
import com.biutag.supervision.pojo.vo.work.ProjectTabWorkVo; |
|
|
|
import com.biutag.supervision.pojo.vo.work.ProjectTabWorkVo; |
|
|
|
import com.biutag.supervision.pojo.vo.work.ProjectWorkVo; |
|
|
|
import com.biutag.supervision.pojo.vo.work.ProjectWorkVo; |
|
|
|
import io.swagger.v3.core.util.Json; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import jakarta.servlet.ServletOutputStream; |
|
|
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
|
|
|
import org.apache.poi.util.IOUtils; |
|
|
|
|
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.InputStream; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
|
|
|
import java.net.URLEncoder; |
|
|
|
|
|
|
|
import java.net.http.HttpResponse; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@ -78,6 +77,26 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
|
|
|
|
|
|
|
|
private final ReportFlowService reportFlowService; |
|
|
|
private final ReportFlowService reportFlowService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ReportReviewMapper reviewMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ReportFileMapper reportFileMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ReportFlowMapper reportFlowMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private InformMessageMapper informMessageMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private WarningContentMapper warningContentMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private WarningRecordMapper warningRecordMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private InvertRecordMapper invertRecordMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Page<EntryWindowVo> getPage(Page<ReportProject> page, QueryWrapper<ReportProject> lambdaQueryWrapper) { |
|
|
|
public Page<EntryWindowVo> getPage(Page<ReportProject> page, QueryWrapper<ReportProject> lambdaQueryWrapper) { |
|
|
|
@ -90,14 +109,14 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取数据 |
|
|
|
* 获取数据 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
public Page<ConditionVo> getConditionPage(Page<ReportProject> page, QueryWrapper<ReportProject> lambdaQueryWrapper) { |
|
|
|
public Page<ConditionVo> getConditionPage(Page<ReportProject> page, QueryWrapper<ReportProject> lambdaQueryWrapper) { |
|
|
|
return baseMapper.queryPageCondition(page, lambdaQueryWrapper); |
|
|
|
return baseMapper.queryPageCondition(page, lambdaQueryWrapper); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取数据详情 |
|
|
|
* 获取数据详情 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
public List<ReportProject> getProjectList(ReportProjectQueryParam queryParam) { |
|
|
|
public List<ReportProject> getProjectList(ReportProjectQueryParam queryParam) { |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
LambdaQueryWrapper<ReportProject> queryWrapper = new LambdaQueryWrapper<ReportProject>() |
|
|
|
LambdaQueryWrapper<ReportProject> queryWrapper = new LambdaQueryWrapper<ReportProject>() |
|
|
|
@ -109,9 +128,10 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
} |
|
|
|
} |
|
|
|
return baseMapper.selectList(queryWrapper); |
|
|
|
return baseMapper.selectList(queryWrapper); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取报审项目详情 |
|
|
|
* 获取报审项目详情 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
public ReportProjectVo getDetail(String id) { |
|
|
|
public ReportProjectVo getDetail(String id) { |
|
|
|
ReportProjectVo vo = new ReportProjectVo(); |
|
|
|
ReportProjectVo vo = new ReportProjectVo(); |
|
|
|
//项目信息
|
|
|
|
//项目信息
|
|
|
|
@ -196,7 +216,7 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新增或修改 |
|
|
|
* 新增或修改 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public ReportProjectVo addOrUpdate(ReportProjectQueryParam queryParam) { |
|
|
|
public ReportProjectVo addOrUpdate(ReportProjectQueryParam queryParam) { |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
@ -251,9 +271,10 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
} |
|
|
|
} |
|
|
|
return getDetail(queryParam.getProject().getId()); |
|
|
|
return getDetail(queryParam.getProject().getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除报审项目 |
|
|
|
* 删除报审项目 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
public Boolean delData(ReportProjectQueryParam queryParam) { |
|
|
|
public Boolean delData(ReportProjectQueryParam queryParam) { |
|
|
|
if (CollectionUtil.isNotEmpty(queryParam.getFiles())) { |
|
|
|
if (CollectionUtil.isNotEmpty(queryParam.getFiles())) { |
|
|
|
for (String key : queryParam.getFiles().keySet()) { |
|
|
|
for (String key : queryParam.getFiles().keySet()) { |
|
|
|
@ -272,8 +293,6 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
return baseMapper.getProjectTabWorkVo(queryParam); |
|
|
|
return baseMapper.getProjectTabWorkVo(queryParam); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean upFinalizationPath(ReportProjectQueryParam queryParam) { |
|
|
|
public boolean upFinalizationPath(ReportProjectQueryParam queryParam) { |
|
|
|
|
|
|
|
|
|
|
|
return reportReviewService.update(new LambdaUpdateWrapper<ReportReview>() |
|
|
|
return reportReviewService.update(new LambdaUpdateWrapper<ReportReview>() |
|
|
|
@ -283,4 +302,31 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
|
|
public Result<Void> delete(ReportDeleteParam reportDeleteParam) { |
|
|
|
|
|
|
|
String id = reportDeleteParam.getId(); |
|
|
|
|
|
|
|
if (StringUtils.isBlank(id)) { |
|
|
|
|
|
|
|
return Result.failed("项目id不能为空"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.removeById(id); |
|
|
|
|
|
|
|
deleteByColumn(reviewMapper, ReportReview::getReportId, id); |
|
|
|
|
|
|
|
deleteByColumn(reportFileMapper, ReportFile::getReportId, id); |
|
|
|
|
|
|
|
deleteByColumn(reportFlowMapper, ReportFlow::getReportId, id); |
|
|
|
|
|
|
|
deleteByColumn(informMessageMapper, InformMessage::getReportId, id); |
|
|
|
|
|
|
|
deleteByColumn(warningContentMapper, WarningContent::getWarningId, id); |
|
|
|
|
|
|
|
deleteByColumn(warningRecordMapper, WarningRecord::getReportId, id); |
|
|
|
|
|
|
|
deleteByColumn(invertRecordMapper, InvertRecord::getReportId, id); |
|
|
|
|
|
|
|
return Result.success(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private <T> void deleteByColumn (BaseMapper<T> mapper, SFunction<T, ?> column, String id ){ |
|
|
|
|
|
|
|
LambdaQueryWrapper<T> wrapper = Wrappers.<T>lambdaQuery().eq(column, id); |
|
|
|
|
|
|
|
mapper.delete(wrapper); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|