Commit 9f66b059 authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang

# Conflicts:
#	quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
parents b1a7c4d7 12fc0de8
...@@ -74,6 +74,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -74,6 +74,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Autowired @Autowired
private TaskUserRelationMapper taskUserRelationMapper; private TaskUserRelationMapper taskUserRelationMapper;
@Autowired
private AutomobileEnterpriseMapper automobileEnterpriseMapper;
// PENDING状态下 // PENDING状态下
// 1.standard字段查询当前最新问卷 // 1.standard字段查询当前最新问卷
// 2.查询场景变更任务 // 2.查询场景变更任务
...@@ -86,9 +89,6 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -86,9 +89,6 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
// 获取当前问卷答案 // 获取当前问卷答案
List<ReviewDetailsResult> results = reviewDetailsResultService.findByTaskId(carReviewTask.getId()); List<ReviewDetailsResult> results = reviewDetailsResultService.findByTaskId(carReviewTask.getId());
// 任务样品关系
List<TaskSampleRelation> relations = taskSampleRelationMapper.selectByTaskId(taskMapper.findByCarReviewTaskId(carReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE);
// 绑定问卷与答案 // 绑定问卷与答案
setDetailsResult(standardTree, results,carReviewTask); setDetailsResult(standardTree, results,carReviewTask);
...@@ -98,14 +98,17 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -98,14 +98,17 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
// 查询场景变更任务便于提醒用户场景变动 // 查询场景变更任务便于提醒用户场景变动
List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByTaskId(carReviewTask.getId()); List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByTaskId(carReviewTask.getId());
// 任务样品关系
List<TaskSampleRelation> sampleRelations = taskSampleRelationMapper.selectByTaskId(taskMapper.findByCarReviewTaskId(carReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE); List<TaskSampleRelation> sampleRelations = taskSampleRelationMapper.selectByTaskId(taskMapper.findByCarReviewTaskId(carReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE);
// 获取第一个整车样品对应的生产企业
TaskSampleRelation taskSampleRelation = sampleRelations.get(0); TaskSampleRelation taskSampleRelation = sampleRelations.get(0);
Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId()); Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId());
AutomobileEnterprise automobileEnterprise = automobileEnterpriseMapper.selectAutomobileEnterpriseById(sample.getManufacturingEnterpriseId());
carReviewTask.setEnterpriseName(sample.getManufacturingEnterprise()); carReviewTask.setEnterpriseName(automobileEnterprise.getEnterpriseName());
// 构建返回结果 // 构建返回结果
CarReviewTaskViewResponse response = new CarReviewTaskViewResponse(); CarReviewTaskViewResponse response = new CarReviewTaskViewResponse();
carReviewTask.setImagesUrl("/vehicle-quality-review-oss/2024/03/04/qianzi1_20240304104011A001.jpg,/vehicle-quality-review-oss/2024/03/04/qianzi2_20240304104121A002.jpg"); carReviewTask.setImagesUrl("/vehicle-quality-review-oss/2024/03/04/qianzi1_20240304104011A001.jpg,/vehicle-quality-review-oss/2024/03/04/qianzi2_20240304104121A002.jpg");
response.setCarReviewTask(carReviewTask); response.setCarReviewTask(carReviewTask);
......
...@@ -66,6 +66,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -66,6 +66,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired @Autowired
private TaskUserRelationMapper taskUserRelationMapper; private TaskUserRelationMapper taskUserRelationMapper;
@Autowired
private AutomobileEnterpriseMapper automobileEnterpriseMapper;
@Override @Override
public void doStart(SystemReviewTask systemReviewTask) { public void doStart(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能开始一个已经开始的任务", HttpStatus.ERROR); throw new ServiceException("不能开始一个已经开始的任务", HttpStatus.ERROR);
...@@ -129,9 +132,6 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -129,9 +132,6 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
// 获取当前问卷答案 // 获取当前问卷答案
List<ReviewDetailsResult> results = reviewDetailsResultService.findByTaskId(systemReviewTask.getId()); List<ReviewDetailsResult> results = reviewDetailsResultService.findByTaskId(systemReviewTask.getId());
// 任务样品关系
List<TaskSampleRelation> relations = taskSampleRelationMapper.selectByTaskId(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE);
// 绑定问卷与答案 // 绑定问卷与答案
setDetailsResult(standardTree, results, systemReviewTask); setDetailsResult(standardTree, results, systemReviewTask);
...@@ -141,12 +141,15 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -141,12 +141,15 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
// 查询场景变更任务便于提醒用户场景变动 // 查询场景变更任务便于提醒用户场景变动
List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByTaskId(systemReviewTask.getId()); List<ReviewSceneChangeTask> lastChanges = reviewSceneChangeTaskService.findLastChangeByTaskId(systemReviewTask.getId());
// 任务样品关系
List<TaskSampleRelation> sampleRelations = taskSampleRelationMapper.selectByTaskId(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE); List<TaskSampleRelation> sampleRelations = taskSampleRelationMapper.selectByTaskId(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE);
// 获取第一个整车样品对应的生产企业
TaskSampleRelation taskSampleRelation = sampleRelations.get(0); TaskSampleRelation taskSampleRelation = sampleRelations.get(0);
Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId()); Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId());
AutomobileEnterprise automobileEnterprise = automobileEnterpriseMapper.selectAutomobileEnterpriseById(sample.getManufacturingEnterpriseId());
systemReviewTask.setEnterpriseName(sample.getManufacturingEnterprise()); systemReviewTask.setEnterpriseName(automobileEnterprise.getEnterpriseName());
// 构建返回结果 // 构建返回结果
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse(); SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
......
...@@ -104,7 +104,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -104,7 +104,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="enterpriseId != null">#{enterpriseId}</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="trademark != null">#{trademark},</if> <if test="trademark != null">#{trademark},</if>
<if test="samplePhotos != null">#{samplePhotos},</if> <if test="samplePhotos != null">#{samplePhotos},</if>
...@@ -177,7 +176,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -177,7 +176,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t.id,t.identification_code,t.sample_number,t.sample_name,t.manufacturing_enterprise_id,t.trademark,t.sample_photos,t.number_of_samples,t.delivery_date,t.sample_sender,t.manufacturing_enterprise,t.manufacture_date select t.id,t.identification_code,t.sample_number,t.sample_name,t.manufacturing_enterprise_id,t.trademark,t.sample_photos,t.number_of_samples,t.delivery_date,t.sample_sender,t.manufacturing_enterprise,t.manufacture_date
from t_sample t from t_sample t
left join t_task_sample_relation ts on ts.sample_id = t.id and ts.task_id = #{id} left join t_task_sample_relation ts on ts.sample_id = t.id and ts.task_id = #{id}
WHERE t.id IN WHERE t.deleted = 0
AND t.id IN
<foreach collection="relationList" item="relation" open="(" separator="," close=")"> <foreach collection="relationList" item="relation" open="(" separator="," close=")">
#{relation.sampleId} #{relation.sampleId}
</foreach> </foreach>
......
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
select id,task_id,sample_id,flag from t_task_sample_relation select id,task_id,sample_id,flag from t_task_sample_relation
</sql> </sql>
<select id="selectByTaskId" resultType="com.ruoyi.domain.TaskSampleRelation"> <select id="selectByTaskId" resultType="com.ruoyi.domain.TaskSampleRelation">
<include refid="Base_Column_List"/> select ts.id,ts.task_id,ts.sample_id,ts.flag from t_task_sample_relation ts
left join t_sample t on t.id = ts.sample_id and t.deleted = 0
where where
<if test="taskId != null and taskId != ''"> <if test="taskId != null and taskId != ''">
task_id = #{taskId} ts.task_id = #{taskId}
</if> </if>
<if test="flag != null and flag != ''"> <if test="flag != null and flag != ''">
and flag = #{flag} and ts.flag = #{flag}
</if> </if>
</select> </select>
......
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