Compare commits

..

No commits in common. 'master' and 'invest1.1' have entirely different histories.

  1. 23
      pom.xml
  2. 25
      src/main/java/com/biutag/supervision/InvestBootApplication.java
  3. 50
      src/main/java/com/biutag/supervision/aop/CheckInterceptor.java
  4. 8
      src/main/java/com/biutag/supervision/aop/ParamChecked.java
  5. 7
      src/main/java/com/biutag/supervision/common/UserContextHolder.java
  6. 2
      src/main/java/com/biutag/supervision/config/MybatisPlusConfig.java
  7. 30
      src/main/java/com/biutag/supervision/constants/enums/DeleteStatusEnum.java
  8. 33
      src/main/java/com/biutag/supervision/constants/enums/WarningStateEnum.java
  9. 15
      src/main/java/com/biutag/supervision/controller/report/ReportFlowController.java
  10. 113
      src/main/java/com/biutag/supervision/controller/report/ReportProjectController.java
  11. 50
      src/main/java/com/biutag/supervision/controller/warning/WarningController.java
  12. 5
      src/main/java/com/biutag/supervision/mapper/Report/ReportProjectMapper.java
  13. 20
      src/main/java/com/biutag/supervision/pojo/dto/QuerySecondDTO.java
  14. 4
      src/main/java/com/biutag/supervision/pojo/entity/CommonOpinions.java
  15. 4
      src/main/java/com/biutag/supervision/pojo/entity/InformMessage.java
  16. 4
      src/main/java/com/biutag/supervision/pojo/entity/InvertRecord.java
  17. 4
      src/main/java/com/biutag/supervision/pojo/entity/price/PriceFile.java
  18. 4
      src/main/java/com/biutag/supervision/pojo/entity/price/PriceInformation.java
  19. 4
      src/main/java/com/biutag/supervision/pojo/entity/recessed/RecessedLog.java
  20. 4
      src/main/java/com/biutag/supervision/pojo/entity/report/ReportFile.java
  21. 9
      src/main/java/com/biutag/supervision/pojo/entity/report/ReportFlow.java
  22. 23
      src/main/java/com/biutag/supervision/pojo/entity/report/ReportProject.java
  23. 4
      src/main/java/com/biutag/supervision/pojo/entity/report/ReportReview.java
  24. 4
      src/main/java/com/biutag/supervision/pojo/entity/serviceUnit/ServiceUnit.java
  25. 4
      src/main/java/com/biutag/supervision/pojo/entity/warning/WarningContent.java
  26. 5
      src/main/java/com/biutag/supervision/pojo/entity/warning/WarningRecord.java
  27. 21
      src/main/java/com/biutag/supervision/pojo/param/Report/ReportDeleteParam.java
  28. 32
      src/main/java/com/biutag/supervision/pojo/request/reportProject/ReportProjectDeleteRequest.java
  29. 36
      src/main/java/com/biutag/supervision/pojo/request/warning/WarningEndRequest.java
  30. 20
      src/main/java/com/biutag/supervision/pojo/transfer/ProjectTransfer.java
  31. 10
      src/main/java/com/biutag/supervision/pojo/vo/entryWindow/EntryWindowVo.java
  32. 14
      src/main/java/com/biutag/supervision/pojo/vo/statement/ConditionVo.java
  33. 2
      src/main/java/com/biutag/supervision/service/Negative/NegativeService.java
  34. 70
      src/main/java/com/biutag/supervision/service/Report/ReportFlowService.java
  35. 123
      src/main/java/com/biutag/supervision/service/Report/ReportProjectService.java
  36. 16
      src/main/java/com/biutag/supervision/service/SupDepartService.java
  37. 2
      src/main/resources/application-dev.yml
  38. BIN
      src/main/resources/excelTemplate/控制价定案表.xls
  39. 11
      src/main/resources/mapper/ReportProjectMapper.xml

23
pom.xml

@ -230,29 +230,6 @@
<version>3.0.1</version> <version>3.0.1</version>
</dependency> </dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- MapStruct 核心依赖 -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.5.5.Final</version>
</dependency>
<!-- MapStruct 编译期处理器 -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.5.5.Final</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

25
src/main/java/com/biutag/supervision/InvestBootApplication.java

@ -1,18 +1,12 @@
package com.biutag.supervision; package com.biutag.supervision;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.context.WebServerApplicationContext;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import java.net.InetAddress;
@EnableAsync @EnableAsync
@EnableCaching @EnableCaching
@EnableScheduling @EnableScheduling
@ -23,22 +17,5 @@ public class InvestBootApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(InvestBootApplication.class, args); SpringApplication.run(InvestBootApplication.class, args);
} }
@Bean
public ApplicationRunner applicationRunner(WebServerApplicationContext context, Environment env) {
return args -> {
try {
String ip = InetAddress.getLocalHost().getHostAddress();
int port = context.getWebServer().getPort();
String contextPath = env.getProperty("server.servlet.context-path", "");
System.out.println("\n" +
"===============================================================\n" +
":: 应用启动成功!\n" +
":: 本地地址: http://localhost:" + port + contextPath + "\n" +
":: 外部地址: http://" + ip + ":" + port + contextPath + "\n" +
"===============================================================\n");
} catch (Exception e) {
System.err.println("获取启动信息失败: " + e.getMessage());
}
};
}
} }

50
src/main/java/com/biutag/supervision/aop/CheckInterceptor.java

@ -1,50 +0,0 @@
package com.biutag.supervision.aop;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
/**
* @ClassName CheckInterceptor
* @Description 参数规范
* @Author shihao
* @Date 2025/12/9 9:14
*/
@Component
@Aspect
@Slf4j
public class CheckInterceptor {
@Pointcut("execution(* com.biutag.supervision.controller..*(..)) || execution(* com.biutag.supervision.service..*(..))")
public void pointCut() {
}
@Before("pointCut()")
public void check(JoinPoint joinPoint) {
Object[] args = joinPoint.getArgs();
for (Object arg : args) {
if (arg instanceof ParamChecked) {
((ParamChecked) arg).check();
}
}
}
/**
* 只校验 com.biutag.supervision.pojo 包下面的类
*/
private boolean inPojoPackage(Object arg) {
Package p = arg.getClass().getPackage();
if (p == null) {
return false;
}
String pkg = p.getName();
return pkg.startsWith("com.biutag.supervision.pojo");
}
}

8
src/main/java/com/biutag/supervision/aop/ParamChecked.java

@ -1,8 +0,0 @@
package com.biutag.supervision.aop;
import java.io.Serializable;
public interface ParamChecked extends Serializable {
void check();
}

7
src/main/java/com/biutag/supervision/common/UserContextHolder.java

@ -2,7 +2,6 @@ package com.biutag.supervision.common;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.http.Header; import cn.hutool.http.Header;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.RedisKeyConstants; import com.biutag.supervision.constants.RedisKeyConstants;
import com.biutag.supervision.exception.AuthException; import com.biutag.supervision.exception.AuthException;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
@ -32,10 +31,4 @@ public class UserContextHolder {
return getCurrentUser().getUserId(); return getCurrentUser().getUserId();
} }
public static boolean isSuperUser() {
return AppConstants.USER_TYPE_SUPER.equals(getCurrentUser().getUserType());
}
} }

2
src/main/java/com/biutag/supervision/config/MybatisPlusConfig.java

@ -2,7 +2,6 @@ package com.biutag.supervision.config;
import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -15,7 +14,6 @@ public class MybatisPlusConfig {
@Bean @Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() { public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 如果配置多个插件, 切记分页最后添加 interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 如果配置多个插件, 切记分页最后添加
// 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType // 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
return interceptor; return interceptor;

30
src/main/java/com/biutag/supervision/constants/enums/DeleteStatusEnum.java

@ -1,30 +0,0 @@
package com.biutag.supervision.constants.enums;
/**
* @Auther: sh
* @Version 1.0
* @Description: 是否删除枚举
*/
public enum DeleteStatusEnum {
YES(1, "是"),
NO(0, "否"),
;
private final int code;
private final String desc;
DeleteStatusEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public int getCode() {
return code;
}
public String getDesc() {
return desc;
}
}

33
src/main/java/com/biutag/supervision/constants/enums/WarningStateEnum.java

@ -1,33 +0,0 @@
package com.biutag.supervision.constants.enums;
import java.util.Set;
/**
* @ClassName WarningStateEnum
* @Description 预警监督状态
* @Author shihao
* @Date 2025/12/22 19:05
*/
public enum WarningStateEnum {
WYJ("0", "未预警监督"),
YWJ("1", "已预警监督"),
YTZ("2", "已通知");;
private final String code;
private final String desc;
WarningStateEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
}

15
src/main/java/com/biutag/supervision/controller/report/ReportFlowController.java

@ -5,7 +5,6 @@ import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.InformMessage; import com.biutag.supervision.pojo.entity.InformMessage;
import com.biutag.supervision.pojo.param.ApprovalFlowQueryParam; import com.biutag.supervision.pojo.param.ApprovalFlowQueryParam;
import com.biutag.supervision.pojo.param.Report.FlowQueryParam; import com.biutag.supervision.pojo.param.Report.FlowQueryParam;
import com.biutag.supervision.pojo.request.warning.WarningEndRequest;
import com.biutag.supervision.service.InformMessageService; import com.biutag.supervision.service.InformMessageService;
import com.biutag.supervision.service.Report.ReportFlowService; import com.biutag.supervision.service.Report.ReportFlowService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -36,7 +35,7 @@ public class ReportFlowController {
} }
/** /**
* 提交给领导 * 审核预警
* */ * */
@PostMapping("/auditWarning") @PostMapping("/auditWarning")
public Result auditWarning(@RequestBody FlowQueryParam queryParam){ public Result auditWarning(@RequestBody FlowQueryParam queryParam){
@ -47,18 +46,6 @@ public class ReportFlowController {
} }
} }
/**
* 结束预警
* */
@PostMapping("/auditEndWarning")
public Result<Boolean> auditEndWarning(@RequestBody WarningEndRequest queryParam){
return flowService.auditEndWarning(queryParam);
}
/** /**
* 审核通知单位 * 审核通知单位
* */ * */

113
src/main/java/com/biutag/supervision/controller/report/ReportProjectController.java

@ -7,6 +7,8 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.support.ExcelTypeEnum; import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.excel.write.handler.CellWriteHandler;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig; import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -15,22 +17,21 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.DeleteStatusEnum; import com.biutag.supervision.constants.enums.FlowNodeEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.mapper.Recessed.RecessedLogMapper; import com.biutag.supervision.mapper.Recessed.RecessedLogMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.QuerySecondDTO;
import com.biutag.supervision.pojo.entity.InformMessage; import com.biutag.supervision.pojo.entity.InformMessage;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.recessed.RecessedLog; import com.biutag.supervision.pojo.entity.recessed.RecessedLog;
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.enums.FlowEnum; import com.biutag.supervision.pojo.enums.FlowEnum;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.Recessed.RecessedParam; import com.biutag.supervision.pojo.param.Recessed.RecessedParam;
import com.biutag.supervision.pojo.param.Report.ReportProjectQueryParam; import com.biutag.supervision.pojo.param.Report.ReportProjectQueryParam;
import com.biutag.supervision.pojo.param.entryWindow.EntryWindowQueryParam; import com.biutag.supervision.pojo.param.entryWindow.EntryWindowQueryParam;
import com.biutag.supervision.pojo.param.statement.StatementQueryParam; import com.biutag.supervision.pojo.param.statement.StatementQueryParam;
import com.biutag.supervision.pojo.request.reportProject.ReportProjectDeleteRequest;
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.excel.ExcelControlPriceVo;
import com.biutag.supervision.pojo.vo.report.ReportHomeVo; import com.biutag.supervision.pojo.vo.report.ReportHomeVo;
@ -39,18 +40,24 @@ import com.biutag.supervision.pojo.vo.statement.ConditionExcelVo;
import com.biutag.supervision.pojo.vo.statement.ConditionVo; import com.biutag.supervision.pojo.vo.statement.ConditionVo;
import com.biutag.supervision.service.InformMessageService; import com.biutag.supervision.service.InformMessageService;
import com.biutag.supervision.service.Report.ReportProjectService; import com.biutag.supervision.service.Report.ReportProjectService;
import com.biutag.supervision.service.Report.ReportReviewService;
import com.biutag.supervision.service.SupDepartService; import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.util.BigDecimalUtils; import com.biutag.supervision.util.BigDecimalUtils;
import com.biutag.supervision.util.CustomFontLoader;
import jakarta.servlet.ServletOutputStream; import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -58,9 +65,7 @@ import java.math.RoundingMode;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Objects;
/** /**
* @author weipeng * @author weipeng
@ -86,7 +91,7 @@ public class ReportProjectController {
wrapper.eq(StrUtil.isNotBlank(query.getReportType()),"p.report_type",query.getReportType()) wrapper.eq(StrUtil.isNotBlank(query.getReportType()),"p.report_type",query.getReportType())
.like(StrUtil.isNotBlank(query.getReportName()),"p.report_name",query.getReportName()) .like(StrUtil.isNotBlank(query.getReportName()),"p.report_name",query.getReportName())
.eq(StrUtil.isNotBlank(query.getProjectType()),"p.project_type",query.getProjectType()) .eq(StrUtil.isNotBlank(query.getProjectType()),"p.project_type",query.getProjectType())
// .eq(StrUtil.isNotBlank(query.getAuditUnitId()),"p.audit_unit_id",query.getAuditUnitId()) .eq(StrUtil.isNotBlank(query.getAuditUnitId()),"p.audit_unit_id",query.getAuditUnitId())
.like(StrUtil.isNotBlank(query.getProjectPrincipal()),"p.project_principal",query.getProjectPrincipal()) .like(StrUtil.isNotBlank(query.getProjectPrincipal()),"p.project_principal",query.getProjectPrincipal())
.like(StrUtil.isNotBlank(query.getProjectPhone()),"p.project_phone",query.getProjectPhone()) .like(StrUtil.isNotBlank(query.getProjectPhone()),"p.project_phone",query.getProjectPhone())
.eq(StrUtil.isNotBlank(query.getPurchaseMethod()),"p.purchase_method",query.getPurchaseMethod()) .eq(StrUtil.isNotBlank(query.getPurchaseMethod()),"p.purchase_method",query.getPurchaseMethod())
@ -127,13 +132,8 @@ public class ReportProjectController {
if(StrUtil.isNotBlank(query.getCode()) &&!"all".equals(query.getCode()) ){ if(StrUtil.isNotBlank(query.getCode()) &&!"all".equals(query.getCode()) ){
wrapper.eq("p.is_recessed",Integer.parseInt(query.getCode())); wrapper.eq("p.is_recessed",Integer.parseInt(query.getCode()));
} }
if (StrUtil.isNotBlank(query.getAuditUnitId())) {
// 获取选择的审计单位及其所有子部门的ID
wrapper.in("p.audit_unit_id", departService.getAllNodeIds(query.getAuditUnitId()));
}
if (StrUtil.isNotBlank(query.getProjectUnitId())){
wrapper.in("p.project_unit_id", departService.getAllNodeIds(query.getProjectUnitId()));
}
//获取登陆人信息 //获取登陆人信息
UserAuth user = UserContextHolder.getCurrentUser(); UserAuth user = UserContextHolder.getCurrentUser();
log.info("user",user); log.info("user",user);
@ -149,42 +149,10 @@ public class ReportProjectController {
orgIds = departService.getAllNodeIds(user.getDepartId()); orgIds = departService.getAllNodeIds(user.getDepartId());
wrapper.in("p.project_unit_id", orgIds); wrapper.in("p.project_unit_id", orgIds);
} }
wrapper.eq("p.delete_flag", DeleteStatusEnum.NO.getCode());
} }
wrapper.orderByDesc("p.crt_time"); wrapper.orderByDesc("p.crt_time");
wrapper.groupBy("p.id"); wrapper.groupBy("p.id");
Page<EntryWindowVo> vo = reportProjectService.getPage(new Page<>(query.getCurrent(), query.getSize()), wrapper); return Result.success(reportProjectService.getPage(new Page<>(query.getCurrent(),query.getSize()),wrapper));
List<EntryWindowVo> entryWindowVos = vo.getRecords();
entryWindowVos.forEach(s->{
SupDepart auditById = departService.getById(s.getAuditUnitId());
SupDepart projectById = departService.getById(s.getProjectUnitId());
if (3==(auditById.getLevel())){
SupDepart byPId = departService.getById(auditById.getPid());
s.setAuditUnitStr(byPId.getShortName() +"/" + auditById.getShortName());
}else {
s.setAuditUnitStr(auditById.getShortName() +"/");
}
if (3==projectById.getLevel()){
SupDepart byPId = departService.getById(projectById.getPid());
s.setProjectUnitStr(byPId.getShortName() +"/" + projectById.getShortName());
}else {
s.setProjectUnitStr(projectById.getShortName() +"/");
}
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())){
QuerySecondDTO querySecondDTO = new QuerySecondDTO();
querySecondDTO.setDepartId(s.getAuditUnitId());
// 项目的二级机构
SupDepart auditUnitSecondSupDepart = departService.getSecondSupDepart(querySecondDTO);
querySecondDTO.setDepartId(UserContextHolder.getCurrentUser().getDepartId());
// 账号的二级机构
SupDepart secondSupDepart = departService.getSecondSupDepart(querySecondDTO);
// 是否内审
s.setIsSelfData(auditUnitSecondSupDepart.getId().equals(secondSupDepart.getId())? "1": "0");
}else {
s.setIsSelfData("1");
}
});
return Result.success(vo);
} }
//审计情况表报表 //审计情况表报表
@ -195,8 +163,8 @@ public class ReportProjectController {
wrapper.eq(StrUtil.isNotBlank(queryParam.getNode()),"p.node",queryParam.getNode()) wrapper.eq(StrUtil.isNotBlank(queryParam.getNode()),"p.node",queryParam.getNode())
.like(StrUtil.isNotBlank(queryParam.getReportName()),"p.report_name",queryParam.getReportName()) .like(StrUtil.isNotBlank(queryParam.getReportName()),"p.report_name",queryParam.getReportName())
.like(StrUtil.isNotBlank(queryParam.getProjectType()),"p.project_type",queryParam.getProjectType()) .like(StrUtil.isNotBlank(queryParam.getProjectType()),"p.project_type",queryParam.getProjectType())
// .eq(StrUtil.isNotBlank(queryParam.getAuditUnitId()),"p.audit_unit_id",queryParam.getAuditUnitId()) .eq(StrUtil.isNotBlank(queryParam.getAuditUnitId()),"p.audit_unit_id",queryParam.getAuditUnitId())
// .eq(StrUtil.isNotBlank(queryParam.getProjectUnitId()),"p.project_unit_id",queryParam.getProjectUnitId()) .eq(StrUtil.isNotBlank(queryParam.getProjectUnitId()),"p.project_unit_id",queryParam.getProjectUnitId())
.eq(StrUtil.isNotBlank(queryParam.getPurchaseMethod()),"p.purchase_method",queryParam.getPurchaseMethod()) .eq(StrUtil.isNotBlank(queryParam.getPurchaseMethod()),"p.purchase_method",queryParam.getPurchaseMethod())
.like(StrUtil.isNotBlank(queryParam.getReferenceNumber()),"p.reference_number",queryParam.getReferenceNumber()); .like(StrUtil.isNotBlank(queryParam.getReferenceNumber()),"p.reference_number",queryParam.getReferenceNumber());
if(StrUtil.isNotBlank(queryParam.getReportType()) && !"all".equals(queryParam.getReportType())) { if(StrUtil.isNotBlank(queryParam.getReportType()) && !"all".equals(queryParam.getReportType())) {
@ -218,33 +186,10 @@ public class ReportProjectController {
wrapper.ge("p.report_money",new BigDecimal(200000)); wrapper.ge("p.report_money",new BigDecimal(200000));
} }
} }
if (StrUtil.isNotBlank(queryParam.getAuditUnitId())) {
// 获取选择的审计单位及其所有子部门的ID
wrapper.in("p.audit_unit_id", departService.getAllNodeIds(queryParam.getAuditUnitId()));
}
if (StrUtil.isNotBlank(queryParam.getProjectUnitId())){
wrapper.in("p.project_unit_id", departService.getAllNodeIds(queryParam.getProjectUnitId()));
}
wrapper.groupBy("p.id"); wrapper.groupBy("p.id");
wrapper.eq("p.delete_flag", DeleteStatusEnum.NO.getCode()); return Result.success(reportProjectService.getConditionPage(new Page<>(queryParam.getCurrent(),queryParam.getSize()),wrapper));
Page<ConditionVo> conditionPage = reportProjectService.getConditionPage(new Page<>(queryParam.getCurrent(), queryParam.getSize()), wrapper);
conditionPage.getRecords().forEach(s->{
SupDepart auditById = departService.getById(s.getAuditUnitId());
SupDepart projectById = departService.getById(s.getProjectUnitId());
if (3==(auditById.getLevel())){
SupDepart byPId = departService.getById(auditById.getPid());
s.setAuditUnitStr(byPId.getShortName() +"/" + auditById.getShortName());
}else {
s.setAuditUnitStr(auditById.getShortName() +"/");
}
if (3==projectById.getLevel()){
SupDepart byPId = departService.getById(projectById.getPid());
s.setProjectUnitStr(byPId.getShortName() +"/" + projectById.getShortName());
}else {
s.setProjectUnitStr(projectById.getShortName() +"/");
}
});
return Result.success(conditionPage);
} }
@ -382,18 +327,10 @@ public class ReportProjectController {
} }
// @DeleteMapping("/{id}") @DeleteMapping("/{id}")
// public Result<Void> delDetail(@PathVariable("id")String id){ public Result delDetail(@PathVariable("id")String id){
//// ReportDeleteParam reportDeleteParam = new ReportDeleteParam(); reportProjectService.removeById(id);
//// reportDeleteParam.setId(id); return Result.success();
//// return reportProjectService.delete(reportDeleteParam);
// reportProjectService.removeById(id);
// return Result.success();
// }
@PostMapping("/deleteReportProject")
public Result<Void> deleteReportProject(@RequestBody ReportProjectDeleteRequest request){
return reportProjectService.deleteReportProject(request);
} }

50
src/main/java/com/biutag/supervision/controller/warning/WarningController.java

@ -3,19 +3,22 @@ package com.biutag.supervision.controller.warning;
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.fastjson.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.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.DeleteStatusEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.entity.InvertRecord;
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.warning.WarningContent; import com.biutag.supervision.pojo.entity.warning.WarningContent;
import com.biutag.supervision.pojo.entity.warning.WarningRecord; import com.biutag.supervision.pojo.entity.warning.WarningRecord;
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.enums.FlowWarningEnum; import com.biutag.supervision.pojo.enums.FlowWarningEnum;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
@ -29,13 +32,14 @@ import com.biutag.supervision.service.Report.ReportProjectService;
import com.biutag.supervision.service.SupDepartService; import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.Warning.WarningContentService; import com.biutag.supervision.service.Warning.WarningContentService;
import com.biutag.supervision.service.Warning.WarningRecordService; import com.biutag.supervision.service.Warning.WarningRecordService;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; 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;
@ -56,19 +60,13 @@ public class WarningController {
public Result<Page<EntryWindowVo>> getPage(@RequestBody WarningQueryParam queryParam){ public Result<Page<EntryWindowVo>> getPage(@RequestBody WarningQueryParam queryParam){
UserAuth user = UserContextHolder.getCurrentUser(); UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<ReportProject> wrapper= new QueryWrapper<ReportProject>() QueryWrapper<ReportProject> wrapper= new QueryWrapper<ReportProject>()
.like(StrUtil.isNotBlank(queryParam.getReportName()),"p.report_name",queryParam.getReportName()) .eq(StrUtil.isNotBlank(queryParam.getProjectUnitId()),"p.project_unit_id",queryParam.getProjectUnitId())
.eq(StrUtil.isNotBlank(queryParam.getAuditUnitId()),"p.audit_unit_id",queryParam.getAuditUnitId())
.eq(StrUtil.isNotBlank(queryParam.getReportName()),"p.report_name",queryParam.getReportName())
.eq("f.report_link","end") .eq("f.report_link","end")
.eq("f.approver_state","end") .eq("f.approver_state","end")
.eq(StrUtil.isNotBlank(queryParam.getWarningState()),"p.warning_state",queryParam.getWarningState()) .eq(StrUtil.isNotBlank(queryParam.getWarningState()),"p.warning_state",queryParam.getWarningState())
.eq("p.node",FlowStateEnum.End.getLabel()) .eq("p.node",FlowStateEnum.End.getLabel());
.eq("p.delete_flag", DeleteStatusEnum.NO.getCode());
if (StrUtil.isNotBlank(queryParam.getAuditUnitId())) {
// 获取选择的审计单位及其所有子部门的ID
wrapper.in("p.audit_unit_id", departService.getAllNodeIds(queryParam.getAuditUnitId()));
}
if (StrUtil.isNotBlank(queryParam.getProjectUnitId())){
wrapper.in("p.project_unit_id", departService.getAllNodeIds(queryParam.getProjectUnitId()));
}
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) && !user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode())) { if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) && !user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode())) {
List<String> orgIds =new ArrayList<>(); List<String> orgIds =new ArrayList<>();
if(!user.getAuthDepartIds().isEmpty()){ if(!user.getAuthDepartIds().isEmpty()){
@ -87,43 +85,28 @@ public class WarningController {
if(CollectionUtil.isNotEmpty(queryParam.getEndDate())){ if(CollectionUtil.isNotEmpty(queryParam.getEndDate())){
wrapper.between(CollectionUtil.isNotEmpty(queryParam.getEndDate()),"p.archiving",queryParam.getEndDate().get(0),queryParam.getEndDate().get(1)); wrapper.between(CollectionUtil.isNotEmpty(queryParam.getEndDate()),"p.archiving",queryParam.getEndDate().get(0),queryParam.getEndDate().get(1));
} }
wrapper.orderByAsc("p.warning_state");
wrapper.groupBy("p.id"); wrapper.groupBy("p.id");
Page<EntryWindowVo> page= reportProjectService.getPageWarning(new Page<>(queryParam.getCurrent(),queryParam.getSize()),wrapper,queryParam.getWarningState()); Page<EntryWindowVo> page= reportProjectService.getPageWarning(new Page<>(queryParam.getCurrent(),queryParam.getSize()),wrapper,queryParam.getWarningState());
List<EntryWindowVo> entryWindowVos = page.getRecords(); List<EntryWindowVo> entryWindowVos = page.getRecords();
entryWindowVos.forEach(s->{ entryWindowVos.forEach(s->{
List<WarningRecord> list = recordService.list(new LambdaQueryWrapper<WarningRecord>().eq(WarningRecord::getReportId,s.getId())); List<WarningRecord> list = recordService.list(new LambdaQueryWrapper<WarningRecord>().eq(WarningRecord::getReportId,s.getId()));
if(CollectionUtil.isNotEmpty(list)) { if(CollectionUtil.isNotEmpty(list)) {
//1的代表已下发问题 //0的代表已下发问题
List<WarningRecord> records= list.stream().filter(x-> "1".equals(x.getFlowState())).toList(); List<WarningRecord> records= list.stream().filter(x-> "0".equals(x.getFlowState())).toList();
//为空表示已提交审核 //为空表示已提交审核
// List<WarningRecord> auditNumber= list.stream().filter(x-> StrUtil.isEmpty(x.getFlowState())).toList(); List<WarningRecord> auditNumber= list.stream().filter(x-> StrUtil.isEmpty(x.getFlowState())).toList();
//1 为 已下发问题 ,2 为已提交审核,0为常规 //1 为 已下发问题 ,2 为已提交审核,0为常规
// String stateData = CollectionUtil.isNotEmpty(records)?"1":(CollectionUtil.isNotEmpty(auditNumber)?"2":"0"); String stateData = CollectionUtil.isNotEmpty(records)?"1":(CollectionUtil.isNotEmpty(auditNumber)?"2":"0");
String stateData = !records.isEmpty()? "1": "0";
s.setStateData(stateData); s.setStateData(stateData);
List<String> ids = list.stream().map(x -> x.getId()).toList(); List<String> ids = list.stream().map(x -> x.getId()).toList();
long counts = contentService.count(new LambdaQueryWrapper<WarningContent>().in(WarningContent::getWarningId, ids) long counts = contentService.count(new LambdaQueryWrapper<WarningContent>().in(WarningContent::getWarningId, ids)
.isNotNull(WarningContent::getRemark)); .isNotNull(WarningContent::getRemark));
s.setWarningContent(counts); s.setWarningContent(counts);
} }
SupDepart auditById = departService.getById(s.getAuditUnitId());
SupDepart projectById = departService.getById(s.getProjectUnitId());
if (3==(auditById.getLevel())){
SupDepart byPId = departService.getById(auditById.getPid());
s.setAuditUnitStr(byPId.getShortName() +"/" + auditById.getShortName());
}else {
s.setAuditUnitStr(auditById.getShortName() +"/");
}
if (3==projectById.getLevel()){
SupDepart byPId = departService.getById(projectById.getPid());
s.setProjectUnitStr(byPId.getShortName() +"/" + projectById.getShortName());
}else {
s.setProjectUnitStr(projectById.getShortName() +"/");
}
}); });
page.setRecords(entryWindowVos); page.setRecords(entryWindowVos);
return Result.success(page); return Result.success(page);
} }
/** /**
* 获取最新的预警记录 * 获取最新的预警记录
@ -177,7 +160,6 @@ public class WarningController {
//保存或者修改 预警督察详情 //保存或者修改 预警督察详情
@PostMapping("/addOrUpData") @PostMapping("/addOrUpData")
@Transactional
public Result addOrUpData(@RequestBody WaringVo vo){ public Result addOrUpData(@RequestBody WaringVo vo){
vo.getRecord().setReportId(vo.getReportProject().getId()); vo.getRecord().setReportId(vo.getReportProject().getId());
UserAuth user = UserContextHolder.getCurrentUser(); UserAuth user = UserContextHolder.getCurrentUser();

5
src/main/java/com/biutag/supervision/mapper/Report/ReportProjectMapper.java

@ -30,9 +30,4 @@ public interface ReportProjectMapper extends BaseMapper<ReportProject> {
List<ProjectWorkVo> getProjectWorkVoList(ProjectWorkQueryParam queryParam); List<ProjectWorkVo> getProjectWorkVoList(ProjectWorkQueryParam queryParam);
ProjectTabWorkVo getProjectTabWorkVo(ProjectWorkQueryParam queryParam); ProjectTabWorkVo getProjectTabWorkVo(ProjectWorkQueryParam queryParam);
/**
* 管理员专用根据 id 查询包括逻辑删除的数据
*/
ReportProject selectByIdIncludeDeleted(@Param("id") String id);
} }

20
src/main/java/com/biutag/supervision/pojo/dto/QuerySecondDTO.java

@ -1,20 +0,0 @@
package com.biutag.supervision.pojo.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName QuerySecondDTO
* @Description 查询二级单位信息DTO
* @Author shihao
* @Date 2026/1/21 11:14
*/
@Getter
@Setter
@Schema(description = "查询二级单位信息DTO")
public class QuerySecondDTO {
@Schema(description = "单位id")
private String departId;
}

4
src/main/java/com/biutag/supervision/pojo/entity/CommonOpinions.java

@ -2,8 +2,6 @@ package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -11,8 +9,6 @@ import java.time.LocalDateTime;
@Data @Data
@Slf4j @Slf4j
@TableName("common_opinions")
@Schema(description="常用意见表")
public class CommonOpinions { public class CommonOpinions {
@TableId @TableId
private int id; private int id;

4
src/main/java/com/biutag/supervision/pojo/entity/InformMessage.java

@ -2,15 +2,11 @@ package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
@TableName("inform_message")
@Schema(description="通知意见--审核通过、驳回发送相关通知")
public class InformMessage { public class InformMessage {
@TableId @TableId

4
src/main/java/com/biutag/supervision/pojo/entity/InvertRecord.java

@ -3,15 +3,11 @@ package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
@TableName("invert_record")
@Schema(description="预警项目内容档案")
public class InvertRecord { public class InvertRecord {
@TableId @TableId

4
src/main/java/com/biutag/supervision/pojo/entity/price/PriceFile.java

@ -2,15 +2,11 @@ package com.biutag.supervision.pojo.entity.price;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
@TableName("price_file")
@Schema(description="价格库文件信息--上传的价格库信息文档")
public class PriceFile { public class PriceFile {
@TableId @TableId
private String id; private String id;

4
src/main/java/com/biutag/supervision/pojo/entity/price/PriceInformation.java

@ -3,10 +3,8 @@ package com.biutag.supervision.pojo.entity.price;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.biutag.supervision.util.BigDecimalUtils; import com.biutag.supervision.util.BigDecimalUtils;
import com.biutag.supervision.util.DataDisposeUtil; import com.biutag.supervision.util.DataDisposeUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -17,8 +15,6 @@ import java.math.BigDecimal;
*/ */
@Slf4j @Slf4j
@Data @Data
@TableName("price_information")
@Schema(description="价格库信息内容--上传的价格库文档的信息内容")
public class PriceInformation { public class PriceInformation {
@TableId @TableId
private String id; private String id;

4
src/main/java/com/biutag/supervision/pojo/entity/recessed/RecessedLog.java

@ -3,17 +3,13 @@ package com.biutag.supervision.pojo.entity.recessed;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
@TableName("recessed_log")
@Schema(description="进退窗记录--进退窗操作记录")
public class RecessedLog { public class RecessedLog {
@TableId @TableId
private String id; private String id;

4
src/main/java/com/biutag/supervision/pojo/entity/report/ReportFile.java

@ -2,10 +2,8 @@ package com.biutag.supervision.pojo.entity.report;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.biutag.supervision.pojo.vo.FileVo; import com.biutag.supervision.pojo.vo.FileVo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -17,8 +15,6 @@ import java.time.LocalDateTime;
*/ //报审项目附件 */ //报审项目附件
@Getter @Getter
@Setter @Setter
@TableName("report_file")
@Schema(description="项目附件表--项目对应的附件")
public class ReportFile { public class ReportFile {
@TableId @TableId
private String id; private String id;

9
src/main/java/com/biutag/supervision/pojo/entity/report/ReportFlow.java

@ -2,8 +2,6 @@ package com.biutag.supervision.pojo.entity.report;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -13,8 +11,6 @@ import java.time.LocalDateTime;
@Getter @Getter
@Setter @Setter
@TableName("report_flow")
@Schema(description="项目审批记录--项目审批流转记录")
public class ReportFlow { public class ReportFlow {
@TableId @TableId
private String id; private String id;
@ -52,11 +48,6 @@ public class ReportFlow {
@TableField("approver_unit_id") @TableField("approver_unit_id")
private String approverUnitId; private String approverUnitId;
/**
* 项目报审 report
* 项目预警下发 warning
* 直接结束 end
*/
@TableField("type") @TableField("type")
private String type; private String type;

23
src/main/java/com/biutag/supervision/pojo/entity/report/ReportProject.java

@ -2,12 +2,7 @@ package com.biutag.supervision.pojo.entity.report;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.DeleteStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.cglib.core.Local; import org.springframework.cglib.core.Local;
@ -20,8 +15,6 @@ import java.util.List;
//报审项目 //报审项目
@Getter @Getter
@Setter @Setter
@TableName("report_project")
@Schema(description="项目基本内容--报审项目内容")
public class ReportProject { public class ReportProject {
@TableId @TableId
@ -155,10 +148,6 @@ public class ReportProject {
@TableField("archiving_reduce_money") @TableField("archiving_reduce_money")
private BigDecimal archivingReduceMoney; private BigDecimal archivingReduceMoney;
/**
* @see com.biutag.supervision.constants.enums.WarningStateEnum
*/
@Schema(description = "预警状态")
@TableField("warning_state") @TableField("warning_state")
private String warningState; private String warningState;
//是否退窗 //是否退窗
@ -166,16 +155,4 @@ public class ReportProject {
private int isRecessed; private int isRecessed;
/**
* @see AppConstants
*/
@Schema(description = "是否逻辑删除:0-未删除,1-已删除")
@TableLogic(value = AppConstants.UN_DEL, delval = AppConstants.DEL)
@TableField("delete_flag")
private Integer deleteFlag;
@TableField("delete_reason")
@Schema(description = "删除原因")
private String deleteReason;
} }

4
src/main/java/com/biutag/supervision/pojo/entity/report/ReportReview.java

@ -2,9 +2,7 @@ package com.biutag.supervision.pojo.entity.report;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.cglib.core.Local; import org.springframework.cglib.core.Local;
@ -16,8 +14,6 @@ import java.time.LocalDateTime;
//报审信息 //报审信息
@Getter @Getter
@Setter @Setter
@TableName("report_review")
@Schema(description="项目审核环节内容")
public class ReportReview { public class ReportReview {
@TableId @TableId
private String id; private String id;

4
src/main/java/com/biutag/supervision/pojo/entity/serviceUnit/ServiceUnit.java

@ -3,9 +3,7 @@ package com.biutag.supervision.pojo.entity.serviceUnit;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -13,8 +11,6 @@ import java.time.LocalDateTime;
@Data @Data
@Builder @Builder
@TableName("service_unit")
@Schema(description="服务单位信息表")
public class ServiceUnit { public class ServiceUnit {
@TableId @TableId

4
src/main/java/com/biutag/supervision/pojo/entity/warning/WarningContent.java

@ -2,13 +2,9 @@ package com.biutag.supervision.pojo.entity.warning;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@Data @Data
@TableName("warning_content")
@Schema(description="项目预警问题")
public class WarningContent { public class WarningContent {
@TableId @TableId
private String id; private String id;

5
src/main/java/com/biutag/supervision/pojo/entity/warning/WarningRecord.java

@ -2,17 +2,14 @@ package com.biutag.supervision.pojo.entity.warning;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.biutag.supervision.pojo.entity.InvertRecord;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Data @Data
@TableName("warning_record")
@Schema(description="项目预警环节基本信息")
public class WarningRecord { public class WarningRecord {
@TableId @TableId
private String id; private String id;

21
src/main/java/com/biutag/supervision/pojo/param/Report/ReportDeleteParam.java

@ -1,21 +0,0 @@
package com.biutag.supervision.pojo.param.Report;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @Auther: sh
* @Version 1.0
* @Description: 删除参数
*/
@Data
public class ReportDeleteParam {
@Schema(description = "项目id")
private String id;
@Schema(description = "删除原因")
private String deleteReason;
}

32
src/main/java/com/biutag/supervision/pojo/request/reportProject/ReportProjectDeleteRequest.java

@ -1,32 +0,0 @@
package com.biutag.supervision.pojo.request.reportProject;
import com.biutag.supervision.aop.ParamChecked;
import dm.jdbc.util.StringUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName ProjectDeleteRequest
* @Description 项目删除请求
* @Author shihao
* @Date 2025/12/8 18:48
*/
@Setter
@Getter
@Schema(description = "项目删除请求")
public class ReportProjectDeleteRequest implements ParamChecked {
@Schema(description = "项目id")
private String id;
@Schema(description = "删除原因")
private String deleteReason;
@Override
public void check() {
if (StringUtil.isEmpty(id)){
throw new IllegalArgumentException("删除id不能为空!");
}
}
}

36
src/main/java/com/biutag/supervision/pojo/request/warning/WarningEndRequest.java

@ -1,36 +0,0 @@
package com.biutag.supervision.pojo.request.warning;
import cn.hutool.core.util.StrUtil;
import com.biutag.supervision.aop.ParamChecked;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName WarningEndRequest
* @Description WarningEndRequest
* @Author shihao
* @Date 2025/12/24 11:40
*/
@Getter
@Setter
@Schema(description = "预警结束请求")
public class WarningEndRequest implements ParamChecked {
@Schema(description = "项目id")
private String reportId;
//是否通知报审人
private String isInform;
//审批意见
private String message;
@Override
public void check() {
if (StrUtil.isBlank(reportId)){
throw new RuntimeException("项目id不能为空");
}
}
}

20
src/main/java/com/biutag/supervision/pojo/transfer/ProjectTransfer.java

@ -1,20 +0,0 @@
package com.biutag.supervision.pojo.transfer;
import com.biutag.supervision.pojo.param.Report.ReportDeleteParam;
import com.biutag.supervision.pojo.request.reportProject.ReportProjectDeleteRequest;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
/**
* @ClassName ProjectTransfer
* @Description ProjectTransfer
* @Author shihao
* @Date 2025/12/8 18:55
*/
@Mapper
public interface ProjectTransfer {
ProjectTransfer INSTANCE = Mappers.getMapper(ProjectTransfer.class);
ReportDeleteParam delRequestToDelParam(ReportProjectDeleteRequest request);
}

10
src/main/java/com/biutag/supervision/pojo/vo/entryWindow/EntryWindowVo.java

@ -1,7 +1,6 @@
package com.biutag.supervision.pojo.vo.entryWindow; package com.biutag.supervision.pojo.vo.entryWindow;
import com.biutag.supervision.pojo.entity.report.ReportProject; import com.biutag.supervision.pojo.entity.report.ReportProject;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
/** /**
@ -22,13 +21,4 @@ public class EntryWindowVo extends ReportProject {
//是否已下发问题了 //是否已下发问题了
private String stateData; private String stateData;
@Schema(description = "审计单位字符串 带父级单位")
private String auditUnitStr;
@Schema(description = "项目单位字符串 带父级单位")
private String projectUnitStr;
@Schema(description = "是否是本单位的数据, 1是, 0否")
private String isSelfData;
} }

14
src/main/java/com/biutag/supervision/pojo/vo/statement/ConditionVo.java

@ -2,8 +2,8 @@ package com.biutag.supervision.pojo.vo.statement;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.biutag.supervision.pojo.entity.report.ReportProject;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -91,16 +91,4 @@ public class ConditionVo {
@ExcelProperty(value = "归档日期") @ExcelProperty(value = "归档日期")
private LocalDateTime archiving; private LocalDateTime archiving;
@Schema(description = "审计单位字符串 带父级单位")
private String auditUnitStr;
@Schema(description = "项目单位字符串 带父级单位")
private String projectUnitStr;
//审计单位id
private String auditUnitId;
//项目单位id
private String projectUnitId;
} }

2
src/main/java/com/biutag/supervision/service/Negative/NegativeService.java

@ -84,7 +84,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
negativeDto.setInvolveProblem(dataDistribute.getInvolveProblem()); negativeDto.setInvolveProblem(dataDistribute.getInvolveProblem());
negativeDto.setResponderName(vo.getRecord().getWarningSupervision()); negativeDto.setResponderName(vo.getRecord().getWarningSupervision());
negativeDto.setContactPhone(null); negativeDto.setContactPhone(null);
negativeDto.setThingDesc("项目名称: " + project.getReportName() +",存在问题:" +x.getRemark() + ",请及时查收并在规定时限内完成整改。"); negativeDto.setThingDesc(x.getRemark());
SupDepart depart = departService.getById(project.getProjectUnitId()); SupDepart depart = departService.getById(project.getProjectUnitId());
if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) {

70
src/main/java/com/biutag/supervision/service/Report/ReportFlowService.java

@ -1,22 +1,24 @@
package com.biutag.supervision.service.Report; package com.biutag.supervision.service.Report;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
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.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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.enums.WarningStateEnum; import com.biutag.supervision.controller.warning.WarningController;
import com.biutag.supervision.mapper.InformMessageMapper; import com.biutag.supervision.mapper.InformMessageMapper;
import com.biutag.supervision.mapper.Invest.InvertRecordMapper;
import com.biutag.supervision.mapper.Report.ReportFlowMapper; 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.Report.ReportReviewMapper;
import com.biutag.supervision.mapper.Warning.WarningRecordMapper; import com.biutag.supervision.mapper.Warning.WarningRecordMapper;
import com.biutag.supervision.mapper.serviceUnit.ServiceUnitMapper; import com.biutag.supervision.mapper.serviceUnit.ServiceUnitMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.InformMessage; import com.biutag.supervision.pojo.entity.InformMessage;
import com.biutag.supervision.pojo.entity.InvertRecord; import com.biutag.supervision.pojo.entity.InvertRecord;
import com.biutag.supervision.pojo.entity.report.ReportFlow; import com.biutag.supervision.pojo.entity.report.ReportFlow;
@ -30,21 +32,27 @@ import com.biutag.supervision.pojo.enums.FlowWarningEnum;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.ApprovalFlowQueryParam; import com.biutag.supervision.pojo.param.ApprovalFlowQueryParam;
import com.biutag.supervision.pojo.param.Report.FlowQueryParam; import com.biutag.supervision.pojo.param.Report.FlowQueryParam;
import com.biutag.supervision.pojo.request.warning.WarningEndRequest;
import com.biutag.supervision.pojo.vo.warning.WaringVo; import com.biutag.supervision.pojo.vo.warning.WaringVo;
import com.biutag.supervision.service.InformMessageService;
import com.biutag.supervision.service.InvertRecord.InvertRecordService; import com.biutag.supervision.service.InvertRecord.InvertRecordService;
import com.biutag.supervision.service.Negative.NegativeService; import com.biutag.supervision.service.Negative.NegativeService;
import com.biutag.supervision.service.ServiceUnit.ServiceUnitService;
import com.biutag.supervision.service.Warning.WarningRecordService;
import com.biutag.supervision.util.BigDecimalUtils; import com.biutag.supervision.util.BigDecimalUtils;
import jakarta.validation.constraints.Negative;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.beans.Transient;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.Flow;
/** /**
* @author weipeng * @author weipeng
@ -88,16 +96,16 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
.eq(ReportFlow::getApproverState,FlowStateEnum.Start.getLabel()) .eq(ReportFlow::getApproverState,FlowStateEnum.Start.getLabel())
.orderByDesc(ReportFlow::getAreportTime) .orderByDesc(ReportFlow::getAreportTime)
.last("limit 1")); .last("limit 1"));
// reportFlow.setApprover(queryParam.getApprover()); reportFlow.setApprover(queryParam.getApprover());
reportFlow.setApproverTime(LocalDateTime.now()); reportFlow.setApproverTime(LocalDateTime.now());
reportFlow.setApproverMessage(queryParam.getMessage()); reportFlow.setApproverMessage(queryParam.getMessage());
reportFlow.setApproverState(Boolean.TRUE.equals(queryParam.getIsAudit()) ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel()); reportFlow.setApproverState(queryParam.getIsAudit() ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel());
baseMapper.updateById(reportFlow); baseMapper.updateById(reportFlow);
if (!FlowEnum.Initial.getLabel().equals(project.getNode())) { if (!FlowEnum.Initial.getLabel().equals(project.getNode())) {
//录入新审批记录 //录入新审批记录
ReportFlow NextFlow = new ReportFlow(); ReportFlow NextFlow = new ReportFlow();
if (Boolean.TRUE.equals(queryParam.getIsAudit())) { if (queryParam.getIsAudit()) {
NextFlow.setReportId(queryParam.getReportId()); NextFlow.setReportId(queryParam.getReportId());
if(project.getNode().equals(FlowEnum.LeadInstance.getLabel())){ if(project.getNode().equals(FlowEnum.LeadInstance.getLabel())){
@ -220,12 +228,12 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
.last("limit 1")); .last("limit 1"));
reportFlow.setApproverTime(LocalDateTime.now()); reportFlow.setApproverTime(LocalDateTime.now());
reportFlow.setApproverMessage(queryParam.getMessage()); reportFlow.setApproverMessage(queryParam.getMessage());
reportFlow.setApproverState(Boolean.TRUE.equals(queryParam.getIsAudit()) ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel()); reportFlow.setApproverState(queryParam.getIsAudit() ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel());
baseMapper.updateById(reportFlow); baseMapper.updateById(reportFlow);
if (!FlowWarningEnum.state.getLabel().equals(record.getNode())) { if (!FlowWarningEnum.state.getLabel().equals(record.getNode())) {
//录入新审批记录 //录入新审批记录
ReportFlow NextFlow = new ReportFlow(); ReportFlow NextFlow = new ReportFlow();
if (Boolean.TRUE.equals(queryParam.getIsAudit())) { if (queryParam.getIsAudit()) {
NextFlow.setReportId(queryParam.getReportId()); NextFlow.setReportId(queryParam.getReportId());
if (record.getNode().equals(FlowWarningEnum.leader.getLabel())) { if (record.getNode().equals(FlowWarningEnum.leader.getLabel())) {
NextFlow.setReportLink(FlowWarningEnum.end.getLabel()); NextFlow.setReportLink(FlowWarningEnum.end.getLabel());
@ -237,7 +245,7 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
new LambdaUpdateWrapper<WarningRecord>() new LambdaUpdateWrapper<WarningRecord>()
.eq(WarningRecord::getId, queryParam.getReportId()) .eq(WarningRecord::getId, queryParam.getReportId())
.set(WarningRecord::getArchiving, LocalDateTime.now()) .set(WarningRecord::getArchiving, LocalDateTime.now())
// .set(WarningRecord::getFlowState,"0") .set(WarningRecord::getFlowState,"0")
.set(WarningRecord::getNode,FlowStateEnum.End.getLabel()) .set(WarningRecord::getNode,FlowStateEnum.End.getLabel())
); );
//版本存储 //版本存储
@ -326,13 +334,13 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
.last("limit 1")); .last("limit 1"));
reportFlow.setApproverTime(LocalDateTime.now()); reportFlow.setApproverTime(LocalDateTime.now());
reportFlow.setApproverMessage(queryParam.getMessage()); reportFlow.setApproverMessage(queryParam.getMessage());
reportFlow.setApproverState(Boolean.TRUE.equals(queryParam.getIsAudit()) ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel()); reportFlow.setApproverState(queryParam.getIsAudit() ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel());
baseMapper.updateById(reportFlow); baseMapper.updateById(reportFlow);
if (!FlowWarningEnum.state.getLabel().equals(record.getInformState())) { if (!FlowWarningEnum.state.getLabel().equals(record.getInformState())) {
//录入新审批记录 //录入新审批记录
ReportFlow NextFlow = new ReportFlow(); ReportFlow NextFlow = new ReportFlow();
//是否驳回 //是否驳回
if (Boolean.TRUE.equals(queryParam.getIsAudit())) { if (queryParam.getIsAudit()) {
NextFlow.setReportId(queryParam.getReportId()); NextFlow.setReportId(queryParam.getReportId());
if (record.getInformNode().equals(FlowWarningEnum.inform.getLabel())) { if (record.getInformNode().equals(FlowWarningEnum.inform.getLabel())) {
NextFlow.setReportLink(FlowWarningEnum.end.getLabel()); NextFlow.setReportLink(FlowWarningEnum.end.getLabel());
@ -430,7 +438,7 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
//接收人 //接收人
informMessage.setRecipient(recipient); informMessage.setRecipient(recipient);
informMessage.setRecipientId(recipientId); informMessage.setRecipientId(recipientId);
informMessage.setFlowState(Boolean.TRUE.equals(queryParam.getIsAudit()) ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel()); informMessage.setFlowState(queryParam.getIsAudit() ? FlowStateEnum.End.getLabel() : FlowStateEnum.Reject.getLabel());
informMessageMapper.insert(informMessage); informMessageMapper.insert(informMessage);
} }
@ -472,41 +480,5 @@ public class ReportFlowService extends ServiceImpl<ReportFlowMapper,ReportFlow>
} }
/**
* 直接结束预警
* @param queryParam
* @return
*/
@Transactional(rollbackFor = Exception.class)
public Result<Boolean> auditEndWarning(WarningEndRequest queryParam) {
ReportProject project = projectMapper.selectById(queryParam.getReportId());
project.setWarningState(WarningStateEnum.YWJ.getCode());
projectMapper.updateById(project);
if (ObjectUtil.isNull(project)) {
throw new RuntimeException("操作失败,没有找到对应项目"+ project.getReportName());
}
project.setWarningState(WarningStateEnum.YWJ.getCode());
boolean ok1 = projectMapper.updateById(project) > 0;
UserAuth currentUser = UserContextHolder.getCurrentUser();
// 留痕:写一条结束记录
ReportFlow endFlow = new ReportFlow();
endFlow.setReportId(queryParam.getReportId());
endFlow.setReportLink(FlowWarningEnum.end.getLabel());
endFlow.setReportCode(FlowWarningEnum.end.getValue());
endFlow.setAreportTime(LocalDateTime.now());
endFlow.setApprover(currentUser.getUserName());
endFlow.setApproverId(currentUser.getEmpNo());
endFlow.setApproverUnit(currentUser.getDepartName());
endFlow.setApproverUnitId(currentUser.getDepartId());
endFlow.setApproverTime(LocalDateTime.now());
endFlow.setApproverMessage(queryParam.getMessage());
endFlow.setApproverState(FlowStateEnum.End.getLabel());
//
endFlow.setType("end");
boolean ok2 = baseMapper.insert(endFlow) > 0;
return Result.success(ok1 && ok2); }
} }

123
src/main/java/com/biutag/supervision/service/Report/ReportProjectService.java

@ -4,24 +4,23 @@ 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.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.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
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.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;
@ -30,30 +29,38 @@ import com.biutag.supervision.pojo.entity.report.ReportReview;
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.request.reportProject.ReportProjectDeleteRequest; import com.biutag.supervision.pojo.param.entryWindow.EntryWindowQueryParam;
import com.biutag.supervision.pojo.transfer.ProjectTransfer;
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 jakarta.annotation.Resource; import io.swagger.v3.core.util.Json;
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.ArrayList; import java.util.*;
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;
@ -71,26 +78,6 @@ 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){
@ -103,14 +90,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>()
@ -122,19 +109,13 @@ 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();
//项目信息 //项目信息
ReportProject project = null; ReportProject project = baseMapper.selectById(id);
if (UserContextHolder.isSuperUser()){
project = baseMapper.selectByIdIncludeDeleted(id);
}else {
project = baseMapper.selectById(id);
}
if(ObjectUtil.isNotEmpty(project.getServiceStartTime()) && ObjectUtil.isNotEmpty(project.getServiceEndTime())){ if(ObjectUtil.isNotEmpty(project.getServiceStartTime()) && ObjectUtil.isNotEmpty(project.getServiceEndTime())){
List<LocalDateTime> dateTimes = new ArrayList<>(); List<LocalDateTime> dateTimes = new ArrayList<>();
dateTimes.add(project.getServiceStartTime()); dateTimes.add(project.getServiceStartTime());
@ -168,9 +149,8 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor
vo.setFiles(reportFileMap); vo.setFiles(reportFileMap);
} }
// //
ReportProject finalReport = project;
List<ReportFlow> flows =reportFlowService.list(new LambdaQueryWrapper<ReportFlow>().eq(ReportFlow::getReportId,id).eq(ReportFlow::getType,"report")); List<ReportFlow> flows =reportFlowService.list(new LambdaQueryWrapper<ReportFlow>().eq(ReportFlow::getReportId,id).eq(ReportFlow::getType,"report"));
flows = flows.stream().filter(s -> !s.getApproverState().equals(FlowStateEnum.Reject.getLabel()) && isFileFlow(finalReport.getNode()).contains(s.getReportLink())) flows=flows.stream().filter(s->!s.getApproverState().equals(FlowStateEnum.Reject.getLabel()) && isFileFlow(project.getNode()).contains(s.getReportLink()))
.collect(Collectors.toMap( .collect(Collectors.toMap(
ReportFlow::getReportCode, ReportFlow::getReportCode,
Function.identity(), Function.identity(),
@ -216,7 +196,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();
@ -271,10 +251,9 @@ 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()){
@ -293,6 +272,8 @@ 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>()
@ -302,44 +283,4 @@ 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);
// }
@Transactional(rollbackFor = Exception.class)
public Result<Void> deleteReportProject(ReportProjectDeleteRequest request) {
ReportDeleteParam reportDeleteParam = ProjectTransfer.INSTANCE.delRequestToDelParam(request);
ReportProject reportProject = this.getById(reportDeleteParam.getId());
if (ObjectUtil.isNull(reportProject)){
throw new RuntimeException("项目数据不存在!");
}
reportProject.setDeleteReason(reportDeleteParam.getDeleteReason());
this.updateById(reportProject);
this.removeById(reportProject);
return Result.success();
}
} }

16
src/main/java/com/biutag/supervision/service/SupDepartService.java

@ -9,7 +9,6 @@ import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.constants.enums.StatusEnum; import com.biutag.supervision.constants.enums.StatusEnum;
import com.biutag.supervision.mapper.SupDepartMapper; import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.dto.QuerySecondDTO;
import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.DepartQueryParam; import com.biutag.supervision.pojo.param.DepartQueryParam;
@ -310,19 +309,4 @@ public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
} }
} }
/**
* 传入3级或2级单位 获取二级单位信息
* @return
*/
public SupDepart getSecondSupDepart(QuerySecondDTO querySecondDTO){
SupDepart res = new SupDepart();
String departId = querySecondDTO.getDepartId();
res = getById(departId);
if (3==res.getLevel()){
res = getById(res.getPid());
}
return res;
}
} }

2
src/main/resources/application-dev.yml

@ -77,8 +77,6 @@ fdfs:
tracker-list: #TrackerList参数,支持多个 tracker-list: #TrackerList参数,支持多个
- 172.31.217.20:32060 - 172.31.217.20:32060
preview-url: http://172.31.217.20:31664 preview-url: http://172.31.217.20:31664
so-timeout: 60000 # 60 秒
connect-timeout: 5000 # 5 秒
springdoc: springdoc:
group-configs: group-configs:

BIN
src/main/resources/excelTemplate/控制价定案表.xls

Binary file not shown.

11
src/main/resources/mapper/ReportProjectMapper.xml

@ -23,10 +23,6 @@
LEFT JOIN report_project as p2 on p2.id = w.report_id LEFT JOIN report_project as p2 on p2.id = w.report_id
<where> <where>
flow.is_init is null flow.is_init is null
AND (
(w.id IS NULL AND project.delete_flag = 0)
OR (w.id IS NOT NULL AND p2.delete_flag = 0)
)
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and flow.approver_id = #{userId} and flow.approver_id = #{userId}
</if> </if>
@ -50,7 +46,7 @@
report_flow flow report_flow flow
LEFT JOIN report_project as project on project.id = flow.report_id LEFT JOIN report_project as project on project.id = flow.report_id
<where> <where>
flow.is_init is null and project.is_recessed = 0 AND project.delete_flag = 0 flow.is_init is null and project.is_recessed = 0
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and flow.approver_id = #{userId} and flow.approver_id = #{userId}
</if> </if>
@ -89,9 +85,4 @@
left join report_review rv on p.id = rv.report_id left join report_review rv on p.id = rv.report_id
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>
<select id="selectByIdIncludeDeleted" resultType="com.biutag.supervision.pojo.entity.report.ReportProject">
SELECT *
FROM report_project
WHERE id = #{id}
</select>
</mapper> </mapper>

Loading…
Cancel
Save