diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/v2/ApiWorkEventItemV2Controller.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/v2/ApiWorkEventItemV2Controller.java new file mode 100644 index 0000000..e4cb995 --- /dev/null +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/v2/ApiWorkEventItemV2Controller.java @@ -0,0 +1,58 @@ +package com.elink.esua.epdc.controller.v2; + +import com.elink.esua.epdc.commons.api.version.ApiVersion; +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.item.result.ItemCirculationDeptResultDTO; +import com.elink.esua.epdc.dto.item.result.ItemHandleResultDTO; +import com.elink.esua.epdc.service.WorkItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 工作端事件 迭代接口 v2 + * + * @author zy + * @date 2020/05/06 + */ +@ApiVersion(2) +@RestController("ApiWorkEventItemV2Controller") +@RequestMapping("work/event/item" + Constant.VERSION_CONTROL) +public class ApiWorkEventItemV2Controller { + + @Autowired + private WorkItemService workItemService; + + /** + * 获取可吹哨部门V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + @GetMapping("whistlingDept") + public Result> whistlingDept() { + Result> list = workItemService.listWhistlingV2Dept(); + return list; + } + + /** + * 获取当前部门可做操作V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + @GetMapping("handleCategory") + public Result> handleCategory() { + Result> list = workItemService.listHandleV2Category(); + return list; + } + +} diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java index 3260a62..d8a8dd0 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/WorkItemFeignClient.java @@ -120,4 +120,26 @@ public interface WorkItemFeignClient { **/ @GetMapping(value = "events/work/item/handleCategory") Result> queryHandleCategories(); + + /** + * 获取可吹哨部门V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + @GetMapping(value = "events/epdc-app/work/event/item/v2/whistlingDept", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> whistlingV2Dept(); + + /** + * 获取当前部门可做操作V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + @GetMapping(value = "events/epdc-app/work/event/item/v2/handleCategory", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> handleV2Category(); } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java index 69a5d52..83ae077 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/WorkItemFeignClientFallback.java @@ -20,15 +20,16 @@ import java.util.List; public class WorkItemFeignClientFallback implements WorkItemFeignClient { - @Override public Result itemStatistics(ItemStatisticsFormDTO formDto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "itemStatistics", formDto); } + @Override public Result> listItems(ItemFormDTO formDto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "listItems", formDto); } + @Override public Result getItemDetail(@PathVariable String id) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "getItemDetail", id); @@ -38,14 +39,17 @@ public class WorkItemFeignClientFallback implements WorkItemFeignClient { public Result> evaluation(EvaluationFormDTO evaluationFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "evaluation", evaluationFormDTO); } + @Override public Result> whistlingDept() { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "whistlingDept"); } + @Override public Result handleSubmit(ItemHandleSubmitFormDTO dto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "handleSubmit"); } + @Override public Result> evaluationDept(EvaluationFormDTO evaluationFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "evaluationDept", evaluationFormDTO); @@ -66,4 +70,13 @@ public class WorkItemFeignClientFallback implements WorkItemFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryHandleCategories"); } + @Override + public Result> whistlingV2Dept() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "whistlingV2Dept"); + } + + @Override + public Result> handleV2Category() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "handleV2Category"); + } } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkItemService.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkItemService.java index b30e56f..9b0077a 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkItemService.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/WorkItemService.java @@ -96,4 +96,24 @@ public interface WorkItemService { * @Date 2020/1/13 16:49 **/ Result> queryHandleCategories(); + + /** + * 获取可吹哨部门V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + Result> listWhistlingV2Dept(); + + /** + * 获取当前部门可做操作V2 + * + * @param: + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2020-05-06 + */ + Result> listHandleV2Category(); } diff --git a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java index 971be64..de27dab 100644 --- a/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java +++ b/epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/WorkItemServiceImpl.java @@ -80,4 +80,14 @@ public class WorkItemServiceImpl implements WorkItemService { return workItemFeignClient.queryHandleCategories(); } + @Override + public Result> listWhistlingV2Dept() { + return workItemFeignClient.whistlingV2Dept(); + } + + @Override + public Result> listHandleV2Category() { + return workItemFeignClient.handleV2Category(); + } + }