预炸品加字段
This commit is contained in:
@@ -66,11 +66,14 @@
|
||||
c.username AS createUserName,
|
||||
c.mobile AS createUserMobile,
|
||||
a.created_time AS createTime,
|
||||
a.audit_status AS auditStatus
|
||||
a.audit_status AS auditStatus,
|
||||
d.region_id as regionId,
|
||||
d.investment_manager AS investmentManagerId
|
||||
FROM
|
||||
xfsg_pre_fry_qualification_apply a
|
||||
LEFT JOIN store_${enterpriseId} b ON a.store_code = b.store_num
|
||||
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||
left join xfsg_shop_info d ON d.shop_code = a.store_code
|
||||
<where>
|
||||
<if test="applyCode !=null and applyCode != ''">
|
||||
and a.apply_code LIKE CONCAT('%', #{applyCode}, '%')
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.dto.pre.fry;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.cool.store.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -18,6 +20,7 @@ public class ApplyManagementDTO {
|
||||
private String storeCode;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
@ExcelProperty(value = "申请单号",order = 1)
|
||||
@ApiModelProperty("申请单号")
|
||||
private String applyCode;
|
||||
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜 ")
|
||||
@@ -32,5 +35,11 @@ public class ApplyManagementDTO {
|
||||
private Date createTime;
|
||||
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
||||
private Integer auditStatus;
|
||||
@ApiModelProperty("所属大区")
|
||||
private String regionName;
|
||||
private Long regionId;
|
||||
private String investmentManagerId;
|
||||
@ApiModelProperty("督导")
|
||||
private String investmentManagerName;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.PreFryApprovalRecordsDAO;
|
||||
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
import com.cool.store.dto.pre.fry.*;
|
||||
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||
@@ -17,16 +19,15 @@ import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -40,6 +41,10 @@ public class PreFryQualificationApplyServiceImpl implements PreFryQualificationA
|
||||
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||
@Resource
|
||||
private PreFryApprovalRecordsDAO preFryApprovalRecordsDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private RegionDao regionDao;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -125,6 +130,16 @@ public class PreFryQualificationApplyServiceImpl implements PreFryQualificationA
|
||||
public PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query) {
|
||||
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||
List<ApplyManagementDTO> applyManagementDTOS = preFryQualificationApplyDAO.selectApplyManagementList(query);
|
||||
if (CollectionUtils.isNotEmpty(applyManagementDTOS)){
|
||||
Set<String> userIds = applyManagementDTOS.stream().map(ApplyManagementDTO::getInvestmentManagerId).collect(Collectors.toSet());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
Set<Long> regionIds = applyManagementDTOS.stream().map(ApplyManagementDTO::getRegionId).collect(Collectors.toSet());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(new ArrayList<>(regionIds));
|
||||
for (ApplyManagementDTO applyManagementDTO:applyManagementDTOS){
|
||||
applyManagementDTO.setInvestmentManagerName(userNameMap.getOrDefault(applyManagementDTO.getInvestmentManagerId(), ""));
|
||||
applyManagementDTO.setRegionName(regionNameMap.getOrDefault(applyManagementDTO.getRegionId(), ""));
|
||||
}
|
||||
}
|
||||
return new PageInfo<>(applyManagementDTOS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user