提交时间
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dao;
|
|||||||
import com.cool.store.entity.LinePayDO;
|
import com.cool.store.entity.LinePayDO;
|
||||||
import com.cool.store.mapper.LinePayMapper;
|
import com.cool.store.mapper.LinePayMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -56,12 +57,19 @@ public class LinePayDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Map<Long,LinePayDO> getLinePayByLineIds(List<Long> lineIds) {
|
public Map<Long,LinePayDO> getLinePayByLineIds(List<Long> lineIds,Integer payBusinessType) {
|
||||||
if(Objects.isNull(lineIds) || lineIds.size() == 0){
|
if(CollectionUtils.isEmpty(lineIds)){
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
List<LinePayDO> linePayDO = linePayMapper.getLinePayByLineIds(lineIds);
|
List<LinePayDO> linePayDO = linePayMapper.getLinePayByLineIds(lineIds,null,payBusinessType);
|
||||||
return linePayDO.stream().collect(Collectors.toMap(LinePayDO::getLineId, linePayDO1 -> linePayDO1, (o, n) -> o));
|
return linePayDO.stream().collect(Collectors.toMap(LinePayDO::getLineId, linePayDO1 -> linePayDO1, (o, n) -> o));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<Long,LinePayDO> getLinePayByShopIds(List<Long> shopIds,Integer payBusinessType) {
|
||||||
|
if(CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
|
List<LinePayDO> linePayDO = linePayMapper.getLinePayByLineIds(null,shopIds,payBusinessType);
|
||||||
|
return linePayDO.stream().collect(Collectors.toMap(LinePayDO::getShopId, linePayDO1 -> linePayDO1, (o, n) -> o));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public interface LinePayMapper {
|
|||||||
* @param lineIds
|
* @param lineIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LinePayDO> getLinePayByLineIds(@Param("lineIds") List<Long> lineIds);
|
List<LinePayDO> getLinePayByLineIds(@Param("lineIds") List<Long> lineIds, @Param("shopIds") List<Long> shopIds, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
void updateByPidAndLid(@Param("lineId") Long lineId,
|
void updateByPidAndLid(@Param("lineId") Long lineId,
|
||||||
@Param("partnerId") String partnerId,
|
@Param("partnerId") String partnerId,
|
||||||
|
|||||||
@@ -316,10 +316,20 @@
|
|||||||
|
|
||||||
<select id="getLinePayByLineIds" resultMap="BaseResultMap">
|
<select id="getLinePayByLineIds" resultMap="BaseResultMap">
|
||||||
select * from xfsg_line_pay where deleted = 0
|
select * from xfsg_line_pay where deleted = 0
|
||||||
<if test="lineIds !=null and lineIds.size>0">
|
<where>
|
||||||
<foreach collection="lineIds" item="lineId" open="and line_id in (" close=")" separator=",">
|
<if test="businessType!=null">
|
||||||
#{lineId}
|
and pay_business_type = #{businessType}
|
||||||
</foreach>
|
</if>
|
||||||
</if>
|
<if test="lineIds !=null and lineIds.size>0">
|
||||||
|
<foreach collection="lineIds" item="lineId" open="and line_id in (" close=")" separator=",">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="shopIds !=null and shopIds.size>0">
|
||||||
|
<foreach collection="shopIds" item="shopId" open="and shop_id in (" close=")" separator=",">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -9,6 +9,8 @@ import com.cool.store.dto.openPreparation.PlanLineDTO;
|
|||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.InterviewTypeEnum;
|
import com.cool.store.enums.InterviewTypeEnum;
|
||||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
|
import com.cool.store.enums.point.PayTypeEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.mapper.IntentAgreementMapper;
|
import com.cool.store.mapper.IntentAgreementMapper;
|
||||||
@@ -178,7 +180,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
|
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
|
||||||
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
||||||
Map<Long, LinePayDO> payMap = linePayDAO.getLinePayByLineIds(lineIds);
|
Map<Long, LinePayDO> payMap = linePayDAO.getLinePayByLineIds(lineIds,PayBusinessTypeEnum.INTENT_MONEY.getCode());
|
||||||
List<PayStagePendingVO> list = new ArrayList<>();
|
List<PayStagePendingVO> list = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
@@ -377,13 +379,21 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
|
|
||||||
|
Map<Long, LinePayDO> shopPayDoMap = new HashMap<>(16);
|
||||||
|
if (ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage().equals(shopSubStageEnum.getShopSubStage())){
|
||||||
|
shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
List<PreparationCommonPendingVO> list = new ArrayList<>();
|
||||||
|
Map<Long, LinePayDO> finalShopPayDoMap = shopPayDoMap;
|
||||||
specialShopStageInfo.forEach(x->{
|
specialShopStageInfo.forEach(x->{
|
||||||
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
||||||
preparationCommonPendingVO.setLineId(x.getLineId());
|
preparationCommonPendingVO.setLineId(x.getLineId());
|
||||||
preparationCommonPendingVO.setShopId(x.getShopId());
|
preparationCommonPendingVO.setShopId(x.getShopId());
|
||||||
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
|
||||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(),new ShopInfoDO());
|
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(),new ShopInfoDO());
|
||||||
|
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,finalShopPayDoMap.getOrDefault(x.getShopId(), new LinePayDO()).getCreateTime()));
|
||||||
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
|
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
|
||||||
PlanLineDTO planLineDTO = lineMap.getOrDefault(x.getLineId(), new PlanLineDTO());
|
PlanLineDTO planLineDTO = lineMap.getOrDefault(x.getLineId(), new PlanLineDTO());
|
||||||
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
|
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.utils.poi;
|
package com.cool.store.utils.poi;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
@@ -83,6 +84,9 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||||||
* @return 格式化完毕的日期
|
* @return 格式化完毕的日期
|
||||||
*/
|
*/
|
||||||
public static String parseDateToStr(final String format, final Date date) {
|
public static String parseDateToStr(final String format, final Date date) {
|
||||||
|
if(StringUtils.isEmpty(format)|| ObjectUtils.isNotEmpty(date)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new SimpleDateFormat(format).format(date);
|
return new SimpleDateFormat(format).format(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user