Commit 814ee4a3 authored by 宋源硕's avatar 宋源硕

Merge branch 'dev' into 'master'

2024/11/05修改接口

See merge request !458
parents 7aa67b92 30a82d50
...@@ -11,4 +11,7 @@ import java.util.List; ...@@ -11,4 +11,7 @@ import java.util.List;
public interface ResultFileRelationMapper extends BaseMapper<ResultFileRelation> { public interface ResultFileRelationMapper extends BaseMapper<ResultFileRelation> {
List<ResultFileRelation> findByResultId(@Param("resultId") Long resultId); List<ResultFileRelation> findByResultId(@Param("resultId") Long resultId);
//删除结果文件关系表中数据
void updateByFileId(Long id);
} }
...@@ -37,4 +37,7 @@ public interface ReviewDetailsMapper extends BaseMapper<ReviewDetails> { ...@@ -37,4 +37,7 @@ public interface ReviewDetailsMapper extends BaseMapper<ReviewDetails> {
List<ReviewDetails> findDetailsList(ReviewFindListRequest request); List<ReviewDetails> findDetailsList(ReviewFindListRequest request);
// 查询细则列表 // 查询细则列表
List<DeleteDetailsResponse> getDeleteDetailsResponseByStandardId(@Param("standardId") Long standardId); List<DeleteDetailsResponse> getDeleteDetailsResponseByStandardId(@Param("standardId") Long standardId);
//删除当前任务中引用了此车企文件的地方数据
void updateByReviewEnterpriseArchiveId(String id);
} }
...@@ -13,6 +13,8 @@ import com.ruoyi.common.utils.bean.BeanUtils; ...@@ -13,6 +13,8 @@ import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewEnterpriseArchive; import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.Task; import com.ruoyi.domain.Task;
import com.ruoyi.domain.vo.*; import com.ruoyi.domain.vo.*;
import com.ruoyi.mapper.ResultFileRelationMapper;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.TaskMapper; import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.ReviewEnterpriseArchiveService; import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper; import com.ruoyi.mapper.ReviewEnterpriseArchiveMapper;
...@@ -55,6 +57,10 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -55,6 +57,10 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Autowired @Autowired
private ReviewEnterpriseArchiveService reviewEnterpriseArchiveService; private ReviewEnterpriseArchiveService reviewEnterpriseArchiveService;
@Autowired
private ResultFileRelationMapper resultFileRelationMapper;
@Autowired
private ReviewDetailsMapper reviewDetailsMapper;
@Autowired @Autowired
private TaskMapper taskMapper; private TaskMapper taskMapper;
...@@ -301,7 +307,13 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -301,7 +307,13 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Override @Override
public void deleteById(Long id) { public void deleteById(Long id) {
//删除车企文件库里的文件 t_review_enterprise_archive
reviewEnterpriseArchiveMapper.deleteById(id); reviewEnterpriseArchiveMapper.deleteById(id);
//删除当前任务中引用了此车企文件的地方数据 t_review_details_result
String newId = id.toString();
reviewDetailsMapper.updateByReviewEnterpriseArchiveId(newId);
//删除结果文件关系表中数据 t_result_file_relation
resultFileRelationMapper.updateByFileId(id);
} }
} }
......
...@@ -3,6 +3,8 @@ package com.ruoyi.service.impl; ...@@ -3,6 +3,8 @@ package com.ruoyi.service.impl;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.SystemReviewTask; import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.Task;
import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.StrategySystemReviewTask; import com.ruoyi.service.StrategySystemReviewTask;
import com.ruoyi.web.response.SystemReviewTaskViewResponse; import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
...@@ -22,6 +24,9 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask, ...@@ -22,6 +24,9 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask,
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@Autowired
private TaskMapper taskMapper;
@Override @Override
public void doStart(SystemReviewTask systemReviewTask) { public void doStart(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能开始一个已关闭的任务", HttpStatus.ERROR); throw new ServiceException("不能开始一个已关闭的任务", HttpStatus.ERROR);
...@@ -49,6 +54,10 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask, ...@@ -49,6 +54,10 @@ public class StrategySystemReviewTaskClose implements StrategySystemReviewTask,
@Override @Override
public SystemReviewTaskViewResponse doView(SystemReviewTask systemReviewTask) { public SystemReviewTaskViewResponse doView(SystemReviewTask systemReviewTask) {
//设置生产企业名称
Task task = taskMapper.getTaskBySystemTaskId(systemReviewTask.getId());
systemReviewTask.setEnterpriseName(task.getEnterpriseName());
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse(); SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
response.setSystemReviewTask(systemReviewTask); response.setSystemReviewTask(systemReviewTask);
......
...@@ -3,10 +3,7 @@ package com.ruoyi.service.impl; ...@@ -3,10 +3,7 @@ package com.ruoyi.service.impl;
import com.ruoyi.common.DataStatisticsUtils; import com.ruoyi.common.DataStatisticsUtils;
import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.ReviewDetailsResult; import com.ruoyi.domain.*;
import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.TaskUserRelation;
import com.ruoyi.mapper.TaskMapper; import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.mapper.TaskUserRelationMapper; import com.ruoyi.mapper.TaskUserRelationMapper;
import com.ruoyi.service.ReviewDetailsResultService; import com.ruoyi.service.ReviewDetailsResultService;
...@@ -83,7 +80,9 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask, ...@@ -83,7 +80,9 @@ public class StrategySystemReviewTaskFinish implements StrategySystemReviewTask,
// 体系审查 // 体系审查
setSystemDataStatistics(standardTree,results,systemReviewTask); setSystemDataStatistics(standardTree,results,systemReviewTask);
//设置生产企业名称
Task task = taskMapper.getTaskBySystemTaskId(systemReviewTask.getId());
systemReviewTask.setEnterpriseName(task.getEnterpriseName());
response.setSystemReviewTask(systemReviewTask); response.setSystemReviewTask(systemReviewTask);
return response; return response;
......
...@@ -4,7 +4,9 @@ import com.ruoyi.common.constant.HttpStatus; ...@@ -4,7 +4,9 @@ import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.domain.SystemReviewTask; import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.domain.Task;
import com.ruoyi.mapper.SystemReviewTaskMapper; import com.ruoyi.mapper.SystemReviewTaskMapper;
import com.ruoyi.mapper.TaskMapper;
import com.ruoyi.service.ReviewStandardService; import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.StrategySystemReviewTask; import com.ruoyi.service.StrategySystemReviewTask;
import com.ruoyi.web.response.SystemReviewTaskViewResponse; import com.ruoyi.web.response.SystemReviewTaskViewResponse;
...@@ -32,6 +34,9 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In ...@@ -32,6 +34,9 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In
@Autowired @Autowired
private SystemReviewTaskMapper systemReviewTaskMapper; private SystemReviewTaskMapper systemReviewTaskMapper;
@Autowired
private TaskMapper taskMapper;
@Override @Override
public void doStart(SystemReviewTask systemReviewTask) { public void doStart(SystemReviewTask systemReviewTask) {
systemReviewTask.setTaskBeginTime(new Date()); systemReviewTask.setTaskBeginTime(new Date());
...@@ -69,6 +74,10 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In ...@@ -69,6 +74,10 @@ public class StrategySystemReviewTaskNew implements StrategySystemReviewTask, In
// 将问卷赋值到任务 // 将问卷赋值到任务
systemReviewTask.setStandard(standardTree); systemReviewTask.setStandard(standardTree);
//设置生产企业名称
Task task = taskMapper.getTaskBySystemTaskId(systemReviewTask.getId());
systemReviewTask.setEnterpriseName(task.getEnterpriseName());
// 生成返回结果 // 生成返回结果
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse(); SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
response.setSystemReviewTask(systemReviewTask); response.setSystemReviewTask(systemReviewTask);
......
...@@ -115,6 +115,10 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask, ...@@ -115,6 +115,10 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
// 体系审查 // 体系审查
setSystemDataStatistics(standardTree,results,systemReviewTask); setSystemDataStatistics(standardTree,results,systemReviewTask);
//设置生产企业名称
Task task = taskMapper.getTaskBySystemTaskId(systemReviewTask.getId());
systemReviewTask.setEnterpriseName(task.getEnterpriseName());
response.setSystemReviewTask(systemReviewTask); response.setSystemReviewTask(systemReviewTask);
return response; return response;
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
<result property="catalogue" column="catalogue" jdbcType="VARCHAR"/> <result property="catalogue" column="catalogue" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/> <result property="fileName" column="file_name" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<update id="updateByFileId">
update t_result_file_relation set file_id = null,catalogue = '',file_name = ''
where file_id = #{id}
</update>
<select id="findByResultId" resultType="com.ruoyi.domain.ResultFileRelation"> <select id="findByResultId" resultType="com.ruoyi.domain.ResultFileRelation">
select id,task_id,result_id,file_id,catalogue,file_name from t_result_file_relation select id,task_id,result_id,file_id,catalogue,file_name from t_result_file_relation
where result_id = #{resultId} where result_id = #{resultId}
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.mapper.ReviewDetailsMapper"> <mapper namespace="com.ruoyi.mapper.ReviewDetailsMapper">
<update id="updateByReviewEnterpriseArchiveId">
update t_review_details_result set review_enterprise_archive_id = '',catalogue = '', file_name = ''
where review_enterprise_archive_id = #{id}
</update>
<select id="findByKeyPointList" resultType="com.ruoyi.domain.ReviewDetails"> <select id="findByKeyPointList" resultType="com.ruoyi.domain.ReviewDetails">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment