fix:产品二级类型相关调整
parent
53d900ca22
commit
50855a68ce
|
|
@ -106,6 +106,7 @@ public class ProductInfo extends BaseEntity
|
|||
* 其它
|
||||
*/
|
||||
OTHER("99","其它"),
|
||||
SERVICE("3", "服务"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
|
|
@ -118,4 +119,67 @@ public class ProductInfo extends BaseEntity
|
|||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级产品类型(软件)
|
||||
*/
|
||||
@Getter
|
||||
public enum ProductTypeLevel2SoftwareEnum {
|
||||
|
||||
HUI_ZHI("1", "软件-汇智"),
|
||||
H3C("2", "软件-H3C"),
|
||||
ZHUAN_SHOU("3", "软件-转售"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String desc;
|
||||
|
||||
ProductTypeLevel2SoftwareEnum(String type,String desc) {
|
||||
this.type = type;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级产品类型(硬件)
|
||||
*/
|
||||
@Getter
|
||||
public enum ProductTypeLevel2HardwareEnum {
|
||||
|
||||
HUI_ZHI("1", "硬件-汇智"),
|
||||
ZHUAN_SHOU("2", "硬件-转售"),
|
||||
HUI_ZHI_CLOUD("3", "硬件-汇智云终端"),
|
||||
H3C_CLOUD("4", "硬件-H3C云终端"),
|
||||
ZHUAN_SHOU_CLOUD("5", "硬件-转售云终端"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String desc;
|
||||
|
||||
ProductTypeLevel2HardwareEnum(String type,String desc) {
|
||||
this.type = type;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级产品类型(服务)
|
||||
*/
|
||||
@Getter
|
||||
public enum ProductTypeLevel2ServiceEnum {
|
||||
|
||||
SHENG_DAI("1", "服务-省代"),
|
||||
HARDWARE_QA("2", "服务-硬件质保"),
|
||||
SOFTWARE_QA("3", "服务-软件维保"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String desc;
|
||||
|
||||
ProductTypeLevel2ServiceEnum(String type,String desc) {
|
||||
this.type = type;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,9 +166,9 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
|
|||
Collectors.groupingBy(OrderList::getOrderId, Collectors.mapping(OrderList::getProductInfo, Collectors.toList())));
|
||||
|
||||
|
||||
// 查询标准硬件维保的产品信息
|
||||
// 查询服务的产品信息
|
||||
ProductInfo productInfo = new ProductInfo();
|
||||
productInfo.setType(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType());
|
||||
productInfo.setType(ProductInfo.ProductTypeEnum.SERVICE.getType());
|
||||
List<ProductInfo> productInfos = productInfoMapper.selectProductInfoList(productInfo);
|
||||
// 设置服务等级和服务结束时间
|
||||
for (DeliveryInfoVo deliveryInfoVo : deliveryInfoVos) {
|
||||
|
|
@ -216,32 +216,26 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
|
|||
if (CollUtil.isNotEmpty(productInfoList)) {
|
||||
if (ProductInfo.ProductTypeEnum.SOFTWARE.getType().equals(deliveryInfoVo.getProductType())) {
|
||||
for (ProductInfo productInfo : productInfoList) {
|
||||
if (ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType().equals(productInfo.getType()) && StringUtils.isNotEmpty(productInfo.getValue())) {
|
||||
if (ProductInfo.ProductTypeLevel2ServiceEnum.SOFTWARE_QA.getType().equals(productInfo.getType()) && StringUtils.isNotEmpty(productInfo.getValue())) {
|
||||
startTime = updateStartTimeAndAddList(deliveryInfoVo, productInfo, startTime, serviceInfoList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
for (ProductInfo productInfo : productInfoList) {
|
||||
if (ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType().equals(productInfo.getType()) && StringUtils.isNotEmpty(productInfo.getValue())) {
|
||||
if (ProductInfo.ProductTypeLevel2ServiceEnum.HARDWARE_QA.getType().equals(productInfo.getType()) && StringUtils.isNotEmpty(productInfo.getValue())) {
|
||||
startTime = updateStartTimeAndAddList(deliveryInfoVo, productInfo, startTime, serviceInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CollUtil.isEmpty(serviceInfoList) && ProductInfo.ProductTypeEnum.HARDWARE.getType().equals(deliveryInfoVo.getProductType())
|
||||
&& CollUtil.isNotEmpty(productInfos)) {
|
||||
// 判断是否硬件,如果是硬件取标准维保三年
|
||||
if (StringUtils.isNotEmpty(productInfos.get(0).getValue())) {
|
||||
startTime = updateStartTimeAndAddList(deliveryInfoVo, productInfos.get(0), startTime, serviceInfoList);
|
||||
}
|
||||
if (CollUtil.isEmpty(serviceInfoList) && ProductInfo.ProductTypeEnum.HARDWARE.getType().equals(deliveryInfoVo.getProductType())
|
||||
&& CollUtil.isNotEmpty(productInfos)) {
|
||||
// 判断是否硬件,如果是硬件取标准维保三年
|
||||
if (StringUtils.isNotEmpty(productInfos.get(0).getValue())) {
|
||||
startTime = updateStartTimeAndAddList(deliveryInfoVo, productInfos.get(0), startTime, serviceInfoList);
|
||||
}
|
||||
deliveryInfoVo.setServiceInfo(serviceInfoList);
|
||||
|
||||
|
||||
}
|
||||
deliveryInfoVo.setServiceInfo(serviceInfoList);
|
||||
}
|
||||
|
||||
private static Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) {
|
||||
|
|
|
|||
|
|
@ -357,9 +357,9 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
|||
|
||||
Map<Long, List<ProjectProductInfo>> maintenanceTypeMap = projectProductInfos.stream().collect(Collectors.groupingBy(ProjectProductInfo::getProjectId));
|
||||
|
||||
// // 查询标准硬件维保的产品信息
|
||||
// // 查询服务的产品信息
|
||||
ProductInfo productInfo = new ProductInfo();
|
||||
productInfo.setType(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType());
|
||||
productInfo.setType(ProductInfo.ProductTypeEnum.SERVICE.getType());
|
||||
List<ProductInfo> productInfos = productInfoService.selectProductInfoList(productInfo);
|
||||
// 设置服务等级和服务结束时间
|
||||
for (DeliveryInfoVo deliveryInfoVo : resultList) {
|
||||
|
|
|
|||
|
|
@ -115,11 +115,7 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
|
|||
projectInfo.setSoftwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.SOFTWARE.getType()));
|
||||
projectInfo.setHardwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.HARDWARE.getType()));
|
||||
// 硬件
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
// 软件
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>()));
|
||||
// 其他
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), new ArrayList<>()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
projectInfo.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
//查询变更记录信息
|
||||
List<ProjectWorkProgress> projectWorkProgresses = workProgressService.selectProjectWorkProgressListByProjectId(Collections.singletonList((projectInfo.getId())));
|
||||
|
|
@ -854,9 +850,7 @@ public class ProjectInfoServiceImpl implements IProjectInfoService {
|
|||
.collect(Collectors.groupingBy(ProjectProductInfo::getType));
|
||||
info.setSoftwareProjectProductInfoList(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE.getType(), Collections.emptyList()));
|
||||
info.setHardwareProjectProductInfoList(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE.getType(), Collections.emptyList()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), Collections.emptyList()));
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), Collections.emptyList()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
info.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -155,9 +155,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
Map<String, List<ProjectProductInfo>> productListMap = projectProductInfos.stream().collect(Collectors.groupingBy(ProjectProductInfo::getType));
|
||||
projectOrderInfo.setSoftwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.SOFTWARE.getType()));
|
||||
projectOrderInfo.setHardwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.HARDWARE.getType()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>()));
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), new ArrayList<>()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
projectOrderInfo.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
|
||||
|
||||
|
|
@ -647,9 +645,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
Map<String, List<ProjectProductInfo>> productListMap = projectProductInfos.stream().collect(Collectors.groupingBy(ProjectProductInfo::getType));
|
||||
projectOrderInfo.setSoftwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.SOFTWARE.getType()));
|
||||
projectOrderInfo.setHardwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.HARDWARE.getType()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>()));
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), new ArrayList<>()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
projectOrderInfo.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
|
||||
|
||||
|
|
@ -726,9 +722,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
.collect(Collectors.groupingBy(ProjectProductInfo::getType));
|
||||
info.setSoftwareProjectProductInfoList(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE.getType(), Collections.emptyList()));
|
||||
info.setHardwareProjectProductInfoList(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE.getType(), Collections.emptyList()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), Collections.emptyList()));
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), Collections.emptyList()));
|
||||
List<ProjectProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
info.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
});
|
||||
if ("YYS".equals(info.getBgProperty())) {
|
||||
|
|
|
|||
|
|
@ -94,9 +94,7 @@ public class QuotationServiceImpl implements IQuotationService {
|
|||
Map<String, List<QuotationProductInfo>> productListMap = productInfoList.stream().collect(Collectors.groupingBy(QuotationProductInfo::getType));
|
||||
quotation.setSoftwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.SOFTWARE.getType()));
|
||||
quotation.setHardwareProjectProductInfoList(productListMap.get(ProductInfo.ProductTypeEnum.HARDWARE.getType()));
|
||||
List<QuotationProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType(), new ArrayList<>());
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType(), new ArrayList<>()));
|
||||
maintenanceProjectProductInfoList.addAll(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.OTHER.getType(), new ArrayList<>()));
|
||||
List<QuotationProductInfo> maintenanceProjectProductInfoList = productListMap.getOrDefault(ProductInfo.ProductTypeEnum.SERVICE.getType(), new ArrayList<>());
|
||||
quotation.setMaintenanceProjectProductInfoList(maintenanceProjectProductInfoList);
|
||||
quotation.setProvinceProductInfoList(productListMap.getOrDefault(ProductInfo.ProductTypeEnum.PROVINCE_SERVICE.getType(),new ArrayList<>()));
|
||||
ProjectInfo projectInfo = new ProjectInfo();
|
||||
|
|
|
|||
Loading…
Reference in New Issue