Commit 425d4b5f authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents bdb1e0cc c71f59a4
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId> <artifactId>ruoyi-framework</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -85,11 +87,14 @@ public class ReviewDetailsResult implements Serializable { ...@@ -85,11 +87,14 @@ public class ReviewDetailsResult implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING) @JsonFormat(shape = JsonFormat.Shape.STRING)
@ApiModelProperty("关联到车企留档文件") @ApiModelProperty("关联到车企留档文件")
private Long reviewEnterpriseArchiveId; private String reviewEnterpriseArchiveId;
@TableField(exist = false)
@ApiModelProperty("文件名称") @ApiModelProperty("文件名称")
private String fileName; private String fileName;
@TableField(exist = false)
@ApiModelProperty("文件列表")
List<ReviewEnterpriseArchiveFileVO> fileList;
} }
package com.ruoyi.domain.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
@ApiModel(value = "ReviewEnterpriseArchiveFileVO", description = "细则关联车企文件列表")
@Accessors(chain = true)
@Data
public class ReviewEnterpriseArchiveFileVO {
@ApiModelProperty("文件id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("文件目录")
private String catalogue;
}
...@@ -3,7 +3,9 @@ package com.ruoyi.service.impl; ...@@ -3,7 +3,9 @@ package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ReviewDetailsResult; import com.ruoyi.domain.ReviewDetailsResult;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import com.ruoyi.service.ReviewDetailsResultService; import com.ruoyi.service.ReviewDetailsResultService;
import com.ruoyi.mapper.ReviewDetailsResultMapper; import com.ruoyi.mapper.ReviewDetailsResultMapper;
import com.ruoyi.web.request.ReviewDetailsResultSaveRequest; import com.ruoyi.web.request.ReviewDetailsResultSaveRequest;
...@@ -11,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -48,8 +51,26 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes ...@@ -48,8 +51,26 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes
result.setUserId(loginUser.getUserId()); result.setUserId(loginUser.getUserId());
result.setUserName(loginUser.getNickName()); result.setUserName(loginUser.getNickName());
result.setLastModifyTime(new Date()); result.setLastModifyTime(new Date());
result.setCatalogue(request.getCatalogue()); result.setComment(request.getComment());
result.setReviewEnterpriseArchiveId(request.getReviewEnterpriseArchiveId());
// 获取文件列表
List<ReviewEnterpriseArchiveFileVO> fileList = request.getFileList();
List<Long> idList = new ArrayList<>();
List<String> fileNameList = new ArrayList<>();
List<String> catalogueList = new ArrayList<>();
// 遍历fileList
for (ReviewEnterpriseArchiveFileVO fileVO : fileList) {
// 将字段逗号分隔后存入对应的集合中
idList.add(fileVO.getId());
fileNameList.add(fileVO.getFileName());
catalogueList.add(fileVO.getCatalogue());
}
result.setReviewEnterpriseArchiveId(StringUtils.join(idList, ","));
result.setFileName(StringUtils.join(fileNameList, ","));
result.setCatalogue(StringUtils.join(catalogueList, ","));
this.baseMapper.updateById(result); this.baseMapper.updateById(result);
} else { } else {
...@@ -57,12 +78,30 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes ...@@ -57,12 +78,30 @@ public class ReviewDetailsResultServiceImpl extends ServiceImpl<ReviewDetailsRes
ReviewDetailsResult reviewDetailsResult = new ReviewDetailsResult(); ReviewDetailsResult reviewDetailsResult = new ReviewDetailsResult();
reviewDetailsResult.setTaskId(request.getTaskId()); reviewDetailsResult.setTaskId(request.getTaskId());
reviewDetailsResult.setReviewDetailsId(request.getReviewDetailsId()); reviewDetailsResult.setReviewDetailsId(request.getReviewDetailsId());
reviewDetailsResult.setReviewEnterpriseArchiveId(request.getReviewEnterpriseArchiveId());
reviewDetailsResult.setCatalogue(request.getCatalogue());
reviewDetailsResult.setPassed(request.getPassed()); reviewDetailsResult.setPassed(request.getPassed());
reviewDetailsResult.setUserId(loginUser.getUserId()); reviewDetailsResult.setUserId(loginUser.getUserId());
reviewDetailsResult.setUserName(loginUser.getNickName()); reviewDetailsResult.setUserName(loginUser.getNickName());
reviewDetailsResult.setLastModifyTime(new Date()); reviewDetailsResult.setLastModifyTime(new Date());
reviewDetailsResult.setComment(request.getComment());
// 获取文件列表
List<ReviewEnterpriseArchiveFileVO> fileList = request.getFileList();
List<Long> idList = new ArrayList<>();
List<String> fileNameList = new ArrayList<>();
List<String> catalogueList = new ArrayList<>();
// 遍历fileList
for (ReviewEnterpriseArchiveFileVO fileVO : fileList) {
// 将字段逗号分隔后存入对应的集合中
idList.add(fileVO.getId());
fileNameList.add(fileVO.getFileName());
catalogueList.add(fileVO.getCatalogue());
}
reviewDetailsResult.setReviewEnterpriseArchiveId(StringUtils.join(idList, ","));
reviewDetailsResult.setFileName(StringUtils.join(fileNameList, ","));
reviewDetailsResult.setCatalogue(StringUtils.join(catalogueList, ","));
this.baseMapper.insert(reviewDetailsResult); this.baseMapper.insert(reviewDetailsResult);
} }
......
...@@ -4,6 +4,7 @@ import com.ruoyi.common.DataStatisticsUtils; ...@@ -4,6 +4,7 @@ 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.*; import com.ruoyi.domain.*;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import com.ruoyi.mapper.*; import com.ruoyi.mapper.*;
import com.ruoyi.service.*; import com.ruoyi.service.*;
import com.ruoyi.web.response.CarReviewTaskViewResponse; import com.ruoyi.web.response.CarReviewTaskViewResponse;
...@@ -181,8 +182,8 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -181,8 +182,8 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
standard.setPassed(null); standard.setPassed(null);
} }
if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) { if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(reviewDetailsResult.getReviewEnterpriseArchiveId());
reviewDetailsResult.setFileName(reviewEnterpriseArchive.getFileName()); reviewDetailsResult.setFileList(setFileList(reviewDetailsResult));
} }
details.setResult(reviewDetailsResult); details.setResult(reviewDetailsResult);
} }
...@@ -204,6 +205,36 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init ...@@ -204,6 +205,36 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
} }
// 设置文件列表
private List<ReviewEnterpriseArchiveFileVO> setFileList(ReviewDetailsResult reviewDetailsResult) {
// 拆分字段值,得到对应的数组
String[] idArray = reviewDetailsResult.getReviewEnterpriseArchiveId().split(",");
String[] catalogueArray = reviewDetailsResult.getCatalogue().split(",");
String[] fileNameArray = reviewDetailsResult.getFileName().split(",");
// 获取数组的最大长度
int maxLength = Math.max(Math.max(idArray.length, catalogueArray.length), fileNameArray.length);
// 创建列表,用于存储合成对象
List<ReviewEnterpriseArchiveFileVO> fileList = new ArrayList<>();
// 合成对象
for (int i = 0; i < maxLength; i++) {
Long id = (i < idArray.length && !idArray[i].isEmpty()) ? Long.parseLong(idArray[i]) : null;
String catalogue = (i < catalogueArray.length) ? catalogueArray[i] : null;
String fileName = (i < fileNameArray.length) ? fileNameArray[i] : null;
ReviewEnterpriseArchiveFileVO fileVO = new ReviewEnterpriseArchiveFileVO();
fileVO.setId(id);
fileVO.setCatalogue(catalogue);
fileVO.setFileName(fileName);
fileList.add(fileVO);
}
return fileList;
}
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
......
...@@ -2,10 +2,9 @@ package com.ruoyi.service.impl; ...@@ -2,10 +2,9 @@ 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.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.domain.*; import com.ruoyi.domain.*;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import com.ruoyi.mapper.*; import com.ruoyi.mapper.*;
import com.ruoyi.service.*; import com.ruoyi.service.*;
import com.ruoyi.web.response.SystemReviewTaskViewResponse; import com.ruoyi.web.response.SystemReviewTaskViewResponse;
...@@ -16,7 +15,6 @@ import org.springframework.stereotype.Service; ...@@ -16,7 +15,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -180,8 +178,8 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -180,8 +178,8 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
standard.setPassed(null); standard.setPassed(null);
} }
if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) { if(reviewDetailsResult != null && reviewDetailsResult.getReviewEnterpriseArchiveId() != null) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(reviewDetailsResult.getReviewEnterpriseArchiveId());
reviewDetailsResult.setFileName(reviewEnterpriseArchive.getFileName()); reviewDetailsResult.setFileList(setFileList(reviewDetailsResult));
} }
details.setResult(reviewDetailsResult); details.setResult(reviewDetailsResult);
} }
...@@ -201,6 +199,36 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask ...@@ -201,6 +199,36 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
systemReviewTaskMapper.updateById(systemReviewTask); systemReviewTaskMapper.updateById(systemReviewTask);
} }
// 设置文件列表
private List<ReviewEnterpriseArchiveFileVO> setFileList(ReviewDetailsResult reviewDetailsResult) {
// 拆分字段值,得到对应的数组
String[] idArray = reviewDetailsResult.getReviewEnterpriseArchiveId().split(",");
String[] catalogueArray = reviewDetailsResult.getCatalogue().split(",");
String[] fileNameArray = reviewDetailsResult.getFileName().split(",");
// 获取数组的最大长度
int maxLength = Math.max(Math.max(idArray.length, catalogueArray.length), fileNameArray.length);
// 创建列表,用于存储合成对象
List<ReviewEnterpriseArchiveFileVO> fileList = new ArrayList<>();
// 合成对象
for (int i = 0; i < maxLength; i++) {
Long id = (i < idArray.length && !idArray[i].isEmpty()) ? Long.parseLong(idArray[i]) : null;
String catalogue = (i < catalogueArray.length) ? catalogueArray[i] : null;
String fileName = (i < fileNameArray.length) ? fileNameArray[i] : null;
ReviewEnterpriseArchiveFileVO fileVO = new ReviewEnterpriseArchiveFileVO();
fileVO.setId(id);
fileVO.setCatalogue(catalogue);
fileVO.setFileName(fileName);
fileList.add(fileVO);
}
return fileList;
}
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
......
...@@ -6,6 +6,13 @@ import com.ruoyi.domain.TestRecords; ...@@ -6,6 +6,13 @@ import com.ruoyi.domain.TestRecords;
import com.ruoyi.mapper.TestRecordsMapper; import com.ruoyi.mapper.TestRecordsMapper;
import com.ruoyi.service.TestRecordsService; import com.ruoyi.service.TestRecordsService;
import okhttp3.Request; import okhttp3.Request;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -13,6 +20,9 @@ import java.io.*; ...@@ -13,6 +20,9 @@ import java.io.*;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
@Transactional @Transactional
...@@ -24,17 +34,6 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR ...@@ -24,17 +34,6 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
JSONObject jsonObject = getInverseParamByUrl("http://10.12.48.78:8090/DescribeProjectTestResult"); JSONObject jsonObject = getInverseParamByUrl("http://10.12.48.78:8090/DescribeProjectTestResult");
} }
// public static void main(String[] args) throws IOException {
// JSONObject jsonObject = getInverseParamByUrl("http://10.12.48.78:8090/DescribeProjectTestResult");
//
// System.out.println("jsonObject = " + jsonObject);
// }
/**
* 通过API获取反参
* @param apiUrl
* @return
* @throws IOException
*/
public static JSONObject getInverseParamByUrl(String apiUrl) throws IOException { public static JSONObject getInverseParamByUrl(String apiUrl) throws IOException {
// 调用请求 // 调用请求
URL url = new URL(apiUrl); URL url = new URL(apiUrl);
...@@ -54,62 +53,104 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR ...@@ -54,62 +53,104 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
return jsonObject; return jsonObject;
} }
public static void main(String[] args) throws UnsupportedEncodingException { public static String doPost(String url, JSONObject json){
// 创建一个Request对象
// Request request = new Request();
// request.setParam1("project_items;1");
// request.setParam2("ALL");
//
// // 将Request对象转换为JSON字符串
// Gson gson = new GsonBuilder().create();
// String jsonRequest = gson.toJson(request);
try { try {
String apiUrl = "http://10.12.48.78:8090/DescribeProjectTestResult"; // 第三方URL CloseableHttpClient httpClient = HttpClientBuilder.create().build();
String param1 = "project_items;1"; HttpPost post = new HttpPost(url);
String param2 = "ALL";
// 首先Header部分需要设定字符集为:uft-8
String postData = String.format("param1=%s&param2=%s", post.addHeader("Content-Type", "application/json;charset=utf-8");
URLEncoder.encode(param1, "UTF-8"), // 此处也需要设定
URLEncoder.encode(param2, "UTF-8")); post.setHeader("Accept", "*/*");
post.setHeader("Accept-Encoding", "gzip, deflate, br");
URL url = new URL(apiUrl); post.setHeader("Connection", "keep-alive");
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // post.setHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36");
conn.setRequestMethod("POST"); post.setEntity(new StringEntity(json.toString(), Charset.forName("UTF-8"))); //设置请求参数
conn.setDoOutput(true); HttpResponse response = httpClient.execute(post);
int statusCode = response.getStatusLine().getStatusCode();
// 设置请求体 if (HttpStatus.SC_OK == statusCode){
DataOutputStream outputStream = new DataOutputStream(conn.getOutputStream()); //返回String
outputStream.writeBytes(postData); String res = EntityUtils.toString(response.getEntity());
outputStream.flush(); System.out.println(res);
outputStream.close(); return res;
}else{
int responseCode = conn.getResponseCode(); return "调用POST请求失败";
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
String responseBody = response.toString();
JSONObject jsonObject = JSONObject.parseObject(responseBody);
System.out.println("Response body: " + responseBody);
System.out.println("jsonObject = " + jsonObject);
} else {
System.out.println("Request failed. Response code: " + responseCode);
} }
conn.disconnect(); } catch (Exception e) {
} catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return "调用POST请求失败";
} }
} }
// public static void main(String[] args) {
// Map<String, Object> map = new HashMap<>();
// map.put("id", "project_items;1");
// map.put("verbose", "ALL");
// JSONObject json = new JSONObject(map);
//
// //以post形式请求接口
// String result = doPost("http://10.12.48.78:8090/DescribeProjectTestResult", json);
// JSONObject jsonObject = JSONObject.parseObject(result);
// String data = jsonObject.get("data").toString();
//
// System.out.println("data = " + data);
// }
// public static void main(String[] args) {
//
// try {
// String apiUrl = "http://10.12.48.78:8090/DescribeProjectTestResult"; // 第三方URL
//
//
// URL url = new URL(apiUrl);
// HttpURLConnection conn = (HttpURLConnection) url.openConnection();
// conn.setRequestMethod("POST");
// conn.setDoInput(true);
// conn.setDoOutput(true);
//
// // 参数设置 ||
// conn.setRequestProperty("Content-Type","application/json");
// conn.connect();
//
// // 设置请求体
// OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(),"UTF-8");
// JSONObject parm = new JSONObject();
// parm.put("id","project_items;1");
// parm.put("verbose","ALL");
// writer.write(URLEncoder.encode(parm.toString(),"UTF-8"));
// writer.flush();
//
//
// int responseCode = conn.getResponseCode();
// if (responseCode == HttpURLConnection.HTTP_OK) {
// BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
// String inputLine;
// StringBuilder response = new StringBuilder();
//// StringBuffer response = new StringBuffer();
//
// while ((inputLine = in.readLine()) != null) {
// response.append(inputLine);
// }
// in.close();
// conn.disconnect();
//
// String result = response.toString();
// System.out.println("result = " + result);
//
//// String responseBody = response.toString();
//// JSONObject jsonObject = JSONObject.parseObject(responseBody);
//// System.out.println("Response body: " + responseBody);
//// System.out.println("jsonObject = " + jsonObject);
// } else {
// System.out.println("Request failed. Response code: " + responseCode);
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
} }
package com.ruoyi.web.request; package com.ruoyi.web.request;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List;
@ApiModel(value = "ReviewDetailsResultSaveRequest", description = "保存审查细则的审查结果") @ApiModel(value = "ReviewDetailsResultSaveRequest", description = "保存审查细则的审查结果")
@Data @Data
public class ReviewDetailsResultSaveRequest { public class ReviewDetailsResultSaveRequest {
...@@ -26,9 +29,9 @@ public class ReviewDetailsResultSaveRequest { ...@@ -26,9 +29,9 @@ public class ReviewDetailsResultSaveRequest {
@ApiModelProperty("审核是否通过(0未通过、1通过)") @ApiModelProperty("审核是否通过(0未通过、1通过)")
private Integer passed; private Integer passed;
@ApiModelProperty("关联到车企留档文件") @ApiModelProperty("评论")
private Long reviewEnterpriseArchiveId; private String comment;
@ApiModelProperty("章节条目或范围") @ApiModelProperty("关联文件列表")
private String catalogue; List<ReviewEnterpriseArchiveFileVO> fileList;
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<resultMap id="BaseResultMap" type="com.ruoyi.domain.ReviewDetailsResult"> <resultMap id="BaseResultMap" type="com.ruoyi.domain.ReviewDetailsResult">
<id property="id" column="id" jdbcType="BIGINT"/> <id property="id" column="id" jdbcType="BIGINT"/>
<result property="passed" column="passed" jdbcType="TINYINT"/> <result property="passed" column="passed" jdbcType="TINYINT"/>
<result property="comment" column="comment" jdbcType="VARCHAR"/> <result property="comment" column="comment" jdbcType="LONGVARCHAR"/>
<result property="imagesUrl" column="images_url" jdbcType="VARCHAR"/> <result property="imagesUrl" column="images_url" jdbcType="VARCHAR"/>
<result property="reviewDetailsId" column="review_details_id" jdbcType="BIGINT"/> <result property="reviewDetailsId" column="review_details_id" jdbcType="BIGINT"/>
<result property="taskId" column="task_id" jdbcType="BIGINT"/> <result property="taskId" column="task_id" jdbcType="BIGINT"/>
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<result property="userName" column="user_name" jdbcType="VARCHAR"/> <result property="userName" column="user_name" jdbcType="VARCHAR"/>
<result property="lastModifyTime" column="last_modify_time" jdbcType="TIMESTAMP"/> <result property="lastModifyTime" column="last_modify_time" jdbcType="TIMESTAMP"/>
<result property="catalogue" column="catalogue" jdbcType="VARCHAR"/> <result property="catalogue" column="catalogue" jdbcType="VARCHAR"/>
<result property="reviewEnterpriseArchiveId" column="review_enterprise_archive_id" jdbcType="BIGINT"/> <result property="reviewEnterpriseArchiveId" column="review_enterprise_archive_id" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="LONGVARCHAR"/>
</resultMap> </resultMap>
...@@ -25,11 +26,11 @@ ...@@ -25,11 +26,11 @@
task_id from t_review_details_result task_id from t_review_details_result
</sql> </sql>
<select id="findByTaskId" resultType="com.ruoyi.domain.ReviewDetailsResult"> <select id="findByTaskId" resultType="com.ruoyi.domain.ReviewDetailsResult">
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id FROM t_review_details_result WHERE task_id = #{taskId} SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id, file_name FROM t_review_details_result WHERE task_id = #{taskId}
</select> </select>
<select id="findByTaskIdAndDetailsId" resultType="com.ruoyi.domain.ReviewDetailsResult"> <select id="findByTaskIdAndDetailsId" resultType="com.ruoyi.domain.ReviewDetailsResult">
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id, file_name
FROM t_review_details_result FROM t_review_details_result
WHERE task_id = #{taskId} and review_details_id = #{reviewDetailsId} WHERE task_id = #{taskId} and review_details_id = #{reviewDetailsId}
</select> </select>
...@@ -39,7 +40,7 @@ ...@@ -39,7 +40,7 @@
WHERE passed = 0 AND task_id = #{taskId} WHERE passed = 0 AND task_id = #{taskId}
</select> </select>
<select id="findByDetailsList" resultType="com.ruoyi.domain.ReviewDetailsResult"> <select id="findByDetailsList" resultType="com.ruoyi.domain.ReviewDetailsResult">
SELECT tr.id, tr.passed, tr.comment, tr.images_url, tr.review_details_id, tr.task_id, tr.user_id, tr.user_name, tr.last_modify_time, tr.catalogue, tr.review_enterprise_archive_id SELECT tr.id, tr.passed, tr.comment, tr.images_url, tr.review_details_id, tr.task_id, tr.user_id, tr.user_name, tr.last_modify_time, tr.catalogue, tr.review_enterprise_archive_id, tr.file_name
FROM t_review_details_result tr FROM t_review_details_result tr
LEFT JOIN t_system_review_task ts ON ts.id = tr.task_id LEFT JOIN t_system_review_task ts ON ts.id = tr.task_id
LEFT JOIN t_car_review_task tc ON tc.id = tr.task_id LEFT JOIN t_car_review_task tc ON tc.id = tr.task_id
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
</foreach> </foreach>
</select> </select>
<select id="findByDetailsId" resultType="com.ruoyi.domain.ReviewDetailsResult"> <select id="findByDetailsId" resultType="com.ruoyi.domain.ReviewDetailsResult">
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id, file_name
FROM t_review_details_result WHERE review_details_id = #{detailsId} FROM t_review_details_result WHERE review_details_id = #{detailsId}
</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