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

This commit is contained in:
shuo.wang
2024-04-25 19:54:49 +08:00
53 changed files with 961 additions and 75 deletions

View File

@@ -0,0 +1,28 @@
package com.cool.store.dao;
import com.cool.store.entity.AssessmentTemplateDO;
import com.cool.store.mapper.AssessmentTemplateMapper;
import com.google.common.collect.Lists;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:20
* @Version 1.0
*/
@Repository
public class AssessmentTemplateDAO {
@Resource
private AssessmentTemplateMapper assessmentTemplateMapper;
public List<AssessmentTemplateDO> listByType(@Param("type") Integer type){
if (type == null){
return Lists.newArrayList();
}
return assessmentTemplateMapper.listByType(type);
}
}

View File

@@ -27,6 +27,11 @@ public class LinePayDAO {
return linePayDO; return linePayDO;
} }
public LinePayDO getLinePayByLineIdAndPayType(Long lineId,Integer payBusinessType) {
LinePayDO linePayDO = linePayMapper.getLinePayByLineIdAndPayType(lineId,payBusinessType);
return linePayDO;
}
public Long addLinePay(LinePayDO linePayDO){ public Long addLinePay(LinePayDO linePayDO){
linePayMapper.insertSelective(linePayDO); linePayMapper.insertSelective(linePayDO);
return linePayDO.getId(); return linePayDO.getId();

View File

@@ -2,6 +2,7 @@ package com.cool.store.dao;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO; import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.entity.ShopInfoDO; import com.cool.store.entity.ShopInfoDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
@@ -9,6 +10,7 @@ import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.vo.shop.StageShopCountVO; import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@@ -16,7 +18,9 @@ import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
@@ -124,7 +128,7 @@ public class ShopInfoDAO {
* @return * @return
*/ */
public List<ShopInfoDO> getShopListByIds(List<Long> shopIds){ public List<ShopInfoDO> getShopListByIds(List<Long> shopIds){
if(CollectionUtils.isNotEmpty(shopIds)){ if(CollectionUtils.isEmpty(shopIds)){
return new ArrayList<>(); return new ArrayList<>();
} }
return shopInfoMapper.getShopListByIds(shopIds); return shopInfoMapper.getShopListByIds(shopIds);
@@ -139,4 +143,12 @@ public class ShopInfoDAO {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return shopInfoMapper.getOpenPlanShopListByShopName(shopName,bigName,fightName); return shopInfoMapper.getOpenPlanShopListByShopName(shopName,bigName,fightName);
} }
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {
if(CollectionUtils.isEmpty(lineIds)){
return Maps.newHashMap();
}
List<LineCountDTO> selectedShopNum = shopInfoMapper.getSelectedShopNum(lineIds);
return selectedShopNum.stream().collect(Collectors.toMap(k->k.getLineId(), v->v.getSelectedShopNum()));
}
} }

View File

@@ -1,7 +1,20 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.entity.AssessmentTemplateDO; import com.cool.store.entity.AssessmentTemplateDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface AssessmentTemplateMapper extends Mapper<AssessmentTemplateDO> { public interface AssessmentTemplateMapper extends Mapper<AssessmentTemplateDO> {
/**
* 根据类型查询
* @param type
* @return
*/
List<AssessmentTemplateDO> listByType(@Param("type") Integer type);
} }

View File

@@ -0,0 +1,8 @@
package com.cool.store.mapper;
import com.cool.store.entity.FirstOrderDO;
import com.cool.store.entity.FranchiseFeeDO;
import tk.mybatis.mapper.common.Mapper;
public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
}

View File

@@ -40,6 +40,8 @@ public interface LinePayMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
LinePayDO getLinePayByLineId(@Param("lineId") Long lineId); LinePayDO getLinePayByLineId(@Param("lineId") Long lineId);
LinePayDO getLinePayByLineIdAndPayType(@Param("lineId") Long lineId,
@Param("payBusinessType")Integer payBusinessType);
/** /**
* getLinePayByLineIds * getLinePayByLineIds

View File

@@ -10,6 +10,11 @@ public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId); ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds); List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
List<ShopAuditInfoDO> getListByShopIdAndType(@Param("shopId") Long shopId,
@Param("type") Integer type);
/** /**
* @Auther: wangshuo * @Auther: wangshuo
* @Date: 2024/4/23 * @Date: 2024/4/23

View File

@@ -1,6 +1,7 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO; import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.entity.ShopInfoDO; import com.cool.store.entity.ShopInfoDO;
import com.cool.store.vo.shop.StageShopCountVO; import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
@@ -69,4 +70,6 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
*/ */
Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopName") String shopName, Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopName") String shopName,
@Param("bigName") String bigName, @Param("fightName") String fightName); @Param("bigName") String bigName, @Param("fightName") String fightName);
List<LineCountDTO> getSelectedShopNum(@Param("lineIds") List<Long> lineIds);
} }

View File

@@ -19,5 +19,21 @@
xfsg_license_transact o xfsg_license_transact o
LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id
LEFT JOIN xfsg_line_info l ON l.id = s.line_id LEFT JOIN xfsg_line_info l ON l.id = s.line_id
<where>
<if test="request.storeName != null and request.storeName != ''">
AND s.shop_name = #{request.storeName}
</if>
<if test="request.submitStartTime != null and request.submitEndTime">
AND o.create_time BETWEEN #{request.submitStartTime} AND #{request.submitEndTime}
</if>
<if test="request.regionId != null and request.regionId != ''">
AND l.region_id = #{request.regionId}
</if>
<if test="request.status != null">
AND o.submit_status = #{request.status}
</if>
</where>
</select> </select>
</mapper> </mapper>

View File

@@ -13,4 +13,9 @@
<result column="score" jdbcType="BIGINT" property="score" /> <result column="score" jdbcType="BIGINT" property="score" />
<result column="template_requirements" jdbcType="LONGVARCHAR" property="templateRequirements" /> <result column="template_requirements" jdbcType="LONGVARCHAR" property="templateRequirements" />
</resultMap> </resultMap>
<select id="listByType" resultMap="BaseResultMap">
select * from xfsg_assessment_template where type = #{type}
</select>
</mapper> </mapper>

View File

@@ -103,7 +103,7 @@
OR l.mobile = #{keyWord} OR l.mobile = #{keyWord}
) )
</if> </if>
<if test="startTime != null and endTime != null"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND lai.create_time BETWEEN #{startTime} AND #{endTime} AND lai.create_time BETWEEN #{startTime} AND #{endTime}
</if> </if>
<if test="region != null and region != ''"> <if test="region != null and region != ''">

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.FranchiseFeeMapper">
</mapper>

View File

@@ -21,11 +21,12 @@
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" /> <result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" /> <result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code, id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time, bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, deleted update_time, create_user_id, update_user_id, deleted,pay_business_type
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
@@ -284,7 +285,18 @@
</sql> </sql>
<select id="getLinePayByLineId" resultMap="BaseResultMap"> <select id="getLinePayByLineId" resultMap="BaseResultMap">
select * from xfsg_line_pay where line_id = #{lineId} and deleted = '0' select *
from xfsg_line_pay
where line_id = #{lineId}
and deleted = '0'
</select>
<select id="getLinePayByLineIdAndPayType" resultMap="BaseResultMap">
select *
from xfsg_line_pay
where line_id = #{lineId}
and deleted = '0'
and pay_business_type = #{payBusinessType}
</select> </select>
<select id="getLinePayByLineIds" resultMap="BaseResultMap"> <select id="getLinePayByLineIds" resultMap="BaseResultMap">

View File

@@ -49,23 +49,23 @@
LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id
LEFT JOIN xfsg_line_info l ON l.id = s.line_id LEFT JOIN xfsg_line_info l ON l.id = s.line_id
<where> <where>
<if test="openAcceptance.shopName != null and openAcceptance.shopName != ''"> <if test="openAcceptance.storeName != null and openAcceptance.storeName != ''">
s.shop_name LIKE CONCAT('%',#{shopName},'%') s.shop_name LIKE CONCAT('%',#{openAcceptance.storeName},'%')
</if> </if>
<if test="openAcceptance.supervisorUserId != null and openAcceptance.supervisorUserId != ''"> <if test="openAcceptance.supervisorUserId != null and openAcceptance.supervisorUserId != ''">
s.supervisor_user_id = #{supervisorUserId} s.supervisor_user_id = #{openAcceptance.supervisorUserId}
</if> </if>
<if test="openAcceptance.investmentManager != null and openAcceptance.investmentManager != ''"> <if test="openAcceptance.investmentManager != null and openAcceptance.investmentManager != ''">
l.investment_manager =#{investmentManager} l.investment_manager =#{openAcceptance.investmentManager}
</if> </if>
<if test="openAcceptance.acceptanceStatus != null"> <if test="openAcceptance.acceptanceStatus != null">
o.acceptance_status = #{acceptanceStatus} o.acceptance_status = #{openAcceptance.acceptanceStatus}
</if> </if>
<if test="openAcceptance.planOpenTimeBegin != null"> <if test="openAcceptance.planOpenTimeBegin != null">
AND o.plan_open_time &gt;= #{planOpenTimeBegin} AND o.plan_open_time &gt;= #{openAcceptance.planOpenTimeBegin}
</if> </if>
<if test="openAcceptance.planOpenTimeEnd != null"> <if test="openAcceptance.planOpenTimeEnd != null">
AND o.plan_open_time &lt;= #{planOpenTimeEnd} AND o.plan_open_time &lt;= #{openAcceptance.planOpenTimeEnd}
</if> </if>
</where> </where>
</select> </select>

View File

@@ -106,7 +106,7 @@
line_id as lineId, line_id as lineId,
count(1) as selectedShopNum count(1) as selectedShopNum
from xfsg_point_info from xfsg_point_info
where deleted = 0 and select_status = 1 and line_id in where deleted = 0 and select_status = 1 and point_status !=7 and line_id in
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")"> <foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
#{lineId} #{lineId}
</foreach> </foreach>
@@ -200,7 +200,7 @@
</select> </select>
<update id="recyclePoint"> <update id="recyclePoint">
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status = if(point_status = 6, 5, point_status)) where id = #{pointId} update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status = if(point_status = 6, 5, point_status) where id = #{pointId}
</update> </update>
</mapper> </mapper>

View File

@@ -47,4 +47,10 @@
where where
shop_id = #{shopId} and deleted = 0 shop_id = #{shopId} and deleted = 0
</select> </select>
<select id="getListByShopIdAndType" resultType="com.cool.store.entity.ShopAuditInfoDO">
select * from xfsg_shop_audit_info
where shop_id = #{shopId}
and audit_type = #{type}
order by create_time
</select>
</mapper> </mapper>

View File

@@ -93,5 +93,17 @@
</select> </select>
<select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO">
select
line_id as lineId,
count(1) as selectedShopNum
from xfsg_shop_info
where deleted = 0 and point_id > 0 and line_id in
<foreach collection="lineIds" item="lineId" index="index" open="(" separator="," close=")">
#{lineId}
</foreach>
group by line_id
</select>
</mapper> </mapper>

View File

@@ -11,7 +11,7 @@ public class AssessmentTemplateDO {
/** /**
* 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收 * 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收
*/ */
private Boolean type; private Integer type;
/** /**
* 模板类别,可为空 * 模板类别,可为空
@@ -60,7 +60,7 @@ public class AssessmentTemplateDO {
* *
* @return type - 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收 * @return type - 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收
*/ */
public Boolean getType() { public Integer getType() {
return type; return type;
} }
@@ -69,7 +69,7 @@ public class AssessmentTemplateDO {
* *
* @param type 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收 * @param type 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收
*/ */
public void setType(Boolean type) { public void setType(Integer type) {
this.type = type; this.type = type;
} }

View File

@@ -0,0 +1,47 @@
package com.cool.store.entity;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@Table(name = "xfsg_franchise_fee")
public class FranchiseFeeDO {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "shop_id")
private Long shopId;
@Column(name = "pay_id")
private Long payId;
@Column(name = "year_franchise_fee")
private String yearFranchiseFee;
@Column(name = "loan_margin")
private String loanMargin;
@Column(name = "first_year_start_time")
private Date firstYearStartTime;
@Column(name = "first_year_end_time")
private Date firstYearEndTime;
@Column(name = "first_year_fee")
private Date firstYearFee;
@Column(name = "second_year_start_time")
private Date secondYearStartTime;
@Column(name = "second_year_end_time")
private Date secondYearEndTime;
@Column(name = "second_year_fee")
private Date secondYearFee;
@Column(name = "third_year_first_time")
private Date thirdYearFirstTime;
@Column(name = "third_year_end_time")
private Date thirdYearEndTime;
@Column(name = "third_year_fee")
private Date thirdYearFee;
@Column(name = "performance_bond")
private Date performanceBond;
@Column(name = "create_time")
private Date createTime;
@Column(name = "update_time")
private Date updateTime;
}

View File

@@ -74,4 +74,7 @@ public class LinePayDO implements Serializable {
@ApiModelProperty("是否删除0.否 1.是") @ApiModelProperty("是否删除0.否 1.是")
private Boolean deleted; private Boolean deleted;
@ApiModelProperty("支付类型 0-缴纳意向金 1-缴纳加盟费 2-装修款")
private Integer payBusinessType;
} }

View File

@@ -1,5 +1,7 @@
package com.cool.store.entity; package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date; import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
@@ -19,36 +21,42 @@ public class ShopAuditInfoDO {
* 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批 * 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批
*/ */
@Column(name = "audit_type") @Column(name = "audit_type")
@ApiModelProperty("0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批")
private Integer auditType; private Integer auditType;
/** /**
* 提交人ID * 提交人ID
*/ */
@Column(name = "submitted_user_id") @Column(name = "submitted_user_id")
@ApiModelProperty("提交人ID")
private String submittedUserId; private String submittedUserId;
/** /**
* 提交人名称 * 提交人名称
*/ */
@Column(name = "submitted_user_name") @Column(name = "submitted_user_name")
@ApiModelProperty("提交人名称")
private String submittedUserName; private String submittedUserName;
/** /**
* 结果类型 0通过,1拒绝 * 结果类型 0通过,1拒绝
*/ */
@Column(name = "result_type") @Column(name = "result_type")
@ApiModelProperty("结果类型 0通过,1拒绝")
private Integer resultType; private Integer resultType;
/** /**
* 通过原因 * 通过原因
*/ */
@Column(name = "pass_reason") @Column(name = "pass_reason")
@ApiModelProperty("通过原因")
private String passReason; private String passReason;
/** /**
* 拒绝原因 * 拒绝原因
*/ */
@Column(name = "reject_reason") @Column(name = "reject_reason")
@ApiModelProperty("拒绝原因")
private String rejectReason; private String rejectReason;
/** /**
@@ -61,6 +69,7 @@ public class ShopAuditInfoDO {
* 创建时间 * 创建时间
*/ */
@Column(name = "create_time") @Column(name = "create_time")
@ApiModelProperty("时间")
private Date createTime; private Date createTime;
/** /**
@@ -75,6 +84,7 @@ public class ShopAuditInfoDO {
private Boolean deleted; private Boolean deleted;
@Column(name = "data_type") @Column(name = "data_type")
@ApiModelProperty("数据类型 0-提交 1-审批")
private Integer dataType; private Integer dataType;
/** /**
@@ -288,4 +298,12 @@ public class ShopAuditInfoDO {
public void setDeleted(Boolean deleted) { public void setDeleted(Boolean deleted) {
this.deleted = deleted; this.deleted = deleted;
} }
public Integer getDataType() {
return dataType;
}
public void setDataType(Integer dataType) {
this.dataType = dataType;
}
} }

View File

@@ -30,15 +30,12 @@ public class AddPointDetailRequest {
@ApiModelProperty("纬度") @ApiModelProperty("纬度")
private String latitude; private String latitude;
@NotBlank
@ApiModelProperty("") @ApiModelProperty("")
private String province; private String province;
@NotBlank
@ApiModelProperty("") @ApiModelProperty("")
private String city; private String city;
@NotBlank
@ApiModelProperty("区/县") @ApiModelProperty("区/县")
private String district; private String district;

View File

@@ -0,0 +1,77 @@
package com.cool.store.request;
import com.cool.store.entity.FranchiseFeeDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@ApiModel("加盟费/保证金实体")
public class FranchiseFeeRequest {
@Column(name = "shop_id")
@ApiModelProperty("shopId")
private Long shopId;
@Column(name = "pay_id")
@ApiModelProperty("payId")
private Long payId;
@Column(name = "year_franchise_fee")
@ApiModelProperty("每年加盟费")
private String yearFranchiseFee;
@Column(name = "loan_margin")
@ApiModelProperty("贷款保证金")
private String loanMargin;
@Column(name = "first_year_start_time")
@ApiModelProperty("第一年度开始时间")
private Date firstYearStartTime;
@ApiModelProperty("第一年度结束时间")
@Column(name = "first_year_end_time")
private Date firstYearEndTime;
@ApiModelProperty("第一年度加盟费")
@Column(name = "first_year_fee")
private Date firstYearFee;
@ApiModelProperty("第二年度开始时间")
@Column(name = "second_year_start_time")
private Date secondYearStartTime;
@ApiModelProperty("第二年度结束时间")
@Column(name = "second_year_end_time")
private Date secondYearEndTime;
@ApiModelProperty("第二年度加盟费")
@Column(name = "second_year_fee")
private Date secondYearFee;
@ApiModelProperty("第仨年度开始时间")
@Column(name = "third_year_first_time")
private Date thirdYearFirstTime;
@ApiModelProperty("第仨年度结束时间")
@Column(name = "third_year_end_time")
private Date thirdYearEndTime;
@ApiModelProperty("第仨年度加盟费")
@Column(name = "third_year_fee")
private Date thirdYearFee;
@ApiModelProperty("履约保证金")
@Column(name = "performance_bond")
private Date performanceBond;
public FranchiseFeeDO toFranchiseFeeDO() {
FranchiseFeeDO franchiseFeeDO = new FranchiseFeeDO();
franchiseFeeDO.setShopId(this.shopId);
franchiseFeeDO.setPayId(this.payId);
franchiseFeeDO.setYearFranchiseFee(this.yearFranchiseFee);
franchiseFeeDO.setLoanMargin(this.loanMargin);
franchiseFeeDO.setFirstYearStartTime(this.firstYearStartTime);
franchiseFeeDO.setFirstYearEndTime(this.firstYearEndTime);
franchiseFeeDO.setFirstYearFee(this.firstYearFee);
franchiseFeeDO.setSecondYearStartTime(this.secondYearStartTime);
franchiseFeeDO.setSecondYearEndTime(this.secondYearEndTime);
franchiseFeeDO.setSecondYearFee(this.secondYearFee);
franchiseFeeDO.setThirdYearFirstTime(this.thirdYearFirstTime);
franchiseFeeDO.setThirdYearEndTime(this.thirdYearEndTime);
franchiseFeeDO.setThirdYearFee(this.thirdYearFee);
franchiseFeeDO.setPerformanceBond(this.performanceBond);
return franchiseFeeDO;
}
}

View File

@@ -52,4 +52,9 @@ public class LinePaySubmitRequest {
@ApiModelProperty("承诺书图片") @ApiModelProperty("承诺书图片")
private String promisePic; private String promisePic;
@ApiModelProperty("支付类型 0-缴纳意向金 1-缴纳加盟费 2-装修款")
private Integer payBusinessType;
@ApiModelProperty("铺位id")
private Long shopId;
} }

View File

@@ -90,6 +90,7 @@ public class OperationAuditRequest {
pointDetailInfo.setClerkNum(request.getClerkNum()); pointDetailInfo.setClerkNum(request.getClerkNum());
pointDetailInfo.setClerkFee(request.getClerkFee()); pointDetailInfo.setClerkFee(request.getClerkFee());
pointDetailInfo.setOperationUserSign(request.getOperationUserSign()); pointDetailInfo.setOperationUserSign(request.getOperationUserSign());
pointDetailInfo.setOperationUserSignTime(new Date());
return pointDetailInfo; return pointDetailInfo;
} }

View File

@@ -51,7 +51,7 @@ public class SysStoreAppRequest {
@Data @Data
@ApiModel("门店信息") @ApiModel("门店信息")
public static class StoreDetail{ public static class StoreDetail{
@ApiModelProperty("门店性质") @ApiModelProperty("门店性质 20加盟 10直营")
private Integer storeNature; private Integer storeNature;
@ApiModelProperty("门店经营者") @ApiModelProperty("门店经营者")
private Integer storeOperator; private Integer storeOperator;
@@ -112,6 +112,8 @@ public class SysStoreAppRequest {
private Integer storeSecurityDeposit; private Integer storeSecurityDeposit;
@ApiModelProperty("享受加盟费和保证金优惠原因") @ApiModelProperty("享受加盟费和保证金优惠原因")
private String reasons; private String reasons;
@ApiModelProperty("品牌使用费率")
private String usageRate;
} }

View File

@@ -0,0 +1,73 @@
package com.cool.store.response;
import com.cool.store.entity.FranchiseFeeDO;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@Table(name = "xfsg_franchise_fee")
public class FranchiseFeeResponse {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "shop_id")
private Long shopId;
@Column(name = "pay_id")
private Long payId;
@Column(name = "year_franchise_fee")
private String yearFranchiseFee;
@Column(name = "loan_margin")
private String loanMargin;
@Column(name = "first_year_start_time")
private Date firstYearStartTime;
@Column(name = "first_year_end_time")
private Date firstYearEndTime;
@Column(name = "first_year_fee")
private Date firstYearFee;
@Column(name = "second_year_start_time")
private Date secondYearStartTime;
@Column(name = "second_year_end_time")
private Date secondYearEndTime;
@Column(name = "second_year_fee")
private Date secondYearFee;
@Column(name = "third_year_first_time")
private Date thirdYearFirstTime;
@Column(name = "third_year_end_time")
private Date thirdYearEndTime;
@Column(name = "third_year_fee")
private Date thirdYearFee;
@Column(name = "performance_bond")
private Date performanceBond;
@Column(name = "create_time")
private Date createTime;
@Column(name = "update_time")
private Date updateTime;
public static FranchiseFeeResponse from(FranchiseFeeDO franchiseFeeDO) {
if (franchiseFeeDO == null) {
return null;
}
FranchiseFeeResponse franchiseFeeResponse = new FranchiseFeeResponse();
franchiseFeeResponse.setId(franchiseFeeDO.getId());
franchiseFeeResponse.setShopId(franchiseFeeDO.getShopId());
franchiseFeeResponse.setPayId(franchiseFeeDO.getPayId());
franchiseFeeResponse.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
franchiseFeeResponse.setLoanMargin(franchiseFeeDO.getLoanMargin());
franchiseFeeResponse.setFirstYearStartTime(franchiseFeeDO.getFirstYearStartTime());
franchiseFeeResponse.setFirstYearEndTime(franchiseFeeDO.getFirstYearEndTime());
franchiseFeeResponse.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
franchiseFeeResponse.setSecondYearStartTime(franchiseFeeDO.getSecondYearStartTime());
franchiseFeeResponse.setSecondYearEndTime(franchiseFeeDO.getSecondYearEndTime());
franchiseFeeResponse.setSecondYearFee(franchiseFeeDO.getSecondYearFee());
franchiseFeeResponse.setThirdYearFirstTime(franchiseFeeDO.getThirdYearFirstTime());
franchiseFeeResponse.setThirdYearEndTime(franchiseFeeDO.getThirdYearEndTime());
franchiseFeeResponse.setThirdYearFee(franchiseFeeDO.getThirdYearFee());
franchiseFeeResponse.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
franchiseFeeResponse.setCreateTime(franchiseFeeDO.getCreateTime());
franchiseFeeResponse.setUpdateTime(franchiseFeeDO.getUpdateTime());
return franchiseFeeResponse;
}
}

View File

@@ -1,11 +1,13 @@
package com.cool.store.response; package com.cool.store.response;
import com.cool.store.entity.LicenseTransactDO; import com.cool.store.entity.LicenseTransactDO;
import com.cool.store.entity.ShopAuditInfoDO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
@Data @Data
@ApiModel("提交证照办理响应体") @ApiModel("提交证照办理响应体")
@@ -83,6 +85,8 @@ public class SubmitLicenseResponse {
@ApiModelProperty("0:保存 1提交到待审核 2:未通过 3:已通过 ") @ApiModelProperty("0:保存 1提交到待审核 2:未通过 3:已通过 ")
private Integer submitStatus; private Integer submitStatus;
@ApiModelProperty("流程记录")
private List<ShopAuditInfoDO> processRecords;
public static SubmitLicenseResponse from(LicenseTransactDO licenseTransactDO) { public static SubmitLicenseResponse from(LicenseTransactDO licenseTransactDO) {
if (licenseTransactDO == null) { if (licenseTransactDO == null) {
@@ -103,25 +107,15 @@ public class SubmitLicenseResponse {
submitLicenseResponse.setRemark(licenseTransactDO.getRemark()); submitLicenseResponse.setRemark(licenseTransactDO.getRemark());
submitLicenseResponse.setRemarkUrl(licenseTransactDO.getRemarkUrl()); submitLicenseResponse.setRemarkUrl(licenseTransactDO.getRemarkUrl());
submitLicenseResponse.setSubmitStatus(licenseTransactDO.getSubmitStatus()); submitLicenseResponse.setSubmitStatus(licenseTransactDO.getSubmitStatus());
// licenseUrl
submitLicenseResponse.setLicenseUrl(licenseTransactDO.getCreditUrl()); submitLicenseResponse.setLicenseUrl(licenseTransactDO.getCreditUrl());
// licenseName
submitLicenseResponse.setLicenseName(licenseTransactDO.getBusinessLicense()); submitLicenseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
// socialCreditCode
submitLicenseResponse.setSocialCreditCode(licenseTransactDO.getCreditCode()); submitLicenseResponse.setSocialCreditCode(licenseTransactDO.getCreditCode());
// idCardAndLicense1
submitLicenseResponse.setIdCardAndLicense1(licenseTransactDO.getIdCardNegativeCreditUrl()); submitLicenseResponse.setIdCardAndLicense1(licenseTransactDO.getIdCardNegativeCreditUrl());
// idCardAndLicense2
submitLicenseResponse.setIdCardAndLicense2(licenseTransactDO.getIdCardPositiveCreditUrl()); submitLicenseResponse.setIdCardAndLicense2(licenseTransactDO.getIdCardPositiveCreditUrl());
// foodLicenseUrl
submitLicenseResponse.setFoodLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl()); submitLicenseResponse.setFoodLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
// businessPremises
submitLicenseResponse.setBusinessPremises(licenseTransactDO.getFoodLicenseAddress()); submitLicenseResponse.setBusinessPremises(licenseTransactDO.getFoodLicenseAddress());
// foodLicenseCode
submitLicenseResponse.setFoodLicenseCode(licenseTransactDO.getFoodBusinessLicenseCode()); submitLicenseResponse.setFoodLicenseCode(licenseTransactDO.getFoodBusinessLicenseCode());
// foodLicenseStartTime
submitLicenseResponse.setFoodLicenseStartTime(licenseTransactDO.getFoodBusinessStartTime()); submitLicenseResponse.setFoodLicenseStartTime(licenseTransactDO.getFoodBusinessStartTime());
// foodLicenseEndTime
submitLicenseResponse.setFoodLicenseEndTime(licenseTransactDO.getFoodBusinessEndTime()); submitLicenseResponse.setFoodLicenseEndTime(licenseTransactDO.getFoodBusinessEndTime());
return submitLicenseResponse; return submitLicenseResponse;
} }

View File

@@ -73,6 +73,18 @@ public class SysStoreAppResponse {
@ApiModelProperty("门店邀约人姓名") @ApiModelProperty("门店邀约人姓名")
private String storeInviteesName; private String storeInviteesName;
@ApiModelProperty("招商姓名")
private String InvestmentName;
@ApiModelProperty("招商人id")
private String InvestmentUserId;
@ApiModelProperty("门店选址人姓名")
private String sitterName;
@ApiModelProperty("门店选址人id")
private String sitterId;
} }
@Data @Data

View File

@@ -0,0 +1,56 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:26
* @Version 1.0
*/
@Data
public class AssessmentTemplateVO {
@ApiModelProperty("ID")
private Long id;
/**
* 模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收
*/
@ApiModelProperty("模板类型0 - 教练员, 1 - 店长, 2 - 店员, 3 - 三方验收")
private Integer type;
/**
* 模板类别,可为空
*/
@ApiModelProperty("分类")
private String category;
/**
* 模板名称
*/
@ApiModelProperty("模板名称")
private String templateName;
/**
* 模板remark
*/
@ApiModelProperty("模板remark")
private List<String> templateRemarkList;
/**
* 考核项分值
*/
@ApiModelProperty("考核项分值")
private Long score;
/**
* 模板要求明细,包括详细的考核要求描述
*/
@ApiModelProperty("模板要求明细,包括详细的考核要求描述")
private String templateRequirements;
}

View File

@@ -52,6 +52,9 @@ public class PointAuditRecordVO {
@ApiModelProperty("是否超时") @ApiModelProperty("是否超时")
private Boolean isTimeout; private Boolean isTimeout;
@ApiModelProperty("节点")
private Integer nodeNo;
public static List<PointAuditRecordVO> convert(List<PointAuditRecordDO> auditRecordList, Map<String, EnterpriseUserDO> userMap) { public static List<PointAuditRecordVO> convert(List<PointAuditRecordDO> auditRecordList, Map<String, EnterpriseUserDO> userMap) {
List<PointAuditRecordVO> resultList = new ArrayList<>(); List<PointAuditRecordVO> resultList = new ArrayList<>();
for (PointAuditRecordDO pointAuditRecord : auditRecordList) { for (PointAuditRecordDO pointAuditRecord : auditRecordList) {
@@ -63,6 +66,7 @@ public class PointAuditRecordVO {
pointAuditRecordVO.setSignAddress(pointAuditRecord.getSignAddress()); pointAuditRecordVO.setSignAddress(pointAuditRecord.getSignAddress());
pointAuditRecordVO.setPictureUrl(pointAuditRecord.getPictureUrl()); pointAuditRecordVO.setPictureUrl(pointAuditRecord.getPictureUrl());
pointAuditRecordVO.setIsTimeout(Boolean.FALSE); pointAuditRecordVO.setIsTimeout(Boolean.FALSE);
pointAuditRecordVO.setNodeNo(pointAuditRecord.getNodeNo());
if(Objects.nonNull(pointAuditRecord.getReceiveTaskTime())){ if(Objects.nonNull(pointAuditRecord.getReceiveTaskTime())){
Date time = Objects.isNull(pointAuditRecord.getFinishTaskTime()) ? new Date() : pointAuditRecord.getFinishTaskTime(); Date time = Objects.isNull(pointAuditRecord.getFinishTaskTime()) ? new Date() : pointAuditRecord.getFinishTaskTime();
LocalDateTime localDateTime = LocalDateTime.ofInstant(pointAuditRecord.getReceiveTaskTime().toInstant(), ZoneId.systemDefault()); LocalDateTime localDateTime = LocalDateTime.ofInstant(pointAuditRecord.getReceiveTaskTime().toInstant(), ZoneId.systemDefault());

View File

@@ -56,8 +56,8 @@ public class RentInfoToDoVO {
if(Objects.nonNull(pointInfo)){ if(Objects.nonNull(pointInfo)){
rent.setPointName(pointInfo.getPointName()); rent.setPointName(pointInfo.getPointName());
rent.setAddress(pointInfo.getAddress()); rent.setAddress(pointInfo.getAddress());
rent.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
} }
rent.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
rent.setSubmitTime(rentContractSubmitTimeMap.get(rent.getShopId())); rent.setSubmitTime(rentContractSubmitTimeMap.get(rent.getShopId()));
resultList.add(rent); resultList.add(rent);
} }

View File

@@ -7,9 +7,32 @@ import com.cool.store.response.SubmitLicenseResponse;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
public interface ApplyLicenseService { public interface ApplyLicenseService {
/**
* 提交证照信息
* @param request
* @return
*/
Boolean submitLicense(SubmitLicenseRequest request); Boolean submitLicense(SubmitLicenseRequest request);
/**
* 获取默认值
* @param shopId
* @return
*/
SubmitLicenseResponse getDefault(Long shopId); SubmitLicenseResponse getDefault(Long shopId);
/**
* 证照审核列表
* @param request
* @return
*/
PageInfo<LicenseListResponse> licenseList(LicenseListRequest request); PageInfo<LicenseListResponse> licenseList(LicenseListRequest request);
/**
* 证照审核审批
* @param id
* @param status 0通过 1不通过
* @return
*/
Boolean licenseExamine(Long shopId, Integer status,String result);
} }

View File

@@ -0,0 +1,25 @@
package com.cool.store.service;
import com.cool.store.vo.AssessmentTemplateVO;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:24
* @Version 1.0
*/
public interface AssessmentTemplateService {
/**
* listByType
* @Description
* @Author suzhuhong
* @Date 2024/4/25 11:24
* @param type
* @return
*/
List<AssessmentTemplateVO> listByType(Integer type);
}

View File

@@ -16,7 +16,7 @@ public interface CoolStoreStartFlowService {
* @param request * @param request
* @return * @return
*/ */
ResponseResult newStore(NewStoreRequest request); ResponseResult newStore(NewStoreRequest request,Long shopId);
/** /**
*特许经营合同 *特许经营合同

View File

@@ -0,0 +1,20 @@
package com.cool.store.service;
import com.cool.store.request.FranchiseFeeRequest;
import com.cool.store.response.FranchiseFeeResponse;
public interface FranchiseFeeService {
/**
* 提交加盟费信息
* @param request
* @return
*/
Boolean submitLicense(FranchiseFeeRequest request);
/**
* 查询加盟费信息
* @param shopId
* @return
*/
FranchiseFeeResponse getDetail(Long shopId);
}

View File

@@ -5,10 +5,12 @@ import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.RegionDao; import com.cool.store.dao.RegionDao;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.LicenseTransactDO; import com.cool.store.entity.LicenseTransactDO;
import com.cool.store.entity.ShopAuditInfoDO; import com.cool.store.entity.ShopAuditInfoDO;
import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.AuditTypeEnum;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ApplyLicenseMapper; import com.cool.store.mapper.ApplyLicenseMapper;
import com.cool.store.mapper.ShopAuditInfoMapper; import com.cool.store.mapper.ShopAuditInfoMapper;
@@ -48,6 +50,9 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
@Resource @Resource
private RegionDao regionDao; private RegionDao regionDao;
@Resource
ShopStageInfoDAO shopStageInfoDAO;
@Override @Override
public Boolean submitLicense(SubmitLicenseRequest request) { public Boolean submitLicense(SubmitLicenseRequest request) {
log.info("submitLicense request{}", JSONObject.toJSONString(request)); log.info("submitLicense request{}", JSONObject.toJSONString(request));
@@ -68,8 +73,10 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
LoginUserInfo user = CurrentUserHolder.getUser(); LoginUserInfo user = CurrentUserHolder.getUser();
shopAuditInfoDO.setSubmittedUserId(user.getUserId()); shopAuditInfoDO.setSubmittedUserId(user.getUserId());
shopAuditInfoDO.setSubmittedUserName(user.getName()); shopAuditInfoDO.setSubmittedUserName(user.getName());
shopAuditInfoDO.setDataType(0);
shopAuditInfoMapper.insertSelective(shopAuditInfoDO); shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
} }
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_41,null);
return true; return true;
} }
@@ -83,6 +90,8 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
throw new ServiceException(ErrorCodeEnum.LICENSE_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LICENSE_NOT_EXIST);
} }
SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result); SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result);
List<ShopAuditInfoDO> listByShopIdAndType = shopAuditInfoMapper.getListByShopIdAndType(shopId, AuditTypeEnum.LICENSE_APPROVAL.getCode());
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
return submitLicenseResponse; return submitLicenseResponse;
} }
@@ -114,4 +123,27 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
} }
return new PageInfo<>(licenseListResponses); return new PageInfo<>(licenseListResponses);
} }
@Override
public Boolean licenseExamine(Long shopId, Integer status,String result) {
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
shopAuditInfoDO.setShopId(shopId);
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
shopAuditInfoDO.setAuditType(AuditTypeEnum.LICENSE_APPROVAL.getCode());
LoginUserInfo user = CurrentUserHolder.getUser();
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
shopAuditInfoDO.setSubmittedUserName(user.getName());
shopAuditInfoDO.setDataType(1);
shopAuditInfoDO.setResultType(status);
if (status == Constants.ZERO_INTEGER){
shopAuditInfoDO.setPassReason(result);
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43;
}else if (status == Constants.ONE_INTEGER){
shopAuditInfoDO.setRejectReason(result);
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_42;
}
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,shopSubStageStatusEnum,null);
return null;
}
} }

View File

@@ -0,0 +1,44 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.AssessmentTemplateDAO;
import com.cool.store.entity.AssessmentTemplateDO;
import com.cool.store.service.AssessmentTemplateService;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.AssessmentTemplateVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:25
* @Version 1.0
*/
@Service
public class AssessmentTemplateServiceImpl implements AssessmentTemplateService {
@Resource
AssessmentTemplateDAO assessmentTemplateDAO;
@Override
public List<AssessmentTemplateVO> listByType(Integer type) {
List<AssessmentTemplateDO> assessmentTemplateDOS = assessmentTemplateDAO.listByType(type);
List<AssessmentTemplateVO> result = new ArrayList<>();
assessmentTemplateDOS.forEach(x->{
AssessmentTemplateVO assessmentTemplateVO = new AssessmentTemplateVO();
BeanUtil.copyProperties(x,assessmentTemplateVO);
x.getTemplateRemark();
if (StringUtils.isNotEmpty(x.getTemplateRemark())){
String[] split = x.getTemplateRemark().replaceAll("[\\[\\]\\s]", "").split(",");
assessmentTemplateVO.setTemplateRemarkList(Arrays.asList(split));
}
result.add(assessmentTemplateVO);
});
return result;
}
}

View File

@@ -1,8 +1,10 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum; import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mq.util.HttpRestTemplateService; import com.cool.store.mq.util.HttpRestTemplateService;
import com.cool.store.request.FranchiseAgreementRequest; import com.cool.store.request.FranchiseAgreementRequest;
@@ -29,11 +31,14 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
@Value("${xfsg.url}") @Value("${xfsg.url}")
private String xfsgUrl; private String xfsgUrl;
@Resource
ShopStageInfoDAO shopStageInfoDAO;
@Resource @Resource
private HttpRestTemplateService httpRestTemplateService; private HttpRestTemplateService httpRestTemplateService;
@Override @Override
public ResponseResult newStore(NewStoreRequest request) { public ResponseResult newStore(NewStoreRequest request,Long shopId) {
log.info("newStore param:{}", JSONObject.toJSONString(request)); log.info("newStore param:{}", JSONObject.toJSONString(request));
if (Objects.isNull(request)) { if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR); throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
@@ -46,6 +51,8 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
if (initiatingResponse.getCode() != 0L){ if (initiatingResponse.getCode() != 0L){
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData()); return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData());
}else { }else {
//更新阶段信息
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31,null);
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData()); return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData());
} }
} }

View File

@@ -0,0 +1,37 @@
package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.entity.FranchiseFeeDO;
import com.cool.store.mapper.FranchiseFeeMapper;
import com.cool.store.request.FranchiseFeeRequest;
import com.cool.store.response.FranchiseFeeResponse;
import com.cool.store.service.FranchiseFeeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
@Slf4j
public class FranchiseFeeServiceImpl implements FranchiseFeeService {
@Resource
FranchiseFeeMapper franchiseFeeMapper;
@Override
public Boolean submitLicense(FranchiseFeeRequest request) {
log.info("submitLicense request{}", JSONObject.toJSONString(request));
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
franchiseFeeMapper.insertSelective(franchiseFeeDO);
return null;
}
@Override
public FranchiseFeeResponse getDetail(Long shopId) {
FranchiseFeeDO franchiseFeeDO = new FranchiseFeeDO();
franchiseFeeDO.setShopId(shopId);
FranchiseFeeDO result = franchiseFeeMapper.selectOneByExample(franchiseFeeDO);
FranchiseFeeResponse resp = FranchiseFeeResponse.from(result);
return resp;
}
}

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.cool.store.dao.HyPartnerUserInfoDAO; import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dao.LineInfoDAO; import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LinePayDAO; import com.cool.store.dao.LinePayDAO;
import com.cool.store.entity.FranchiseFeeDO;
import com.cool.store.entity.HyPartnerUserInfoDO; import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.LineInfoDO; import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.LinePayDO; import com.cool.store.entity.LinePayDO;
@@ -11,16 +12,20 @@ import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowSubStageEnum; import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum; import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.FranchiseFeeMapper;
import com.cool.store.mapper.LineInfoMapper; import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.LinePaySubmitRequest; import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.service.LinePayService; import com.cool.store.service.LinePayService;
import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.LinePayVO; import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO; import com.cool.store.vo.PartnerUserInfoVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /**
@@ -37,6 +42,9 @@ public class LinePayServiceImpl implements LinePayService {
@Resource @Resource
private LineInfoDAO lineInfoDAO; private LineInfoDAO lineInfoDAO;
@Resource
FranchiseFeeMapper franchiseFeeMapper;
@Override @Override
public LinePayVO getLinePayInfo(Long lineId) { public LinePayVO getLinePayInfo(Long lineId) {
LinePayVO result = null; LinePayVO result = null;
@@ -58,20 +66,39 @@ public class LinePayServiceImpl implements LinePayService {
if(Objects.isNull(lineInfo)){ if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
LinePayDO linePayDO = linePayDAO.getLinePayByLineId(request.getLineId()); if (request.getPayBusinessType() != null
if(linePayDO == null){ && request.getPayBusinessType() == Constants.ONE_INTEGER
linePayDO = new LinePayDO(); && request.getShopId() != null){
fillLinePay(true, linePayDO, request, partnerUser); LinePayDO linePayDO = linePayDAO.getLinePayByLineIdAndPayType(request.getLineId(),request.getPayBusinessType());
linePayDAO.addLinePay(linePayDO); if (Objects.isNull(linePayDO)){
fillLinePay(true, linePayDO, request, partnerUser);
Long aLong = linePayDAO.addLinePay(linePayDO);
FranchiseFeeDO franchiseFeeDO = new FranchiseFeeDO();
franchiseFeeDO.setShopId(request.getShopId());
FranchiseFeeDO result = franchiseFeeMapper.selectOneByExample(franchiseFeeDO);
result.setPayId(aLong);
franchiseFeeMapper.updateByPrimaryKeySelective(result);
}else {
fillLinePay(false, linePayDO, request, partnerUser);
linePayDAO.updateLinePay(linePayDO);
}
}else { }else {
fillLinePay(false, linePayDO, request, partnerUser); LinePayDO linePayDO = linePayDAO.getLinePayByLineIdAndPayType(request.getLineId(),0);
linePayDAO.updateLinePay(linePayDO); if(linePayDO == null){
} linePayDO = new LinePayDO();
fillLinePay(true, linePayDO, request, partnerUser);
linePayDAO.addLinePay(linePayDO);
}else {
fillLinePay(false, linePayDO, request, partnerUser);
linePayDAO.updateLinePay(linePayDO);
}
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode()); lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()); lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
lineInfoDAO.insertOrUpdate(lineInfo); lineInfoDAO.insertOrUpdate(lineInfo);
return linePayDO.getId(); return linePayDO.getId();
}
return null;
} }
private void fillLinePay(Boolean isAdd, LinePayDO linePayDO, LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) { private void fillLinePay(Boolean isAdd, LinePayDO linePayDO, LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
@@ -86,6 +113,7 @@ public class LinePayServiceImpl implements LinePayService {
linePayDO.setPayPic(request.getPayPic()); linePayDO.setPayPic(request.getPayPic());
linePayDO.setPromisePic(request.getPromisePic()); linePayDO.setPromisePic(request.getPromisePic());
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()); linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
linePayDO.setPayBusinessType(request.getPayBusinessType());
if(isAdd){ if(isAdd){
linePayDO.setPartnerId(partnerUser.getPartnerId()); linePayDO.setPartnerId(partnerUser.getPartnerId());
linePayDO.setLineId(request.getLineId()); linePayDO.setLineId(request.getLineId());

View File

@@ -85,6 +85,9 @@ public class LineServiceImpl implements LineService {
if (lineInfo==null){ if (lineInfo==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
if (StringUtil.isBlank(lineInfo.getInvestmentManager())){
return null;
}
if (lineInfo.getLineSource()!=null){ if (lineInfo.getLineSource()!=null){
Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(Arrays.asList(lineInfo.getLineSource())); Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(Arrays.asList(lineInfo.getLineSource()));
result.setLineSourceName(channelMapByIds.get(lineInfo.getLineSource())); result.setLineSourceName(channelMapByIds.get(lineInfo.getLineSource()));
@@ -94,7 +97,7 @@ public class LineServiceImpl implements LineService {
result.setInvestmentManagerName(user.getName()); result.setInvestmentManagerName(user.getName());
result.setInvestmentManagerMobile(user.getMobile()); result.setInvestmentManagerMobile(user.getMobile());
} }
if(lineInfo.getRegionId()!=null){ if(lineInfo.getRegionId() != null && lineInfo.getRegionId() != 0){
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId()); Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId());
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId())); Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId()));
result.setRegionId(lineInfo.getRegionId()); result.setRegionId(lineInfo.getRegionId());

View File

@@ -168,7 +168,7 @@ public class PointServiceImpl implements PointService {
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_7.getCode()); updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_7.getCode());
pointInfoDAO.updatePointInfo(updatePoint); pointInfoDAO.updatePointInfo(updatePoint);
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){ if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
rollbackSelectPoint(pointInfo.getShopId()); rollbackSelectPoint(pointInfo.getShopId(), pointInfo.getId());
} }
return pointRecommendDAO.updateRecommendStatus(pointId, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_6, null); return pointRecommendDAO.updateRecommendStatus(pointId, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_6, null);
} }
@@ -177,8 +177,11 @@ public class PointServiceImpl implements PointService {
* 回退选址状态 * 回退选址状态
* @return * @return
*/ */
private void rollbackSelectPoint(Long shopId){ private void rollbackSelectPoint(Long shopId, Long pointId){
//店铺回退待带选址
shopInfoDAO.unbindPoint(shopId); shopInfoDAO.unbindPoint(shopId);
//铺位回退
pointInfoDAO.recyclePoint(pointId);
//回到待选址状态 //回到待选址状态
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10); shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10);
//租赁合同回到未开始 //租赁合同回到未开始
@@ -200,9 +203,8 @@ public class PointServiceImpl implements PointService {
if(PointStatusEnum.POINT_STATUS_6.getCode().equals(pointInfo.getPointStatus())){ if(PointStatusEnum.POINT_STATUS_6.getCode().equals(pointInfo.getPointStatus())){
throw new ServiceException(ErrorCodeEnum.POINT_SIGNED); throw new ServiceException(ErrorCodeEnum.POINT_SIGNED);
} }
pointInfoDAO.recyclePoint(pointId);
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){ if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
rollbackSelectPoint(pointInfo.getShopId()); rollbackSelectPoint(pointInfo.getShopId(), pointInfo.getId());
} }
//将已选择、已被他人选择的状态更新成待选泽 //将已选择、已被他人选择的状态更新成待选泽
return pointRecommendDAO.updateRecommendStatusByStatusAndPointId(pointId, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1, Arrays.asList(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_3)); return pointRecommendDAO.updateRecommendStatusByStatusAndPointId(pointId, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1, Arrays.asList(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2, PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_3));
@@ -416,6 +418,12 @@ public class PointServiceImpl implements PointService {
if(Objects.isNull(pointInfo)){ if(Objects.isNull(pointInfo)){
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
} }
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus()) || PointStatusEnum.POINT_STATUS_6.getCode().equals(pointInfo.getPointStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
if(PointStatusEnum.POINT_STATUS_7.getCode().equals(pointInfo.getPointStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
pointInfo.setDevelopmentManager(request.getDevelopmentManager()); pointInfo.setDevelopmentManager(request.getDevelopmentManager());
return pointInfoDAO.updatePointInfo(pointInfo); return pointInfoDAO.updatePointInfo(pointInfo);
} }
@@ -429,7 +437,7 @@ public class PointServiceImpl implements PointService {
List<Long> wantShopAreaIds = lineList.stream().map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList()); List<Long> wantShopAreaIds = lineList.stream().map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, Integer> recommendShopNumMap = pointRecommendDAO.getPushShopNumMap(lineIds); Map<Long, Integer> recommendShopNumMap = pointRecommendDAO.getPushShopNumMap(lineIds);
Map<Long, HyOpenAreaInfoDO> cityMap = hyOpenAreaInfoDAO.getCityMap(wantShopAreaIds); Map<Long, HyOpenAreaInfoDO> cityMap = hyOpenAreaInfoDAO.getCityMap(wantShopAreaIds);
Map<Long, Integer> selectedShopNumMap = pointInfoDAO.getSelectedShopNumMap(lineIds); Map<Long, Integer> selectedShopNumMap = shopInfoDAO.getSelectedShopNumMap(lineIds);
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(investmentManagerUserIds); Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(investmentManagerUserIds);
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList); Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
List<LinePointBaseInfoVO> resultList = LinePointBaseInfoVO.convertList(lineList, userNameMap, userPortraitMap, cityMap, recommendShopNumMap, selectedShopNumMap); List<LinePointBaseInfoVO> resultList = LinePointBaseInfoVO.convertList(lineList, userNameMap, userPortraitMap, cityMap, recommendShopNumMap, selectedShopNumMap);
@@ -697,8 +705,9 @@ public class PointServiceImpl implements PointService {
pointInfoDAO.updatePointInfo(updatePoint); pointInfoDAO.updatePointInfo(updatePoint);
ShopInfoDO updateShop = new ShopInfoDO(); ShopInfoDO updateShop = new ShopInfoDO();
updateShop.setId(shopId); updateShop.setId(shopId);
updateShop.setShopName(pointInfo.getPointName());
updateShop.setPointId(pointId); updateShop.setPointId(pointId);
shopInfoDAO.updateShopInfo(shopInfo); shopInfoDAO.updateShopInfo(updateShop);
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11); shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
PointDetailInfoDO updateDetail = new PointDetailInfoDO(); PointDetailInfoDO updateDetail = new PointDetailInfoDO();
updateDetail.setPointId(pointId); updateDetail.setPointId(pointId);
@@ -780,13 +789,6 @@ public class PointServiceImpl implements PointService {
if(!request.check()){ if(!request.check()){
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR); throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
} }
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_2);
if(Objects.isNull(shopSubStageInfo)){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_ERROR);
}
if(!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
Long pointId = request.getPointId(), shopId = request.getShopId(); Long pointId = request.getPointId(), shopId = request.getShopId();
if(Objects.isNull(pointId) && Objects.nonNull(shopId)){ if(Objects.isNull(pointId) && Objects.nonNull(shopId)){
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
@@ -796,6 +798,13 @@ public class PointServiceImpl implements PointService {
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId); PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
shopId = pointInfo.getShopId(); shopId = pointInfo.getShopId();
} }
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_2);
if(Objects.isNull(shopSubStageInfo)){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_ERROR);
}
if(!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
//是否存在租赁合同 //是否存在租赁合同
ShopRentInfoDO rentContract = shopRentInfoDAO.getRentContractByShopId(shopId); ShopRentInfoDO rentContract = shopRentInfoDAO.getRentContractByShopId(shopId);
ShopRentInfoDO shopRentInfo = AddRentContractRequest.convertDO(request); ShopRentInfoDO shopRentInfo = AddRentContractRequest.convertDO(request);

View File

@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
* @Version 1.0 * @Version 1.0
*/ */
@Service @Service
public class PreparationServiceImpl implements PreparationService { public class PreparationServiceImpl implements PreparationService {
@Resource @Resource
private ShopStageInfoDAO shopStageInfoDAO; private ShopStageInfoDAO shopStageInfoDAO;
@@ -38,8 +38,8 @@ public class PreparationServiceImpl implements PreparationService {
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null); List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
if (CollectionUtils.isNotEmpty(shopStageInfo)){ if (CollectionUtils.isNotEmpty(shopStageInfo)){
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data)); Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
Boolean buildStoreCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatusName().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus()); Boolean buildStoreCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
Boolean contractCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatusName().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage()).getShopSubStageStatus()); Boolean contractCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage()).getShopSubStageStatus());
//都完成了 初始化后续流程数据 //都完成了 初始化后续流程数据
if (buildStoreCompletionFlag && contractCompletionFlag){ if (buildStoreCompletionFlag && contractCompletionFlag){

View File

@@ -4,11 +4,13 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.AuditEnum; import com.cool.store.enums.AuditEnum;
import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.AuditTypeEnum;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.UserRoleEnum; import com.cool.store.enums.UserRoleEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.enums.prepare.newStore.BusinessDistrictEnum; import com.cool.store.enums.prepare.newStore.BusinessDistrictEnum;
import com.cool.store.enums.prepare.newStore.OfflineCompetitorEnum; import com.cool.store.enums.prepare.newStore.OfflineCompetitorEnum;
import com.cool.store.enums.prepare.newStore.PassengerFlowEnum; import com.cool.store.enums.prepare.newStore.PassengerFlowEnum;
@@ -72,6 +74,9 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
@Resource @Resource
ShopInfoMapper shopInfoMapper; ShopInfoMapper shopInfoMapper;
@Resource
ShopStageInfoDAO shopStageInfoDAO;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseResult submitSysBuildStore(SysStoreAppRequest request) { public ResponseResult submitSysBuildStore(SysStoreAppRequest request) {
@@ -92,7 +97,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(request.getLineId(), request.getShopId());//查铺位信息确定铺位所在大区、战区、门店所在省市区街道地址 PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(request.getLineId(), request.getShopId());//查铺位信息确定铺位所在大区、战区、门店所在省市区街道地址
//3.请求鲜丰接口 //3.请求鲜丰接口
NewStoreRequest apiRequest = convertToNewStoreRequest(request,lineInfoDO,pointInfoDO); NewStoreRequest apiRequest = convertToNewStoreRequest(request,lineInfoDO,pointInfoDO);
return coolStoreStartFlowService.newStore(apiRequest); return coolStoreStartFlowService.newStore(apiRequest,request.getShopId());
} }
@Override @Override
@@ -220,6 +225,14 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
franInfo.setPartnerNum(lineInfoDO.getPartnerNum()); franInfo.setPartnerNum(lineInfoDO.getPartnerNum());
franInfo.setFranchiseeMobile(lineInfoDO.getMobile()); franInfo.setFranchiseeMobile(lineInfoDO.getMobile());
franInfo.setFranchiseeName(lineInfoDO.getUsername()); franInfo.setFranchiseeName(lineInfoDO.getUsername());
franInfo.setInvestmentUserId(lineInfoDO.getInvestmentManager());
EnterpriseUserDO userInfoById = enterpriseUserMapper.getUserInfoById(lineInfoDO.getInvestmentManager());
franInfo.setInvestmentName(userInfoById.getName());
}
if (Objects.nonNull(pointInfoDO)){
EnterpriseUserDO locationPeople = enterpriseUserMapper.getUserInfoById(pointInfoDO.getDevelopmentManager());//门店选址人
franInfo.setSitterId(pointInfoDO.getDevelopmentManager());
franInfo.setSitterName(locationPeople.getName());
} }
sysStoreAppResponse.setStoreDetail(storeDetail); sysStoreAppResponse.setStoreDetail(storeDetail);
sysStoreAppResponse.setSupervisorDetail(supervisorDetail); sysStoreAppResponse.setSupervisorDetail(supervisorDetail);
@@ -376,6 +389,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
String kdzBusinessId = request.getKdzBusinessId(); String kdzBusinessId = request.getKdzBusinessId();
Long shopId = getShopId(kdzBusinessId); Long shopId = getShopId(kdzBusinessId);
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO(); ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
//1.成功/失败原因 //1.成功/失败原因
try { try {
shopAuditInfoDO.setShopId(shopId); shopAuditInfoDO.setShopId(shopId);
@@ -383,12 +397,14 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
LoginUserInfo user = CurrentUserHolder.getUser(); LoginUserInfo user = CurrentUserHolder.getUser();
shopAuditInfoDO.setSubmittedUserId(user.getUserId()); shopAuditInfoDO.setSubmittedUserId(user.getUserId());
shopAuditInfoDO.setSubmittedUserName(user.getName()); shopAuditInfoDO.setSubmittedUserName(user.getName());
if (request.getAuditResult() == 0){ if (request.getAuditResult() == Constants.ZERO_INTEGER){
shopAuditInfoDO.setResultType(1); shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
shopAuditInfoDO.setRejectReason(request.getCause()); shopAuditInfoDO.setRejectReason(request.getCause());
}else if (request.getAuditResult() == 1){ shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_32;
shopAuditInfoDO.setResultType(0); }else if (request.getAuditResult() == Constants.ONE_INTEGER){
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
shopAuditInfoDO.setPassReason(request.getCause()); shopAuditInfoDO.setPassReason(request.getCause());
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33;
} }
shopAuditInfoMapper.insertSelective(shopAuditInfoDO); shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
}catch (Exception e){ }catch (Exception e){
@@ -396,10 +412,13 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
}finally { }finally {
//2.校验建店与加盟签约合同是否完成 并初始化后续流程数据 //2.校验建店与加盟签约合同是否完成 并初始化后续流程数据
preparationService.contractAndBuildStoreCompletion(shopId); preparationService.contractAndBuildStoreCompletion(shopId);
//更新门店编码
ShopInfoDO shopInfoDO = new ShopInfoDO(); ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setId(shopId); shopInfoDO.setId(shopId);
shopInfoDO.setStoreNum(request.getStoreNum()); shopInfoDO.setStoreNum(request.getStoreNum());
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO); shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
//更新阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum,null);
} }
return true; return true;
} }

View File

@@ -0,0 +1,39 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.AssessmentTemplateService;
import com.cool.store.vo.AssessmentTemplateVO;
import com.cool.store.vo.desk.IntendPendingVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:41
* @Version 1.0
*/
@Api(tags = "模板列表")
@RestController
@RequestMapping("pc/template")
public class AssessmentTemplateController {
@Resource
AssessmentTemplateService assessmentTemplateService;
@ApiOperation("检查项模板列表type 0 1 2 3")
@GetMapping("/listByType")
public ResponseResult<List<AssessmentTemplateVO>> intendPendingList(@RequestParam(value = "type",required = true)Integer type) {
return ResponseResult.success(assessmentTemplateService.listByType(type));
}
}

View File

@@ -4,16 +4,16 @@ import com.cool.store.request.LicenseListRequest;
import com.cool.store.request.OpenAcceptanceRequest; import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.response.LicenseListResponse; import com.cool.store.response.LicenseListResponse;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.response.SubmitLicenseResponse;
import com.cool.store.service.ApplyLicenseService; import com.cool.store.service.ApplyLicenseService;
import com.cool.store.vo.OpenAcceptanceInfoListVO; import com.cool.store.vo.OpenAcceptanceInfoListVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -34,7 +34,22 @@ public class PCApplyLicenseController {
@ApiOperation("证照办理数据回显") @ApiOperation("证照办理数据回显")
@GetMapping("/default/get") @GetMapping("/default/get")
public ResponseResult getDefault(@RequestParam("shopId") Long shopId) { public ResponseResult<SubmitLicenseResponse> getDefault(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(applyLicenseService.getDefault(shopId)); return ResponseResult.success(applyLicenseService.getDefault(shopId));
} }
/**
*
* @param id
* @param status 0通过 1不通过
* @return
*/
@PostMapping(path = "/examine")
@ApiOperation("证照审批列表")
public ResponseResult licenseExamine(@RequestParam("id") Long shopId,
@RequestParam("status") Integer status,
@RequestParam("result") String result) {
return ResponseResult.success(applyLicenseService.licenseExamine(shopId,status,result));
}
} }

View File

@@ -0,0 +1,33 @@
package com.cool.store.controller.webb;
import com.cool.store.request.FranchiseFeeRequest;
import com.cool.store.request.SubmitLicenseRequest;
import com.cool.store.response.FranchiseFeeResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.FranchiseFeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/pc/franchiseFee")
@Api(tags = "PC加盟费/保证金")
@Slf4j
public class PCFranchiseFeeController {
FranchiseFeeService franchiseFeeService;
@ApiOperation("基本信息提交")
@PostMapping("/submit")
public ResponseResult submitLicense(@RequestBody FranchiseFeeRequest request) {
return ResponseResult.success(franchiseFeeService.submitLicense(request));
}
@ApiOperation("基本信息查询")
@GetMapping("/getDetail")
public ResponseResult<FranchiseFeeResponse> getDetail(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(franchiseFeeService.getDetail(shopId));
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller.webb; package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.PartnerUserHolder; import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.*; import com.cool.store.request.*;
@@ -11,6 +12,7 @@ import com.cool.store.vo.shop.ShopStageVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -23,6 +25,7 @@ import java.util.List;
* @Description: * @Description:
* @date 2024-03-29 15:36 * @date 2024-03-29 15:36
*/ */
@Slf4j
@Api(tags = "选址&铺位") @Api(tags = "选址&铺位")
@RestController @RestController
@RequestMapping("/pc/point") @RequestMapping("/pc/point")
@@ -34,6 +37,7 @@ public class PointController {
@ApiOperation("新增铺位") @ApiOperation("新增铺位")
@PostMapping("/add") @PostMapping("/add")
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) { public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId())); return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
} }

View File

@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
import com.cool.store.request.SysStoreAppRequest; import com.cool.store.request.SysStoreAppRequest;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.response.SysStoreAppResponse;
import com.cool.store.service.SysStoreAppService; import com.cool.store.service.SysStoreAppService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -14,7 +15,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/pc/sysStore") @RequestMapping("/pc/sysStore")
@Api(tags = "系统建店") @Api(tags = "PC系统建店")
@Slf4j @Slf4j
public class SysStoreAppController { public class SysStoreAppController {
@@ -29,8 +30,8 @@ public class SysStoreAppController {
@GetMapping(path = "/default/get") @GetMapping(path = "/default/get")
@ApiOperation("获取系统建店默认值") @ApiOperation("获取系统建店默认值")
public ResponseResult getDefaultValueSysBuildStore(@RequestParam("lineId") Long lineId, public ResponseResult<SysStoreAppResponse> getDefaultValueSysBuildStore(@RequestParam("lineId") Long lineId,
@RequestParam("shopId") Long shopId) { @RequestParam("shopId") Long shopId) {
return ResponseResult.success(sysStoreAppService.getDefaultValueSysBuildStore(lineId,shopId)); return ResponseResult.success(sysStoreAppService.getDefaultValueSysBuildStore(lineId,shopId));
} }

View File

@@ -0,0 +1,42 @@
package com.cool.store.controller.webc;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.NewStoreOpeningService;
import com.cool.store.vo.NewStoreOpeningVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author byd
* @Date 2023/6/15 9:49
* @Version 1.0
*/
@RestController
@RequestMapping("/mini//newStoreOpening")
@Api(tags = "mini新店开业")
public class MiniNewStoreOpeningController {
@Resource
NewStoreOpeningService newStoreOpeningService;
@GetMapping(path = "/storeTodoList")
@ApiOperation("新店开业待办列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
})
public ResponseResult<List<NewStoreOpeningVO>> storeTodoList(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(newStoreOpeningService.storeTodoList(shopId));
}
}

View File

@@ -0,0 +1,49 @@
package com.cool.store.controller.webc;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpenAcceptanceInfoService;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import com.cool.store.vo.ShopAcceptanceVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author byd
* @Date 2023/6/15 9:49
* @Version 1.0
*/
@RestController
@RequestMapping("/mini/openAcceptanceInfo")
@Api(tags = "mini开业验收")
public class MiniOpenAcceptanceInfoController {
@Resource
OpenAcceptanceInfoService openAcceptanceInfoService;
@GetMapping(path = "/openAcceptanceList")
@ApiOperation("开业验收列表")
public ResponseResult<PageInfo<OpenAcceptanceInfoListVO>> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest) {
return ResponseResult.success(openAcceptanceInfoService.openAcceptanceList(openAcceptanceRequest));
}
@GetMapping(path = "/acceptanceStageList")
@ApiOperation("开业验收阶段结果列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
})
public ResponseResult<ShopAcceptanceVO> acceptanceStageList(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(openAcceptanceInfoService.acceptanceStageList(shopId));
}
}

View File

@@ -0,0 +1,35 @@
package com.cool.store.controller.webc;
import com.cool.store.request.SysStoreAppRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.SysStoreAppResponse;
import com.cool.store.service.SysStoreAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/mini/sysStore")
@Api(tags = "mini系统建店")
@Slf4j
public class MiniSysStoreAppController {
@Resource
private SysStoreAppService sysStoreAppService;
@PostMapping(path = "/submit")
@ApiOperation("提交(更新) 系统建店申请")
public ResponseResult submitSysBuildStore(@RequestBody SysStoreAppRequest request) {
return sysStoreAppService.submitSysBuildStore(request);
}
@GetMapping(path = "/default/get")
@ApiOperation("获取系统建店默认值")
public ResponseResult<SysStoreAppResponse> getDefaultValueSysBuildStore(@RequestParam("lineId") Long lineId,
@RequestParam("shopId") Long shopId) {
return ResponseResult.success(sysStoreAppService.getDefaultValueSysBuildStore(lineId,shopId));
}
}