开业筹备阶段4.0

This commit is contained in:
shuo.wang
2024-04-26 19:08:34 +08:00
parent a5ca7a3a63
commit 9e4de953c4
13 changed files with 48 additions and 49 deletions

View File

@@ -11,9 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -126,6 +124,9 @@ public class EnterpriseUserDAO {
return enterpriseUserMapper.selectByInvestmentManager( investmentManager);
}
public List<UserNameDTO> getNameByUserId(List<String> userIdList){
if (CollectionUtils.isEmpty(userIdList)) {
return new ArrayList<>();
}
return enterpriseUserMapper.selectNameByUserId(userIdList);
}
}

View File

@@ -140,9 +140,9 @@ public class ShopInfoDAO {
* @Date: 2024/4/24
* @description: 开业运营方案根据shopname获取列表
*/
public List<OpenPlanShopInfoDTO>getOpenPlanShopListByShopName( List<Long> shopIdlist,String shopName, String bigName, String fightName){
public List<OpenPlanShopInfoDTO>getOpenPlanShopListByShopName( List<Long> shopIdlist,String shopName, String regionId ){
return shopInfoMapper.getOpenPlanShopListByShopName(shopIdlist,shopName,bigName,fightName);
return shopInfoMapper.getOpenPlanShopListByShopName(shopIdlist,shopName,regionId);
}
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {

View File

@@ -17,5 +17,5 @@ public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanD
@Param("endDate") Date endDate,
@Param("resultType") Integer resultType);
Integer updateByShopId(@Param("shopId") Long shopId, @Param("audit") Long auditId, @Param("resulType") Integer resultType);
Integer updateByShopId(@Param("shopId") Long shopId, @Param("auditId") Long auditId, @Param("resultType") Integer resultType);
}

View File

@@ -69,7 +69,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
* @description: 开业运营方案根据shopname获取列表
*/
List<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopIdlist")List<Long> shopIdlist, @Param("shopName") String shopName,
@Param("bigName") String bigName, @Param("fightName") String fightName);
@Param("regionId") String regionId);
/**
* @Auther: wangshuo
* @Date: 2024/4/25

View File

@@ -133,7 +133,7 @@
FROM enterprise_user_${enterpriseId} WHERE ( mobile = #{investmentManager} or `name` = #{investmentManager} ) and active = true LIMIT 1
</select>
<select id="selectNameByUserId" resultType="com.cool.store.dto.openPreparation.UserNameDTO">
select user_id as userId ,name ,
select user_id as userId ,name
from enterprise_user_${enterpriseId}
where user_id in
<foreach item="userId" index="index" collection="userIdList" open="(" separator="," close=")">

View File

@@ -17,7 +17,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="selectByShopId" resultType="com.cool.store.dto.openPreparation.FirstOrderDTO">
select total_order_deposit as totalOrderDeposit,latest_payment_date as latestPaymentDate
select total_order_deposit as totalOrderDeposit, latest_payment_date as latestPaymentDate ,
estimated_cost as estimatedCost ,fruits_cost as fruitsCost
from xfsg_first_order
where shop_id = #{shopId}

View File

@@ -25,8 +25,9 @@
<result column="result_type" jdbcType="TINYINT" property="resultType"/>
</resultMap>
<sql id="Base_Column_List">
shop_id,plan_source,submitted_user_id,submission_time,survey_result,survey_result_url,activity_theme,activity_theme_url,preparation_user_ids,
route_completed,deleted,audit_id,result_type
id,shop_id,plan_source,survey_result,survey_result_url,activity_theme,activity_theme_url,
submission_time,submitted_user_id,preparation_user_ids,route_completed,create_time,
update_time,create_user_id,update_user_id,deleted,audit_id,result_type
</sql>
<update id="updateByShopId">
update xfsg_opening_operation_plan
@@ -44,17 +45,17 @@
deleted = 0
</select>
<select id="selectPlanList" resultType="com.cool.store.dto.openPreparation.OpeningOperationPlanDTO">
SELECT op.shop_id AS shopId, op.submission_time AS submissionTime, op.result_type AS resultType
op.audit_id as auditId
FROM xfsg_opening_operation_plan op
where
<if test="openingOperationPlanDTO.planStartDate != null">
op.create_time >= #{startDate}
SELECT shop_id AS shopId, submission_time AS submissionTime, result_type AS resultType,
audit_id as auditId
FROM xfsg_opening_operation_plan
where 1=1
<if test="startDate != null">
and op.create_time >= #{startDate}
</if>
<if test="openingOperationPlanDTO.planEndDate != null">
<![CDATA[AND op.create_time <= #{endDate}]]>
<if test="endDate != null">
AND op.create_time &lt;= #{endDate}
</if>
<if test="openingOperationPlanDTO.resultType != null">
<if test="resultType != null">
and op.result_type = #{resultType}
</if>

View File

@@ -75,7 +75,7 @@
<select id="getOpenPlanShopListByShopName" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
select si.id as shopId, si.line_id as lineId, si.shop_name as shopName,
si.shop_code as shopCode, si.shop_manager_user_id as shopManagerUserId,si.shop_manager_user_id as shopManagerUserId
si.shop_code as shopCode, si.shop_manager_user_id as shopManagerUserId,si.shop_manager_user_id as shopManagerUserId,
xsbs.big_name as bigName, xsbs.fight_name as fightName
from xfsg_shop_info si
join xfsg_line_info li on si.line_id = li.id
@@ -90,12 +90,9 @@
<if test="shopName != null and shopName != ''">
AND si.shop_name = #{shopName}
</if>
<if test="bigName != null and bigName != ''">
AND xsbs.big_name = #{bigName}
<if test="regionId != null and regionId != ''">
AND xsbs.fight_code = #{fightCode}
</if>
<if test="fightName != null and fightName != ''">
AND xsbs.fight_name = #{fightName}
</if>
</select>
<select id="queryShopIdListByStage" resultType="java.lang.Long">