Merge #33 into master from cc_20260106_point_update

铺位管理 地图

* cc_20260106_point_update: (15 commits squashed)

  - feat:铺位改造

  - Merge branch 'refs/heads/master' into cc_20260106_point_update

  - feat:铺位调整

  - feat:新增字段

  - feat:新增字段

  - feat:新增字段

  - feat:点位ID 处理校验规则

  - feat:保存铺位 返回点位ID

  - feat:根据主数据门店编码获取CRM点位数据

  - feat:铺位

  - feat:我的铺位 根据管辖

  - fix:bug 查询

  - fix:PC端点位新增直接关联铺位 bug

  - feat:过滤已开店的铺位

  - Merge branch 'master' into cc_20260106_point_update

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/33
This commit is contained in:
正新
2026-01-23 06:48:32 +00:00
parent 44ba00dc38
commit 1b1684f373
33 changed files with 2686 additions and 80 deletions

View File

@@ -0,0 +1,37 @@
package com.cool.store.dto.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Auther zx_szh
* @Date 2026/1/8 15:00
* @Version 1.0
*/
@Data
public class PointStatisticsDTO {
@ApiModelProperty("已签约数量")
private Integer contractedCount;
@ApiModelProperty("已审核数量")
private Integer approvedCount;
@ApiModelProperty("已失效数量")
private Integer invalidCount;
private Integer totalCount;
public PointStatisticsDTO() {
this.contractedCount = 0;
this.approvedCount = 0;
this.invalidCount = 0;
this.totalCount = 0;
}
public Integer getTotalCount() {
return totalCount = contractedCount + approvedCount + invalidCount;
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.entity;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.Date;
@@ -172,4 +173,7 @@ public class PointInfoDO {
@Column(name = "point_location")
private String pointLocation;
@Column(name = "protection_distance")
private Integer protectionDistance;
}

View File

@@ -252,6 +252,9 @@ public class AddPointDetailRequest {
@NotBlank(message = "铺位经纬度geohash不能为空")
private String location;
@ApiModelProperty("保护距离")
private Integer protectionDistance;
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
PointDetailInfoDO result = new PointDetailInfoDO();
result.setBusinessStatus(request.getBusinessStatus());
@@ -319,6 +322,7 @@ public class AddPointDetailRequest {
result.setCity(request.getCity());
result.setDistrict(request.getDistrict());
result.setTownship(request.getTownship());
result.setProtectionDistance(request.getProtectionDistance());
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
if(Objects.nonNull(addressInfo)){

View File

@@ -0,0 +1,30 @@
package com.cool.store.request;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class PointMapRequest extends PageBasicInfo {
@ApiModelProperty("铺位名称或编号")
private String keyword;
@ApiModelProperty("选择区域")
private List<String> regionIds;
@ApiModelProperty(value = "招商专员")
private String developmentManager;
@ApiModelProperty("点位状态")
private Integer pointStatus;
@ApiModelProperty(value = "管辖区域", hidden = true)
private List<String> authRegionIds;
@ApiModelProperty("当前登录人")
private String currentUserId;
}

View File

@@ -35,7 +35,7 @@ public class PointPageRequest extends PageBasicInfo {
@ApiModelProperty("结束拓展时间 yyyy-MM-dd HH:mm:ss")
private String developmentEndTime;
@ApiModelProperty(value = "拓展专员", hidden = true)
@ApiModelProperty(value = "拓展专员")
private String developmentManager;
@Min(1)@Max(2)
@@ -57,14 +57,14 @@ public class PointPageRequest extends PageBasicInfo {
@ApiModelProperty("省市区编码,传最后一级")
private String areaCode;
@ApiModelProperty(value = "管辖区域",hidden = true)
private List<String> authRegionIds;
public List<Integer> getPointStatusList() {
List<Integer> pointStatusList = new ArrayList<>();
if (pointStatus != null) {
pointStatusList.add(pointStatus);
}
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
}
return pointStatusList;
}

View File

@@ -31,9 +31,6 @@ public class RecommendPointPageRequest extends PageBasicInfo {
if (pointStatus != null) {
pointStatusList.add(pointStatus);
}
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
}
return pointStatusList;
}

View File

@@ -13,7 +13,6 @@ import java.util.Objects;
@Data
public class UpdatePointDetailRequest extends AddPointDetailRequest {
@NotNull
@ApiModelProperty("点位id")
private Long pointId;
@@ -89,6 +88,7 @@ public class UpdatePointDetailRequest extends AddPointDetailRequest {
result.setCity(request.getCity());
result.setDistrict(request.getDistrict());
result.setTownship(request.getTownship());
result.setProtectionDistance(request.getProtectionDistance());
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
if(Objects.nonNull(addressInfo)){

View File

@@ -0,0 +1,271 @@
package com.cool.store.request.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Auther zx_szh
* @Date 2026/1/8 13:42
* @Version 1.0
*/
@Data
public class AddPointFinancialDataRequest {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 点位ID
*/
@ApiModelProperty("点位ID")
private Long pointId;
/**
* 设备费
*/
@ApiModelProperty("设备费")
private BigDecimal equipmentCost;
/**
* 装修费
*/
@ApiModelProperty("装修费")
private BigDecimal decorationCost;
/**
* 加盟费
*/
@ApiModelProperty("加盟费")
private BigDecimal franchiseFee;
/**
* 管理费
*/
@ApiModelProperty("管理费")
private BigDecimal managementFee;
/**
* 设计费
*/
@ApiModelProperty("设计费")
private BigDecimal designFee;
/**
* 首批进货成本
*/
@ApiModelProperty("首批进货成本")
private BigDecimal firstInventoryCost;
/**
* 押金
*/
@ApiModelProperty("押金")
private BigDecimal deposit;
/**
* 初始投资额
*/
@ApiModelProperty("初始投资额")
private BigDecimal initialInvestment;
/**
* 日均订单量
*/
@ApiModelProperty("日均订单量")
private Integer avgDailyOrders;
/**
* 日均单价
*/
@ApiModelProperty("日均单价")
private BigDecimal avgOrderPrice;
/**
* 每年运营天数
*/
@ApiModelProperty("每年运营天数")
private Integer operatingDaysPerYear;
/**
* 每日销售额
*/
@ApiModelProperty("每日销售额")
private BigDecimal dailySales;
/**
* 全年GMV
*/
@ApiModelProperty("全年GMV")
private BigDecimal annualGmv;
/**
* 每月销售额
*/
@ApiModelProperty("每月销售额")
private BigDecimal monthlySales;
/**
* 门店产品毛利率(%)
*/
@ApiModelProperty("门店产品毛利率")
private BigDecimal grossMarginRate;
/**
* 正新货品年收入
*/
@ApiModelProperty("正新货品年收入")
private BigDecimal annualIncome;
/**
* 材料成本(元/年)
*/
@ApiModelProperty("材料成本")
private BigDecimal materialCostAnnual;
/**
* 材料成本(元/月)
*/
@ApiModelProperty("材料成本")
private BigDecimal materialCostMonthly;
/**
* 材料成本占收入%
*/
@ApiModelProperty("材料成本占收入")
private BigDecimal materialCostRate;
/**
* 人员数量
*/
@ApiModelProperty("人员数量")
private Integer staffCount;
/**
* 平均工资
*/
@ApiModelProperty("平均工资")
private BigDecimal avgSalary;
/**
* 员工成本(元/年)
*/
@ApiModelProperty("员工成本")
private BigDecimal staffCostAnnual;
/**
* 员工成本占收入%
*/
@ApiModelProperty("员工成本占收入")
private BigDecimal staffCostRate;
/**
* 租金成本(元/年)
*/
@ApiModelProperty("租金成本")
private BigDecimal rentCostAnnual;
/**
* 租金成本占收入%
*/
@ApiModelProperty("租金成本占收入")
private BigDecimal rentCostRate;
/**
* 外卖占总营业额%
*/
@ApiModelProperty("外卖占总营业额")
private BigDecimal takeawayRate;
/**
* 外卖抽点比例(%)
*/
@ApiModelProperty("外卖抽点比例")
private BigDecimal platformCommissionRate;
/**
* 外卖抽点
*/
@ApiModelProperty("外卖抽点")
private BigDecimal platformCommission;
/**
* 水电开支
*/
@ApiModelProperty("水电开支")
private BigDecimal utilityCost;
/**
* 水电开支占收入%
*/
@ApiModelProperty("水电开支占收入")
private BigDecimal utilityCostRate;
/**
* 其他(含配送费用)
*/
@ApiModelProperty("其他")
private BigDecimal otherCost;
/**
* 其他占收入%
*/
@ApiModelProperty("其他占收入")
private BigDecimal otherCostRate;
/**
* 门店经营利润
*/
@ApiModelProperty("门店经营利润")
private BigDecimal operatingProfit;
/**
* 门店经营利润率(%)
*/
@ApiModelProperty("门店经营利润率")
private BigDecimal operatingProfitRate;
/**
* 回报期 - 年
*/
@ApiModelProperty("回报期 - 年")
private BigDecimal paybackPeriodYears;
/**
* 回报期 - 月
*/
@ApiModelProperty("回报期 - 月")
private BigDecimal paybackPeriodMonths;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty("更新时间")
private Date updateTime;
/**
* 创建人
*/
@ApiModelProperty("创建人")
private String createUserId;
/**
* 更新人
*/
@ApiModelProperty("更新人")
private String updateUserId;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.request.point;
import com.sun.xml.bind.v2.model.core.ID;
import io.swagger.annotations.ApiModelProperty;
/**
* @Auther zx_szh
* @Date 2026/1/8 13:43
* @Version 1.0
*/
public class UpdatePointFinancialDataRequest extends AddPointFinancialDataRequest{
@ApiModelProperty("ID")
private Long id;
}

View File

@@ -281,6 +281,9 @@ public class PointDetailVO {
@ApiModelProperty("铺位经纬度geohash")
private String location;
@ApiModelProperty("保护距离")
private Integer protectionDistance;
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
PointDetailVO result = new PointDetailVO();
result.setPointId(pointInfo.getId());
@@ -291,9 +294,6 @@ public class PointDetailVO {
result.setLatitude(pointInfo.getLatitude());
result.setAddress(pointInfo.getAddress());
result.setPointStatus(pointInfo.getPointStatus());
if (PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())) {
result.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
}
result.setDevelopmentTime(pointInfo.getDevelopmentTime());
result.setPointArea(pointInfo.getPointArea());
result.setRegionId(pointInfo.getRegionId());
@@ -370,6 +370,7 @@ public class PointDetailVO {
result.setCityCode(pointInfo.getCityCode());
result.setDistrictCode(pointInfo.getDistrictCode());
result.setLocation(pointInfo.getPointLocation());
result.setProtectionDistance(pointInfo.getProtectionDistance());
return result;
}

View File

@@ -0,0 +1,266 @@
package com.cool.store.vo.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Auther zx_szh
* @Date 2026/1/8 14:15
* @Version 1.0
*/
@Data
public class PointFinancialDataVO {
private Long id;
/**
* 点位ID
*/
@ApiModelProperty("点位ID")
private Long pointId;
/**
* 设备费
*/
@ApiModelProperty("设备费")
private BigDecimal equipmentCost;
/**
* 装修费
*/
@ApiModelProperty("装修费")
private BigDecimal decorationCost;
/**
* 加盟费
*/
@ApiModelProperty("加盟费")
private BigDecimal franchiseFee;
/**
* 管理费
*/
@ApiModelProperty("管理费")
private BigDecimal managementFee;
/**
* 设计费
*/
@ApiModelProperty("设计费")
private BigDecimal designFee;
/**
* 首批进货成本
*/
@ApiModelProperty("首批进货成本")
private BigDecimal firstInventoryCost;
/**
* 押金
*/
@ApiModelProperty("押金")
private BigDecimal deposit;
/**
* 初始投资额
*/
@ApiModelProperty("初始投资额")
private BigDecimal initialInvestment;
/**
* 日均订单量
*/
@ApiModelProperty("日均订单量")
private Integer avgDailyOrders;
/**
* 日均单价
*/
@ApiModelProperty("日均单价")
private BigDecimal avgOrderPrice;
/**
* 每年运营天数
*/
@ApiModelProperty("每年运营天数")
private Integer operatingDaysPerYear;
/**
* 每日销售额
*/
@ApiModelProperty("每日销售额")
private BigDecimal dailySales;
/**
* 全年GMV
*/
@ApiModelProperty("全年GMV")
private BigDecimal annualGmv;
/**
* 每月销售额
*/
@ApiModelProperty("每月销售额")
private BigDecimal monthlySales;
/**
* 门店产品毛利率(%)
*/
@ApiModelProperty("门店产品毛利率")
private BigDecimal grossMarginRate;
/**
* 正新货品年收入
*/
@ApiModelProperty("正新货品年收入")
private BigDecimal annualIncome;
/**
* 材料成本(元/年)
*/
@ApiModelProperty("材料成本")
private BigDecimal materialCostAnnual;
/**
* 材料成本(元/月)
*/
@ApiModelProperty("材料成本")
private BigDecimal materialCostMonthly;
/**
* 材料成本占收入%
*/
@ApiModelProperty("材料成本占收入")
private BigDecimal materialCostRate;
/**
* 人员数量
*/
@ApiModelProperty("人员数量")
private Integer staffCount;
/**
* 平均工资
*/
@ApiModelProperty("平均工资")
private BigDecimal avgSalary;
/**
* 员工成本(元/年)
*/
@ApiModelProperty("员工成本")
private BigDecimal staffCostAnnual;
/**
* 员工成本占收入%
*/
@ApiModelProperty("员工成本占收入")
private BigDecimal staffCostRate;
/**
* 租金成本(元/年)
*/
@ApiModelProperty("租金成本")
private BigDecimal rentCostAnnual;
/**
* 租金成本占收入%
*/
@ApiModelProperty("租金成本占收入")
private BigDecimal rentCostRate;
/**
* 外卖占总营业额%
*/
@ApiModelProperty("外卖占总营业额")
private BigDecimal takeawayRate;
/**
* 外卖抽点比例(%)
*/
@ApiModelProperty("外卖抽点比例")
private BigDecimal platformCommissionRate;
/**
* 外卖抽点
*/
@ApiModelProperty("外卖抽点")
private BigDecimal platformCommission;
/**
* 水电开支
*/
@ApiModelProperty("水电开支")
private BigDecimal utilityCost;
/**
* 水电开支占收入%
*/
@ApiModelProperty("水电开支占收入")
private BigDecimal utilityCostRate;
/**
* 其他(含配送费用)
*/
@ApiModelProperty("其他")
private BigDecimal otherCost;
/**
* 其他占收入%
*/
@ApiModelProperty("其他占收入")
private BigDecimal otherCostRate;
/**
* 门店经营利润
*/
@ApiModelProperty("门店经营利润")
private BigDecimal operatingProfit;
/**
* 门店经营利润率(%)
*/
@ApiModelProperty("门店经营利润率")
private BigDecimal operatingProfitRate;
/**
* 回报期 - 年
*/
@ApiModelProperty("回报期 - 年")
private BigDecimal paybackPeriodYears;
/**
* 回报期 - 月
*/
@ApiModelProperty("回报期 - 月")
private BigDecimal paybackPeriodMonths;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty("更新时间")
private Date updateTime;
/**
* 创建人
*/
@ApiModelProperty("创建人")
private String createUserId;
/**
* 更新人
*/
@ApiModelProperty("更新人")
private String updateUserId;
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.vo.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Auther zx_szh
* @Date 2026/1/15 16:43
* @Version 1.0
*/
@Data
public class PointMapVO {
@ApiModelProperty("点位ID")
private Long pointId;
@ApiModelProperty("点位名称")
private String pointName;
@ApiModelProperty("经度")
private String longitude;
@ApiModelProperty("维度")
private String latitude;
@ApiModelProperty("点位状态")
private Integer pointStatus;
}

View File

@@ -40,6 +40,8 @@ public class PointPageVO {
@ApiModelProperty("铺位面积")
private String pointArea;
private String developmentManager;
@ApiModelProperty("拓展专员")
private String developmentManagerUsername;
@@ -80,11 +82,9 @@ public class PointPageVO {
pointPageVO.setRegionId(pointInfo.getRegionId());
pointPageVO.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
pointPageVO.setPointStatus(pointInfo.getPointStatus());
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
pointPageVO.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
}
pointPageVO.setPointScore(pointInfo.getPointScore());
pointPageVO.setPointArea(pointInfo.getPointArea());
pointPageVO.setDevelopmentManager(pointInfo.getDevelopmentManager());
pointPageVO.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
pointPageVO.setDevelopmentTime(pointInfo.getDevelopmentTime());
pointPageVO.setSelectStatus(pointInfo.getSelectStatus());

View File

@@ -78,9 +78,6 @@ public class PointRecommendPageVO {
recommend.setRegionId(pointInfo.getRegionId());
recommend.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
recommend.setPointStatus(pointInfo.getPointStatus());
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
recommend.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
}
recommend.setPointScore(pointInfo.getPointScore());
recommend.setPointArea(pointInfo.getPointArea());
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));