This commit is contained in:
zhangchenbiao
2024-04-16 17:39:07 +08:00
parent fca4c05bac
commit cf0b5927d7
9 changed files with 42 additions and 11 deletions

View File

@@ -62,7 +62,6 @@ public enum FlowRateCalculateEnum {
* @return * @return
*/ */
public static FlowRateCalculateEnum getByFlowRate(Integer nineFlowRate, Integer tenFlowRate, Integer eighteenFlowRate, Integer nineteenFlowRate){ public static FlowRateCalculateEnum getByFlowRate(Integer nineFlowRate, Integer tenFlowRate, Integer eighteenFlowRate, Integer nineteenFlowRate){
System.out.println("@@@@@@@@@@");
Integer flowRate = 0, count = 0; Integer flowRate = 0, count = 0;
if(Objects.nonNull(nineFlowRate)){ if(Objects.nonNull(nineFlowRate)){
flowRate += nineFlowRate; flowRate += nineFlowRate;

View File

@@ -41,9 +41,9 @@
<select id="getRecommendPointList" resultMap="BaseResultMap"> <select id="getRecommendPointList" resultMap="BaseResultMap">
select select
id, id,
point_id as pointId, point_id,
line_id as lineId, line_id,
development_manager as developmentManager, development_manager,
status, status,
reason reason
from from

View File

@@ -32,7 +32,8 @@
select select
<include refid="allColumn"/> <include refid="allColumn"/>
from from
where shop_id = #{shopId} and deleted = 0 xfsg_shop_rent_info
where shop_id = #{shopId} and deleted = 0
</select> </select>
</mapper> </mapper>

View File

@@ -521,10 +521,6 @@ public class PointDetailInfoDO {
return getMarketSizeScore() + getShopAreaScore() + getConvenientScore() + getEnvironmentScore(); return getMarketSizeScore() + getShopAreaScore() + getConvenientScore() + getEnvironmentScore();
} }
public Integer getFlowRateCalculate() {
return FlowRateCalculateEnum.getByFlowRate(this.nineFlowRate, this.tenFlowRate, this.eighteenFlowRate, this.nineteenFlowRate).getCode();
}
public boolean isCanSubmitEvaluable(){ public boolean isCanSubmitEvaluable(){
if(Objects.isNull(this.businessStatus)){ if(Objects.isNull(this.businessStatus)){
return false; return false;

View File

@@ -209,6 +209,9 @@ public class AddPointDetailRequest {
@ApiModelProperty("图片对象") @ApiModelProperty("图片对象")
private String pictureObj; private String pictureObj;
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300400人/时, 3.200300人/时, 4.100200人/时")
private Integer flowRateCalculate;
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) { public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
PointDetailInfoDO result = new PointDetailInfoDO(); PointDetailInfoDO result = new PointDetailInfoDO();
@@ -258,6 +261,7 @@ public class AddPointDetailRequest {
result.setMonthRateReturn(request.getMonthRateReturn()); result.setMonthRateReturn(request.getMonthRateReturn());
result.setRentContract(request.getRentContract()); result.setRentContract(request.getRentContract());
result.setPictureObj(request.getPictureObj()); result.setPictureObj(request.getPictureObj());
result.setFlowRateCalculate(request.getFlowRateCalculate());
return result; return result;
} }

View File

@@ -54,6 +54,9 @@ public class PointRecommendPageVO {
@ApiModelProperty("选择状态1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效") @ApiModelProperty("选择状态1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
private Integer recommendStatus; private Integer recommendStatus;
@ApiModelProperty("铺位地址")
private String address;
public static List<PointRecommendPageVO> convertVO(List<PointRecommendDO> recommendList, List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) { public static List<PointRecommendPageVO> convertVO(List<PointRecommendDO> recommendList, List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) {
if(CollectionUtils.isEmpty(recommendList) || CollectionUtils.isEmpty(pointList)){ if(CollectionUtils.isEmpty(recommendList) || CollectionUtils.isEmpty(pointList)){
@@ -79,6 +82,7 @@ public class PointRecommendPageVO {
recommend.setPointArea(pointInfo.getPointArea()); recommend.setPointArea(pointInfo.getPointArea());
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager())); recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
recommend.setDevelopmentTime(pointInfo.getDevelopmentTime()); recommend.setDevelopmentTime(pointInfo.getDevelopmentTime());
recommend.setAddress(pointInfo.getAddress());
} }
resultList.add(recommend); resultList.add(recommend);
} }

View File

@@ -2,6 +2,7 @@ package com.cool.store.vo.shop;
import com.cool.store.entity.LineAuditInfoDO; import com.cool.store.entity.LineAuditInfoDO;
import com.cool.store.entity.ShopStageInfoDO; import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.vo.AuditInfoVO;
import com.cool.store.vo.LineAuditInfoVO; import com.cool.store.vo.LineAuditInfoVO;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@@ -43,7 +44,7 @@ public class ShopStageInfoVO {
private String actualCompleteTime; private String actualCompleteTime;
@ApiModelProperty("阶段审核信息") @ApiModelProperty("阶段审核信息")
private LineAuditInfoVO auditInfo; private AuditInfoVO auditInfo;
public ShopStageInfoVO(Integer shopStage, Integer shopSubStage, Integer shopSubStageStatus, Boolean isTerminated) { public ShopStageInfoVO(Integer shopStage, Integer shopSubStage, Integer shopSubStageStatus, Boolean isTerminated) {
this.shopStage = shopStage; this.shopStage = shopStage;
@@ -62,7 +63,7 @@ public class ShopStageInfoVO {
for (ShopStageInfoDO stageInfo : stageList) { for (ShopStageInfoDO stageInfo : stageList) {
ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated()); ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated());
LineAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId()); LineAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
LineAuditInfoVO auditInfoVO = LineAuditInfoVO.convertVO(auditInfo); AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo);
shopStageInfo.setAuditInfo(auditInfoVO); shopStageInfo.setAuditInfo(auditInfoVO);
shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime()); shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime());
shopStageInfo.setActualCompleteTime(stageInfo.getActualCompleteTime()); shopStageInfo.setActualCompleteTime(stageInfo.getActualCompleteTime());

View File

@@ -316,6 +316,9 @@ public class PointServiceImpl implements PointService {
}else{ }else{
//没有下一节点 审批通过 //没有下一节点 审批通过
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode()); 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_2);
}
} }
return pointInfoDAO.updatePointInfo(updatePoint); return pointInfoDAO.updatePointInfo(updatePoint);
} }
@@ -371,6 +374,9 @@ public class PointServiceImpl implements PointService {
PointInfoDO pointInfoUpdate = new PointInfoDO(); PointInfoDO pointInfoUpdate = new PointInfoDO();
pointInfoUpdate.setId(pointId); pointInfoUpdate.setId(pointId);
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode()); 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_2);
}
return pointInfoDAO.updatePointInfo(pointInfoUpdate); return pointInfoDAO.updatePointInfo(pointInfoUpdate);
} }
@@ -603,6 +609,10 @@ public class PointServiceImpl implements PointService {
updateDetail.setLineSign(request.getLineSign()); updateDetail.setLineSign(request.getLineSign());
updateDetail.setLineSignTime(new Date()); updateDetail.setLineSignTime(new Date());
pointDetailInfoDAO.updatePointDetailInfo(updateDetail); pointDetailInfoDAO.updatePointDetailInfo(updateDetail);
//如果铺位是已审核 则进入上传租赁合同状态
if(PointStatusEnum.POINT_STATUS_5.getCode().equals(pointInfo.getPointStatus())){
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_2);
}
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId); return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId);
} catch (ServiceException e) { } catch (ServiceException e) {
throw e; throw e;
@@ -715,6 +725,14 @@ public class PointServiceImpl implements PointService {
} }
Long auditId = lineAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, shopInfo.getPartnerId(), shopInfo.getLineId())); Long auditId = lineAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, shopInfo.getPartnerId(), shopInfo.getLineId()));
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_5 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_4; ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_5 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_4;
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_5.equals(subStageStatus)){
//审核通过铺位变为已签约
PointInfoDO updatePoint = new PointInfoDO();
updatePoint.setId(shopInfo.getPointId());
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_6.getCode());
pointInfoDAO.updatePointInfo(updatePoint);
//系统筹建初始化 TODO
}
return shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId); return shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId);
} }

View File

@@ -4,6 +4,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.service.ShopService; import com.cool.store.service.ShopService;
import com.cool.store.vo.shop.MiniShopPageVO; import com.cool.store.vo.shop.MiniShopPageVO;
import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.StageShopCountVO; import com.cool.store.vo.shop.StageShopCountVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -41,4 +42,11 @@ public class PCShopController {
return ResponseResult.success(shopService.getStageShopCount(lineId)); return ResponseResult.success(shopService.getStageShopCount(lineId));
} }
@ApiOperation("获取店铺的阶段信息")
@GetMapping("/getShopStageInfo")
public ResponseResult<List<ShopStageInfoVO>> getShopStageInfo(@RequestParam("shopId")Long shopId, @RequestParam(value = "shopStage", required = false)Integer shopStage) {
Long lineId = PartnerUserHolder.getUser().getLineId();
return ResponseResult.success(shopService.getShopStageInfo(lineId, shopId, shopStage));
}
} }