Commit f40f802d by guojuxing

扩容审批详情修改

parent 39fd0c9d
package com.gic.finance.web.controller; package com.gic.finance.web.controller;
import com.gic.commons.util.CollectionUtil; import com.gic.commons.util.CollectionUtil;
import com.gic.enterprise.dto.EnterpriseDTO;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
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;
...@@ -53,6 +56,8 @@ public class TransferAccountsApprovalController { ...@@ -53,6 +56,8 @@ public class TransferAccountsApprovalController {
private BillingRechargeRecordApiService billingRechargeRecordApiService; private BillingRechargeRecordApiService billingRechargeRecordApiService;
@Autowired @Autowired
private OrderApiService orderApiService; private OrderApiService orderApiService;
@Autowired
private EnterpriseApiService enterpriseApiService;
@RequestMapping("/get-approval") @RequestMapping("/get-approval")
public RestResponse getById(Integer id) { public RestResponse getById(Integer id) {
...@@ -164,7 +169,7 @@ public class TransferAccountsApprovalController { ...@@ -164,7 +169,7 @@ public class TransferAccountsApprovalController {
Map<Long, List<LicenseVO>> licenseMap; Map<Long, List<LicenseVO>> licenseMap;
if (licenseVOList.size() > 0) { if (licenseVOList.size() > 0) {
//license是在服务下面,进行匹配 //license是在服务下面,进行匹配
licenseMap = CollectionUtil.group(licenseVOList, "applicationId") ; licenseMap = CollectionUtil.group(licenseVOList, "applicationId");
vo.setLicenseVOList(licenseVOList); vo.setLicenseVOList(licenseVOList);
} else { } else {
licenseMap = new HashMap<>(2); licenseMap = new HashMap<>(2);
...@@ -179,6 +184,19 @@ public class TransferAccountsApprovalController { ...@@ -179,6 +184,19 @@ public class TransferAccountsApprovalController {
} else if (licenseVOList.size() > 0) { } else if (licenseVOList.size() > 0) {
//没有服务,只有license数据,比如扩容 //没有服务,只有license数据,比如扩容
ServiceInfoVO temp = new ServiceInfoVO(); ServiceInfoVO temp = new ServiceInfoVO();
boolean isGicEnterprise = transfer.getPlatformType() != null && transfer.getPlatformType()
.intValue() == EnterprisePlatformTypeEnum.GIC.getCode();
if (isGicEnterprise) {
ServiceResponse<EnterpriseDTO> tempResult = enterpriseApiService
.getEnterpriseById(transfer.getEnterpriseId());
if (tempResult.isSuccess()) {
temp.setVersionName(orderDTO.getServeName() + "-" + tempResult.getResult().getVersionName());
} else {
LOGGER.warn(tempResult.getMessage());
}
} else {
temp.setVersionName(orderDTO.getServeName());
}
temp.setLicenseVOList(licenseVOList); temp.setLicenseVOList(licenseVOList);
serviceInfoVOList.add(temp); serviceInfoVOList.add(temp);
vo.setServiceInfoVOList(serviceInfoVOList); vo.setServiceInfoVOList(serviceInfoVOList);
......
...@@ -28,6 +28,8 @@ public class ServiceInfoVO implements Serializable{ ...@@ -28,6 +28,8 @@ public class ServiceInfoVO implements Serializable{
*/ */
private String serveInfo; private String serveInfo;
private String versionName;
/** /**
* 服务描述 * 服务描述
*/ */
...@@ -72,6 +74,9 @@ public class ServiceInfoVO implements Serializable{ ...@@ -72,6 +74,9 @@ public class ServiceInfoVO implements Serializable{
public String getServcieDesc() { public String getServcieDesc() {
if (StringUtils.isBlank(skuInfo)) { if (StringUtils.isBlank(skuInfo)) {
if (StringUtils.isNotBlank(versionName)) {
return versionName;
}
return "--"; return "--";
} }
JSONObject jsonObject = JSONObject.parseObject(skuInfo); JSONObject jsonObject = JSONObject.parseObject(skuInfo);
...@@ -119,4 +124,8 @@ public class ServiceInfoVO implements Serializable{ ...@@ -119,4 +124,8 @@ public class ServiceInfoVO implements Serializable{
public void setPayDetail(String payDetail) { public void setPayDetail(String payDetail) {
this.payDetail = payDetail; this.payDetail = payDetail;
} }
public void setVersionName(String versionName) {
this.versionName = versionName;
}
} }
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