fix
This commit is contained in:
@@ -16,7 +16,8 @@ public enum ShopSubStageStatusEnum {
|
||||
|
||||
//选址
|
||||
SHOP_SUB_STAGE_STATUS_10(ShopSubStageEnum.SHOP_STAGE_1, 100, "待选址", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_11(ShopSubStageEnum.SHOP_STAGE_1, 110, "已选址", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_11(ShopSubStageEnum.SHOP_STAGE_1, 110, "待审核", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_12(ShopSubStageEnum.SHOP_STAGE_1, 120, "已选址", Boolean.TRUE),
|
||||
|
||||
//上传租赁合同
|
||||
SHOP_SUB_STAGE_STATUS_20(ShopSubStageEnum.SHOP_STAGE_2, 200, "待上传", Boolean.FALSE),
|
||||
|
||||
@@ -113,6 +113,32 @@ public class ShopStageInfoDAO {
|
||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新店铺状态
|
||||
* @param shopId
|
||||
* @param subStageStatusList
|
||||
* @return
|
||||
*/
|
||||
public Integer batchUpdateShopStageStatus(Long shopId, List<ShopSubStageStatusEnum> subStageStatusList) {
|
||||
if(Objects.isNull(shopId) || CollectionUtils.isEmpty(subStageStatusList)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> shopStageList = Lists.newArrayList();
|
||||
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.batchUpdateShopStageStatus(shopId, shopStageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新子阶段到未开始状态
|
||||
* @param shopId
|
||||
|
||||
@@ -51,6 +51,14 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||
|
||||
/**
|
||||
* 批量更新阶段及审核信息
|
||||
* @param shopId
|
||||
* @param updateList
|
||||
* @return
|
||||
*/
|
||||
Integer batchUpdateShopStageStatus(@Param("shopId") Long shopId, @Param("updateList") List<ShopStageInfoDO> updateList);
|
||||
|
||||
/**
|
||||
* 更新阶段及审核信息
|
||||
* @param shopId
|
||||
|
||||
@@ -86,6 +86,21 @@
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
|
||||
<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"/>
|
||||
|
||||
@@ -349,7 +349,7 @@ public class PointServiceImpl implements PointService {
|
||||
//没有下一节点 审批通过
|
||||
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
|
||||
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
|
||||
shopStageInfoDAO.updateShopStageInfo(pointInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
|
||||
}
|
||||
}
|
||||
return pointInfoDAO.updatePointInfo(updatePoint);
|
||||
@@ -407,7 +407,8 @@ public class PointServiceImpl implements PointService {
|
||||
pointInfoUpdate.setId(pointId);
|
||||
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
|
||||
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
|
||||
shopStageInfoDAO.updateShopStageInfo(pointInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
|
||||
|
||||
}
|
||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||
}
|
||||
@@ -708,16 +709,20 @@ public class PointServiceImpl implements PointService {
|
||||
updateShop.setShopName(pointInfo.getPointName());
|
||||
updateShop.setPointId(pointId);
|
||||
shopInfoDAO.updateShopInfo(updateShop);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
|
||||
ShopSubStageStatusEnum selectStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11;
|
||||
PointDetailInfoDO updateDetail = new PointDetailInfoDO();
|
||||
updateDetail.setPointId(pointId);
|
||||
updateDetail.setLineSign(request.getLineSign());
|
||||
updateDetail.setLineSignTime(new Date());
|
||||
pointDetailInfoDAO.updatePointDetailInfo(updateDetail);
|
||||
List<ShopSubStageStatusEnum> updateStatusList = new ArrayList<>();
|
||||
//如果铺位是已审核 则进入上传租赁合同状态
|
||||
if(PointStatusEnum.POINT_STATUS_5.getCode().equals(pointInfo.getPointStatus())){
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
|
||||
selectStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12;
|
||||
updateStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
|
||||
}
|
||||
updateStatusList.add(selectStatus);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
||||
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId);
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
@@ -816,7 +821,6 @@ public class PointServiceImpl implements PointService {
|
||||
shopRentInfo.setId(rentContract.getId());
|
||||
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||
}
|
||||
|
||||
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
||||
}
|
||||
|
||||
@@ -857,8 +861,7 @@ public class PointServiceImpl implements PointService {
|
||||
updatePoint.setId(shopInfo.getPointId());
|
||||
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_6.getCode());
|
||||
pointInfoDAO.updatePointInfo(updatePoint);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Lists.newArrayList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40));
|
||||
ShopInfoDO updateShop = new ShopInfoDO();
|
||||
updateShop.setId(shopId);
|
||||
updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage());
|
||||
|
||||
Reference in New Issue
Block a user