Merge branch 'master' into cc20250207_optimize_v2.5
# Conflicts: # coolstore-partner-dao/src/main/java/com/cool/store/mapper/FranchiseFeeMapper.java
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/09/下午4:13
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ExportBranchShopDTO {
|
||||
|
||||
@ExcelProperty(value = "加盟商名称",order = 1)
|
||||
@ColumnWidth(30)
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty(value = "加盟商手机号",order = 2)
|
||||
@ColumnWidth(30)
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty(value = "门店名称",order = 3)
|
||||
@ColumnWidth(30)
|
||||
private String shopName;
|
||||
|
||||
@ExcelProperty(value = "门店编号",order = 4)
|
||||
@ColumnWidth(30)
|
||||
private String shopCode;
|
||||
|
||||
@ExcelProperty(value = "所属区域/分公司",order = 5)
|
||||
@ColumnWidth(30)
|
||||
private String regionName;
|
||||
|
||||
@ExcelProperty(value = "加盟模式",order = 6)
|
||||
@ColumnWidth(30)
|
||||
private String joinMode;
|
||||
|
||||
@ExcelProperty(value = "所属品牌",order = 6)
|
||||
@ColumnWidth(30)
|
||||
private String franchiseBrand;
|
||||
|
||||
@ExcelProperty(value = "督导",order = 7)
|
||||
@ColumnWidth(30)
|
||||
private String investmentManager;
|
||||
|
||||
@ExcelProperty(value = "合同编号",order = 8)
|
||||
@ColumnWidth(30)
|
||||
private String contractCode;
|
||||
|
||||
@ExcelProperty(value = "第一年加盟开始时间",order = 9)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearStartTime;
|
||||
|
||||
@ExcelProperty(value = "第一年加盟结束时间",order = 10)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearEndTime;
|
||||
|
||||
@ExcelProperty(value = "合同开始时间",order = 11)
|
||||
@ColumnWidth(30)
|
||||
private String contractStartTime;
|
||||
|
||||
@ExcelProperty(value = "合同结束时间",order = 12)
|
||||
@ColumnWidth(30)
|
||||
private String contractEndTime;
|
||||
|
||||
@ExcelProperty(value = "开票时间",order = 13)
|
||||
@ColumnWidth(30)
|
||||
private String invoicingTime;
|
||||
|
||||
@ExcelProperty(value = "币种",order = 14)
|
||||
@ColumnWidth(30)
|
||||
private String currency;
|
||||
|
||||
@ExcelProperty(value = "合计缴费金额(取自账单)",order = 15)
|
||||
@ColumnWidth(30)
|
||||
private String totalAmountContributions;
|
||||
|
||||
@ExcelProperty(value = "加盟费(取自账单)",order = 16)
|
||||
@ColumnWidth(30)
|
||||
private String franchiseFeeBill;
|
||||
|
||||
@ExcelProperty(value = "加盟费(含税金额)",order = 18)
|
||||
@ColumnWidth(30)
|
||||
private String franchiseFeeTax;
|
||||
|
||||
@ExcelProperty(value = "加盟费(不含税金额)",order = 19)
|
||||
@ColumnWidth(30)
|
||||
private String franchiseFee;
|
||||
|
||||
@ExcelProperty(value = "保证金(取自账单)",order = 20)
|
||||
@ColumnWidth(30)
|
||||
private String loanMargin;
|
||||
|
||||
@ExcelProperty(value = "第一年度管理费(取自账单)",order = 21)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearManagementFeeBill;
|
||||
|
||||
@ExcelProperty(value = "第一年度管理费(含税金额)",order = 22)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearManagementFeeTax;
|
||||
|
||||
@ExcelProperty(value = "第一年度管理费(不含税金额)",order = 23)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearManagementFee;
|
||||
|
||||
@ExcelProperty(value = "第一年度品牌费(取自账单)",order = 24)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearBrandingFeeBill;
|
||||
|
||||
@ExcelProperty(value = "第一年度品牌费(含税金额)",order = 25)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearBrandingFeeTax;
|
||||
|
||||
@ExcelProperty(value = "第一年度品牌费(不含税金额)",order = 26)
|
||||
@ColumnWidth(30)
|
||||
private String firstYearBrandingFee;
|
||||
|
||||
@ExcelProperty(value = "设计费(取自账单)",order = 27)
|
||||
@ColumnWidth(30)
|
||||
private String performanceBondBill;
|
||||
|
||||
@ExcelProperty(value = "设计费(含税金额)",order = 28)
|
||||
@ColumnWidth(30)
|
||||
private String designFeeTax;
|
||||
|
||||
@ExcelProperty(value = "设计费(不含税金额)",order = 29)
|
||||
@ColumnWidth(30)
|
||||
private String designFee;
|
||||
|
||||
@ExcelProperty(value = "第1次缴纳时间",order = 30)
|
||||
@ColumnWidth(30)
|
||||
private String firstPayTime;
|
||||
|
||||
@ExcelProperty(value = "第2次缴纳时间",order = 31)
|
||||
@ColumnWidth(30)
|
||||
private String secondPayTime;
|
||||
|
||||
@ExcelProperty(value = "第3次缴纳时间",order = 32)
|
||||
@ColumnWidth(30)
|
||||
private String thirdPayTime;
|
||||
|
||||
@ExcelProperty(value = "第4次缴纳时间",order = 33)
|
||||
@ColumnWidth(30)
|
||||
private String fourthPayTime;
|
||||
|
||||
@ExcelProperty(value = "当前进度",order = 34)
|
||||
@ColumnWidth(30)
|
||||
private String currentProgress;
|
||||
|
||||
@ExcelProperty(value = "状态",order = 35)
|
||||
@ColumnWidth(30)
|
||||
private String shopStatus;
|
||||
|
||||
@ExcelProperty(value = "计划开店时间",order = 36)
|
||||
@ColumnWidth(30)
|
||||
private String planOpenTime;
|
||||
|
||||
@ExcelProperty(value = "开店时长(天)",order =37)
|
||||
@ColumnWidth(30)
|
||||
private String openDuration;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/02/07/14:34
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class FranchiseFeeDTO {
|
||||
private Long shopId;
|
||||
|
||||
private Date payTime;
|
||||
|
||||
private String yearFranchiseFee;
|
||||
|
||||
private String loanMargin;
|
||||
|
||||
private Date firstYearStartTime;
|
||||
|
||||
private Date firstYearEndTime;
|
||||
|
||||
private String firstYearFee;
|
||||
|
||||
private String performanceBond;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dto.Preparation;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -14,6 +15,10 @@ public class PreparationDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long wantShopAreaId;
|
||||
|
||||
private Integer shopStatus;
|
||||
|
||||
private Long lineId;
|
||||
|
||||
private String shopName;
|
||||
@@ -37,4 +42,9 @@ public class PreparationDTO {
|
||||
private String supervisorUserId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String franchiseBrand;
|
||||
|
||||
private Integer joinMode;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,19 +10,20 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class TransferLogDTO {
|
||||
|
||||
@ApiModelProperty("操作人id")
|
||||
private String fromUserId;
|
||||
|
||||
@ApiModelProperty("被分配人ID")
|
||||
private String toUserId;
|
||||
|
||||
@ApiModelProperty("操作人")
|
||||
private String fromUserName;
|
||||
|
||||
@ApiModelProperty("被分配人")
|
||||
private String toUserName;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private String fromUserMobile;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private String toUserMobile;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("'1-线索,2-门店'")
|
||||
private Integer lineShopType;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.dto.point;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/1/8 15:41
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ShopCountDTO {
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("推荐门店数量")
|
||||
private Integer recommendShopNum;
|
||||
|
||||
@ApiModelProperty("选择门店数量")
|
||||
private Integer selectedShopNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.dto.point;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/1/8 15:12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ShopPointDTO {
|
||||
|
||||
private Long shopId;
|
||||
|
||||
private Long lineId;
|
||||
|
||||
private Long pointId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private String shopName;
|
||||
|
||||
private Long wantShopAreaId;
|
||||
|
||||
private String userPortrait;
|
||||
|
||||
private String investmentManager;
|
||||
|
||||
}
|
||||
@@ -76,10 +76,13 @@ public class LineFollowLogDO {
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
//1-线索日志,2-门店日志
|
||||
private Integer type;
|
||||
|
||||
public LineFollowLogDO() {
|
||||
}
|
||||
|
||||
public LineFollowLogDO(String partnerId, Long lineId, String operateUserId, String operateUsername, Integer workflowStage, Integer workflowSubStage, Integer workflowSubStageStatus, String message) {
|
||||
public LineFollowLogDO(String partnerId, Long lineId, String operateUserId, String operateUsername, Integer workflowStage, Integer workflowSubStage, Integer workflowSubStageStatus, String message,Integer type) {
|
||||
this.partnerId = partnerId;
|
||||
this.lineId = lineId;
|
||||
this.operateUserId = operateUserId;
|
||||
@@ -89,5 +92,6 @@ public class LineFollowLogDO {
|
||||
this.workflowSubStageStatus = workflowSubStageStatus;
|
||||
this.message = message;
|
||||
this.createTime= new Date();
|
||||
this.type=type;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,9 @@ public class PointRecommendDO {
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 点位id
|
||||
*/
|
||||
|
||||
@@ -104,11 +104,30 @@ public class ShopInfoDO {
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Column(name = "create_user_id")
|
||||
private String createUserId;
|
||||
@Column(name = "update_user_id")
|
||||
private String updateUserId;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@Column(name = "join_mode")
|
||||
private Integer joinMode;
|
||||
|
||||
@Column(name = "franchise_brand")
|
||||
private String franchiseBrand;
|
||||
|
||||
@Column(name = "development_manager")
|
||||
private String developmentManager;
|
||||
@Column(name = "want_shop_area_id")
|
||||
private Long wantShopAreaId;
|
||||
@Column(name = "investment_manager")
|
||||
private String investmentManager;
|
||||
@Column(name = "shop_status")
|
||||
private Integer shopStatus;
|
||||
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class TransferLogDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
// line_info.id/shop_id',
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
|
||||
@@ -58,6 +58,9 @@ public class TransferLogDO {
|
||||
*/
|
||||
@Column(name = "update_user_id")
|
||||
private String updateUserId;
|
||||
//'1-线索,2-门店'
|
||||
@Column(name = "line_shop_type")
|
||||
private String lineShopType;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
@@ -110,7 +113,6 @@ public class TransferLogDO {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopStatusEnum;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/08/下午2:20
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AddBranchShopRequest {
|
||||
@NotNull
|
||||
private Long lineId;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
@NotNull
|
||||
private Long wantShopAreaId;
|
||||
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty(" 加盟模式//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',")
|
||||
private Integer joinMode;
|
||||
@NotBlank
|
||||
@ApiModelProperty("'加盟品牌1,\"正新鸡排\",2,\"正新三明治\",3,\"正烧记\"4,\"大鼓米线\"5,\"串小妹\"6,\"茂掌柜\"'")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("督导")
|
||||
private String investmentManagerUserId;
|
||||
@NotNull
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long regionId;
|
||||
|
||||
public ShopInfoDO toDO(AddBranchShopRequest request, LineInfoDO lineInfo) {
|
||||
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
||||
shopInfoDO.setLineId(request.getLineId());
|
||||
shopInfoDO.setShopName(StringUtils.isNotBlank(request.getShopName())?request.getShopName():"店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()+1));
|
||||
shopInfoDO.setRegionId(request.getRegionId());
|
||||
shopInfoDO.setShopName(request.getShopName());
|
||||
shopInfoDO.setWantShopAreaId(request.getWantShopAreaId());
|
||||
shopInfoDO.setJoinMode(request.getJoinMode());
|
||||
shopInfoDO.setInvestmentManager(request.getInvestmentManagerUserId());
|
||||
shopInfoDO.setDevelopmentManager(request.getInvestmentManagerUserId());
|
||||
shopInfoDO.setSupervisorUserId(request.getInvestmentManagerUserId());
|
||||
shopInfoDO.setCreateTime(new Date());
|
||||
shopInfoDO.setShopStatus(ShopStatusEnum.ING.getCode());
|
||||
shopInfoDO.setShopStage(ShopStageEnum.SHOP_STAGE_1.getShopStage());
|
||||
shopInfoDO.setPartnerId(lineInfo.getPartnerId());
|
||||
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
||||
return shopInfoDO;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ public class AddShopRequest {
|
||||
@NotEmpty
|
||||
@ApiModelProperty("店铺名称")
|
||||
private List<String> shopNameList;
|
||||
@ApiModelProperty(value = "当前登录用户id",hidden = true)
|
||||
private String userId;
|
||||
|
||||
public AddShopRequest() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/08/下午4:49
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BranchShopDetailRequest {
|
||||
@NotNull
|
||||
private Long shopId;
|
||||
@ApiModelProperty("加盟意向区域")
|
||||
private Long wantShopAreaId;
|
||||
@ApiModelProperty("所属区域")
|
||||
private Long regionId;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店")
|
||||
private Integer joinMode;
|
||||
@NotBlank
|
||||
@ApiModelProperty("加盟品牌")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/08/下午6:00
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BranchShopRequest extends PageBasicInfo{
|
||||
@ApiModelProperty("加盟商姓名或手机号")
|
||||
private String partnerKeyword;
|
||||
@ApiModelProperty("门店名称/编号")
|
||||
private String shopKeyword;
|
||||
@ApiModelProperty("所属大区")
|
||||
private List<String> regionIds;
|
||||
@ApiModelProperty("督导userId")
|
||||
private String investmentManagerUserId;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private List<Long> wantShopAreaId;
|
||||
@ApiModelProperty("加盟模式")
|
||||
private List<Integer> joinMode;
|
||||
@ApiModelProperty("加盟品牌")
|
||||
private List<Integer> franchiseBrand;
|
||||
@ApiModelProperty("开店状态")
|
||||
private List<Integer> shopStatus;
|
||||
@ApiModelProperty("计划开业日期开始")
|
||||
private Date openTimeStart;
|
||||
@ApiModelProperty("计划开业日期结束")
|
||||
private Date openTimeEnd;
|
||||
@ApiModelProperty(value = "管辖区域",hidden = true)
|
||||
private List<String> authRegionIds;
|
||||
@ApiModelProperty(value="意向开店区域+子节点",hidden = true)
|
||||
private List<Long> wantShopAreaAllIds;
|
||||
@ApiModelProperty("1-我负责的,2-我管辖的")
|
||||
@NotNull
|
||||
private Integer flag;
|
||||
|
||||
}
|
||||
@@ -12,10 +12,12 @@ import lombok.Data;
|
||||
@Data
|
||||
public class LineFollowLogRequest {
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
@ApiModelProperty("线索id/shopId")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("日志")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty("1-线索日志,2-门店日志")
|
||||
private Integer type = 1;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import java.util.stream.Collectors;
|
||||
@Data
|
||||
public class LineRecommendPointRequest {
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("铺位ids")
|
||||
private List<Long> pointIds;
|
||||
@@ -30,12 +30,12 @@ public class LineRecommendPointRequest {
|
||||
private String developmentManager;
|
||||
|
||||
public List<PointRecommendDO> convertList(){
|
||||
if(Objects.isNull(this.lineId) || CollectionUtils.isEmpty(pointIds)){
|
||||
if(Objects.isNull(this.shopId) || CollectionUtils.isEmpty(pointIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return this.pointIds.stream().map(pointId -> {
|
||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||
pointRecommendDO.setLineId(this.lineId);
|
||||
pointRecommendDO.setShopId(this.shopId);
|
||||
pointRecommendDO.setDevelopmentManager(this.developmentManager);
|
||||
pointRecommendDO.setPointId(pointId);
|
||||
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/07/下午2:49
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class LinesRequest {
|
||||
@ApiModelProperty("姓名/手机号")
|
||||
private String keyword;
|
||||
private Integer pageSize = 10;
|
||||
private Integer pageNum = 1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class MiniPointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "线索id")
|
||||
private Long lineId;
|
||||
@ApiModelProperty(value = "门店线索ID")
|
||||
private Long shopId;
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.stream.Collectors;
|
||||
public class PointRecommendLineRequest {
|
||||
|
||||
@ApiModelProperty("线索ids")
|
||||
private List<Long> lineIds;
|
||||
private List<Long> shopIds;
|
||||
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
@@ -30,12 +30,12 @@ public class PointRecommendLineRequest {
|
||||
private String developmentManager;
|
||||
|
||||
public List<PointRecommendDO> convertList(){
|
||||
if(Objects.isNull(this.lineIds) || CollectionUtils.isEmpty(this.lineIds) || Objects.isNull(pointId)){
|
||||
if(Objects.isNull(this.shopIds) || CollectionUtils.isEmpty(this.shopIds) || Objects.isNull(pointId)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return this.lineIds.stream().map(lineId -> {
|
||||
return this.shopIds.stream().map(shopId -> {
|
||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||
pointRecommendDO.setLineId(lineId);
|
||||
pointRecommendDO.setShopId(shopId);
|
||||
pointRecommendDO.setDevelopmentManager(this.developmentManager);
|
||||
pointRecommendDO.setPointId(pointId);
|
||||
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());
|
||||
|
||||
@@ -23,8 +23,8 @@ public class RejectPointRequest {
|
||||
@ApiModelProperty("拒绝原因")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||
private Long lineId;
|
||||
@ApiModelProperty(value = "门店Id")
|
||||
private Long shopId;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class TurnLineRequest {
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("新的选址人员")
|
||||
private String developmentManager;
|
||||
|
||||
@@ -26,8 +26,8 @@ public class UpdateLineRequest {
|
||||
private Long regionId;
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("加盟模式 1-社会加盟 2-强加盟")
|
||||
@Max(3)
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店")
|
||||
private Integer joinMode;
|
||||
@NotNull
|
||||
@ApiModelProperty("加盟品牌")
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/08/下午4:11
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BranchShopDetailResponse {
|
||||
|
||||
@ApiModelProperty("加盟商名称")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("加盟手机号")
|
||||
private String mobile;
|
||||
@ApiModelProperty(" 加盟模式//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店'")
|
||||
private Integer joinMode;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("门店编号")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("总项数")
|
||||
private Integer totalColumn;
|
||||
|
||||
@ApiModelProperty("完成项")
|
||||
private Integer completionColumn;
|
||||
|
||||
@ApiModelProperty("所属品牌 1,\"正新鸡排\",2,\"正新三明治\",3,\"正烧记\"4,\"大鼓米线\"5,\"串小妹\"6,\"茂掌柜\"")
|
||||
private String franchiseBrand;
|
||||
|
||||
@ApiModelProperty("预估完成时间")
|
||||
private Date planCompletionTime;
|
||||
|
||||
@ApiModelProperty("招商经理名称")
|
||||
private String investmentManagerName;
|
||||
|
||||
@ApiModelProperty("招商经理userId")
|
||||
private String investmentManagerId;
|
||||
|
||||
@ApiModelProperty("所属大区name")
|
||||
private String regionName;
|
||||
|
||||
@ApiModelProperty("所属大区id")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantRegionName;
|
||||
|
||||
@ApiModelProperty("意向开店区域市id")
|
||||
private Long wantRegionId;
|
||||
@ApiModelProperty("意向开店区域省id")
|
||||
private Long wantRegionParentId;
|
||||
|
||||
@ApiModelProperty("门店状态:0.跟进中 1.已完成 2.已放弃")
|
||||
private Integer shopStatus;
|
||||
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/08/下午5:46
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BranchShopResponse {
|
||||
private Long shopId;
|
||||
private Long lineId;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String username;
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String mobile;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("门店编号")
|
||||
private String shopCode;
|
||||
@ApiModelProperty("所属大区")
|
||||
private String regionName;
|
||||
@ApiModelProperty("所属品牌")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("加盟模式")
|
||||
private Integer joinMode;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantRegionName;
|
||||
@ApiModelProperty("计划开业时间")
|
||||
private Date planOpenTime;
|
||||
@ApiModelProperty("总项数")
|
||||
private Integer totalColumn;
|
||||
@ApiModelProperty("完成项")
|
||||
private Integer completionColumn;
|
||||
@ApiModelProperty("开店时长")
|
||||
private String days;
|
||||
@ApiModelProperty("督导/招商经理")
|
||||
private String investmentManagerName;
|
||||
@ApiModelProperty("状态")
|
||||
private String shopStatus;
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
@ApiModelProperty("开业活动完成时间")
|
||||
private Date openingActivityEndTime;
|
||||
|
||||
public void setDays() {
|
||||
if (this.openingActivityEndTime==null){
|
||||
long between = ChronoUnit.SECONDS.between(this.createTime.toInstant(), new Date().toInstant());
|
||||
double days = (double) between / (24*60*60);
|
||||
this.days=String.format("%.1f", days);
|
||||
}else{
|
||||
long between = ChronoUnit.SECONDS.between(this.createTime.toInstant(), this.openingActivityEndTime.toInstant());
|
||||
double days = (double) between / (24*60*60);
|
||||
this.days = String.format("%.1f", days);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/01/07/下午2:31
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class LineVO {
|
||||
private Long lineId;
|
||||
@ApiModelProperty("加盟商名字")
|
||||
private String username;
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class MiniPointPageVO {
|
||||
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
|
||||
private Integer recommendStatus;
|
||||
|
||||
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap, Long curLineId) {
|
||||
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
|
||||
if(CollectionUtils.isEmpty(pointList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.enums.JoinModeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -36,8 +40,29 @@ public class MiniShopPageVO {
|
||||
private Long regionId;
|
||||
@ApiModelProperty("门店所属区域name")
|
||||
private String regionName;
|
||||
@ApiModelProperty("督导name")
|
||||
private String investmentName;
|
||||
@ApiModelProperty("督导userId")
|
||||
private String investmentUserId;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode,Boolean flag,Long pointId,Long regionId,String regionName) {
|
||||
@ApiModelProperty("预估完成时间")
|
||||
private Date planCompletionTime;
|
||||
|
||||
@ApiModelProperty("总项数")
|
||||
private Integer totalColumn;
|
||||
|
||||
@ApiModelProperty("完成项")
|
||||
private Integer completionColumn;
|
||||
|
||||
@ApiModelProperty("所属品牌")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("加盟模式")
|
||||
private String joinMode;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantRegionName;
|
||||
@ApiModelProperty("门店状态'0.跟进中 1.已完成 2.已放弃',")
|
||||
private Integer shopStatus;
|
||||
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
this.shopCode = shopCode;
|
||||
@@ -47,7 +72,7 @@ public class MiniShopPageVO {
|
||||
this.regionName = regionName;
|
||||
}
|
||||
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap, Map<Long, String> regionNameMap ) {
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap, Map<Long, String> regionNameMap, Map<Long, ScheduleDTO> scheduleMap, Map<Long, String> wantRegionMap, Map<String, EnterpriseUserDO> userInfoMap) {
|
||||
List<MiniShopPageVO> resultList = new ArrayList<>();
|
||||
for (ShopInfoDO shopInfo : shopInfoList) {
|
||||
ShopStageInfoDO stageInfoDO = stageMap.get(shopInfo.getId());
|
||||
@@ -57,10 +82,27 @@ public class MiniShopPageVO {
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
if(Objects.isNull(regionNameMap)){
|
||||
if (Objects.isNull(regionNameMap)) {
|
||||
regionNameMap = new HashMap<>();
|
||||
}
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode(),flag,shopInfo.getPointId(),shopInfo.getRegionId(), regionNameMap.getOrDefault(shopInfo.getRegionId(),"")));
|
||||
MiniShopPageVO miniShopPageVO = new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(), shopInfo.getShopCode(), flag, shopInfo.getPointId(), shopInfo.getRegionId(), regionNameMap.getOrDefault(shopInfo.getRegionId(), ""));
|
||||
miniShopPageVO.setInvestmentUserId(shopInfo.getInvestmentManager());
|
||||
if (userInfoMap!=null){
|
||||
miniShopPageVO.setInvestmentName(userInfoMap.getOrDefault(shopInfo.getInvestmentManager(),new EnterpriseUserDO()).getName());
|
||||
}
|
||||
if (scheduleMap != null) {
|
||||
miniShopPageVO.setTotalColumn(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getTotalColumn());
|
||||
miniShopPageVO.setCompletionColumn(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getCompletionColumn());
|
||||
miniShopPageVO.setPlanCompletionTime(scheduleMap.getOrDefault(shopInfo.getId(),new ScheduleDTO()).getPlanCompleteTime());
|
||||
}
|
||||
miniShopPageVO.setFranchiseBrand(shopInfo.getFranchiseBrand());
|
||||
miniShopPageVO.setJoinMode(JoinModeEnum.getByCode(shopInfo.getJoinMode()));
|
||||
if (Objects.nonNull(wantRegionMap)) {
|
||||
miniShopPageVO.setWantRegionName(wantRegionMap.get(shopInfo.getWantShopAreaId()));
|
||||
}
|
||||
miniShopPageVO.setShopStatus(shopInfo.getShopStatus());
|
||||
resultList.add(miniShopPageVO);
|
||||
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.point.ShopPointDTO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/1/8 14:59
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ShopPointBaseInfoVO {
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("区域路径")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("用户标签")
|
||||
private List<String> userPortraitList;
|
||||
|
||||
@ApiModelProperty("招商经理")
|
||||
private String investmentManagerUsername;
|
||||
|
||||
@ApiModelProperty("已推门店")
|
||||
private Integer recommendShopNum;
|
||||
|
||||
@ApiModelProperty("已选门店")
|
||||
private Integer selectedShopNum;
|
||||
|
||||
public ShopPointBaseInfoVO(Long shopId, String shopName, String mobile) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public static List<ShopPointBaseInfoVO> convertList(Map<Long, String> partnerNameMap,List<ShopPointDTO> lineList, Map<String, String> userNameMap, Map<Long, String> userPortraitMap, Map<Long, HyOpenAreaInfoDO> cityMap, Map<Long, Integer> recommendShopNumMap){
|
||||
List<ShopPointBaseInfoVO> resultList = new ArrayList<>();
|
||||
for (ShopPointDTO shopPointDTO : lineList) {
|
||||
ShopPointBaseInfoVO shopPointBaseInfoVO = new ShopPointBaseInfoVO(shopPointDTO.getShopId(), shopPointDTO.getShopName(), shopPointDTO.getMobile());
|
||||
String username = userNameMap.get(shopPointDTO.getInvestmentManager());
|
||||
shopPointBaseInfoVO.setInvestmentManagerUsername(username);
|
||||
shopPointBaseInfoVO.setPartnerName(partnerNameMap.get(shopPointDTO.getLineId()));
|
||||
HyOpenAreaInfoDO areaInfo = cityMap.get(shopPointDTO.getWantShopAreaId());
|
||||
if(Objects.nonNull(areaInfo)){
|
||||
shopPointBaseInfoVO.setAreaName(areaInfo.getAreaName());
|
||||
shopPointBaseInfoVO.setAreaPath(areaInfo.getAreaPath().replace("/", "").trim());
|
||||
}
|
||||
shopPointBaseInfoVO.setRecommendShopNum(recommendShopNumMap.get(shopPointDTO.getShopId()));
|
||||
shopPointBaseInfoVO.setSelectedShopNum((shopPointDTO.getPointId()!=null&&shopPointDTO.getPointId()> CommonConstants.ZERO)?CommonConstants.ONE:CommonConstants.ZERO);
|
||||
if(StringUtils.isNotBlank(shopPointDTO.getUserPortrait())){
|
||||
List<String> userPortraitList = new ArrayList<>();
|
||||
String[] parts = shopPointDTO.getUserPortrait().split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (StringUtils.isNotBlank(trimmedPart)) {
|
||||
String s = userPortraitMap.get(Long.valueOf(part));
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
userPortraitList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
shopPointBaseInfoVO.setUserPortraitList(userPortraitList);
|
||||
}
|
||||
resultList.add(shopPointBaseInfoVO);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
public static ShopPointBaseInfoVO convert(LineInfoDO lineInfo, String username, Map<Long, String> userPortraitMap, HyOpenAreaInfoDO cityArea, Map<Long, Integer> recommendShopNumMap, Map<Long, Integer> selectedShopNumMap){
|
||||
ShopPointBaseInfoVO linePointBaseInfo = new ShopPointBaseInfoVO(lineInfo.getId(), lineInfo.getUsername(), lineInfo.getMobile());
|
||||
linePointBaseInfo.setInvestmentManagerUsername(username);
|
||||
if(Objects.nonNull(cityArea)){
|
||||
linePointBaseInfo.setAreaName(cityArea.getAreaName());
|
||||
linePointBaseInfo.setAreaPath(cityArea.getAreaPath().replace("/", "").trim());
|
||||
}
|
||||
linePointBaseInfo.setRecommendShopNum(recommendShopNumMap.get(lineInfo.getId()));
|
||||
linePointBaseInfo.setSelectedShopNum(selectedShopNumMap.get(lineInfo.getId()));
|
||||
if(StringUtils.isNotBlank(lineInfo.getUserPortrait())){
|
||||
List<String> userPortraitList = new ArrayList<>();
|
||||
String[] parts = lineInfo.getUserPortrait().split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (StringUtils.isNotBlank(trimmedPart)) {
|
||||
String s = userPortraitMap.get(Long.valueOf(part));
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
userPortraitList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
linePointBaseInfo.setUserPortraitList(userPortraitList);
|
||||
}
|
||||
return linePointBaseInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user