【DAOP-1.0】数据需求
【功能点】联调问题处理
Showing
4 changed files
with
25 additions
and
8 deletions
... | @@ -14,9 +14,12 @@ import java.util.List; | ... | @@ -14,9 +14,12 @@ import java.util.List; |
14 | @Schema(title = "数据需求状态修改参数") | 14 | @Schema(title = "数据需求状态修改参数") |
15 | public class DemandUpdateStateVO { | 15 | public class DemandUpdateStateVO { |
16 | 16 | ||
17 | @Schema(description = "加工单位唯一标识") | 17 | @Schema(description = "加工单位唯一标识列表") |
18 | private List<String> processCompanyGuidList; | 18 | private List<String> processCompanyGuidList; |
19 | 19 | ||
20 | @Schema(description = "加工单位唯一标识") | ||
21 | private String processOrderGuid; | ||
22 | |||
20 | @Schema(description = "资源获取状态【N未开始 A进行中 Y已完成】") | 23 | @Schema(description = "资源获取状态【N未开始 A进行中 Y已完成】") |
21 | private String resourceAcquisitionState; | 24 | private String resourceAcquisitionState; |
22 | 25 | ... | ... |
... | @@ -17,6 +17,7 @@ import java.util.List; | ... | @@ -17,6 +17,7 @@ import java.util.List; |
17 | * @author Xiaocq | 17 | * @author Xiaocq |
18 | */ | 18 | */ |
19 | @FeignClient(value = "ms-daop-configure-service", configuration = FastCallFeignConfiguration.class) | 19 | @FeignClient(value = "ms-daop-configure-service", configuration = FastCallFeignConfiguration.class) |
20 | |||
20 | public interface ConfigureFeign { | 21 | public interface ConfigureFeign { |
21 | 22 | ||
22 | /** | 23 | /** | ... | ... |
... | @@ -2,20 +2,26 @@ package com.csbr.qingcloud.portal.feign; | ... | @@ -2,20 +2,26 @@ package com.csbr.qingcloud.portal.feign; |
2 | 2 | ||
3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; | 3 | import com.csbr.cloud.common.config.FastCallFeignConfiguration; |
4 | import com.csbr.cloud.common.response.CommonRes; | 4 | import com.csbr.cloud.common.response.CommonRes; |
5 | import com.csbr.qingcloud.portal.domain.vo.DemandUpdateStateVO; | ||
5 | import com.csbr.qingcloud.portal.domain.vo.ProcessOrderRQVO; | 6 | import com.csbr.qingcloud.portal.domain.vo.ProcessOrderRQVO; |
6 | import jakarta.validation.Valid; | 7 | import jakarta.validation.Valid; |
7 | import org.springframework.cloud.openfeign.FeignClient; | 8 | import org.springframework.cloud.openfeign.FeignClient; |
8 | import org.springframework.http.MediaType; | 9 | import org.springframework.http.MediaType; |
9 | import org.springframework.web.bind.annotation.PostMapping; | 10 | import org.springframework.web.bind.annotation.PostMapping; |
10 | import org.springframework.web.bind.annotation.RequestBody; | 11 | import org.springframework.web.bind.annotation.RequestBody; |
12 | import java.util.List; | ||
13 | import java.util.Map; | ||
11 | 14 | ||
12 | /** | 15 | /** |
13 | * @author Xiaocq | 16 | * @author Xiaocq |
14 | */ | 17 | */ |
15 | @FeignClient(value = "ms-data-process-basic-service", configuration = FastCallFeignConfiguration.class) | 18 | @FeignClient(value = "ms-data-process-basic-service",url = "${dataProcessUrl}", configuration = FastCallFeignConfiguration.class) |
16 | public interface DataProcessBasicFeign { | 19 | public interface DataProcessBasicFeign { |
17 | 20 | ||
18 | @PostMapping(value = "/process-order/save", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | 21 | @PostMapping(value = "/process-order/save", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) |
19 | CommonRes<Boolean> saveProcessOrder(@RequestBody @Valid ProcessOrderRQVO vo); | 22 | CommonRes<Boolean> saveProcessOrder(@RequestBody @Valid ProcessOrderRQVO vo); |
20 | 23 | ||
24 | @PostMapping(value = "/process-order-process-dtl/get-order-state", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) | ||
25 | CommonRes<Map<String, DemandUpdateStateVO>> getOrderState(@RequestBody List<String> processOrderGuids); | ||
26 | |||
21 | } | 27 | } | ... | ... |
... | @@ -34,10 +34,8 @@ import org.springframework.stereotype.Service; | ... | @@ -34,10 +34,8 @@ import org.springframework.stereotype.Service; |
34 | import io.seata.spring.annotation.GlobalTransactional; | 34 | import io.seata.spring.annotation.GlobalTransactional; |
35 | import org.springframework.transaction.annotation.Transactional; | 35 | import org.springframework.transaction.annotation.Transactional; |
36 | 36 | ||
37 | import java.util.ArrayList; | 37 | import java.util.*; |
38 | import java.util.Collections; | 38 | import java.util.stream.Collectors; |
39 | import java.util.Date; | ||
40 | import java.util.List; | ||
41 | 39 | ||
42 | /** | 40 | /** |
43 | * @program: D:/git/ms-data-circulation-portal-service | 41 | * @program: D:/git/ms-data-circulation-portal-service |
... | @@ -545,14 +543,23 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -545,14 +543,23 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
545 | rsPageList.setRecords(convertToVO(pageList.getRecords())); | 543 | rsPageList.setRecords(convertToVO(pageList.getRecords())); |
546 | } | 544 | } |
547 | // 需要特殊处理数据时使用 | 545 | // 需要特殊处理数据时使用 |
548 | /*if(CollectionUtils.isNotEmpty(pageList.getRecords())){ | 546 | if(CollectionUtils.isNotEmpty(pageList.getRecords())){ |
547 | List<String> guids = pageList.getRecords().stream().map(MfDemand::getProcessCompanyGuid).collect(Collectors.toList()); | ||
548 | Map<String, DemandUpdateStateVO> map = dataProcessBasicFeign.getOrderState(guids).getData(); | ||
549 | List<DemandRSVO> results = new ArrayList<>(); | 549 | List<DemandRSVO> results = new ArrayList<>(); |
550 | for (MfDemand item : pageList.getRecords()){ | 550 | for (MfDemand item : pageList.getRecords()){ |
551 | DemandRSVO vo = convertToVO(item); | 551 | DemandRSVO vo = convertToVO(item); |
552 | DemandUpdateStateVO voState = map.get(item.getProcessCompanyGuid()); | ||
553 | if(voState != null){ | ||
554 | vo.setResourceAcquisitionState(voState.getResourceAcquisitionState()); | ||
555 | vo.setProductProcessingState(voState.getProductProcessingState()); | ||
556 | vo.setProductDeliveryState(voState.getProductDeliveryState()); | ||
557 | vo.setProductAcceptState(voState.getProductAcceptState()); | ||
558 | } | ||
552 | results.add(vo); | 559 | results.add(vo); |
553 | } | 560 | } |
554 | rsPageList.setRecords(results); | 561 | rsPageList.setRecords(results); |
555 | }*/ | 562 | } |
556 | } | 563 | } |
557 | 564 | ||
558 | //region 辅助操作 | 565 | //region 辅助操作 | ... | ... |
-
Please register or sign in to post a comment