This commit is contained in:
zhangchenbiao
2023-06-21 15:14:13 +08:00
parent b92e34224c
commit 0750d68809
11 changed files with 106 additions and 58 deletions

View File

@@ -1,10 +1,19 @@
package com.cool.store.vo;
import cn.hutool.core.date.DateUtil;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.utils.CoolDateUtils;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
@@ -16,7 +25,6 @@ import java.util.Date;
@ApiModel
public class PartnerIntentApplyInfoVO {
@ApiModelProperty("")
private Long id;
@@ -45,7 +53,7 @@ public class PartnerIntentApplyInfoVO {
private Integer acceptAdjustType;
@ApiModelProperty("截止时间")
private Date deadline;
private String deadline;
@ApiModelProperty("阶段提交时间")
private Date partnerSubmitTime;
@@ -53,4 +61,31 @@ public class PartnerIntentApplyInfoVO {
@ApiModelProperty("阶段状态")
private String WorkflowStatus;
public static List<PartnerIntentApplyInfoVO> convertList(List<PartnerIntentApplyInfoDTO> list, Map<String, HyPartnerUserInfoDO> infoDOMap, Map<String, String> wantShopAreaNameMap, String workflowStatus){
if(CollectionUtils.isEmpty(list)){
return Lists.newArrayList();
}
List<PartnerIntentApplyInfoVO> resultList = new ArrayList<>();
for (PartnerIntentApplyInfoDTO partnerIntentApplyInfoDTO : list) {
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
partnerIntentApplyInfoVO.setId(partnerIntentApplyInfoDTO.getId());
partnerIntentApplyInfoVO.setPartnerId(partnerIntentApplyInfoDTO.getPartnerId());
partnerIntentApplyInfoVO.setLineId(partnerIntentApplyInfoDTO.getPartnerLineId());
partnerIntentApplyInfoVO.setPartnerSubmitTime(partnerIntentApplyInfoDTO.getPartnerSubmitTime());
partnerIntentApplyInfoVO.setAcceptAdjustType(partnerIntentApplyInfoDTO.getAcceptAdjustType());
partnerIntentApplyInfoVO.setLiveArea(partnerIntentApplyInfoDTO.getLiveArea());
partnerIntentApplyInfoVO.setWantShopArea(partnerIntentApplyInfoDTO.getWantShopArea());
String deadLine = DateUtil.format(partnerIntentApplyInfoDTO.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC);
partnerIntentApplyInfoVO.setDeadline(deadLine);
HyPartnerUserInfoDO infoDOMapOrDefault = infoDOMap.getOrDefault(partnerIntentApplyInfoDTO.getPartnerId(), new HyPartnerUserInfoDO());
partnerIntentApplyInfoVO.setPartnerUserName(infoDOMapOrDefault.getUsername());
partnerIntentApplyInfoVO.setPartnerUserPhone(infoDOMapOrDefault.getMobile());
partnerIntentApplyInfoVO.setWorkflowStatus(workflowStatus);
partnerIntentApplyInfoVO.setWantShopAreaName(wantShopAreaNameMap.get(partnerIntentApplyInfoDTO.getWantShopArea()));
resultList.add(partnerIntentApplyInfoVO);
}
return resultList;
}
}

View File

@@ -1,11 +1,15 @@
package com.cool.store.vo;
import io.swagger.annotations.Api;
import cn.hutool.core.date.DateUtil;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.utils.CoolDateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @Author suzhuhong
@@ -19,7 +23,6 @@ public class PartnerLineInfoVO {
@ApiModelProperty("")
private Long lineId;
@ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId;
@@ -42,7 +45,7 @@ public class PartnerLineInfoVO {
private String developmentManager;
@ApiModelProperty("截止时间")
private Date deadline;
private String deadline;
@ApiModelProperty("通过原因")
private String passReason;
@@ -67,12 +70,45 @@ public class PartnerLineInfoVO {
@ApiModelProperty("加盟商用户手机号")
private String partnerUserPhone;
@ApiModelProperty("结束操作人ID")
private String closeUserId ;
private String closeUserId ;
@ApiModelProperty("结束操作人名称")
private String closeUserName ;
private String closeUserName ;
@ApiModelProperty("结束时间")
private Date closeDate ;
private String closeDate ;
/**
*
* @param lineList
* @return
*/
public static List<PartnerLineInfoVO> convertList(List<HyPartnerLineInfoDO> lineList, Map<String, String> userNamePhoneMap){
List<PartnerLineInfoVO> resultList = new ArrayList<>();
for (HyPartnerLineInfoDO line : lineList) {
PartnerLineInfoVO result = new PartnerLineInfoVO();
result.setLineId(line.getId());
result.setPartnerId(line.getPartnerId());
result.setCertifyFile(line.getCertifyFile());
result.setWorkflowStage(line.getWorkflowStage());
result.setWorkflowStatus(line.getWorkflowStatus());
result.setLineStatus(line.getLineStatus());
String deadLine = DateUtil.format(line.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC);
result.setDeadline(deadLine);
result.setPassReason(line.getPassReason());
result.setRejectPublicReason(line.getRejectPublicReason());
result.setRejectRealReason(line.getRejectRealReason());
result.setCertifyFile(line.getCertifyFile());
result.setCloseUserId(line.getCloseUserId());
result.setCloseUserName(userNamePhoneMap.get(line.getCloseUserId()));
String closeDate = DateUtil.format(line.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC_7);
result.setCloseDate(closeDate);
resultList.add(result);
}
return resultList;
}
}

View File

@@ -84,7 +84,7 @@ public class PrivateSeaLineListVo {
private String recommendPartnerName;
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<Long, String> wantShopAreaNameMap){
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap){
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
for (PrivateSeaLineDTO x : list) {
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();