该店铺已完成试运营
This commit is contained in:
@@ -35,4 +35,8 @@ public class OpenAcceptanceInfoDAO {
|
|||||||
public int updateByPrimaryKeySelective(OpenAcceptanceInfoDO acceptanceInfoDO) {
|
public int updateByPrimaryKeySelective(OpenAcceptanceInfoDO acceptanceInfoDO) {
|
||||||
return openAcceptanceInfoMapper.updateByPrimaryKeySelective(acceptanceInfoDO);
|
return openAcceptanceInfoMapper.updateByPrimaryKeySelective(acceptanceInfoDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int shopOpenAcceptanceStatusUpdate(){
|
||||||
|
return openAcceptanceInfoMapper.shopOpenAcceptanceStatusUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ public interface OpenAcceptanceInfoMapper extends Mapper<OpenAcceptanceInfoDO> {
|
|||||||
|
|
||||||
|
|
||||||
List<OpenAcceptanceInfoListVO> openAcceptanceList(@Param("openAcceptance") OpenAcceptanceRequest openAcceptanceRequest);
|
List<OpenAcceptanceInfoListVO> openAcceptanceList(@Param("openAcceptance") OpenAcceptanceRequest openAcceptanceRequest);
|
||||||
|
|
||||||
|
int shopOpenAcceptanceStatusUpdate();
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,22 @@
|
|||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<update id="shopOpenAcceptanceStatusUpdate">
|
||||||
|
UPDATE xfsg_shop_stage_info s
|
||||||
|
SET shop_sub_stage_status = 1710
|
||||||
|
WHERE
|
||||||
|
shop_sub_stage_status = 1700
|
||||||
|
AND shop_id IN (
|
||||||
|
SELECT
|
||||||
|
shop_id
|
||||||
|
FROM
|
||||||
|
xfsg_open_acceptance_info
|
||||||
|
WHERE
|
||||||
|
acceptance_status = 1
|
||||||
|
AND plan_open_time BETWEEN DATE_SUB( NOW( ), INTERVAL 7 DAY )
|
||||||
|
AND DATE_SUB( NOW( ), INTERVAL 3 DAY )
|
||||||
|
)
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="openAcceptanceList" resultType="com.cool.store.vo.OpenAcceptanceInfoListVO">
|
<select id="openAcceptanceList" resultType="com.cool.store.vo.OpenAcceptanceInfoListVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.cool.store.dao.NewStoreOpeningDAO;
|
import com.cool.store.dao.NewStoreOpeningDAO;
|
||||||
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.entity.NewStoreOpeningDO;
|
import com.cool.store.entity.NewStoreOpeningDO;
|
||||||
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.NewStoreOpeningRequest;
|
import com.cool.store.request.NewStoreOpeningRequest;
|
||||||
import com.cool.store.service.NewStoreOpeningService;
|
import com.cool.store.service.NewStoreOpeningService;
|
||||||
import com.cool.store.vo.NewStoreOpeningVO;
|
import com.cool.store.vo.NewStoreOpeningVO;
|
||||||
@@ -22,6 +27,9 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
|||||||
@Resource
|
@Resource
|
||||||
private NewStoreOpeningDAO newStoreOpeningDAO;
|
private NewStoreOpeningDAO newStoreOpeningDAO;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<NewStoreOpeningVO> storeTodoList(Long shopId) {
|
public List<NewStoreOpeningVO> storeTodoList(Long shopId) {
|
||||||
List<NewStoreOpeningDO> storeOpeningDOList = newStoreOpeningDAO.storeTodoList(shopId);
|
List<NewStoreOpeningDO> storeOpeningDOList = newStoreOpeningDAO.storeTodoList(shopId);
|
||||||
@@ -41,6 +49,13 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest) {
|
public void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest) {
|
||||||
|
// 判断是否可以添加
|
||||||
|
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(newStoreOpeningRequest.getShopId(), ShopSubStageEnum.SHOP_STAGE_17);
|
||||||
|
|
||||||
|
if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException("该店铺已经完成试运营,不能再添加待办事项");
|
||||||
|
}
|
||||||
|
|
||||||
NewStoreOpeningDO newStoreOpeningDO = new NewStoreOpeningDO();
|
NewStoreOpeningDO newStoreOpeningDO = new NewStoreOpeningDO();
|
||||||
newStoreOpeningDO.setShopId(newStoreOpeningRequest.getShopId());
|
newStoreOpeningDO.setShopId(newStoreOpeningRequest.getShopId());
|
||||||
newStoreOpeningDO.setTodoItem(newStoreOpeningRequest.getTodoItem());
|
newStoreOpeningDO.setTodoItem(newStoreOpeningRequest.getTodoItem());
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.cool.store.entity.ShopStageInfoDO;
|
|||||||
import com.cool.store.enums.point.ShopStageEnum;
|
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.ShopSubStageFieldEnum;
|
import com.cool.store.enums.point.ShopSubStageFieldEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.OpenAcceptanceRequest;
|
import com.cool.store.request.OpenAcceptanceRequest;
|
||||||
import com.cool.store.request.ShopAcceptanceRequest;
|
import com.cool.store.request.ShopAcceptanceRequest;
|
||||||
@@ -143,6 +144,10 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
|||||||
shopInfoDO.setId(shopAcceptanceRequest.getShopId());
|
shopInfoDO.setId(shopAcceptanceRequest.getShopId());
|
||||||
shopInfoDO.setPlanOpenTime(shopAcceptanceRequest.getPlanOpenTime());
|
shopInfoDO.setPlanOpenTime(shopAcceptanceRequest.getPlanOpenTime());
|
||||||
shopInfoDAO.updateShopInfo(shopInfoDO);
|
shopInfoDAO.updateShopInfo(shopInfoDO);
|
||||||
|
//开业验收完成
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_161);
|
||||||
|
//新店开业试运营
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ public class XxlJobHandler {
|
|||||||
private EnterpriseUserDAO enterpriseUserDAO;
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private UserAuthMappingService userAuthMappingService;
|
private UserAuthMappingService userAuthMappingService;
|
||||||
|
@Resource
|
||||||
|
private OpenAcceptanceInfoDAO openAcceptanceInfoDAO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每天都将待体验门店信息变更到体验中
|
* 每天都将待体验门店信息变更到体验中
|
||||||
@@ -416,7 +418,6 @@ public class XxlJobHandler {
|
|||||||
StaffExamInfoDTO staffExamInfoDTO = xfsgEhrService.getUserExamInfo(enterpriseUserDO.getJobnumber());
|
StaffExamInfoDTO staffExamInfoDTO = xfsgEhrService.getUserExamInfo(enterpriseUserDO.getJobnumber());
|
||||||
if (staffExamInfoDTO != null && StringUtils.isNotBlank(staffExamInfoDTO.getExamResult())
|
if (staffExamInfoDTO != null && StringUtils.isNotBlank(staffExamInfoDTO.getExamResult())
|
||||||
&& StringUtils.isNotBlank(staffExamInfoDTO.getExamScore())) {
|
&& StringUtils.isNotBlank(staffExamInfoDTO.getExamScore())) {
|
||||||
|
|
||||||
employeeTrainingDO.setTheoreticalExamScore(StringUtils.isNotBlank(staffExamInfoDTO.getExamScore()) ? Integer.valueOf(staffExamInfoDTO.getExamScore()) : null);
|
employeeTrainingDO.setTheoreticalExamScore(StringUtils.isNotBlank(staffExamInfoDTO.getExamScore()) ? Integer.valueOf(staffExamInfoDTO.getExamScore()) : null);
|
||||||
employeeTrainingDO.setTheoreticalExamStatus(ExamStatusEnum.matchCodeByDesc(staffExamInfoDTO.getExamResult()));
|
employeeTrainingDO.setTheoreticalExamStatus(ExamStatusEnum.matchCodeByDesc(staffExamInfoDTO.getExamResult()));
|
||||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||||
@@ -426,4 +427,15 @@ public class XxlJobHandler {
|
|||||||
XxlJobHelper.handleSuccess();
|
XxlJobHelper.handleSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺新店开业状态更新
|
||||||
|
*/
|
||||||
|
@XxlJob("shopOpenAcceptanceStatusUpdate")
|
||||||
|
public void shopOpenAcceptanceStatusUpdate() {
|
||||||
|
log.info("------店铺新店开业状态更新------");
|
||||||
|
int num = openAcceptanceInfoDAO.shopOpenAcceptanceStatusUpdate();
|
||||||
|
log.info("------店铺新店开业状态更新完成num:{}------", num);
|
||||||
|
XxlJobHelper.handleSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user