|
@@ -5,6 +5,8 @@ import com.java110.api.listener.AbstractServiceApiListener;
|
|
|
import com.java110.core.annotation.Java110Listener;
|
|
import com.java110.core.annotation.Java110Listener;
|
|
|
import com.java110.core.context.DataFlowContext;
|
|
import com.java110.core.context.DataFlowContext;
|
|
|
import com.java110.core.smo.purchaseApply.IPurchaseApplyInnerServiceSMO;
|
|
import com.java110.core.smo.purchaseApply.IPurchaseApplyInnerServiceSMO;
|
|
|
|
|
+import com.java110.core.smo.purchaseApplyUser.IPurchaseApplyUserInnerServiceSMO;
|
|
|
|
|
+import com.java110.dto.complaint.ComplaintDto;
|
|
|
import com.java110.dto.purchaseApply.PurchaseApplyDetailDto;
|
|
import com.java110.dto.purchaseApply.PurchaseApplyDetailDto;
|
|
|
import com.java110.dto.purchaseApply.PurchaseApplyDto;
|
|
import com.java110.dto.purchaseApply.PurchaseApplyDto;
|
|
|
import com.java110.event.service.api.ServiceDataFlowEvent;
|
|
import com.java110.event.service.api.ServiceDataFlowEvent;
|
|
@@ -33,6 +35,9 @@ public class ListPurchaseApplysListener extends AbstractServiceApiListener {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IPurchaseApplyInnerServiceSMO purchaseApplyInnerServiceSMOImpl;
|
|
private IPurchaseApplyInnerServiceSMO purchaseApplyInnerServiceSMOImpl;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IPurchaseApplyUserInnerServiceSMO purchaseApplyUserInnerServiceSMOImpl;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public String getServiceCode() {
|
|
public String getServiceCode() {
|
|
|
return ServiceCodePurchaseApplyConstant.LIST_PURCHASE_APPLY;
|
|
return ServiceCodePurchaseApplyConstant.LIST_PURCHASE_APPLY;
|
|
@@ -74,6 +79,7 @@ public class ListPurchaseApplysListener extends AbstractServiceApiListener {
|
|
|
List<ApiPurchaseApplyDataVo> purchaseApplys = null;
|
|
List<ApiPurchaseApplyDataVo> purchaseApplys = null;
|
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
|
List<PurchaseApplyDto> purchaseApplyDtos = purchaseApplyInnerServiceSMOImpl.queryPurchaseApplyAndDetails(purchaseApplyDto);
|
|
List<PurchaseApplyDto> purchaseApplyDtos = purchaseApplyInnerServiceSMOImpl.queryPurchaseApplyAndDetails(purchaseApplyDto);
|
|
|
|
|
+ purchaseApplyDtos = freshCurrentUser(purchaseApplyDtos);
|
|
|
purchaseApplys = BeanConvertUtil.covertBeanList(purchaseApplyDtos, ApiPurchaseApplyDataVo.class);
|
|
purchaseApplys = BeanConvertUtil.covertBeanList(purchaseApplyDtos, ApiPurchaseApplyDataVo.class);
|
|
|
for( ApiPurchaseApplyDataVo apiPurchaseApplyDataVo : purchaseApplys){
|
|
for( ApiPurchaseApplyDataVo apiPurchaseApplyDataVo : purchaseApplys){
|
|
|
List<PurchaseApplyDetailVo> applyDetailList = apiPurchaseApplyDataVo.getPurchaseApplyDetailVo();
|
|
List<PurchaseApplyDetailVo> applyDetailList = apiPurchaseApplyDataVo.getPurchaseApplyDetailVo();
|
|
@@ -89,7 +95,9 @@ public class ListPurchaseApplysListener extends AbstractServiceApiListener {
|
|
|
apiPurchaseApplyDataVo.setResourceNames(resNames.toString());
|
|
apiPurchaseApplyDataVo.setResourceNames(resNames.toString());
|
|
|
apiPurchaseApplyDataVo.setTotalPrice(totalPrice.toString());
|
|
apiPurchaseApplyDataVo.setTotalPrice(totalPrice.toString());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
purchaseApplys = new ArrayList<>();
|
|
purchaseApplys = new ArrayList<>();
|
|
|
}
|
|
}
|
|
@@ -105,4 +113,15 @@ public class ListPurchaseApplysListener extends AbstractServiceApiListener {
|
|
|
context.setResponseEntity(responseEntity);
|
|
context.setResponseEntity(responseEntity);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ private List<PurchaseApplyDto> freshCurrentUser(List<PurchaseApplyDto> purchaseApplyDtos) {
|
|
|
|
|
+ List<PurchaseApplyDto> tmpPurchaseApplyDtos = new ArrayList<>();
|
|
|
|
|
+ for(PurchaseApplyDto purchaseApplyDto : purchaseApplyDtos){
|
|
|
|
|
+ purchaseApplyDto = purchaseApplyUserInnerServiceSMOImpl.getTaskCurrentUser(purchaseApplyDto);
|
|
|
|
|
+ tmpPurchaseApplyDtos.add(purchaseApplyDto);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return tmpPurchaseApplyDtos;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|