实训时间

This commit is contained in:
苏竹红
2024-05-25 18:09:29 +08:00
parent 0ea385ed33
commit 95d3c2230d
7 changed files with 59 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import com.cool.store.enums.point.ShopStageEnum;
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.ShopStageInfoMapper; import com.cool.store.mapper.ShopStageInfoMapper;
import com.cool.store.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.shop.RentInfoToDoVO; import com.cool.store.vo.shop.RentInfoToDoVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@@ -88,6 +89,13 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage); return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
} }
public PreparationProcessVO getPreparationProcess(Long shopId) {
if(Objects.isNull(shopId)){
return null;
}
return shopStageInfoMapper.getPreparationProcess(shopId);
}
public Integer getAllCompletionCount(Long shopId) { public Integer getAllCompletionCount(Long shopId) {
if(Objects.isNull(shopId)){ if(Objects.isNull(shopId)){
return 0; return 0;

View File

@@ -4,6 +4,7 @@ import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.entity.ShopStageInfoDO; import com.cool.store.entity.ShopStageInfoDO;
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.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.shop.RentInfoToDoVO; import com.cool.store.vo.shop.RentInfoToDoVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -35,6 +36,8 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
*/ */
List<ShopStageInfoDO> getShopStageInfo(@Param("shopId") Long shopId, @Param("shopStage") Integer shopStage); List<ShopStageInfoDO> getShopStageInfo(@Param("shopId") Long shopId, @Param("shopStage") Integer shopStage);
PreparationProcessVO getPreparationProcess(@Param("shopId") Long shopId);
/** /**
* 查询结束阶段的数量 * 查询结束阶段的数量
* @param shopId * @param shopId

View File

@@ -58,6 +58,13 @@
</if> </if>
</select> </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 id="getAllCompletionCount" resultType="java.lang.Integer">
select select
count(1) count(1)

View File

@@ -0,0 +1,21 @@
package com.cool.store.vo.Preparation;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2024/5/25 17:51
* @Version 1.0
*/
@Data
public class PreparationProcessVO {
private Date planStartTime;
private Integer totalCount;
private Integer finishCount;
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.request.PreparationRequest; import com.cool.store.request.PreparationRequest;
import com.cool.store.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO; import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
import com.cool.store.vo.Preparation.PreparationScheduleVO; import com.cool.store.vo.Preparation.PreparationScheduleVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -30,6 +31,8 @@ public interface PreparationService {
*/ */
PreparationScheduleDetailVO getPreparationDetail(Long shopId); PreparationScheduleDetailVO getPreparationDetail(Long shopId);
PreparationProcessVO getPreparationProcess(Long shopId);
/** /**
* 校验建店与加盟签约合同是否完成 并初始化后续流程数据 * 校验建店与加盟签约合同是否完成 并初始化后续流程数据
* @param shopId * @param shopId

View File

@@ -20,6 +20,7 @@ import com.cool.store.service.*;
import com.cool.store.utils.poi.DateUtils; import com.cool.store.utils.poi.DateUtils;
import com.cool.store.utils.poi.StringUtils; import com.cool.store.utils.poi.StringUtils;
import com.cool.store.utils.poi.constant.Constants; import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO; import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
import com.cool.store.vo.Preparation.PreparationScheduleVO; import com.cool.store.vo.Preparation.PreparationScheduleVO;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@@ -175,6 +176,16 @@ public class PreparationServiceImpl implements PreparationService {
return preparationScheduleDetailVO; return preparationScheduleDetailVO;
} }
@Override
public PreparationProcessVO getPreparationProcess(Long shopId) {
PreparationProcessVO preparationProcess = shopStageInfoDAO.getPreparationProcess(shopId);
if (preparationProcess == null){
return null;
}
preparationProcess.setTotalCount(14);
return preparationProcess;
}
@Override @Override
public void contractAndBuildStoreCompletion(Long shopId) { public void contractAndBuildStoreCompletion(Long shopId) {
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null); List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);

View File

@@ -6,6 +6,7 @@ import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.service.PreparationService; import com.cool.store.service.PreparationService;
import com.cool.store.service.impl.PreparationServiceImpl; import com.cool.store.service.impl.PreparationServiceImpl;
import com.cool.store.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO; import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
import com.cool.store.vo.Preparation.PreparationScheduleVO; import com.cool.store.vo.Preparation.PreparationScheduleVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -46,5 +47,10 @@ public class PreparationController {
} }
@ApiOperation("筹建进展")
@GetMapping("/getPreparationProcess")
public ResponseResult<PreparationProcessVO> getPreparationProcess(@RequestParam("shopId")Long shopId) {
return ResponseResult.success(preparationService.getPreparationProcess(shopId));
}
} }