Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.openPreparation.UserInfoDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
@@ -125,7 +125,7 @@ public class EnterpriseUserDAO {
|
||||
}
|
||||
return enterpriseUserMapper.selectByInvestmentManager( investmentManager);
|
||||
}
|
||||
public List<UserInfoDTO> getNameByUserId(List<String> userIdList){
|
||||
public List<UserNameDTO> getNameByUserId(List<String> userIdList){
|
||||
return enterpriseUserMapper.selectNameByUserId(userIdList);
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午2:47
|
||||
* @Version 1.0
|
||||
* @注释:开业运营方案审核
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class OpeningOperationPlanAuditDAO {
|
||||
|
||||
@Resource
|
||||
private ShopAuditInfoMapper shopAuditInfoMapper;
|
||||
@Resource
|
||||
private OpeningOperationPlanMapper openingOperationPlanMapper;
|
||||
|
||||
public Long insertSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
return shopAuditInfoDO.getId();
|
||||
}
|
||||
public Integer updateSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Byte selectByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditResultByShopId(shopId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -28,21 +29,22 @@ public class OpeningOperationPlanDAO {
|
||||
return openingOperationPlanDO.getId();
|
||||
}
|
||||
|
||||
public OpeningOperationPlanDO selectById(Long Id){
|
||||
return openingOperationPlanMapper.selectByPrimaryKey(Id);
|
||||
}
|
||||
|
||||
public Integer updateResultType(Long shopId,Long auditId,Integer resultType){
|
||||
return openingOperationPlanMapper.updateByShopId(shopId,auditId,resultType);
|
||||
|
||||
}
|
||||
public Long updateSelective( OpeningOperationPlanDO openingOperationPlanDO){
|
||||
openingOperationPlanMapper.updateByPrimaryKeySelective(openingOperationPlanDO);
|
||||
return openingOperationPlanDO.getId();
|
||||
openingOperationPlanMapper.updateByPrimaryKeySelective(openingOperationPlanDO);
|
||||
return openingOperationPlanDO.getId();
|
||||
}
|
||||
|
||||
public OpeningOperationPlanDO selectByShopId( Long shopId){
|
||||
return openingOperationPlanMapper.selectByShopId(shopId);
|
||||
}
|
||||
//条件关联查询
|
||||
public List<OpeningOperationPlanDTO> selectConditionPlanList(List<Long> shopIdList, OpeningOperationPlanDTO openingOperationPlanDTO){
|
||||
return openingOperationPlanMapper.selectPlanListByShopId(shopIdList, openingOperationPlanDTO);
|
||||
|
||||
public List<OpeningOperationPlanDTO> selectConditionPlanList(Date StartDate,Date EndDate,Integer resultType){
|
||||
return openingOperationPlanMapper.selectPlanList( StartDate,EndDate,resultType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,4 +52,13 @@ public class ShopAuditInfoDAO {
|
||||
return shopAuditInfoMapper.getAuditInfoList(auditIds);
|
||||
}
|
||||
|
||||
public Integer updateSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Long selectIdByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditIdByShopId(shopId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -139,9 +140,9 @@ public class ShopInfoDAO {
|
||||
* @Date: 2024/4/24
|
||||
* @description: 开业运营方案,根据shopname获取列表
|
||||
*/
|
||||
public Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(String shopName, String bigName, String fightName, Integer pageNum, Integer pageSize){
|
||||
public Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName( List<Long> shopIdlist,String shopName, String bigName, String fightName, Integer pageNum, Integer pageSize){
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
return shopInfoMapper.getOpenPlanShopListByShopName(shopName,bigName,fightName);
|
||||
return shopInfoMapper.getOpenPlanShopListByShopName(shopIdlist,shopName,bigName,fightName);
|
||||
}
|
||||
|
||||
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {
|
||||
@@ -151,4 +152,20 @@ public class ShopInfoDAO {
|
||||
List<LineCountDTO> selectedShopNum = shopInfoMapper.getSelectedShopNum(lineIds);
|
||||
return selectedShopNum.stream().collect(Collectors.toMap(k->k.getLineId(), v->v.getSelectedShopNum()));
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:获取筹建阶段shopid
|
||||
*/
|
||||
public List<Long> queryShopIdListByStage(){
|
||||
return shopInfoMapper.queryShopIdListByStage();
|
||||
};
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description: 根据idlist 获取shopcode
|
||||
*/
|
||||
public List<OpenPlanShopInfoDTO> queryShopCodeListByid(@Param("shopIdList") List<Long> shopIdList){
|
||||
return shopInfoMapper.queryShopCodeListByid(shopIdList);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -172,5 +172,8 @@ public class ShopStageInfoDAO {
|
||||
ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
|
||||
return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(), shopSubStageStatus.getShopSubStageStatus());
|
||||
}
|
||||
|
||||
public Page<Long> getShopIdListByStageStatus( Integer pageNum, Integer pageSize){
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
return shopStageInfoMapper.getShopIdListByStageStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.openPreparation.UserInfoDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -75,5 +75,5 @@ public interface EnterpriseUserMapper {
|
||||
* @Date: 2024/4/24
|
||||
* @description: 根据userid查询名字
|
||||
*/
|
||||
List<UserInfoDTO> selectNameByUserId(@Param("userIdList") List<String> userId);
|
||||
List<UserNameDTO> selectNameByUserId(@Param("userIdList") List<String> userId);
|
||||
}
|
||||
@@ -5,13 +5,16 @@ import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanDO> {
|
||||
|
||||
OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
List<OpeningOperationPlanDTO> selectPlanListByShopId(@Param("shopId") List<Long> shopId,
|
||||
@Param("openingOperationPlanDTO") OpeningOperationPlanDTO openingOperationPlanDTO );
|
||||
List<OpeningOperationPlanDTO> selectPlanList( @Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("resultType") Integer resultType);
|
||||
|
||||
Integer updateByShopId(@Param("shopId") Long shopId, @Param("audit") Long auditId, @Param("resulType") Integer resultType);
|
||||
}
|
||||
@@ -7,18 +7,19 @@ import tk.mybatis.mapper.common.Mapper;
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
||||
|
||||
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
|
||||
|
||||
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
|
||||
|
||||
List<ShopAuditInfoDO> getListByShopIdAndType(@Param("shopId") Long shopId,
|
||||
@Param("type") Integer type);
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description:根据店铺id查询审批结果
|
||||
*/
|
||||
Byte selectAuditResultByShopId(@Param("shopId") Long shopId);
|
||||
Long selectAuditIdByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
|
||||
}
|
||||
@@ -68,8 +68,20 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
* @Date: 2024/4/24
|
||||
* @description: 开业运营方案,根据shopname获取列表
|
||||
*/
|
||||
Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopName") String shopName,
|
||||
Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopIdlist")List<Long> shopIdlist, @Param("shopName") String shopName,
|
||||
@Param("bigName") String bigName, @Param("fightName") String fightName);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:获取筹建阶段shopid
|
||||
*/
|
||||
List<Long> queryShopIdListByStage();
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description: 根据idlist 获取shopcode
|
||||
*/
|
||||
List<OpenPlanShopInfoDTO> queryShopCodeListByid(@Param("shopIdList") List<Long> shopIdList);
|
||||
|
||||
List<LineCountDTO> getSelectedShopNum(@Param("lineIds") List<Long> lineIds);
|
||||
}
|
||||
@@ -94,4 +94,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
Page<RentInfoToDoVO> getRentContractToDoPage(@Param("userId") String userId, @Param("shopSubStage")Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus);
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:获取处于订货金阶段的shopid
|
||||
*/
|
||||
Page<Long> getShopIdListByStageStatus();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
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.UserInfoDTO">
|
||||
<select id="selectNameByUserId" resultType="com.cool.store.dto.openPreparation.UserNameDTO">
|
||||
select user_id as userId ,name ,
|
||||
from enterprise_user_${enterpriseId}
|
||||
where user_id in
|
||||
|
||||
@@ -49,23 +49,23 @@
|
||||
LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id
|
||||
LEFT JOIN xfsg_line_info l ON l.id = s.line_id
|
||||
<where>
|
||||
<if test="openAcceptance.shopName != null and openAcceptance.shopName != ''">
|
||||
s.shop_name LIKE CONCAT('%',#{shopName},'%')
|
||||
<if test="openAcceptance.storeName != null and openAcceptance.storeName != ''">
|
||||
s.shop_name LIKE CONCAT('%',#{openAcceptance.storeName},'%')
|
||||
</if>
|
||||
<if test="openAcceptance.supervisorUserId != null and openAcceptance.supervisorUserId != ''">
|
||||
s.supervisor_user_id = #{supervisorUserId}
|
||||
s.supervisor_user_id = #{openAcceptance.supervisorUserId}
|
||||
</if>
|
||||
<if test="openAcceptance.investmentManager != null and openAcceptance.investmentManager != ''">
|
||||
l.investment_manager =#{investmentManager}
|
||||
l.investment_manager =#{openAcceptance.investmentManager}
|
||||
</if>
|
||||
<if test="openAcceptance.acceptanceStatus != null">
|
||||
o.acceptance_status = #{acceptanceStatus}
|
||||
o.acceptance_status = #{openAcceptance.acceptanceStatus}
|
||||
</if>
|
||||
<if test="openAcceptance.planOpenTimeBegin != null">
|
||||
AND o.plan_open_time >= #{planOpenTimeBegin}
|
||||
AND o.plan_open_time >= #{openAcceptance.planOpenTimeBegin}
|
||||
</if>
|
||||
<if test="openAcceptance.planOpenTimeEnd != null">
|
||||
AND o.plan_open_time <= #{planOpenTimeEnd}
|
||||
AND o.plan_open_time <= #{openAcceptance.planOpenTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
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
|
||||
</sql>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_opening_operation_plan
|
||||
set audit_id = #{auditId},result_type = #{resultType}
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.OpeningOperationPlanDO">
|
||||
select
|
||||
@@ -38,22 +43,20 @@
|
||||
and
|
||||
deleted = 0
|
||||
</select>
|
||||
<select id="selectPlanListByShopId" resultType="com.cool.store.dto.openPreparation.OpeningOperationPlanDTO">
|
||||
SELECT op.shop_id AS shopId, op.update_time AS updateTime, op.result_type AS resultType
|
||||
<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
|
||||
JOIN xfsg_shop_info si ON op.shop_id = si.id
|
||||
where
|
||||
<if test="shopId != null and shopId.size >0 ">
|
||||
<foreach item="shopId" index="index" collection="shopIdList" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="openingOperationPlanDTO.planStartDate != null">
|
||||
AND DATE(op.create_time) >= #{openingOperationPlanDTO.planStartDate}
|
||||
op.create_time >= #{startDate}
|
||||
</if>
|
||||
<if test="openingOperationPlanDTO.planEndDate != null">
|
||||
<![CDATA[AND DATE(op.create_time) <= #{openingOperationPlanDTO.planEndDate}]]>
|
||||
<![CDATA[AND op.create_time <= #{endDate}]]>
|
||||
</if>
|
||||
<if test="openingOperationPlanDTO.resultType != null">
|
||||
and op.result_type = #{resultType}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from xfsg_region_qrcode_config
|
||||
where region_id = #{regionId}
|
||||
where region_id = #{regionId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -39,9 +39,9 @@
|
||||
id,shop_id,audit_type,submitted_user_id,submitted_user_name,result_type,pass_reason,reject_reason,
|
||||
certify_file,create_time,update_time,deleted
|
||||
</sql>
|
||||
<select id="selectAuditResultByShopId" resultType="java.lang.Byte">
|
||||
<select id="selectAuditIdByShopId" resultType="java.lang.Long">
|
||||
select
|
||||
result_type
|
||||
id
|
||||
from
|
||||
xfsg_shop_audit_info
|
||||
where
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
join xfsg_line_info li on si.line_id = li.id
|
||||
join xfsg_system_building_shop xsbs on si.id = xsbs.big_name
|
||||
where 1=1
|
||||
<if test="shopIdlist != null and shopIdlist.size>0">
|
||||
and si.id in
|
||||
<foreach collection="shopIdlist" item="shopId" separator="," open="(" close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopName != null and shopName != ''">
|
||||
AND si.shop_name = #{shopName}
|
||||
</if>
|
||||
@@ -92,6 +98,23 @@
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="queryShopIdListByStage" resultType="java.lang.Long">
|
||||
select id
|
||||
from xfsg_shop_info
|
||||
where shop_stage = 2
|
||||
and deleted = 0
|
||||
</select>
|
||||
<select id="queryShopCodeListByid" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select id as shopId,shop_code as shopCode
|
||||
from xfsg_shop_info
|
||||
where 1=1
|
||||
<if test="shopIdList != null and shopIdList.size >0">
|
||||
and id in
|
||||
<foreach collection="shopIdList" separator="," open="(" close=")" item="shopId">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO">
|
||||
select
|
||||
|
||||
@@ -148,5 +148,10 @@
|
||||
where
|
||||
a.shop_sub_stage = #{shopSubStage} and a.shop_sub_stage_status = #{shopSubStageStatus} and a.deleted = 0 and b.deleted = 0 and b.investment_manager = #{userId}
|
||||
</select>
|
||||
<select id="getShopIdListByStageStatus" resultType="java.lang.Long">
|
||||
select shop_id
|
||||
from xfsg_shop_stage_info
|
||||
where shop_stage = 2 and shop_sub_stage = 150 and shop_sub_stage_status= 1505 and is_terminated = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user