待处理 我的数据

This commit is contained in:
苏竹红
2024-05-07 15:21:56 +08:00
parent f3d5a3eb99
commit 34fa4b5a4e
11 changed files with 326 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.dto.InvestmentCountDTO;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.dto.openPreparation.PlanLineDTO;
import com.cool.store.entity.LineInfoDO;
@@ -144,6 +145,16 @@ public class LineInfoDAO {
PendingCountDTO pendingCount = lineInfoMapper.pendingCount(userId);
return pendingCount;
}
public InvestmentCountDTO investmentData(String userId) {
if (StringUtils.isBlank(userId)){
return null;
}
InvestmentCountDTO investmentData = lineInfoMapper.investmentData(userId);
return investmentData;
}
public List<PlanLineDTO> getLines(List<Long> lineIdList){
return lineInfoMapper.getLines(lineIdList);
}

View File

@@ -224,4 +224,10 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.getShopContractIncompletion();
}
public List<ShopStageInfoDO> getSpecialShopStageInfo(List<Long> shopIds, Integer shopSubStage,
List<Integer> shopSubStageStatusList,String investmentUserId,Integer queryUserType){
return shopStageInfoMapper.getSpecialShopStageInfo( shopIds, shopSubStage, shopSubStageStatusList,investmentUserId,queryUserType);
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.InvestmentCountDTO;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.dto.openPreparation.PlanLineDTO;
import com.cool.store.entity.LineInfoDO;
@@ -73,7 +74,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
*/
PendingCountDTO pendingCount(@Param("userId") String userId);
InvestmentCountDTO investmentData(@Param("userId") String userId);

View File

@@ -124,4 +124,11 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
*/
List<Long> getShopContractIncompletion();
List<ShopStageInfoDO> getSpecialShopStageInfo(@Param("shopIds") List<Long> shopIds,
@Param("shopSubStage") Integer shopSubStage,
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
@Param("investmentUserId") String investmentUserId,
@Param("queryUserType") Integer queryUserType);
}

View File

@@ -357,6 +357,20 @@
xfsg_line_info where deleted = 0 and line_status = 1
</select>
<select id="investmentData" resultType="com.cool.store.dto.InvestmentCountDTO">
SELECT
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 1, 1, 0 ) ) AS intendCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 5, 1, 0 ) ) AS interviewCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 10, 1, 0 ) ) AS firstInterviewCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 15, 1, 0 ) ) AS payStageCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 20, 1, 0 ) ) AS signingCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 25, 1, 0 ) ) AS storeExperienceCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage = 30, 1, 0 ) ) AS secondInterviewCount
FROM
xfsg_line_info where deleted = 0 and line_status = 1 and investment_manager = #{userId}
</select>
<select id="lineList" resultMap="BaseResultMap">
select * from xfsg_line_info a
<if test="wantShopAreaName!=null">
@@ -485,7 +499,7 @@
join enterprise_user_${enterpriseId} eu on xli.investment_manager = eu.user_id
where deleted = 0 and join_status = 1 and line_status = 1
<if test=" lineIdList != null and lineIdList.size>0">
and id in
and xli.id in
<foreach collection="lineIdList" item="lineId" open="(" separator="," close=")">
#{lineId}
</foreach>

View File

@@ -217,4 +217,39 @@
</select>
<select id="getSpecialShopStageInfo" resultMap="BaseResultMap">
select
*
from xfsg_shop_stage_info a
<if test="investmentUserId!=null and investmentUserId!='' and queryUserType == 0 ">
left join xfsg_line_info b on a.line_id = b.id
</if>
<if test="investmentUserId!=null and investmentUserId!='' and queryUserType == 1 ">
left join xfsg_system_building_shop c on a.id = c.shop_id
</if>
<where>
<if test="shopIds != null and shopIds.size() > 0">
and a.id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
</if>
<if test="shopSubStage!=null">
and a.shop_sub_stage = #{shopSubStage}
</if>
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
and a.shop_sub_stage_status in
<foreach collection="shopSubStageStatusList" item="stageStatus" index="index" open="(" separator="," close=")">
#{stageStatus}
</foreach>
</if>
<if test="investmentUserId!=null and investmentUserId!='' and queryUserType == 0">
and b.investment_manager = #{investmentUserId}
</if>
<if test="investmentUserId!=null and investmentUserId!='' and queryUserType == 1">
and c.supervisor_id = #{investmentUserId}
</if>
</where>
</select>
</mapper>