|
@@ -3,6 +3,7 @@ package com.diagbot.facade;
|
|
|
import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.OrderDetialsDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.dto.UserAndProdutDTO;
|
|
|
import com.diagbot.dto.UserOrgDTO;
|
|
|
import com.diagbot.entity.LantoneProduct;
|
|
|
import com.diagbot.entity.OpenedProducts;
|
|
@@ -30,7 +31,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
-import java.util.Collection;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -151,16 +151,18 @@ public class OrderDetailsFacade extends OrderDetailsServiceImpl {
|
|
|
"获取用户和机构信息失败");
|
|
|
}
|
|
|
Map<Long, UserOrgDTO> dataMap = mapRespDTO.data;
|
|
|
+ List<UserAndProdutDTO> openedProductTime =openedProductsFacade.getInformationAvailableByUserIds(list1);
|
|
|
for(OrderDetialsDTO bean : list) {
|
|
|
UserOrgDTO uo = dataMap.get(bean.getUserId());
|
|
|
if(uo != null) {
|
|
|
BeanUtil.copyProperties(uo,bean);
|
|
|
}
|
|
|
- if(bean.getAuditStatus()==AuditStatusEnum.Adopt.getKey()){
|
|
|
- Collection<OpenedProducts> openedProductTime =openedProductsFacade.listByIds(list1);
|
|
|
- for (OpenedProducts openedProducts:openedProductTime) {
|
|
|
- bean.setStartTime(openedProducts.getStartTime());
|
|
|
- bean.setEndTime(openedProducts.getEndTime());
|
|
|
+ if(bean.getAuditStatus() == AuditStatusEnum.Adopt.getKey()){
|
|
|
+ for (UserAndProdutDTO openedProducts:openedProductTime) {
|
|
|
+ if(bean.getUserId().intValue() == openedProducts.getUserId().intValue() && bean.getProductId().intValue() == openedProducts.getProductId().intValue()){
|
|
|
+ bean.setStartTime(openedProducts.getStartTime());
|
|
|
+ bean.setEndTime(openedProducts.getEndTime());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|