Commit 2a10e740 authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

2024/11/04修改接口和配置文件

See merge request !455
parents 00980cc9 b0660501
......@@ -185,6 +185,12 @@ public class Task {
@TableField(exist = false)
private String inspectionItemName;
@ApiModelProperty("企业ID")
private Long enterpriseId;
@ApiModelProperty("企业名称")
private String enterpriseName;
/**
* 返回当前节点的下一个节点
*/
......
......@@ -50,6 +50,11 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri
* 修改车企文件信息
* */
void updateByTaskId(ReviewEnterpriseArchive reviewEnterpriseArchive);
/*
* 根据任务id查询车企信息
* */
ReviewEnterpriseArchive selectByIdNew(Long id);
}
......
......@@ -89,4 +89,9 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return
*/
List<EntrustedUnitResponse> entrustedUnitDistribution();
/*
* 获取任务企业名称
* */
Task getTaskBySystemTaskId(Long id);
}
......@@ -193,7 +193,9 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
@Override
public ReviewEnterpriseArchive getInfo(ReviewEnterpriseArchiveGetInfoRequest request) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(request.getId());
// ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(request.getId());
//根据任务id查询车企信息
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectByIdNew(request.getId());
// 按逗号拆分字符串
// 将拆分后的字符串配对创建AttachmentsVO对象,并加入到List中
......
......@@ -163,7 +163,16 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
List<TaskSampleRelation> sampleRelations = taskSampleRelationMapper.selectByTaskId(taskMapper.findBySystemReviewTaskId(systemReviewTask.getId()),TaskSampleRelation.COMPLETE_VEHICLE_SAMPLE);
// 获取第一个整车样品对应的生产企业
TaskSampleRelation taskSampleRelation = sampleRelations.get(0);
//TaskSampleRelation taskSampleRelation = sampleRelations.get(0);
// 获取第一个整车样品对应的生产企业
// TaskSampleRelation taskSampleRelation;
// 判断任务样品列表是否为null
/*if (!Objects.isNull(sampleRelations)){
taskSampleRelation = new TaskSampleRelation();
}else {
taskSampleRelation = sampleRelations.get(0);
}
if (!Objects.isNull(taskSampleRelation.getSampleId())){
Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId());
......@@ -171,8 +180,12 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
systemReviewTask.setEnterpriseName(automobileEnterprise.getEnterpriseName());
}else {
systemReviewTask.setEnterpriseName("");
}
}*/
// 构建返回结果
//设置生产企业名称
Task task = taskMapper.getTaskBySystemTaskId(systemReviewTask.getId());
systemReviewTask.setEnterpriseName(task.getEnterpriseName());
SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
response.setSystemReviewTask(systemReviewTask);
response.setReviewSceneChangeTasks(lastChanges);
......
......@@ -218,6 +218,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
task.setName(standard.getName());
task.setStandardNo(standard.getStandardNo());
task.setFile(standard.getFile());
//11.01新增企业id和企业名称字段,避免没有选择整车样品开启填写任务的时候 找不到企业名称
task.setEnterpriseId(request.getEnterpriseId());
task.setEnterpriseName(request.getEnterpriseName());
setTaskList(request.getTaskList(),task);
BeanUtils.copyBeanProp(task, request);
......@@ -360,7 +363,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
saveUserRelation(auditors,task);
// 判断第一个整车样品的生产企业是否变化
judgmentSample(request);
//judgmentSample(request);
// 保存关联的整车样品信息和零部件样品信息
List<TaskSampleRelation> relations = request.getSample();
......@@ -492,6 +495,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 上传的文件
response.setFileList(taskFileRelationService.findByTaskId(request.getId()));
response.setEnterpriseId(task.getEnterpriseId().toString());
response.setEnterpriseName(task.getEnterpriseName());
return response;
} else {
return null;
......
......@@ -26,5 +26,7 @@ public class SampleManagementRequest extends PageDomain {
@ApiModelProperty("0:整车样品 1:零部件样品")
private String flag;
/*生产企业id*/
@ApiModelProperty("生产企业id")
private Long manufacturingEnterpriseId;
}
......@@ -69,4 +69,10 @@ public class TaskCreateRequest {
@ApiModelProperty("上传的文件")
private List<TaskFileRelation> fileList;
@ApiModelProperty("企业id")
private Long enterpriseId;
@ApiModelProperty("企业名称")
private String enterpriseName;
}
......@@ -73,4 +73,10 @@ public class TaskEditRequest {
@ApiModelProperty("上传的文件")
private List<TaskFileRelation> fileList;
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("企业id")
private Long enterpriseId;
}
......@@ -124,4 +124,9 @@ public class TaskFindResponse {
@ApiModelProperty("是否选择场景")
private Boolean taskScenario;
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("企业id")
private Long enterpriseId;
}
......@@ -134,4 +134,9 @@ public class TaskGetInfoResponse {
@ApiModelProperty("上传的文件")
private List<TaskFileRelation> fileList;
@ApiModelProperty("企业id")
private String enterpriseId;
@ApiModelProperty("企业名称")
private String enterpriseName;
}
......@@ -78,8 +78,9 @@
where task_id = #{taskId}
</select>
<select id="findEnterpriseArchiveByTaskId" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
SELECT id, enterprise_name, file_name, version, publish_date, status, identify_number, storage, photo, task_id, create_by, create_time,photo_name
FROM t_review_enterprise_archive
SELECT trea.id, tt.enterprise_name, trea.file_name, trea.version, trea.publish_date, trea.status, trea.identify_number, trea.storage, trea.photo, trea.task_id, trea.create_by, trea.create_time,trea.photo_name
FROM t_review_enterprise_archive trea
left join t_task tt on trea.task_id = tt.id
<where>
task_id = #{taskId}
<if test="fileName != null and fileName != ''">
......@@ -98,6 +99,12 @@
FROM t_review_enterprise_archive
where file_name = #{fileName} and task_id = #{taskId}
</select>
<select id="selectByIdNew" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
SELECT trea.id, tt.enterprise_name, trea.file_name, trea.version, trea.publish_date, trea.status, trea.identify_number, trea.storage, trea.photo, trea.task_id, trea.create_by, trea.create_time,trea.photo_name
FROM t_review_enterprise_archive trea
left join t_task tt on trea.task_id = tt.id
where trea.id = #{id}
</select>
<insert id="insertEnterprise" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert into t_review_enterprise_archive(id,enterprise_name,file_name,version,publish_date,status,identify_number,storage,task_id,create_by,create_time)values
......
......@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="identificationCode != null and identificationCode != ''"> and sm.identification_code like concat('%', #{identificationCode}, '%')</if>
<if test="sampleNumber != null and sampleNumber != ''"> and sm.sample_number like concat('%', #{sampleNumber}, '%')</if>
<if test="sampleName != null and sampleName != ''"> and sm.sample_name like concat('%', #{sampleName}, '%')</if>
<if test="manufacturingEnterpriseId != null and manufacturingEnterpriseId != ''"> and sm.manufacturing_enterprise_id = #{manufacturingEnterpriseId} </if>
<if test="flag != null and flag != ''"> and sm.flag = #{flag} </if>
</where>
</select>
......
......@@ -91,7 +91,7 @@
order by create_time desc
</select>
<select id="findPending" parameterType="com.ruoyi.web.request.TaskFindPendingRequest" resultMap="ResponseMap">
SELECT t.id, t.system_review_task_id, t.car_review_task_id,t.model_test_task_id,
SELECT t.id, t.system_review_task_id, t.car_review_task_id,t.model_test_task_id,t.enterprise_name,t.enterprise_id,
t.task_no,t.task_name,t.task_status,t.run_status,t.name,
t.leader_id,t.leader,
t.task_begin_time,
......@@ -438,6 +438,11 @@
task_status not in ("TEMPORARILY")
group by entrusted_unit
</select>
<select id="getTaskBySystemTaskId" resultType="com.ruoyi.domain.Task">
select *
from t_task
where system_review_task_id = #{id}
</select>
</mapper>
......@@ -95,7 +95,7 @@ token:
# 令牌密钥
secret: ${TOKEN_SECRET}
# 令牌有效期(默认30分钟)
expireTime: 30
expireTime: 120
# MyBatis配置
#mybatis:
......@@ -151,4 +151,4 @@ minio:
# 定时任务开启状态
task:
scheduling: true
\ No newline at end of file
scheduling: true
......@@ -97,7 +97,7 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
expireTime: 120
# MyBatis配置
#mybatis:
......@@ -154,4 +154,4 @@ minio:
# 定时任务开启状态
task:
scheduling: true
\ No newline at end of file
scheduling: true
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