上传租赁合同所属大区更改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -44,20 +45,23 @@ public class RentInfoToDoVO {
|
||||
@ApiModelProperty("提交时间")
|
||||
private Date submitTime;
|
||||
|
||||
public static List<RentInfoToDoVO> convert(List<RentInfoToDoVO> list, Map<Long, Long> shopPointMap, Map<Long, PointInfoDO> pointMap, Map<Long, String> regionNameMap, Map<Long, Date> rentContractSubmitTimeMap){
|
||||
public static List<RentInfoToDoVO> convert(List<RentInfoToDoVO> list, Map<Long, ShopInfoDO> shopPointMap, Map<Long, PointInfoDO> pointMap, Map<Long, String> regionNameMap, Map<Long, Date> rentContractSubmitTimeMap){
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<RentInfoToDoVO> resultList = new ArrayList<>();
|
||||
for (RentInfoToDoVO rent : list) {
|
||||
Long pointId = shopPointMap.get(rent.getShopId());
|
||||
rent.setPointId(pointId);
|
||||
PointInfoDO pointInfo = pointMap.get(pointId);
|
||||
ShopInfoDO shopInfo = shopPointMap.get(rent.getShopId());
|
||||
if(Objects.isNull(shopInfo)){
|
||||
continue;
|
||||
}
|
||||
PointInfoDO pointInfo = pointMap.get(shopInfo.getPointId());
|
||||
if(Objects.nonNull(pointInfo)){
|
||||
rent.setPointName(pointInfo.getPointName());
|
||||
rent.setAddress(pointInfo.getAddress());
|
||||
rent.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
||||
}
|
||||
rent.setPointId(shopInfo.getPointId());
|
||||
rent.setRegionNodeName(regionNameMap.get(shopInfo.getRegionId()));
|
||||
rent.setSubmitTime(rentContractSubmitTimeMap.get(rent.getShopId()));
|
||||
resultList.add(rent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user