Browse Source

心理咨询相关问题修复,对接前端

feature/yujt_analysisHomeChange
yujt 5 years ago
parent
commit
836b66954d
  1. 4
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java
  2. 18
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java
  3. 10
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java
  4. 31
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java
  5. 1
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java
  6. 5
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java
  7. 5
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java
  8. 16
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java

4
epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java

@ -416,7 +416,7 @@ public class ApiPropertyController {
* @since 2019/10/22 15:33
*/
@GetMapping("psychology/listUserQuestion")
public Result<List<PsychologyAnswerListUserResultDTO>> listUserQuestion(@LoginUser TokenDto userDetail, @RequestBody PsychologyAnswerFormDTO formDto) {
public Result<List<PsychologyAnswerListUserResultDTO>> listUserQuestion(@LoginUser TokenDto userDetail, PsychologyAnswerFormDTO formDto) {
return propertyService.listUserQuestion(userDetail, formDto);
}
@ -429,7 +429,7 @@ public class ApiPropertyController {
* @since 2019/10/22 15:33
*/
@GetMapping("psychology/listQuestion")
public Result<List<PsychologyAnswerListResultDTO>> listQuestion(@LoginUser TokenDto userDetail, @RequestBody PsychologyAnswerFormDTO formDto) {
public Result<List<PsychologyAnswerListResultDTO>> listQuestion(@LoginUser TokenDto userDetail, PsychologyAnswerFormDTO formDto) {
return propertyService.listQuestion(userDetail, formDto);
}
}

18
epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiWorkPropertyController.java

@ -2,7 +2,6 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateDetailFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateHistoryFormDTO;
import com.elink.esua.epdc.dto.conflict.result.ConflictMediateDetailResultDTO;
@ -14,10 +13,7 @@ import com.elink.esua.epdc.dto.psychology.result.PsychologyAnswerOfMineResultDTO
import com.elink.esua.epdc.dto.psychology.result.PsychologyUnansweredResultDTO;
import com.elink.esua.epdc.service.WorkPropertyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -60,7 +56,7 @@ public class ApiWorkPropertyController {
}
/**
* 工作端--心理咨询-提交问题的回答
* 工作端--心理咨询-解答心理咨询问题提交回复
*
* @return com.elink.esua.epdc.commons.tools.utils.Result < PsychologyAnswerOfMineResultDTO >
* @params [formDto]
@ -68,7 +64,7 @@ public class ApiWorkPropertyController {
* @since 2020/6/9 15:33
*/
@PostMapping("psychology/submitAnswer")
public Result submitAnswer(PsychologySubmitAnswerFormDTO formDto) {
public Result submitAnswer(@RequestBody PsychologySubmitAnswerFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return workPropertyService.submitAnswer(formDto);
}
@ -94,9 +90,9 @@ public class ApiWorkPropertyController {
* @author zhangyuan
* @since 2020/6/9 15:33
*/
@GetMapping("conflict/getById")
public Result<ConflictMediateDetailResultDTO> getById(ConflictMediateDetailFormDTO formDto) {
return workPropertyService.getById(formDto);
@GetMapping("conflict/getById/{conflictId}")
public Result<ConflictMediateDetailResultDTO> getById(@PathVariable("conflictId") String conflictId) {
return workPropertyService.getById(conflictId);
}
/**
@ -108,7 +104,7 @@ public class ApiWorkPropertyController {
* @since 2020/6/9 15:33
*/
@PostMapping("conflict/submit")
public Result submit(ConflictMediateFormDTO formDto) {
public Result submit(@RequestBody ConflictMediateFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return workPropertyService.submit(formDto);
}

10
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/PropertyFeignClient.java

@ -299,7 +299,7 @@ public interface PropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/listPsychiatrist", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "property/epdc-app/psychology/listPsychiatrist", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologistResultDTO>> listPsychiatrist(@RequestBody PsychologistFormDTO fromDTO);
/***
@ -309,7 +309,7 @@ public interface PropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/psychologistInfo", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "property/epdc-app/psychology/psychologistInfo", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PsychologistInfoResultDTO> psychologistInfo(@RequestBody PsychologistInfoFormDTO fromDTO);
/***
@ -319,7 +319,7 @@ public interface PropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@PostMapping(value = "news/epdc-app/psychology/submitQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "property/epdc-app/psychology/submitQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submitQuestion(@RequestBody PsychologyQuestionFormDTO fromDTO);
/***
@ -329,7 +329,7 @@ public interface PropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/listUserQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "property/epdc-app/psychology/listUserQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyAnswerListUserResultDTO>> listUserQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO);
/***
@ -339,7 +339,7 @@ public interface PropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/listQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "property/epdc-app/psychology/listQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyAnswerListResultDTO>> listQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO);
}

31
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkPropertyFeignClient.java

@ -3,7 +3,6 @@ package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.config.FeignRequestInterceptor;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateDetailFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateHistoryFormDTO;
import com.elink.esua.epdc.dto.conflict.result.ConflictMediateDetailResultDTO;
@ -17,8 +16,8 @@ import com.elink.esua.epdc.feign.fallback.WorkPropertyFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -28,7 +27,7 @@ import java.util.List;
* @Author zhangyuan
* @Date 2020/6/9 16:39
*/
@FeignClient(name = ServiceConstant.EPDC_EVENTS_SERVER, fallback = WorkPropertyFeignClientFallback.class, configuration = FeignRequestInterceptor.class)
@FeignClient(name = ServiceConstant.EPDC_PROPERTY_SERVER, fallback = WorkPropertyFeignClientFallback.class, configuration = FeignRequestInterceptor.class)
public interface WorkPropertyFeignClient {
/***
@ -38,8 +37,8 @@ public interface WorkPropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/listUnansweredQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(@RequestBody PsychologyUnansweredFormDTO fromDTO);
@GetMapping(value = "property/epdc-app/psychology/listUnansweredQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(PsychologyUnansweredFormDTO fromDTO);
/***
* 工作端--待解答的心理咨询问题列表
@ -48,8 +47,8 @@ public interface WorkPropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/psychology/listMyQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(@RequestBody PsychologyAnswerFormDTO fromDTO);
@GetMapping(value = "property/epdc-app/psychology/listMyQuestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(PsychologyAnswerFormDTO fromDTO);
/***
* 工作端--待解答的心理咨询问题列表
@ -58,8 +57,8 @@ public interface WorkPropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@PostMapping(value = "news/epdc-app/psychology/submitAnswer", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submitAnswer(@RequestBody PsychologySubmitAnswerFormDTO fromDTO);
@PostMapping(value = "property/epdc-app/psychology/submitAnswer", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submitAnswer(PsychologySubmitAnswerFormDTO fromDTO);
/***
* 工作端--矛盾纠纷历史上报列表
@ -68,18 +67,18 @@ public interface WorkPropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/conflict/listHistory", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<ConflictMediateHistoryResultDTO>> listHistory(@RequestBody ConflictMediateHistoryFormDTO fromDTO);
@GetMapping(value = "property/epdc-app/conflict/listHistory", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<ConflictMediateHistoryResultDTO>> listHistory(ConflictMediateHistoryFormDTO fromDTO);
/***
* 工作端--矛盾调解 详情
* @param fromDTO
* @param conflictId
* @return com.elink.esua.epdc.commons.tools.utils.Result < ConflictMediateDetailResultDTO >
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@GetMapping(value = "news/epdc-app/conflict/getById", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ConflictMediateDetailResultDTO> getById(@RequestBody ConflictMediateDetailFormDTO fromDTO);
@GetMapping(value = "property/epdc-app/conflict/getById/{conflictId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<ConflictMediateDetailResultDTO> getById(@PathVariable("conflictId") String conflictId);
/***
* 工作端--矛盾纠纷提交
@ -88,6 +87,6 @@ public interface WorkPropertyFeignClient {
* @author zhangyuan
* @date 2020/6/8 9:25
*/
@PostMapping(value = "news/epdc-app/conflict/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submit(@RequestBody ConflictMediateFormDTO fromDTO);
@PostMapping(value = "property/epdc-app/conflict/submit", consumes = MediaType.APPLICATION_JSON_VALUE)
Result submit(ConflictMediateFormDTO fromDTO);
}

1
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/PropertyFeignClientFallback.java

@ -154,6 +154,7 @@ public class PropertyFeignClientFallback implements PropertyFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "getDeptPolice", formDto);
}
@Override
public Result submit(TopicCommentFormDTO commentFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "submit", commentFormDTO);
}

5
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkPropertyFeignClientFallback.java

@ -3,7 +3,6 @@ package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateDetailFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateHistoryFormDTO;
import com.elink.esua.epdc.dto.conflict.result.ConflictMediateDetailResultDTO;
@ -46,8 +45,8 @@ public class WorkPropertyFeignClientFallback implements WorkPropertyFeignClient
}
@Override
public Result<ConflictMediateDetailResultDTO> getById(ConflictMediateDetailFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "getById", formDto);
public Result<ConflictMediateDetailResultDTO> getById(String conflictId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PROPERTY_SERVER, "getById", conflictId);
}
@Override

5
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkPropertyService.java

@ -1,7 +1,6 @@
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateDetailFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateHistoryFormDTO;
import com.elink.esua.epdc.dto.conflict.result.ConflictMediateDetailResultDTO;
@ -65,12 +64,12 @@ public interface WorkPropertyService {
/**
* 工作端--矛盾调解 详情
*
* @param formDto 查询参数
* @param conflictId 查询参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.ConflictMediateDetailResultDTO>>
* @author zhangyuan
* @date 2020/6/8 09:15
*/
Result<ConflictMediateDetailResultDTO> getById(ConflictMediateDetailFormDTO formDto);
Result<ConflictMediateDetailResultDTO> getById(String conflictId);
/**
* 工作端--矛盾纠纷提交

16
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkPropertyServiceImpl.java

@ -1,7 +1,8 @@
package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.commons.tools.utils.DateUtils;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateDetailFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateFormDTO;
import com.elink.esua.epdc.dto.conflict.form.ConflictMediateHistoryFormDTO;
import com.elink.esua.epdc.dto.conflict.result.ConflictMediateDetailResultDTO;
@ -32,37 +33,34 @@ public class WorkPropertyServiceImpl implements WorkPropertyService {
@Override
public Result<List<PsychologyUnansweredResultDTO>> listUnansweredQuestion(PsychologyUnansweredFormDTO formDto) {
return workPropertyFeignClient.listUnansweredQuestion(formDto);
}
@Override
public Result<List<PsychologyAnswerOfMineResultDTO>> listMyQuestion(PsychologyAnswerFormDTO formDto) {
return workPropertyFeignClient.listMyQuestion(formDto);
}
@Override
public Result submitAnswer(PsychologySubmitAnswerFormDTO formDto) {
return workPropertyFeignClient.submitAnswer(formDto);
}
@Override
public Result<List<ConflictMediateHistoryResultDTO>> listHistory(ConflictMediateHistoryFormDTO formDto) {
return workPropertyFeignClient.listHistory(formDto);
}
@Override
public Result<ConflictMediateDetailResultDTO> getById(ConflictMediateDetailFormDTO formDto) {
return workPropertyFeignClient.getById(formDto);
public Result<ConflictMediateDetailResultDTO> getById(String conflictId) {
return workPropertyFeignClient.getById(conflictId);
}
@Override
public Result submit(ConflictMediateFormDTO formDto) {
if (!ModuleUtils.isValidDate(formDto.getSubmitTime(), DateUtils.DATE_PATTERN)) {
return new Result().error("提报日期格式错误");
}
return workPropertyFeignClient.submit(formDto);
}
}

Loading…
Cancel
Save