Commit cabc388e authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

10.21接口修改

See merge request !443
parents 88c27c71 9e7db2b5
......@@ -45,6 +45,11 @@ public interface ReviewEnterpriseArchiveMapper extends BaseMapper<ReviewEnterpri
// 批量新增车企文件
public int insertEnterprise(List<EnterpriseImportFileVO> list);
/*
* 修改车企文件信息
* */
void updateByTaskId(ReviewEnterpriseArchive reviewEnterpriseArchive);
}
......
......@@ -50,4 +50,9 @@ public interface ReviewEnterpriseArchiveService extends IService<ReviewEnterpris
* @param reviewEnterpriseArchive
*/
void editEnterpriseArchive(ReviewEnterpriseArchive reviewEnterpriseArchive);
/*
* 删除车企文件接口
* */
void deleteById(Long id);
}
......@@ -292,7 +292,14 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
reviewEnterpriseArchive.setPhoto(photo);
reviewEnterpriseArchive.setPhotoName(photoName);
}
reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive);
//mybatis-plus如果值为null的话不更改 这里自己写一个
reviewEnterpriseArchiveMapper.updateByTaskId(reviewEnterpriseArchive);
//reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive);
}
@Override
public void deleteById(Long id) {
reviewEnterpriseArchiveMapper.deleteById(id);
}
}
......
......@@ -1184,7 +1184,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
map.put("verbose", "BASIC");
//以post形式请求接口
String result= HttpUtil.post("https://10.12.48.78:8090/DescribeProjectTestResult", JSONObject.toJSONString(map));
String result= HttpUtil.post("https://10.12.48.78:8096/DescribeProjectTestResult", JSONObject.toJSONString(map));
JSONObject jsonObject = JSONObject.parseObject(result);
......
......@@ -42,7 +42,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
map.put("verbose", "ALL");
//以post形式请求接口
String result= HttpUtil.post("https://10.12.48.78:8090/DescribeProjectTestResult",JSONObject.toJSONString(map));
String result= HttpUtil.post("https://10.12.48.78:8096/DescribeProjectTestResult",JSONObject.toJSONString(map));
JSONObject jsonObject = JSONObject.parseObject(result);
......
......@@ -96,6 +96,15 @@ public class ReviewEnterpriseArchiveController extends BaseController {
reviewEnterpriseArchiveService.editEnterpriseArchive(reviewEnterpriseArchive);
return R.ok();
}
@ApiOperation("删除车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "删除车企文件", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/delete")
public R<String> deleteEnterpriseArchive(@Validated @RequestBody ReviewEnterpriseArchiveGetInfoRequest request) {
reviewEnterpriseArchiveService.deleteById(request.getId());
return R.ok();
}
@ApiOperation("预览企业留档文件")
@Trace
......
......@@ -18,6 +18,17 @@
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
</resultMap>
<update id="updateByTaskId">
update t_review_enterprise_archive
set photo_name = #{photoName},
photo=#{photo},
file_name=#{fileName},
version=#{version},
publish_date=#{publishDate},
status=#{status},
identify_number=#{identifyNumber}
where id = #{id}
</update>
<select id="findByTaskId" resultType="com.ruoyi.domain.ReviewEnterpriseArchive">
......@@ -67,7 +78,7 @@
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
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
<where>
task_id = #{taskId}
......
......@@ -28,7 +28,7 @@
</select>
<select id="countResult" resultType="java.lang.Long">
SELECT COUNT(*) FROM t_test_records
WHERE project_id = #{projectId}
WHERE project_id = #{projectId} and test_result != 'IGNORED'
GROUP BY project_id
</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