fix 意向加盟阶段完成对门店阶段的处理
This commit is contained in:
@@ -13,6 +13,7 @@ import com.cool.store.vo.shop.RentInfoToDoVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -41,10 +42,10 @@ public class ShopStageInfoDAO {
|
||||
* 初始化店铺阶段信息
|
||||
* @param lineId
|
||||
* @param shopIds
|
||||
* @return
|
||||
* @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。
|
||||
*/
|
||||
public Integer initShopStageInfo(Long lineId, List<Long> shopIds) {
|
||||
if(CollectionUtils.isEmpty(shopIds)){
|
||||
public Integer initShopStageInfo(Long lineId, List<Long> shopIds, Boolean flag) {
|
||||
if (CollectionUtils.isEmpty(shopIds)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> addShopStageList = new ArrayList<>();
|
||||
@@ -57,9 +58,14 @@ public class ShopStageInfoDAO {
|
||||
ShopStageEnum shopStageEnum = shopSubStageEnum.getShopStageEnum();
|
||||
shopStageInfo.setShopStage(shopStageEnum.getShopStage());
|
||||
shopStageInfo.setShopSubStage(shopSubStageEnum.getShopSubStage());
|
||||
ShopSubStageStatusEnum initStatus = shopSubStageEnum.getInitStatus();
|
||||
ShopSubStageStatusEnum initStatus;
|
||||
if (flag) {
|
||||
initStatus = shopSubStageEnum.getInitStatus();
|
||||
} else {
|
||||
initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00;
|
||||
}
|
||||
shopStageInfo.setShopSubStageStatus(initStatus.getShopSubStageStatus());
|
||||
shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR +shopSubStageEnum.getInitStatus().getShopSubStageStatusName());
|
||||
shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR + shopSubStageEnum.getInitStatus().getShopSubStageStatusName());
|
||||
shopStageInfo.setIsTerminated(Boolean.FALSE);
|
||||
shopStageInfo.setPlanCompleteTime(shopSubStageEnum.getPlanCompleteTime(selectStartDate));
|
||||
addShopStageList.add(shopStageInfo);
|
||||
@@ -69,22 +75,22 @@ public class ShopStageInfoDAO {
|
||||
return shopStageInfoMapper.batchInsert(addShopStageList);
|
||||
}
|
||||
|
||||
public Integer batchInsert( List<ShopStageInfoDO> addShopStageList){
|
||||
if(CollectionUtils.isEmpty(addShopStageList)){
|
||||
public Integer batchInsert(List<ShopStageInfoDO> addShopStageList) {
|
||||
if (CollectionUtils.isEmpty(addShopStageList)) {
|
||||
return 0;
|
||||
}
|
||||
return shopStageInfoMapper.batchInsert(addShopStageList);
|
||||
}
|
||||
|
||||
public Integer insertSelective(ShopStageInfoDO shopStageInfoDO) {
|
||||
if(Objects.isNull(shopStageInfoDO)){
|
||||
if (Objects.isNull(shopStageInfoDO)) {
|
||||
return 0;
|
||||
}
|
||||
return shopStageInfoMapper.insertSelective(shopStageInfoDO);
|
||||
}
|
||||
|
||||
public Integer updateByPrimaryKeySelective(ShopStageInfoDO shopStageInfoDO) {
|
||||
if(Objects.isNull(shopStageInfoDO)){
|
||||
if (Objects.isNull(shopStageInfoDO)) {
|
||||
return 0;
|
||||
}
|
||||
return shopStageInfoMapper.updateByPrimaryKeySelective(shopStageInfoDO);
|
||||
@@ -92,7 +98,7 @@ public class ShopStageInfoDAO {
|
||||
|
||||
|
||||
public Integer batchUpdate(List<ShopStageInfoDO> shopStageList) {
|
||||
if(CollectionUtils.isEmpty(shopStageList)){
|
||||
if (CollectionUtils.isEmpty(shopStageList)) {
|
||||
return 0;
|
||||
}
|
||||
return shopStageInfoMapper.batchUpdate(shopStageList);
|
||||
@@ -104,36 +110,38 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public List<ShopStageInfoDO> getShopStageInfo(Long shopId, Integer shopStage) {
|
||||
if(Objects.isNull(shopId)){
|
||||
if (Objects.isNull(shopId)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
|
||||
}
|
||||
|
||||
public PreparationProcessVO getPreparationProcess(Long shopId) {
|
||||
if(Objects.isNull(shopId)){
|
||||
if (Objects.isNull(shopId)) {
|
||||
return null;
|
||||
}
|
||||
return shopStageInfoMapper.getPreparationProcess(shopId);
|
||||
}
|
||||
|
||||
public Integer getAllCompletionCount(Long shopId) {
|
||||
if(Objects.isNull(shopId)){
|
||||
if (Objects.isNull(shopId)) {
|
||||
return 0;
|
||||
}
|
||||
return shopStageInfoMapper.getAllCompletionCount(shopId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:更新完成时间byshopId
|
||||
*/
|
||||
public Integer updateByShopId( ShopStageInfoDO shopStageInfoDO){
|
||||
if (Objects.isNull(shopStageInfoDO)){
|
||||
public Integer updateByShopId(ShopStageInfoDO shopStageInfoDO) {
|
||||
if (Objects.isNull(shopStageInfoDO)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return shopStageInfoMapper.updateByShopId(shopStageInfoDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子阶段信息
|
||||
* @param shopId
|
||||
@@ -141,17 +149,17 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public ShopStageInfoDO getShopSubStageInfo(Long shopId, ShopSubStageEnum shopSubStageEnum) {
|
||||
if(Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)){
|
||||
if (Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)) {
|
||||
return null;
|
||||
}
|
||||
return shopStageInfoMapper.getShopSubStageInfo(shopId, shopSubStageEnum.getShopSubStage());
|
||||
}
|
||||
|
||||
public Integer updateShopStageInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo) {
|
||||
if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){
|
||||
if (Objects.isNull(shopId) || Objects.isNull(shopStageInfo)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
|
||||
boolean isTerminated = shopStageInfo.isTerminated();
|
||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||
}
|
||||
@@ -164,7 +172,7 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public Integer batchUpdateShopStageStatus(Long shopId, List<ShopSubStageStatusEnum> subStageStatusList) {
|
||||
if(Objects.isNull(shopId) || CollectionUtils.isEmpty(subStageStatusList)){
|
||||
if (Objects.isNull(shopId) || CollectionUtils.isEmpty(subStageStatusList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> shopStageList = Lists.newArrayList();
|
||||
@@ -182,6 +190,34 @@ public class ShopStageInfoDAO {
|
||||
return shopStageInfoMapper.batchUpdateShopStageStatus(shopId, shopStageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新店铺状态
|
||||
* @param shopIds
|
||||
* @param subStageStatusList
|
||||
* @return
|
||||
*/
|
||||
public Integer batchUpdateByShopIdsAndSubStageStatus(List<Long> shopIds, List<ShopSubStageStatusEnum> subStageStatusList) {
|
||||
if (Objects.isNull(shopIds) || CollectionUtils.isEmpty(subStageStatusList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> shopStageList = Lists.newArrayList();
|
||||
for (Long shopId : shopIds) {
|
||||
for (ShopSubStageStatusEnum subStageStatus : subStageStatusList) {
|
||||
String remark = subStageStatus.getShopSubStageName() + CommonConstants.PATH_BAR + subStageStatus.getShopSubStageStatusName();
|
||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||
shopStageInfo.setShopId(shopId);
|
||||
shopStageInfo.setShopSubStage(subStageStatus.getShopSubStageEnum().getShopSubStage());
|
||||
shopStageInfo.setShopSubStageStatus(subStageStatus.getShopSubStageStatus());
|
||||
shopStageInfo.setRemark(remark);
|
||||
shopStageInfo.setIsTerminated(subStageStatus.isTerminated());
|
||||
shopStageList.add(shopStageInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return shopStageInfoMapper.batchUpdateByShopIdsAndSubStageStatus(shopIds, shopStageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新子阶段到未开始状态
|
||||
* @param shopId
|
||||
@@ -189,7 +225,7 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public Integer updateShopStageToNotStarted(Long shopId, ShopSubStageEnum shopSubStageEnum) {
|
||||
if(Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)){
|
||||
if (Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return shopStageInfoMapper.updateShopStageToNotStarted(shopId, shopSubStageEnum.getShopSubStage());
|
||||
@@ -202,49 +238,51 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public Integer updateShopStageAndAuditInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo, Long auditId) {
|
||||
if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){
|
||||
if (Objects.isNull(shopId) || Objects.isNull(shopStageInfo)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
|
||||
boolean isTerminated = shopStageInfo.isTerminated();
|
||||
return shopStageInfoMapper.updateShopStageAndAuditInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark, auditId);
|
||||
}
|
||||
|
||||
public Page<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNum, Integer pageSize){
|
||||
public Page<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNum, Integer pageSize) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
|
||||
return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(), shopSubStageStatus.getShopSubStageStatus());
|
||||
}
|
||||
public List<ShopStageInfoDO> getShopIdListByStageStatus(Integer shopSubStageStatus){
|
||||
if (shopSubStageStatus == null ||shopSubStageStatus ==CommonConstants.ZERO){
|
||||
|
||||
public List<ShopStageInfoDO> getShopIdListByStageStatus(Integer shopSubStageStatus) {
|
||||
if (shopSubStageStatus == null || shopSubStageStatus == CommonConstants.ZERO) {
|
||||
return null;
|
||||
}
|
||||
return shopStageInfoMapper.getShopIdListByStageStatus(shopSubStageStatus);
|
||||
return shopStageInfoMapper.getShopIdListByStageStatus(shopSubStageStatus);
|
||||
}
|
||||
|
||||
public List<ScheduleDTO> getScheduleList(List<Long> shopIdList){
|
||||
if (CollectionUtils.isEmpty(shopIdList)){
|
||||
public List<ScheduleDTO> getScheduleList(List<Long> shopIdList) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return shopStageInfoMapper.getScheduleList(shopIdList);
|
||||
}
|
||||
public List<ScheduleDTO> getPlatformBuildList(List<Long> shopIdList){
|
||||
if (CollectionUtils.isEmpty(shopIdList)){
|
||||
|
||||
public List<ScheduleDTO> getPlatformBuildList(List<Long> shopIdList) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return shopStageInfoMapper.getPlatformBuildList(shopIdList);
|
||||
}
|
||||
|
||||
public List<ShopStageInfoDO> getShopContractActualCompletionTime(List<Long> shopIdList){
|
||||
if (CollectionUtils.isEmpty(shopIdList)){
|
||||
public List<ShopStageInfoDO> getShopContractActualCompletionTime(List<Long> shopIdList) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return shopStageInfoMapper.getShopContractActualCompletionTime(shopIdList);
|
||||
}
|
||||
|
||||
|
||||
public List<ShopStageInfoDO> getOpenActivityActualCompletionTime(List<Long> shopIdList){
|
||||
if (CollectionUtils.isEmpty(shopIdList)){
|
||||
public List<ShopStageInfoDO> getOpenActivityActualCompletionTime(List<Long> shopIdList) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return shopStageInfoMapper.getOpenActivityActualCompletionTime(shopIdList);
|
||||
@@ -256,53 +294,57 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public List<Long> getCanSubmitRentContractShopIds(List<Long> shopIds) {
|
||||
if(CollectionUtils.isEmpty(shopIds)){
|
||||
if (CollectionUtils.isEmpty(shopIds)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return shopStageInfoMapper.getCanSubmitRentContractShopIds(shopIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/5
|
||||
* @description:获取施工阶段未完成的店铺
|
||||
*/
|
||||
public List<Long> getShopContractIncompletion(){
|
||||
public List<Long> getShopContractIncompletion() {
|
||||
return shopStageInfoMapper.getShopContractIncompletion();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/13
|
||||
* @description:批量更新店铺某一阶段的状态
|
||||
*/
|
||||
public Integer batchUpdateShopStageStatus(List<Long> shopIdList,Integer shopSubStageEnum, Integer shopSubStageStatusEnum) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)){
|
||||
public Integer batchUpdateShopStageStatus(List<Long> shopIdList, Integer shopSubStageEnum, Integer shopSubStageStatusEnum) {
|
||||
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return shopStageInfoMapper.batchUpdateStatus(shopIdList,shopSubStageEnum,shopSubStageStatusEnum);
|
||||
return shopStageInfoMapper.batchUpdateStatus(shopIdList, shopSubStageEnum, shopSubStageStatusEnum);
|
||||
}
|
||||
|
||||
public List<ShopStageInfoDO> getSpecialShopStageInfo(List<Long> shopIds, Integer shopSubStage,
|
||||
List<Integer> shopSubStageStatusList,
|
||||
String investmentUserId,
|
||||
List<String> authRegionIds){
|
||||
return shopStageInfoMapper.getSpecialShopStageInfo( shopIds, shopSubStage, shopSubStageStatusList,investmentUserId,authRegionIds);
|
||||
List<String> authRegionIds) {
|
||||
return shopStageInfoMapper.getSpecialShopStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, authRegionIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/9
|
||||
* @description:获取处于XXXX阶段的列表
|
||||
*/
|
||||
public List<ShopStageInfoDO> getSubStageList(List<Long> shopIds, Integer shopSubStage){
|
||||
if(CollectionUtils.isEmpty(shopIds) || shopSubStage == null){
|
||||
public List<ShopStageInfoDO> getSubStageList(List<Long> shopIds, Integer shopSubStage) {
|
||||
if (CollectionUtils.isEmpty(shopIds) || shopSubStage == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return shopStageInfoMapper.getSubStageList(shopIds,shopSubStage);
|
||||
return shopStageInfoMapper.getSubStageList(shopIds, shopSubStage);
|
||||
}
|
||||
public List<ShopStageInfoDO> getSubStages(List<Long> shopIds, Integer shopSubStage){
|
||||
if(CollectionUtils.isEmpty(shopIds) ){
|
||||
|
||||
public List<ShopStageInfoDO> getSubStages(List<Long> shopIds, Integer shopSubStage) {
|
||||
if (CollectionUtils.isEmpty(shopIds)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return shopStageInfoMapper.getSubStages(shopIds,shopSubStage);
|
||||
return shopStageInfoMapper.getSubStages(shopIds, shopSubStage);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -310,28 +352,30 @@ public class ShopStageInfoDAO {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
public Integer getNotOpenShopCountByLineId(Long lineId){
|
||||
if(Objects.isNull(lineId)){
|
||||
public Integer getNotOpenShopCountByLineId(Long lineId) {
|
||||
if (Objects.isNull(lineId)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_16;
|
||||
return shopStageInfoMapper.getShopCountByLineIdAndStageStatus(lineId, shopSubStageEnum.getShopStageEnum().getShopStage(), shopSubStageEnum.getShopSubStage(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/11
|
||||
* @description:获取处于a阶段或b阶段,和c阶段的
|
||||
*/
|
||||
public List<ShopStageInfoDO> getSubStageListBySubStageStatus(ShopSubStageStatusEnum a,ShopSubStageStatusEnum b, ShopSubStageStatusEnum c){
|
||||
public List<ShopStageInfoDO> getSubStageListBySubStageStatus(ShopSubStageStatusEnum a, ShopSubStageStatusEnum b, ShopSubStageStatusEnum c) {
|
||||
|
||||
return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(),b.getShopSubStageStatus(),c.getShopSubStageStatus());
|
||||
return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(), b.getShopSubStageStatus(), c.getShopSubStageStatus());
|
||||
}
|
||||
|
||||
public ShopStageInfoDO getByShopIdAndSubStage(Long shopId, Integer shopSubStage) {
|
||||
return shopStageInfoMapper.getByShopIdAndSubStage(shopId,shopSubStage);
|
||||
return shopStageInfoMapper.getByShopIdAndSubStage(shopId, shopSubStage);
|
||||
}
|
||||
|
||||
public List<PlatformBuildStageDTO> getPlatformBuildStage(List<Long> shopIds) {
|
||||
if (CollectionUtils.isEmpty(shopIds)){
|
||||
if (CollectionUtils.isEmpty(shopIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return shopStageInfoMapper.getPlatformBuildStage(shopIds);
|
||||
@@ -342,12 +386,28 @@ public class ShopStageInfoDAO {
|
||||
* @param shopSubStage
|
||||
* @return
|
||||
*/
|
||||
public List<ShopStageInfoDO> getSubStages(Integer shopSubStage){
|
||||
return shopStageInfoMapper.getSubStageList(null,shopSubStage);
|
||||
public List<ShopStageInfoDO> getSubStages(Integer shopSubStage) {
|
||||
return shopStageInfoMapper.getSubStageList(null, shopSubStage);
|
||||
}
|
||||
|
||||
//获取新店筹备总阶段总数排除发票回传,flag=0查询全部 =1 查询已完成
|
||||
public Integer allNumber(Long shopId,Integer flag){
|
||||
return shopStageInfoMapper.getAllNumber(shopId,flag);
|
||||
public Integer allNumber(Long shopId, Integer flag) {
|
||||
return shopStageInfoMapper.getAllNumber(shopId, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/1/15
|
||||
* @description:批量获取线索下门店的选址未开始的数据
|
||||
*/
|
||||
public List<ShopStageInfoDO> getByLineIdAndSubStage(Long lineId) {
|
||||
if (lineId == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Example example = new Example(ShopStageInfoDO.class);
|
||||
example.createCriteria().andEqualTo("lineId", lineId).andEqualTo("shopSubStage", ShopSubStageEnum.SHOP_STAGE_1.getShopSubStage())
|
||||
.andEqualTo("shopSubStageStatus", ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus());
|
||||
return shopStageInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
Integer batchUpdateShopStageStatus(@Param("shopId") Long shopId, @Param("updateList") List<ShopStageInfoDO> updateList);
|
||||
Integer batchUpdateByShopIdsAndSubStageStatus(@Param("shopIds") List<Long> shopIds, @Param("updateList") List<ShopStageInfoDO> updateList);
|
||||
|
||||
/**
|
||||
* 更新阶段及审核信息
|
||||
|
||||
@@ -1,367 +1,391 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.ShopStageInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopStageInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="shop_stage" jdbcType="TINYINT" property="shopStage" />
|
||||
<result column="shop_sub_stage" jdbcType="TINYINT" property="shopSubStage" />
|
||||
<result column="shop_sub_stage_status" jdbcType="TINYINT" property="shopSubStageStatus" />
|
||||
<result column="is_terminated" jdbcType="BIT" property="isTerminated" />
|
||||
<result column="plan_complete_time" jdbcType="VARCHAR" property="planCompleteTime" />
|
||||
<result column="actual_complete_time" jdbcType="VARCHAR" property="actualCompleteTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopStageInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="line_id" jdbcType="BIGINT" property="lineId"/>
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
|
||||
<result column="shop_stage" jdbcType="TINYINT" property="shopStage"/>
|
||||
<result column="shop_sub_stage" jdbcType="TINYINT" property="shopSubStage"/>
|
||||
<result column="shop_sub_stage_status" jdbcType="TINYINT" property="shopSubStageStatus"/>
|
||||
<result column="is_terminated" jdbcType="BIT" property="isTerminated"/>
|
||||
<result column="plan_complete_time" jdbcType="VARCHAR" property="planCompleteTime"/>
|
||||
<result column="actual_complete_time" jdbcType="VARCHAR" property="actualCompleteTime"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="audit_id" jdbcType="BIGINT" property="auditId"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time, actual_complete_time, remark, audit_id, deleted, create_time, update_time
|
||||
</sql>
|
||||
<sql id="allColumn">
|
||||
id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time,
|
||||
actual_complete_time, remark, audit_id, deleted, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<insert id="batchInsert">
|
||||
<foreach collection="addShopStageList" separator=";" item="shop">
|
||||
INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time, remark)
|
||||
VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus}, #{shop.isTerminated}, #{shop.planCompleteTime}, #{shop.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert">
|
||||
<foreach collection="addShopStageList" separator=";" item="shop">
|
||||
INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status,
|
||||
is_terminated, plan_complete_time, remark)
|
||||
VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus},
|
||||
#{shop.isTerminated}, #{shop.planCompleteTime}, #{shop.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="batchUpdate">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
shop_sub_stage_status = CASE id
|
||||
<foreach collection="addShopStageList" separator=" " item="item">
|
||||
WHEN #{item.id} THEN IFNULL(#{item.shopSubStageStatus},shop_sub_stage_status)
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="addShopStageList" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
<update id="batchUpdate">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
shop_sub_stage_status = CASE id
|
||||
<foreach collection="addShopStageList" separator=" " item="item">
|
||||
WHEN #{item.id} THEN IFNULL(#{item.shopSubStageStatus},shop_sub_stage_status)
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="addShopStageList" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
|
||||
<select id="getShopStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="allColumn"/>
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0
|
||||
<if test="shopStage != null">
|
||||
and shop_stage = #{shopStage}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPreparationProcess" resultType="com.cool.store.vo.Preparation.PreparationProcessVO">
|
||||
select
|
||||
max(plan_complete_time) as planStartTime,
|
||||
sum(if(is_terminated = 1, 1, 0)) as finishCount
|
||||
from xfsg_shop_stage_info where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
<select id="getAllCompletionCount" resultType="java.lang.Integer">
|
||||
select
|
||||
count(1)
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1
|
||||
and shop_sub_stage in (60,40,120,140,150)
|
||||
</select>
|
||||
|
||||
<update id="updateShopStageInfo">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{shopSubStageStatus},
|
||||
is_terminated = #{isTerminated},
|
||||
remark = #{remark},
|
||||
actual_complete_time = if(is_terminated, now(), null)
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="batchUpdateShopStageStatus">
|
||||
<foreach collection="updateList" separator=";" item="update">
|
||||
update
|
||||
<select id="getShopStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="allColumn"/>
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{update.shopSubStageStatus},
|
||||
is_terminated = #{update.isTerminated},
|
||||
remark = #{update.remark},
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0
|
||||
<if test="shopStage != null">
|
||||
and shop_stage = #{shopStage}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPreparationProcess" resultType="com.cool.store.vo.Preparation.PreparationProcessVO">
|
||||
select
|
||||
max(plan_complete_time) as planStartTime,
|
||||
sum(if(is_terminated = 1, 1, 0)) as finishCount
|
||||
from xfsg_shop_stage_info where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
<select id="getAllCompletionCount" resultType="java.lang.Integer">
|
||||
select
|
||||
count(1)
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1
|
||||
and shop_sub_stage in (60,40,120,140,150)
|
||||
</select>
|
||||
|
||||
<update id="updateShopStageInfo">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{shopSubStageStatus},
|
||||
is_terminated = #{isTerminated},
|
||||
remark = #{remark},
|
||||
actual_complete_time = if(is_terminated, now(), null)
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{update.shopSubStage}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getShopSubStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="allColumn"/>
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} and deleted = 0
|
||||
</select>
|
||||
|
||||
<update id="updateShopStageAndAuditInfo">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{shopSubStageStatus},
|
||||
is_terminated = #{isTerminated},
|
||||
remark = #{remark},
|
||||
actual_complete_time = if(is_terminated, now(), null),
|
||||
audit_id = #{auditId}
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
<update id="updateShopStageToNotStarted">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = -100,
|
||||
is_terminated = 0,
|
||||
remark = '未开始',
|
||||
actual_complete_time = null,
|
||||
audit_id = null
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
<if test="shopStageInfoDO.planCompleteTime">
|
||||
plan_complete_time = #{shopStageInfoDO.planCompleteTime},
|
||||
</if>
|
||||
<if test="shopStageInfoDO.actualCompleteTime">
|
||||
actual_complete_time = #{shopStageInfoDO.actualCompleteTime},
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopStageInfoDO.shopId} AND shop_sub_stage = #{shopStageInfoDO.shopSubStage}
|
||||
|
||||
</update>
|
||||
<update id="batchUpdateStatus">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
|
||||
<if test="shopSubStageStatusEnum !=null">
|
||||
shop_sub_stage_status = #{shopSubStageStatusEnum}
|
||||
</if>
|
||||
</set>
|
||||
where shop_id in
|
||||
<foreach collection="shopIdList" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
<if test="shopSubStageEnum != null">
|
||||
and shop_sub_stage = #{shopSubStageEnum}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
|
||||
select
|
||||
b.id as lineId,
|
||||
b.username as lineUsername,
|
||||
b.mobile as lineMobile,
|
||||
a.shop_id as shopId,
|
||||
a.shop_sub_stage_status as shopSubStageStatus
|
||||
from
|
||||
xfsg_shop_stage_info a
|
||||
inner join xfsg_line_info b on a.line_id = b.id
|
||||
where
|
||||
a.shop_sub_stage = #{shopSubStage} and a.shop_sub_stage_status = #{shopSubStageStatus} and a.deleted = 0 and b.deleted = 0 and b.development_manager = #{userId}
|
||||
</select>
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getScheduleList" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
||||
select
|
||||
shop_id as shopId,
|
||||
max(plan_complete_time) as planCompleteTime,
|
||||
count(1)-1 as totalColumn,
|
||||
sum(if(is_terminated = 1 and shop_sub_stage!=85, 1, 0)) as completionColumn
|
||||
from xfsg_shop_stage_info where shop_stage = 2
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by shop_id
|
||||
</select>
|
||||
<update id="batchUpdateShopStageStatus">
|
||||
<foreach collection="updateList" separator=";" item="update">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{update.shopSubStageStatus},
|
||||
is_terminated = #{update.isTerminated},
|
||||
remark = #{update.remark},
|
||||
actual_complete_time = if(is_terminated, now(), null)
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{update.shopSubStage}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getShopSubStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="allColumn"/>
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} and deleted = 0
|
||||
</select>
|
||||
|
||||
<update id="updateShopStageAndAuditInfo">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{shopSubStageStatus},
|
||||
is_terminated = #{isTerminated},
|
||||
remark = #{remark},
|
||||
actual_complete_time = if(is_terminated, now(), null),
|
||||
audit_id = #{auditId}
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
<update id="updateShopStageToNotStarted">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = -100,
|
||||
is_terminated = 0,
|
||||
remark = '未开始',
|
||||
actual_complete_time = null,
|
||||
audit_id = null
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
<if test="shopStageInfoDO.planCompleteTime">
|
||||
plan_complete_time = #{shopStageInfoDO.planCompleteTime},
|
||||
</if>
|
||||
<if test="shopStageInfoDO.actualCompleteTime">
|
||||
actual_complete_time = #{shopStageInfoDO.actualCompleteTime},
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopStageInfoDO.shopId} AND shop_sub_stage = #{shopStageInfoDO.shopSubStage}
|
||||
|
||||
</update>
|
||||
<update id="batchUpdateStatus">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
|
||||
<if test="shopSubStageStatusEnum !=null">
|
||||
shop_sub_stage_status = #{shopSubStageStatusEnum}
|
||||
</if>
|
||||
</set>
|
||||
where shop_id in
|
||||
<foreach collection="shopIdList" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
<if test="shopSubStageEnum != null">
|
||||
and shop_sub_stage = #{shopSubStageEnum}
|
||||
</if>
|
||||
</update>
|
||||
<update id="batchUpdateByShopIdsAndSubStageStatus">
|
||||
<foreach collection="updateList" separator=";" item="update">
|
||||
update
|
||||
xfsg_shop_stage_info
|
||||
set
|
||||
shop_sub_stage_status = #{update.shopSubStageStatus},
|
||||
is_terminated = #{update.isTerminated},
|
||||
remark = #{update.remark},
|
||||
actual_complete_time = if(is_terminated, now(), null)
|
||||
where
|
||||
shop_id in
|
||||
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
and shop_sub_stage = #{update.shopSubStage}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
|
||||
select
|
||||
b.id as lineId,
|
||||
b.username as lineUsername,
|
||||
b.mobile as lineMobile,
|
||||
a.shop_id as shopId,
|
||||
a.shop_sub_stage_status as shopSubStageStatus
|
||||
from
|
||||
xfsg_shop_stage_info a
|
||||
inner join xfsg_line_info b on a.line_id = b.id
|
||||
where
|
||||
a.shop_sub_stage = #{shopSubStage} and a.shop_sub_stage_status = #{shopSubStageStatus} and a.deleted = 0 and
|
||||
b.deleted = 0 and b.development_manager = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getShopContractActualCompletionTime" resultMap="BaseResultMap">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info where shop_stage = 1 and shop_sub_stage = 20 and actual_complete_time is not null
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCanSubmitRentContractShopIds" resultType="long">
|
||||
select
|
||||
shop_id
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where shop_sub_stage_status in(200, 220) and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getShopContractIncompletion" resultType="java.lang.Long">
|
||||
SELECT
|
||||
shop_id
|
||||
FROM
|
||||
xfsg_shop_stage_info
|
||||
WHERE
|
||||
shop_sub_stage = 110
|
||||
AND (shop_sub_stage_status = 1100 OR shop_sub_stage_status = 1110)
|
||||
</select>
|
||||
<select id="getScheduleList" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
||||
select
|
||||
shop_id as shopId,
|
||||
max(plan_complete_time) as planCompleteTime,
|
||||
count(1)-1 as totalColumn,
|
||||
sum(if(is_terminated = 1 and shop_sub_stage!=85, 1, 0)) as completionColumn
|
||||
from xfsg_shop_stage_info where shop_stage = 2
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by shop_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSpecialShopStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info a
|
||||
<if test="(authRegionIds != null and authRegionIds.size() > 0) or (investmentUserId != null and investmentUserId != '')">
|
||||
left join xfsg_shop_info si on a.shop_id = si.id
|
||||
</if>
|
||||
<where>
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and a.shop_id in
|
||||
<select id="getShopContractActualCompletionTime" resultMap="BaseResultMap">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info where shop_stage = 1 and shop_sub_stage = 20 and actual_complete_time is not null
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCanSubmitRentContractShopIds" resultType="long">
|
||||
select
|
||||
shop_id
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where shop_sub_stage_status in(200, 220) and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
#{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}
|
||||
</select>
|
||||
<select id="getShopContractIncompletion" resultType="java.lang.Long">
|
||||
SELECT
|
||||
shop_id
|
||||
FROM
|
||||
xfsg_shop_stage_info
|
||||
WHERE
|
||||
shop_sub_stage = 110
|
||||
AND (shop_sub_stage_status = 1100 OR shop_sub_stage_status = 1110)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSpecialShopStageInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info a
|
||||
<if test="(authRegionIds != null and authRegionIds.size() > 0) or (investmentUserId != null and investmentUserId != '')">
|
||||
left join xfsg_shop_info si on a.shop_id = si.id
|
||||
</if>
|
||||
<where>
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and a.shop_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 authRegionIds.size()==0">
|
||||
and si.investment_manager = #{investmentUserId}
|
||||
</if>
|
||||
<if test="authRegionIds != null and authRegionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getSubStageList" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="shopIds !=null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopSubStage !=null">
|
||||
and shop_sub_stage =#{shopSubStage}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getShopIdListByStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where shop_sub_stage_status = #{shopSubStageStatus}
|
||||
</select>
|
||||
|
||||
<select id="getShopCountByLineIdAndStageStatus" resultType="integer">
|
||||
select count(1) from xfsg_shop_stage_info where shop_stage = #{shopStage} and shop_sub_stage = #{shopSubStage}
|
||||
and shop_sub_stage_status = #{shopSubStageStatus} and line_id = #{lineId}
|
||||
</select>
|
||||
<select id="getSubStageListBySubStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="subStageStatusA !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusA}
|
||||
</if>
|
||||
<if test="subStageStatusB !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusB}
|
||||
</if>
|
||||
<if test="subStageStatusC !=null">
|
||||
and shop_sub_stage_status = #{subStageStatusC}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getByShopIdAndSubStage" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
SELECT
|
||||
<include refid="allColumn"/>
|
||||
FROM xfsg_shop_stage_info
|
||||
WHERE shop_id = #{shopId}
|
||||
AND shop_sub_stage = #{shopSubStage}
|
||||
</select>
|
||||
<select id="getPlatformBuildList" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
||||
select
|
||||
shop_id as shopId,
|
||||
count(1) as totalColumn,
|
||||
sum(if(is_terminated = 1, 1, 0)) as completionColumn
|
||||
from xfsg_shop_stage_info where shop_stage = 3
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by shop_id
|
||||
</select>
|
||||
<select id="getPlatformBuildStage" resultType="com.cool.store.dto.PlatformBuildStageDTO">
|
||||
select shop_id as shopId,
|
||||
shop_sub_stage as shopSubStage,
|
||||
shop_sub_stage_status as shopSubStageStatus
|
||||
from xfsg_shop_stage_info
|
||||
where shop_stage = 3
|
||||
and shop_sub_stage_status != -100
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="investmentUserId!=null and investmentUserId!='' and authRegionIds.size()==0">
|
||||
and si.investment_manager = #{investmentUserId}
|
||||
</if>
|
||||
<if test="authRegionIds != null and authRegionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getSubStageList" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="shopIds !=null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopSubStage !=null">
|
||||
and shop_sub_stage =#{shopSubStage}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getShopIdListByStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where shop_sub_stage_status = #{shopSubStageStatus}
|
||||
</select>
|
||||
|
||||
<select id="getShopCountByLineIdAndStageStatus" resultType="integer">
|
||||
select count(1) from xfsg_shop_stage_info where shop_stage = #{shopStage} and shop_sub_stage = #{shopSubStage} and shop_sub_stage_status = #{shopSubStageStatus} and line_id = #{lineId}
|
||||
</select>
|
||||
<select id="getSubStageListBySubStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="subStageStatusA !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusA}
|
||||
</if>
|
||||
<if test="subStageStatusB !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusB}
|
||||
</if>
|
||||
<if test="subStageStatusC !=null">
|
||||
and shop_sub_stage_status = #{subStageStatusC}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getByShopIdAndSubStage" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
SELECT <include refid="allColumn"/>
|
||||
FROM xfsg_shop_stage_info
|
||||
WHERE shop_id = #{shopId}
|
||||
AND shop_sub_stage = #{shopSubStage}
|
||||
</select>
|
||||
<select id="getPlatformBuildList" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
||||
select
|
||||
shop_id as shopId,
|
||||
count(1) as totalColumn,
|
||||
sum(if(is_terminated = 1, 1, 0)) as completionColumn
|
||||
from xfsg_shop_stage_info where shop_stage = 3
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by shop_id
|
||||
</select>
|
||||
<select id="getPlatformBuildStage" resultType="com.cool.store.dto.PlatformBuildStageDTO">
|
||||
select shop_id as shopId,
|
||||
shop_sub_stage as shopSubStage,
|
||||
shop_sub_stage_status as shopSubStageStatus
|
||||
from xfsg_shop_stage_info
|
||||
where shop_stage = 3
|
||||
and shop_sub_stage_status != -100
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
<select id="getSubStages" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where is_terminated = 1
|
||||
<if test="shopIds !=null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopSubStage !=null">
|
||||
and shop_sub_stage =#{shopSubStage}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getOpenActivityActualCompletionTime" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info where shop_stage = 2 and shop_sub_stage = 140 and actual_complete_time is not null
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</select>
|
||||
<select id="getSubStages" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where is_terminated = 1
|
||||
<if test="shopIds !=null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopSubStage !=null">
|
||||
and shop_sub_stage =#{shopSubStage}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getOpenActivityActualCompletionTime" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select
|
||||
*
|
||||
from xfsg_shop_stage_info where shop_stage = 2 and shop_sub_stage = 140 and actual_complete_time is not null
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAllNumber" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from xfsg_shop_stage_info
|
||||
|
||||
Reference in New Issue
Block a user