Merge branch 'develop_master' into FOTON
This commit is contained in:
@@ -133,6 +133,10 @@
|
||||
<version>19.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
+13
-2
@@ -113,14 +113,25 @@ public class AskQuestionsController extends BaseController<AskQuestions> {
|
||||
return Result.success(askQuestionsList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标准编号,等查询条件 查询我的回答
|
||||
* @param askQuestions
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAskQuestionsNew")
|
||||
public ResponseMessage getAskQuestionsNew(AskQuestions askQuestions){
|
||||
List<AskQuestions> askQuestionsList = askQuestionsService.getAskQuestionsNew(askQuestions);
|
||||
return Result.success(askQuestionsList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据问题ID查询回答***
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getAskQuestionsByakId")
|
||||
public ResponseMessage getAskQuestionsByakId(String id){
|
||||
List<Reply> askQuestionsList = askQuestionsService.getAskQuestionsByakId(id);
|
||||
public ResponseMessage getAskQuestionsByakId(String id,String state){
|
||||
List<Reply> askQuestionsList = askQuestionsService.getAskQuestionsByakId(id,state);
|
||||
return Result.success(askQuestionsList);
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.StandardQA.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ConvertMqEO;
|
||||
import com.adc.da.slrs.StandardQA.entity.AskQuestions;
|
||||
import com.adc.da.slrs.StandardQA.entity.Reply;
|
||||
import com.adc.da.slrs.StandardQA.service.Impl.ReplyServiceImpl;
|
||||
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: qk
|
||||
@@ -41,9 +43,11 @@ public class ReplyController extends BaseController<Reply> {
|
||||
if(StringUtils.isEmpty(reply.getReply())){
|
||||
return Result.error("-1","请输入回答内容");
|
||||
}
|
||||
if(reply.getFileList().size() >0) {
|
||||
reply.setAppendixId(reply.getFileList().get(0).getAttId());
|
||||
reply.setAppendixName(reply.getFileList().get(0).getName());
|
||||
if(!reply.getFileList().isEmpty()) {
|
||||
String appendixIds = reply.getFileList().stream().map(ConvertMqEO::getId).collect(Collectors.joining(","));;
|
||||
String appendixNames = reply.getFileList().stream().map(ConvertMqEO::getName).collect(Collectors.joining(","));;
|
||||
reply.setAppendixId(appendixIds);
|
||||
reply.setAppendixName(appendixNames);
|
||||
}
|
||||
reply.setReplyTime(new Date());
|
||||
reply.setId(UUIDUtils.randomUUID20());
|
||||
|
||||
@@ -18,6 +18,8 @@ public interface AskQuestionsDao extends BaseMapper<AskQuestions> {
|
||||
|
||||
List<AskQuestions> getAskQuestions (@Param("askQuestions") AskQuestions askQuestions);
|
||||
|
||||
List<AskQuestions> getAskQuestionsNew (@Param("ask") AskQuestions askQuestions);
|
||||
|
||||
List<AskQuestions> getReplyDetails (@Param("askQuestions") AskQuestions askQuestions);
|
||||
|
||||
List<AskQuestions> getReplyDetailsByStandId (@Param("askQuestions") AskQuestions askQuestions);
|
||||
@@ -34,7 +36,7 @@ public interface AskQuestionsDao extends BaseMapper<AskQuestions> {
|
||||
|
||||
List<AskQuestions> getArchiveAskQuestions (String id);
|
||||
|
||||
List<Reply> getAskQuestionsByakId (String id);
|
||||
List<Reply> getAskQuestionsByakId (String id,String state);
|
||||
|
||||
List<String> getUId();
|
||||
}
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
public interface AskQuestionsService extends IService<AskQuestions> {
|
||||
|
||||
List<AskQuestions> getAskQuestions(AskQuestions askQuestions);
|
||||
List<AskQuestions> getAskQuestionsNew(AskQuestions askQuestions);
|
||||
|
||||
List<AskQuestions> getReplyDetails(AskQuestions askQuestions);
|
||||
List<AskQuestions> getReplyDetailsByStandId(AskQuestions askQuestions);
|
||||
@@ -25,7 +26,7 @@ public interface AskQuestionsService extends IService<AskQuestions> {
|
||||
|
||||
List<AskQuestions> getAskQuestionsByStandardId(String standardId);
|
||||
List<AskQuestions> getArchiveAskQuestions(String id);
|
||||
List<Reply> getAskQuestionsByakId(String id);
|
||||
List<Reply> getAskQuestionsByakId(String id,String state);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+11
-2
@@ -6,6 +6,7 @@ import com.adc.da.slrs.StandardQA.entity.AskQuestions;
|
||||
import com.adc.da.slrs.StandardQA.entity.Reply;
|
||||
import com.adc.da.slrs.StandardQA.service.AskQuestionsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
@@ -47,6 +48,9 @@ public class AskQuestionsServiceImpl extends ServiceImpl<AskQuestionsDao, AskQue
|
||||
|
||||
@Override
|
||||
public List<AskQuestions> retrieve(AskQuestions askQuestions) {
|
||||
if (StringUtils.isNotBlank(askQuestions.getStandardEncdoing())) {
|
||||
askQuestions.setStandardEncdoing(askQuestions.getStandardEncdoing().replace(" ", " "));
|
||||
}
|
||||
return askQuestionsDao.retrieve(askQuestions);
|
||||
}
|
||||
|
||||
@@ -65,14 +69,19 @@ public class AskQuestionsServiceImpl extends ServiceImpl<AskQuestionsDao, AskQue
|
||||
return askQuestionsDao.getAskQuestionsByStandardId(standardId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AskQuestions> getAskQuestionsNew(AskQuestions askQuestions) {
|
||||
return askQuestionsDao.getAskQuestionsNew(askQuestions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AskQuestions> getArchiveAskQuestions(String id) {
|
||||
return askQuestionsDao.getArchiveAskQuestions(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Reply> getAskQuestionsByakId(String id) {
|
||||
return askQuestionsDao.getAskQuestionsByakId(id);
|
||||
public List<Reply> getAskQuestionsByakId(String id,String state) {
|
||||
return askQuestionsDao.getAskQuestionsByakId(id,state);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
AND aq.STANDARD_ID = #{standardId}
|
||||
</if>
|
||||
</where>
|
||||
order by QUESTION_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="getArchiveAskQuestions" resultType="com.adc.da.slrs.StandardQA.entity.AskQuestions">
|
||||
@@ -72,6 +73,9 @@
|
||||
<if test="id !=null and id !=''">
|
||||
AND reply.ASK_ID = #{id}
|
||||
</if>
|
||||
<if test="state !=null and state !=''">
|
||||
AND reply.state = #{state}
|
||||
</if>
|
||||
</where>
|
||||
order by reply.REPLY_TIME
|
||||
|
||||
@@ -203,7 +207,7 @@
|
||||
</select>
|
||||
|
||||
<select id="resemblance" resultType="com.adc.da.slrs.StandardQA.entity.AskQuestions">
|
||||
SELECT *,
|
||||
SELECT DISTINCT *,
|
||||
<foreach item="item" collection="chars" separator="+" open="(" close=")" index="">
|
||||
(case when PROBLEM_DESCRIPTION like CONCAT('%',#{item},'%') then 1 else 0 end)
|
||||
</foreach>
|
||||
@@ -217,6 +221,24 @@
|
||||
WHERE
|
||||
ti.`name`='标准法规部'
|
||||
</select>
|
||||
<select id="getAskQuestionsNew" resultType="com.adc.da.slrs.StandardQA.entity.AskQuestions">
|
||||
SELECT aq.ID,aq.CLASSIFICATION,aq.PROBLEM_DESCRIPTION,t1.UNAME QUESTIONER,aq.QUESTION_TIME,aq.STANDARD_ENCDOING,
|
||||
aq.STANDARD_NAME,aq.STANDARD_ID
|
||||
FROM ask_questions aq
|
||||
LEFT JOIN ts_user t1 ON t1.USID = aq.QUESTIONER
|
||||
<where>
|
||||
<if test="ask.standardId !=null and ask.standardId !=''">
|
||||
AND aq.STANDARD_ID = #{ask.standardId}
|
||||
</if>
|
||||
<if test="ask.problemDescription !=null and ask.problemDescription !=''">
|
||||
AND aq.PROBLEM_DESCRIPTION LIKE concat(concat('%',#{ask.problemDescription}),'%')
|
||||
</if>
|
||||
<if test="ask.classification !=null and ask.classification !=''">
|
||||
AND aq.CLASSIFICATION LIKE concat(concat('%',#{ask.classification}),'%')
|
||||
</if>
|
||||
</where>
|
||||
order by QUESTION_TIME desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -44,6 +44,18 @@
|
||||
</modules>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-ali</id>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public//</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>adc</id>
|
||||
<url>http://60.247.58.121:8182/nexus/content/groups/public</url>
|
||||
@@ -54,18 +66,6 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-ali</id>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public//</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
Reference in New Issue
Block a user