Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
guohb
2024-04-23 16:21:27 +08:00
8 changed files with 121 additions and 27 deletions

View File

@@ -10,11 +10,11 @@ public enum WorkflowSubStageEnum{
/** /**
* 流程子阶段枚举 * 流程子阶段枚举
*/ */
INTEND(1, "加盟意向申请", WorkflowSubStageStatusEnum.INTENT_0,"joinIntentionServiceImpl",1), INTEND(1, "加盟意向申请", WorkflowSubStageStatusEnum.INTENT_0,"joinIntentionServiceImpl",0),
INVITING_INTERVIEWS(5, "邀约面谈", WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10, "lineInterviewServiceImpl",2), INVITING_INTERVIEWS(5, "邀约面谈", WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10, "lineInterviewServiceImpl",2),
FIRST_INTERVIEWS(10, "一审面试", WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_25, "lineInterviewServiceImpl",4), FIRST_INTERVIEWS(10, "一审面试", WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_25, "lineInterviewServiceImpl",4),
PAY_DEPOSIT(15, "缴纳意向金", WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, "bankServiceImpl",5), PAY_DEPOSIT(15, "缴纳意向金", WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, "bankServiceImpl",4),
SIGN_INTENT_AGREEMENT(20, "签署意向协议", WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, "intentAgreementServiceImpl",7), SIGN_INTENT_AGREEMENT(20, "签署意向协议", WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, "intentAgreementServiceImpl",6),
STORE_EXPERIENCE(25, "门店体验", WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, "trainingExperienceServiceImpl",9), STORE_EXPERIENCE(25, "门店体验", WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, "trainingExperienceServiceImpl",9),
SECOND_INTERVIEWS(30, "二审面试", WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, "lineInterviewServiceImpl",10); SECOND_INTERVIEWS(30, "二审面试", WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, "lineInterviewServiceImpl",10);

View File

@@ -12,21 +12,21 @@ import java.util.List;
*/ */
public enum ShopSubStageEnum { public enum ShopSubStageEnum {
SHOP_STAGE_1(ShopStageEnum.SHOP_STAGE_1, 10, "选址", 3), SHOP_STAGE_1(ShopStageEnum.SHOP_STAGE_1, 10, "选址", 12),
SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同", 2), SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同", 14),
SHOP_STAGE_3(ShopStageEnum.SHOP_STAGE_2, 30, "系统建店", 2), SHOP_STAGE_3(ShopStageEnum.SHOP_STAGE_2, 30, "系统建店", 19),
SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理", 2), SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理", 24),
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 2), SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 23),
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训", 2), SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训", 30),
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 2), SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 2), SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 2), SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 24),
SHOP_STAGE_10(ShopStageEnum.SHOP_STAGE_2, 100, "装修款", 2), SHOP_STAGE_10(ShopStageEnum.SHOP_STAGE_2, 100, "装修款", 25),
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 2), SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 29),
SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "三方验收", 2), SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "三方验收", 26),
SHOP_STAGE_13(ShopStageEnum.SHOP_STAGE_2, 130, "视觉验收", 2), SHOP_STAGE_13(ShopStageEnum.SHOP_STAGE_2, 130, "视觉验收", 26),
SHOP_STAGE_14(ShopStageEnum.SHOP_STAGE_2, 140, "开业运营方案", 2), SHOP_STAGE_14(ShopStageEnum.SHOP_STAGE_2, 140, "开业运营方案", 23),
SHOP_STAGE_15(ShopStageEnum.SHOP_STAGE_2, 150, "首批订货清单", 2), SHOP_STAGE_15(ShopStageEnum.SHOP_STAGE_2, 150, "首批订货清单", 20),
; ;
//阶段 //阶段

View File

@@ -0,0 +1,93 @@
package com.cool.store.utils;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* @author zhangchenbiao
* @FileName: GeoMapUtil
* @Description:
* @date 2024-04-23 11:26
*/
public class GeoMapUtil {
private static final String AMAP_API_URL = "https://restapi.amap.com/v3/geocode/regeo";
private static final String API_KEY = "bdf789122b56e8fd3d4a4410800382a6"; // 替换为你的高德地图API密钥
public static void main(String[] args) {
AddressInfo addressInfo = reverseGeoCoding("30.41875", "120.2985");
System.out.println(JSONObject.toJSONString(addressInfo));
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.41", "120.29")));
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.42", "120.30")));
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.4", "120.2")));
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.5", "120.3")));
System.out.println(JSONObject.toJSONString(reverseGeoCoding("30.419", "120.299")));
}
public static AddressInfo reverseGeoCoding(String latitude, String longitude) {
BufferedReader in = null;
try {
URL url = new URL(AMAP_API_URL + "?location=" + longitude + "," + latitude + "&output=json&key=" + API_KEY);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.connect();
if(connection.getResponseCode() == HttpURLConnection.HTTP_OK){
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
JSONObject jsonObject = JSONObject.parseObject(content.toString());
// 提取并构建AddressInfo对象
AddressInfo addressInfo = extractAddressInfo(jsonObject.getJSONObject("regeocode"));
return addressInfo;
}
} catch (IOException e) {
System.out.println("Error occurred while making the request: " + e.getMessage());
}finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return null;
}
private static AddressInfo extractAddressInfo(JSONObject geoJson) {
JSONObject addressComponent = geoJson.getJSONObject("addressComponent");
// 根据实际响应结构解析省市区街道信息,此处仅为示例
String province = (String) addressComponent.get("province");
String city = (String) addressComponent.get("city");
String district = (String) addressComponent.get("district");
String township = (String) addressComponent.get("township");
String address = geoJson.getString("formatted_address");
return new AddressInfo(province, city, district, township, address);
}
@Data
public static class AddressInfo {
private String province;
private String city;
private String district;
private String township;
private String address;
public AddressInfo(String province, String city, String district, String township, String address) {
this.province = province;
this.city = city;
this.district = district;
this.township = township;
this.address = address;
}
}
}

View File

@@ -574,9 +574,6 @@ public class PointDetailInfoDO {
if(Objects.isNull(this.dayTrader) || Objects.isNull(this.profitRate) || Objects.isNull(this.monthProfitRate)){ if(Objects.isNull(this.dayTrader) || Objects.isNull(this.profitRate) || Objects.isNull(this.monthProfitRate)){
return false; return false;
} }
if(Objects.isNull(this.deliveryRate) || Objects.isNull(this.deliveryFee)){
return false;
}
if(Objects.isNull(this.brandUseFee) || Objects.isNull(this.brandUseRate)){ if(Objects.isNull(this.brandUseFee) || Objects.isNull(this.brandUseRate)){
return false; return false;
} }

View File

@@ -37,7 +37,7 @@ public interface PointService {
* @param shopPointDetailRequest * @param shopPointDetailRequest
* @return * @return
*/ */
Integer updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest); Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest);
/** /**
* 生成铺位评估报告 * 生成铺位评估报告

View File

@@ -314,7 +314,7 @@ public class LineServiceImpl implements LineService {
return null; return null;
} }
//总天数 //总天数
Integer totalDays = 20; Integer totalDays = 10;
IntendProcessTotalVO intendProcessTotalVO = new IntendProcessTotalVO(); IntendProcessTotalVO intendProcessTotalVO = new IntendProcessTotalVO();
intendProcessTotalVO.setTotalDays(totalDays); intendProcessTotalVO.setTotalDays(totalDays);
intendProcessTotalVO.setCompletionTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(memberQuestionDO.getCreateTime(),totalDays))); intendProcessTotalVO.setCompletionTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(memberQuestionDO.getCreateTime(),totalDays)));
@@ -365,7 +365,7 @@ public class LineServiceImpl implements LineService {
for (WorkflowSubStageEnum workflowSubStageEnum : WorkflowSubStageEnum.values()) { for (WorkflowSubStageEnum workflowSubStageEnum : WorkflowSubStageEnum.values()) {
IntendProcessVO intend = getIntend(memberQuestionDO.getCreateTime(), workflowSubStageEnum); IntendProcessVO intend = getIntend(memberQuestionDO.getCreateTime(), workflowSubStageEnum);
if (map.get(workflowSubStageEnum.getCode())!=null){ if (map.get(workflowSubStageEnum.getCode())!=null){
intend.setActualTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(map.get(workflowSubStageEnum.getCode()),workflowSubStageEnum.getProgress()))); intend.setActualTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,map.get(workflowSubStageEnum.getCode())));
} }
list.add(intend); list.add(intend);
} }

View File

@@ -123,12 +123,13 @@ public class PointServiceImpl implements PointService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Integer updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest) { public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest) {
PointInfoDO shopPointInfo = UpdatePointDetailRequest.convertPointDO(shopPointDetailRequest); PointInfoDO shopPointInfo = UpdatePointDetailRequest.convertPointDO(shopPointDetailRequest);
PointDetailInfoDO shopPoint = UpdatePointDetailRequest.convertDO(shopPointDetailRequest); PointDetailInfoDO shopPoint = UpdatePointDetailRequest.convertDO(shopPointDetailRequest);
shopPointInfo.setPointScore(shopPoint.getTotalPointScore()); shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
pointInfoDAO.updatePointInfo(shopPointInfo); pointInfoDAO.updatePointInfo(shopPointInfo);
return pointDetailInfoDAO.updatePointDetailInfo(shopPoint); pointDetailInfoDAO.updatePointDetailInfo(shopPoint);
return shopPointDetailRequest.getPointId();
} }
@Override @Override
@@ -476,6 +477,9 @@ public class PointServiceImpl implements PointService {
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds())); request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
} }
} }
if(Objects.nonNull(request.getPointStatus()) && PointStatusEnum.POINT_STATUS_3.getCode().equals(request.getPointStatus())){
request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
}
List<PointPageVO> resultList = new ArrayList(); List<PointPageVO> resultList = new ArrayList();
Page<PointInfoDO> pointPage = pointInfoDAO.getTeamPointPage(request); Page<PointInfoDO> pointPage = pointInfoDAO.getTeamPointPage(request);
if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){ if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){

View File

@@ -46,7 +46,7 @@ public class PointController {
@ApiOperation("完善铺位") @ApiOperation("完善铺位")
@PostMapping("/update") @PostMapping("/update")
public ResponseResult<Integer> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) { public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest)); return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest));
} }