选址
This commit is contained in:
@@ -62,7 +62,6 @@ public enum FlowRateCalculateEnum {
|
||||
* @return
|
||||
*/
|
||||
public static FlowRateCalculateEnum getByFlowRate(Integer nineFlowRate, Integer tenFlowRate, Integer eighteenFlowRate, Integer nineteenFlowRate){
|
||||
System.out.println("@@@@@@@@@@");
|
||||
Integer flowRate = 0, count = 0;
|
||||
if(Objects.nonNull(nineFlowRate)){
|
||||
flowRate += nineFlowRate;
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<select id="getRecommendPointList" resultMap="BaseResultMap">
|
||||
select
|
||||
id,
|
||||
point_id as pointId,
|
||||
line_id as lineId,
|
||||
development_manager as developmentManager,
|
||||
point_id,
|
||||
line_id,
|
||||
development_manager,
|
||||
status,
|
||||
reason
|
||||
from
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
select
|
||||
<include refid="allColumn"/>
|
||||
from
|
||||
where shop_id = #{shopId} and deleted = 0
|
||||
xfsg_shop_rent_info
|
||||
where shop_id = #{shopId} and deleted = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -521,10 +521,6 @@ public class PointDetailInfoDO {
|
||||
return getMarketSizeScore() + getShopAreaScore() + getConvenientScore() + getEnvironmentScore();
|
||||
}
|
||||
|
||||
public Integer getFlowRateCalculate() {
|
||||
return FlowRateCalculateEnum.getByFlowRate(this.nineFlowRate, this.tenFlowRate, this.eighteenFlowRate, this.nineteenFlowRate).getCode();
|
||||
}
|
||||
|
||||
public boolean isCanSubmitEvaluable(){
|
||||
if(Objects.isNull(this.businessStatus)){
|
||||
return false;
|
||||
|
||||
@@ -209,6 +209,9 @@ public class AddPointDetailRequest {
|
||||
@ApiModelProperty("图片对象")
|
||||
private String pictureObj;
|
||||
|
||||
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300~400人/时, 3.200~300人/时, 4.100~200人/时")
|
||||
private Integer flowRateCalculate;
|
||||
|
||||
|
||||
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
|
||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||
@@ -258,6 +261,7 @@ public class AddPointDetailRequest {
|
||||
result.setMonthRateReturn(request.getMonthRateReturn());
|
||||
result.setRentContract(request.getRentContract());
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
result.setFlowRateCalculate(request.getFlowRateCalculate());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ public class PointRecommendPageVO {
|
||||
@ApiModelProperty("选择状态1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
|
||||
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) {
|
||||
if(CollectionUtils.isEmpty(recommendList) || CollectionUtils.isEmpty(pointList)){
|
||||
@@ -79,6 +82,7 @@ public class PointRecommendPageVO {
|
||||
recommend.setPointArea(pointInfo.getPointArea());
|
||||
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||
recommend.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
||||
recommend.setAddress(pointInfo.getAddress());
|
||||
}
|
||||
resultList.add(recommend);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.vo.AuditInfoVO;
|
||||
import com.cool.store.vo.LineAuditInfoVO;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -43,7 +44,7 @@ public class ShopStageInfoVO {
|
||||
private String actualCompleteTime;
|
||||
|
||||
@ApiModelProperty("阶段审核信息")
|
||||
private LineAuditInfoVO auditInfo;
|
||||
private AuditInfoVO auditInfo;
|
||||
|
||||
public ShopStageInfoVO(Integer shopStage, Integer shopSubStage, Integer shopSubStageStatus, Boolean isTerminated) {
|
||||
this.shopStage = shopStage;
|
||||
@@ -62,7 +63,7 @@ public class ShopStageInfoVO {
|
||||
for (ShopStageInfoDO stageInfo : stageList) {
|
||||
ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated());
|
||||
LineAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
|
||||
LineAuditInfoVO auditInfoVO = LineAuditInfoVO.convertVO(auditInfo);
|
||||
AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo);
|
||||
shopStageInfo.setAuditInfo(auditInfoVO);
|
||||
shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime());
|
||||
shopStageInfo.setActualCompleteTime(stageInfo.getActualCompleteTime());
|
||||
|
||||
@@ -316,6 +316,9 @@ public class PointServiceImpl implements PointService {
|
||||
}else{
|
||||
//没有下一节点 审批通过
|
||||
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);
|
||||
}
|
||||
@@ -371,6 +374,9 @@ public class PointServiceImpl implements PointService {
|
||||
PointInfoDO pointInfoUpdate = new PointInfoDO();
|
||||
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_2);
|
||||
}
|
||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||
}
|
||||
|
||||
@@ -603,6 +609,10 @@ public class PointServiceImpl implements PointService {
|
||||
updateDetail.setLineSign(request.getLineSign());
|
||||
updateDetail.setLineSignTime(new Date());
|
||||
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);
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
@@ -715,6 +725,14 @@ public class PointServiceImpl implements PointService {
|
||||
}
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -41,4 +42,11 @@ public class PCShopController {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user