Commit f634093c by guojuxing

转账审批服务订购详情修改:license项目挂在服务下面

parent cdab3287
package com.gic.finance.web.controller; package com.gic.finance.web.controller;
import com.gic.commons.util.CollectionUtil;
import com.gic.finance.web.utils.UserInfoUtils; import com.gic.finance.web.utils.UserInfoUtils;
import com.gic.finance.web.vo.*; import com.gic.finance.web.vo.*;
import com.gic.open.api.dto.OrderDTO; import com.gic.open.api.dto.OrderDTO;
...@@ -28,7 +29,9 @@ import com.gic.finance.qo.TransferListQueryQO; ...@@ -28,7 +29,9 @@ import com.gic.finance.qo.TransferListQueryQO;
import com.gic.finance.service.TransferAccountsApprovalApiService; import com.gic.finance.service.TransferAccountsApprovalApiService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 转账审批 * 转账审批
...@@ -128,6 +131,7 @@ public class TransferAccountsApprovalController { ...@@ -128,6 +131,7 @@ public class TransferAccountsApprovalController {
serviceInfoVO.setSkuInfo(itemDTO.getSkuInfo()); serviceInfoVO.setSkuInfo(itemDTO.getSkuInfo());
serviceInfoVO.setTotalAmount(itemDTO.getTotalAmount()); serviceInfoVO.setTotalAmount(itemDTO.getTotalAmount());
serviceInfoVO.setServeInfo(itemDTO.getServeInfo()); serviceInfoVO.setServeInfo(itemDTO.getServeInfo());
serviceInfoVO.setApplicationId(itemDTO.getApplicationId());
serviceInfoVOList.add(serviceInfoVO); serviceInfoVOList.add(serviceInfoVO);
} else if (itemDTO.getServeType() == 2) { } else if (itemDTO.getServeType() == 2) {
//license //license
...@@ -137,6 +141,7 @@ public class TransferAccountsApprovalController { ...@@ -137,6 +141,7 @@ public class TransferAccountsApprovalController {
licenseVO.setTotalAmount(itemDTO.getTotalAmount()); licenseVO.setTotalAmount(itemDTO.getTotalAmount());
licenseVO.setServeQuantity(itemDTO.getServeQuantity()); licenseVO.setServeQuantity(itemDTO.getServeQuantity());
licenseVO.setServeInfo(itemDTO.getServeInfo()); licenseVO.setServeInfo(itemDTO.getServeInfo());
licenseVO.setApplicationId(itemDTO.getApplicationId());
licenseVOList.add(licenseVO); licenseVOList.add(licenseVO);
} else if (itemDTO.getServeType() == 3) { } else if (itemDTO.getServeType() == 3) {
//拓展包 //拓展包
...@@ -149,12 +154,23 @@ public class TransferAccountsApprovalController { ...@@ -149,12 +154,23 @@ public class TransferAccountsApprovalController {
expandPackageVOList.add(expandPackageVO); expandPackageVOList.add(expandPackageVO);
} }
} }
if (serviceInfoVOList.size() > 0) { Map<Long, List<LicenseVO>> licenseMap;
vo.setServiceInfoVOList(serviceInfoVOList);
}
if (licenseVOList.size() > 0) { if (licenseVOList.size() > 0) {
//license是在服务下面,进行匹配
licenseMap = CollectionUtil.group(licenseVOList, "applicationId") ;
vo.setLicenseVOList(licenseVOList); vo.setLicenseVOList(licenseVOList);
} else {
licenseMap = new HashMap<>(2);
}
if (serviceInfoVOList.size() > 0) {
for (ServiceInfoVO serviceInfoVO : serviceInfoVOList) {
if (licenseMap.containsKey(serviceInfoVO.getApplicationId())) {
serviceInfoVO.setLicenseVOList(licenseMap.get(serviceInfoVO.getApplicationId()));
}
}
vo.setServiceInfoVOList(serviceInfoVOList);
} }
if (expandPackageVOList.size() > 0) { if (expandPackageVOList.size() > 0) {
vo.setExpandPackageVOList(expandPackageVOList); vo.setExpandPackageVOList(expandPackageVOList);
} }
......
...@@ -34,6 +34,11 @@ public class LicenseVO implements Serializable{ ...@@ -34,6 +34,11 @@ public class LicenseVO implements Serializable{
private String licenseUnit; private String licenseUnit;
/**
* 应用id
*/
private Long applicationId;
public String getServeInfo() { public String getServeInfo() {
return serveInfo; return serveInfo;
} }
...@@ -73,4 +78,12 @@ public class LicenseVO implements Serializable{ ...@@ -73,4 +78,12 @@ public class LicenseVO implements Serializable{
public void setLicenseUnit(String licenseUnit) { public void setLicenseUnit(String licenseUnit) {
this.licenseUnit = licenseUnit; this.licenseUnit = licenseUnit;
} }
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
} }
...@@ -5,6 +5,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -5,6 +5,7 @@ import org.apache.commons.lang.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
/** /**
* 转账审批-service订单项 * 转账审批-service订单项
...@@ -41,6 +42,13 @@ public class ServiceInfoVO implements Serializable{ ...@@ -41,6 +42,13 @@ public class ServiceInfoVO implements Serializable{
*/ */
private BigDecimal totalAmount; private BigDecimal totalAmount;
/**
* 应用id
*/
private Long applicationId;
private List<LicenseVO> licenseVOList;
public void setServeName(String serveName) { public void setServeName(String serveName) {
this.serveName = serveName; this.serveName = serveName;
} }
...@@ -82,4 +90,20 @@ public class ServiceInfoVO implements Serializable{ ...@@ -82,4 +90,20 @@ public class ServiceInfoVO implements Serializable{
public void setServeInfo(String serveInfo) { public void setServeInfo(String serveInfo) {
this.serveInfo = serveInfo; this.serveInfo = serveInfo;
} }
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
public List<LicenseVO> getLicenseVOList() {
return licenseVOList;
}
public void setLicenseVOList(List<LicenseVO> licenseVOList) {
this.licenseVOList = licenseVOList;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment