feat:系统建店相关代码
refactor:鲜丰系统API回调优化
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
public enum AuditEnum {
|
||||
|
||||
CONTRACT_INTENTION("intention", "意向加盟合同API","IntentAgreementServiceImpl"),
|
||||
SYS_BUILD("sysBuild", "系统建店API","SysStoreAppServiceImpl"),
|
||||
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
private String clazz;
|
||||
|
||||
AuditEnum(String code, String message, String clazz) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public static AuditEnum getWorkflowSubStageEnum(String flag) {
|
||||
for (AuditEnum auditEnum : AuditEnum.values()) {
|
||||
if (auditEnum.getCode().equals(flag)) {
|
||||
return auditEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: SmsCodeTypeEnum
|
||||
* @Description: 短信验证码类型
|
||||
* @date 2021-07-20 9:47
|
||||
*/
|
||||
|
||||
public enum SmsCodeTypeEnum {
|
||||
|
||||
LOGIN("SMS_220325070","验证码登录", 10 * 60),
|
||||
FORGOT_PWD("SMS_220325070","忘记密码", 10 * 60),
|
||||
MODIFY_PWD("SMS_220325070","修改密码", 10 * 60),
|
||||
IMPROVE_INFO("SMS_220325070","完善用户信息", 10 * 60),
|
||||
USER_REGISTER("SMS_220325070","用户注册", 10 * 60),
|
||||
ENTERPRISE_REGISTER("SMS_220325070","企业注册", 10 * 60),
|
||||
LOGIN2("SMS_232163403","验证码登录", 10 * 60),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private String templateCode;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.enums.prepare.newStore;
|
||||
|
||||
import com.cool.store.enums.ThirdRegionTypeEnum;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 社区类型
|
||||
*/
|
||||
public enum BusinessDistrictEnum {
|
||||
|
||||
COMMUNITY(10,"社区型"),
|
||||
COMMERCIAL_STREET(20,"商业街边型"),
|
||||
SCHOOL(30,"学校型"),
|
||||
CBD_OFFICE(40,"CBD/办公型"),
|
||||
HOSPITAL(60,"医院型"),
|
||||
VEGETABLE_MARKET(70,"-菜场型"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
BusinessDistrictEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static final Map<Integer, BusinessDistrictEnum> map
|
||||
= Arrays.stream(values()).collect(Collectors.toMap(BusinessDistrictEnum::getCode, Function.identity()));
|
||||
|
||||
public static BusinessDistrictEnum getByCode(Integer code) {
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cool.store.enums.prepare.newStore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 线下竞争对手
|
||||
*/
|
||||
public enum OfflineCompetitorEnum {
|
||||
BRAND_FRUIT(10,"品牌水果店"),
|
||||
COUPLES_FRUIT(20,"夫妻水果店"),
|
||||
VEGETABLE_MARKET(30,"菜场店"),
|
||||
BIG_BUSINESS(40,"大商超"),
|
||||
FRESH_FOOD(50,"生鲜店"),
|
||||
NONE(60,"无"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
OfflineCompetitorEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static final Map<Integer, OfflineCompetitorEnum> map
|
||||
= Arrays.stream(values()).collect(Collectors.toMap(OfflineCompetitorEnum::getCode, Function.identity()));
|
||||
|
||||
public static OfflineCompetitorEnum getByCode(Integer code) {
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.enums.prepare.newStore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public enum PassengerFlowEnum {
|
||||
BELOW_1000(0,"1000以下"),
|
||||
TO_1000_10000(1,"1000-1万"),
|
||||
MORE_THAN_10000(2,"1万以上"),
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
PassengerFlowEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static final Map<Integer, PassengerFlowEnum> map
|
||||
= Arrays.stream(values()).collect(Collectors.toMap(PassengerFlowEnum::getCode, Function.identity()));
|
||||
|
||||
public static PassengerFlowEnum getByCode(Integer code) {
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.cool.store.enums.prepare.newStore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public enum StoreOperatorEnum {
|
||||
FRANCHISEE(10,"加盟商"),
|
||||
STORE_MANAGER(20,"店长"),
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
StoreOperatorEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static final Map<Integer, StoreOperatorEnum> map
|
||||
= Arrays.stream(values()).collect(Collectors.toMap(StoreOperatorEnum::getCode, Function.identity()));
|
||||
|
||||
public static StoreOperatorEnum getByCode(Integer code) {
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
@@ -72,4 +72,13 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
Integer recyclePoint(@Param("pointId") Long pointId);
|
||||
|
||||
/**
|
||||
* 根据shopId与lineId查找铺位信息
|
||||
* @param lineId
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
PointInfoDO getDataByShopIdAndLineId(@Param("lineId") Long lineId,
|
||||
@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -100,4 +100,6 @@ public interface RegionMapper {
|
||||
|
||||
|
||||
RegionDO getRegionByStoreId(@Param("storeId") String storeId);
|
||||
|
||||
RegionDO getBigRegionByRegionId(@Param("regionId") long regionId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.SystemBuildingShopDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface SystemBuildingShopMapper extends tk.mybatis.mapper.common.Mapper<SystemBuildingShopDO> {
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ThirdDepartmentDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 主应用移植,完整的使用去主应用找
|
||||
*/
|
||||
public interface ThirdDepartmentMapper {
|
||||
/**
|
||||
*
|
||||
* 默认查询方法,通过主键获取所有字段的值
|
||||
* dateTime:2024-04-02 04:42
|
||||
*/
|
||||
ThirdDepartmentDO selectByPrimaryKey(Long id);
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键物理删除
|
||||
* dateTime:2024-04-02 04:42
|
||||
*/
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
Integer deleteThirdDepartment(@Param("departmentCodes") List<String> departmentCodes);
|
||||
|
||||
void batchInsertOrUpdate(@Param("thirdDepartments") List<ThirdDepartmentDO> thirdDepartments);
|
||||
|
||||
List<ThirdDepartmentDO> listByDeptPrincipals(@Param("deptPrincipals") List<String> deptPrincipals);
|
||||
|
||||
List<ThirdDepartmentDO> listAllThirdDepartment();
|
||||
|
||||
ThirdDepartmentDO getByDepartmentCode(@Param("departmentCode") String departmentCode);
|
||||
|
||||
ThirdDepartmentDO getByName(@Param("name")String name);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -190,8 +190,16 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDataByShopIdAndLineId" resultType="com.cool.store.entity.PointInfoDO">
|
||||
SELECT
|
||||
<include refid="allColumn"/>
|
||||
FROM xfsg_point_info
|
||||
WHERE shop_id = #{shopId}
|
||||
AND line_id = #{lineId}
|
||||
AND deleted = 0
|
||||
</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>
|
||||
|
||||
|
||||
@@ -364,6 +364,16 @@
|
||||
and store_id = #{storeId}
|
||||
and region_type = 'store'
|
||||
</select>
|
||||
<select id="getBigRegionByRegionId" resultType="com.cool.store.entity.RegionDO">
|
||||
select <include refid="fields"/>
|
||||
from region_${enterpriseId}
|
||||
where deleted = 0
|
||||
and id = (
|
||||
SELECT parent_id
|
||||
FROM region_${enterpriseId}
|
||||
WHERE id = #{regionId}
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?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.SystemBuildingShopMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.SystemBuildingShopDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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.ThirdDepartmentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ThirdDepartmentDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="department_code" jdbcType="VARCHAR" property="departmentCode" />
|
||||
<result column="department_name" jdbcType="VARCHAR" property="departmentName" />
|
||||
<result column="dept_principal" jdbcType="VARCHAR" property="deptPrincipal" />
|
||||
<result column="parent_department_code" jdbcType="VARCHAR" property="parentDepartmentCode" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, department_code,
|
||||
department_name,
|
||||
dept_principal,
|
||||
parent_department_code,
|
||||
create_time,
|
||||
update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from third_department_${enterpriseId}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from third_department_${enterpriseId}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<sql id="dynamicQuery">
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="null != id">
|
||||
and t.id = #{id,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="null != departmentCode">
|
||||
and t.department_code = #{departmentCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="null != departmentName">
|
||||
and t.department_name = #{departmentName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="null != deptPrincipal">
|
||||
and t.dept_principal = #{deptPrincipal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="null != parentDepartmentCode">
|
||||
and t.parent_department_code = #{parentDepartmentCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="null != createTime">
|
||||
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="null != updateTime">
|
||||
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteThirdDepartment">
|
||||
delete from third_department_${enterpriseId}
|
||||
where department_code in
|
||||
<foreach collection="departmentCodes" item="departmentCode" open="(" separator="," close=")">
|
||||
#{departmentCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertOrUpdate" parameterType="java.util.List">
|
||||
insert into third_department_${enterpriseId}
|
||||
(
|
||||
department_code,
|
||||
department_name,
|
||||
dept_principal,
|
||||
parent_department_code,
|
||||
create_time
|
||||
) values
|
||||
<foreach collection="thirdDepartments" item="thirdDepartment" separator=",">
|
||||
(
|
||||
#{thirdDepartment.departmentCode},
|
||||
#{thirdDepartment.departmentName},
|
||||
#{thirdDepartment.deptPrincipal},
|
||||
#{thirdDepartment.parentDepartmentCode},
|
||||
now()
|
||||
)
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE update_time=values(update_time),department_name=values(department_name),
|
||||
dept_principal=values(dept_principal),parent_department_code=values(parent_department_code)
|
||||
</insert>
|
||||
|
||||
<select id="listByDeptPrincipals" resultType="com.cool.store.entity.ThirdDepartmentDO">
|
||||
select <include refid="Base_Column_List" />
|
||||
from third_department_${enterpriseId}
|
||||
where dept_principal in
|
||||
<foreach collection="deptPrincipals" item="deptPrincipal" open="(" separator="," close=")">
|
||||
#{deptPrincipal}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="listAllThirdDepartment" resultType="com.cool.store.entity.ThirdDepartmentDO">
|
||||
select <include refid="Base_Column_List" />
|
||||
from third_department_${enterpriseId}
|
||||
</select>
|
||||
|
||||
<select id="getByDepartmentCode" resultType="com.cool.store.entity.ThirdDepartmentDO">
|
||||
select <include refid="Base_Column_List" />
|
||||
from third_department_${enterpriseId}
|
||||
where department_code = #{departmentCode}
|
||||
</select>
|
||||
<select id="getByName" resultType="com.cool.store.entity.ThirdDepartmentDO">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM third_department_${enterpriseId}
|
||||
WHERE department_name = #{name}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.cool.store.request.SysStoreAppRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "xfsg_system_building_shop")
|
||||
public class SystemBuildingShopDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
@Column(name = "line_id")
|
||||
private Long lineId;
|
||||
@Column(name = "audit_id")
|
||||
private Long auditId;
|
||||
@Column(name = "franchisee_type")
|
||||
private Integer franchiseeType;
|
||||
@Column(name = "store_invitees_name")
|
||||
private String storeInviteesName;
|
||||
@Column(name = "store_invitees_id")
|
||||
private String storeInviteesId;
|
||||
@Column(name = "store_nature")
|
||||
private Integer storeNature;
|
||||
@Column(name = "store_operator")
|
||||
private Integer storeOperator;
|
||||
@Column(name = "big_desc")
|
||||
private String bigDesc;
|
||||
@Column(name = "big_name")
|
||||
private String bigName;
|
||||
@Column(name = "big_code")
|
||||
private String bigCode;
|
||||
@Column(name = "fight_desc")
|
||||
private String fightDesc;
|
||||
@Column(name = "fight_name")
|
||||
private String fightName;
|
||||
@Column(name = "fight_code")
|
||||
private String fightCode;
|
||||
@Column(name = "small_code")
|
||||
private String smallCode;
|
||||
@Column(name = "small_desc")
|
||||
private String smallDesc;
|
||||
@Column(name = "small_name")
|
||||
private String smallName;
|
||||
@Column(name = "main_business_type")
|
||||
private Integer mainBusinessType;
|
||||
@Column(name = "sub_business_type")
|
||||
private Integer subBusinessType;
|
||||
@Column(name = "offline_competitor")
|
||||
private Integer offlineCompetitor;
|
||||
@Column(name = "offline_competing_brand")
|
||||
private String offlineCompetingBrand;
|
||||
@Column(name = "average_price_sh")
|
||||
private Integer averagePriceSh;
|
||||
@Column(name = "average_daily_rs")
|
||||
private Integer averageDailyRs;
|
||||
@Column(name = "business_store_type")
|
||||
private String businessStoreType;
|
||||
@Column(name = "estimated_turnover")
|
||||
private Integer estimatedTurnover;
|
||||
@Column(name = "sign_date")
|
||||
private Date signDate;
|
||||
@Column(name = "landlord_name")
|
||||
private String landlordName;
|
||||
@Column(name = "contract_delivery_date")
|
||||
private Date contractDeliveryDate;
|
||||
@Column(name = "landlord_mobile")
|
||||
private String landlordMobile;
|
||||
@Column(name = "reservation")
|
||||
private Date reservation;
|
||||
@Column(name = "store_rent")
|
||||
private Integer storeRent;
|
||||
@Column(name = "store_franchise_fee")
|
||||
private Integer storeFranchiseFee;
|
||||
@Column(name = "store_security_deposit")
|
||||
private Integer storeSecurityDeposit;
|
||||
@Column(name = "reasons")
|
||||
private String reasons;
|
||||
@Column(name = "supervisor_name")
|
||||
private String supervisorName;
|
||||
@Column(name = "supervisor_id")
|
||||
private String supervisorId;
|
||||
@Column(name = "regio_general")
|
||||
private String regioGeneral;
|
||||
@Column(name = "regio_general_id")
|
||||
private String regioGeneralId;
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
||||
public static SystemBuildingShopDO convertToSystemBuildingShopDO(SysStoreAppRequest sysStoreAppRequest) {
|
||||
if (Objects.isNull(sysStoreAppRequest)) {
|
||||
return null;
|
||||
}
|
||||
SystemBuildingShopDO systemBuildingShopDO = new SystemBuildingShopDO();
|
||||
// id
|
||||
// shopInfoId
|
||||
systemBuildingShopDO.setShopId(sysStoreAppRequest.getShopId());
|
||||
// lineId
|
||||
systemBuildingShopDO.setLineId(sysStoreAppRequest.getLineId());
|
||||
// franchiseeType
|
||||
systemBuildingShopDO.setFranchiseeType(sysStoreAppRequest.getFranInfo().getFranchiseeType());
|
||||
// storeInviteesName
|
||||
systemBuildingShopDO.setStoreInviteesName(sysStoreAppRequest.getFranInfo().getStoreInviteesName());
|
||||
// // storeInviteesId
|
||||
systemBuildingShopDO.setStoreInviteesId(sysStoreAppRequest.getFranInfo().getInviteUserId());
|
||||
// storeNature
|
||||
systemBuildingShopDO.setStoreNature(sysStoreAppRequest.getStoreDetail().getStoreNature());
|
||||
// storeOperator
|
||||
// systemBuildingShopDO.setStoreOperator(sysStoreAppRequest.getStoreDetail().getstore);
|
||||
// bigDesc
|
||||
systemBuildingShopDO.setBigDesc(sysStoreAppRequest.getStoreDetail().getBigDesc());
|
||||
// fightDesc
|
||||
systemBuildingShopDO.setFightDesc(sysStoreAppRequest.getStoreDetail().getFightDesc());
|
||||
// smallCode
|
||||
systemBuildingShopDO.setSmallCode(sysStoreAppRequest.getStoreDetail().getSmallCode());
|
||||
// smallDesc
|
||||
systemBuildingShopDO.setSmallDesc(sysStoreAppRequest.getStoreDetail().getSmallDesc());
|
||||
// mainBusinessType
|
||||
systemBuildingShopDO.setMainBusinessType(sysStoreAppRequest.getStoreDetail().getMainBusinessType());
|
||||
// subBusinessType
|
||||
systemBuildingShopDO.setSubBusinessType(sysStoreAppRequest.getStoreDetail().getSubBusinessType());
|
||||
// offlineCompetitor
|
||||
systemBuildingShopDO.setOfflineCompetitor(sysStoreAppRequest.getStoreDetail().getOfflineCompetitor());
|
||||
// offlineCompetingBrand
|
||||
systemBuildingShopDO.setOfflineCompetingBrand(sysStoreAppRequest.getStoreDetail().getOfflineCompetingBrand());
|
||||
// averagePriceSh
|
||||
systemBuildingShopDO.setAveragePriceSh(sysStoreAppRequest.getStoreDetail().getAveragePriceSh());
|
||||
// averageDailyRs
|
||||
systemBuildingShopDO.setAverageDailyRs(sysStoreAppRequest.getStoreDetail().getAverageDailyRs());
|
||||
// businessStoreType
|
||||
systemBuildingShopDO.setBusinessStoreType(sysStoreAppRequest.getStoreDetail().getBusinessStoreType());
|
||||
// estimatedTurnover
|
||||
systemBuildingShopDO.setEstimatedTurnover(sysStoreAppRequest.getStoreDetail().getEstimatedTurnover());
|
||||
// signDate
|
||||
systemBuildingShopDO.setSignDate(sysStoreAppRequest.getStoreDetail().getSignDate());
|
||||
// landlordName
|
||||
systemBuildingShopDO.setLandlordName(sysStoreAppRequest.getStoreDetail().getLandlordName());
|
||||
// contractDeliveryDate
|
||||
systemBuildingShopDO.setContractDeliveryDate(sysStoreAppRequest.getStoreDetail().getContractDeliveryDate());
|
||||
// landlordMobile
|
||||
systemBuildingShopDO.setLandlordMobile(sysStoreAppRequest.getStoreDetail().getLandlordMobile());
|
||||
// reservation
|
||||
systemBuildingShopDO.setReservation(sysStoreAppRequest.getStoreDetail().getReservation());
|
||||
// storeRent
|
||||
systemBuildingShopDO.setStoreRent(sysStoreAppRequest.getStoreDetail().getStoreRent());
|
||||
// storeFranchiseFee
|
||||
systemBuildingShopDO.setStoreFranchiseFee(sysStoreAppRequest.getStoreDetail().getStoreFranchiseFee());
|
||||
// storeSecurityDeposit
|
||||
systemBuildingShopDO.setStoreSecurityDeposit(sysStoreAppRequest.getStoreDetail().getStoreSecurityDeposit());
|
||||
// reasons
|
||||
systemBuildingShopDO.setReasons(sysStoreAppRequest.getStoreDetail().getReasons());
|
||||
// supervisorName
|
||||
systemBuildingShopDO.setSupervisorName(sysStoreAppRequest.getSupervisorDetail().getSupervisorName());
|
||||
// supervisorId
|
||||
systemBuildingShopDO.setSupervisorId(sysStoreAppRequest.getSupervisorDetail().getSupervisorId());
|
||||
// regioGeneral
|
||||
systemBuildingShopDO.setRegioGeneral(sysStoreAppRequest.getSupervisorDetail().getRegioGeneral());
|
||||
// regioGeneralId
|
||||
systemBuildingShopDO.setRegioGeneralId(sysStoreAppRequest.getSupervisorDetail().getRegioGeneralId());
|
||||
return systemBuildingShopDO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ThirdDepartmentDO implements Serializable {
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("三方部门code")
|
||||
private String departmentCode;
|
||||
|
||||
@ApiModelProperty("三方部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@ApiModelProperty("部门负责人 鲜丰水果是工号")
|
||||
private String deptPrincipal;
|
||||
|
||||
@ApiModelProperty("父部门code")
|
||||
private String parentDepartmentCode;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("意向加盟合同审核结果请求体")
|
||||
@ApiModel("审核结果请求体")
|
||||
public class AuditResultRequest {
|
||||
|
||||
@ApiModelProperty("kdz业务id唯一标识")
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class FranchiseAgreementRequest {
|
||||
/**
|
||||
* 流程发起人工号
|
||||
*/
|
||||
private String apply_user;
|
||||
/**
|
||||
* 公司主体0.鲜丰水果股份有限公司
|
||||
*/
|
||||
private long company;
|
||||
/**
|
||||
* 第一年度结束时间
|
||||
*/
|
||||
private String end1;
|
||||
/**
|
||||
* 第二年度结束时间
|
||||
*/
|
||||
private String end2;
|
||||
/**
|
||||
* 第三年度结束时间
|
||||
*/
|
||||
private String end3;
|
||||
/**
|
||||
* 特许经营合同
|
||||
*/
|
||||
private List<String> fjsc;
|
||||
/**
|
||||
* 发起公司名称,默认值:鲜丰水果股份有限公司
|
||||
*/
|
||||
private String fqgsmc;
|
||||
/**
|
||||
* 辅助字段0.个人签字 1.企业盖章
|
||||
*/
|
||||
private long fzzd1;
|
||||
/**
|
||||
* 工程装修合同发起人工号,默认:20230724
|
||||
*/
|
||||
private String gczxhtfqr;
|
||||
/**
|
||||
* 货款保证金
|
||||
*/
|
||||
private long hkbzj;
|
||||
/**
|
||||
* 货款保证金大写
|
||||
*/
|
||||
private long hkbzjdx;
|
||||
/**
|
||||
* 货款保证金大写文本
|
||||
*/
|
||||
private String hkbzjwb;
|
||||
/**
|
||||
* 合同开始日
|
||||
*/
|
||||
private long ht_day;
|
||||
/**
|
||||
* 合同结束日
|
||||
*/
|
||||
private long ht_day2;
|
||||
/**
|
||||
* 合同开始月
|
||||
*/
|
||||
private long ht_month1;
|
||||
/**
|
||||
* 合同结束月
|
||||
*/
|
||||
private long ht_month2;
|
||||
/**
|
||||
* 合同开始年
|
||||
*/
|
||||
private long ht_year1;
|
||||
/**
|
||||
* 合同结束年
|
||||
*/
|
||||
private long ht_year2;
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
private List<String> idcard_1;
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
private List<String> idcard_2;
|
||||
/**
|
||||
* 身份证地址
|
||||
*/
|
||||
private String idcard_address;
|
||||
/**
|
||||
* 是否有营业执照
|
||||
*/
|
||||
private long is_business_license;
|
||||
/**
|
||||
* 是否补缴保证金0.是 1.否
|
||||
*/
|
||||
private long is_deposit;
|
||||
/**
|
||||
* 是否有食品许可证0.是 2.否[二证合一] 3.否[三小一摊] 4.否[暂未办理]
|
||||
*/
|
||||
private long is_food_license;
|
||||
/**
|
||||
* 缴款日期
|
||||
*/
|
||||
private String jiaokuandate;
|
||||
/**
|
||||
* 缴款人
|
||||
*/
|
||||
private String jkr;
|
||||
/**
|
||||
* 加盟店区县
|
||||
*/
|
||||
private String jmd_area;
|
||||
/**
|
||||
* 加盟店市
|
||||
*/
|
||||
private String jmd_city;
|
||||
/**
|
||||
* 加盟店省
|
||||
*/
|
||||
private String jmd_province;
|
||||
/**
|
||||
* 加盟店街
|
||||
*/
|
||||
private String jmd_street;
|
||||
/**
|
||||
* 每年加盟费
|
||||
*/
|
||||
private long jmf;
|
||||
/**
|
||||
* 第一年度加盟费
|
||||
*/
|
||||
private long jmf2;
|
||||
/**
|
||||
* 第二年度加盟费
|
||||
*/
|
||||
private long jmf3;
|
||||
/**
|
||||
* 第三年度加盟费
|
||||
*/
|
||||
private long jmf4;
|
||||
/**
|
||||
* 第一年度开始日
|
||||
*/
|
||||
private long jmfday1;
|
||||
/**
|
||||
* 第一年度结束日
|
||||
*/
|
||||
private long jmfday2;
|
||||
/**
|
||||
* 第二年度开始日
|
||||
*/
|
||||
private long jmfday3;
|
||||
/**
|
||||
* 第二年度结束日
|
||||
*/
|
||||
private long jmfday4;
|
||||
/**
|
||||
* 第三年度开始日
|
||||
*/
|
||||
private long jmfday5;
|
||||
/**
|
||||
* 第三年度结束日
|
||||
*/
|
||||
private long jmfday6;
|
||||
/**
|
||||
* 加盟费
|
||||
*/
|
||||
private long jmfdx;
|
||||
/**
|
||||
* 第一年度开始月
|
||||
*/
|
||||
private long jmfmonth1;
|
||||
/**
|
||||
* 第一年度结束月
|
||||
*/
|
||||
private long jmfmonth2;
|
||||
/**
|
||||
* 第二年度开始月
|
||||
*/
|
||||
private long jmfmonth3;
|
||||
/**
|
||||
* 第二年度结束月
|
||||
*/
|
||||
private long jmfmonth4;
|
||||
/**
|
||||
* 第三年度开始月
|
||||
*/
|
||||
private long jmfmonth5;
|
||||
/**
|
||||
* 第三年度结束月
|
||||
*/
|
||||
private long jmfmonth6;
|
||||
/**
|
||||
* 加盟费大写文本
|
||||
*/
|
||||
private String jmfwb;
|
||||
/**
|
||||
* 第一年度开始年
|
||||
*/
|
||||
private long jmfyear1;
|
||||
/**
|
||||
* 第一年度结束年
|
||||
*/
|
||||
private long jmfyear2;
|
||||
/**
|
||||
* 第二年度开始年
|
||||
*/
|
||||
private long jmfyear3;
|
||||
/**
|
||||
* 第二年度结束年
|
||||
*/
|
||||
private long jmfyear4;
|
||||
/**
|
||||
* 第三年度开始年
|
||||
*/
|
||||
private long jmfyear5;
|
||||
/**
|
||||
* 第三年度结束年
|
||||
*/
|
||||
private long jmfyear6;
|
||||
/**
|
||||
* 加盟费/保证金打款截图,上传文件,是否补签=否时必填,是否补签=是时不传
|
||||
*/
|
||||
private List<String> jmsdkjt;
|
||||
/**
|
||||
* 加盟商代码88888888
|
||||
*/
|
||||
private String jmsdm;
|
||||
/**
|
||||
* 加盟商合同状态0.生效 1.终止 2.转让 3.草稿,默认值:0
|
||||
*/
|
||||
private long jmshtzt;
|
||||
/**
|
||||
* 加盟商类型0.新加盟商开单店 1.老加盟商开单店 2.老加盟商开区域单店 3.新加盟商开区域单店
|
||||
*/
|
||||
private long jmslx;
|
||||
/**
|
||||
* 加盟商联系方式
|
||||
*/
|
||||
private String jmslxfs;
|
||||
/**
|
||||
* 加盟商身份证号
|
||||
*/
|
||||
private String jmssfzhm;
|
||||
/**
|
||||
* 加盟商编码
|
||||
*/
|
||||
private String jmsxm;
|
||||
/**
|
||||
* 加盟商姓名
|
||||
*/
|
||||
private String jmsxm1;
|
||||
/**
|
||||
* 合同结束日期
|
||||
*/
|
||||
private String jsrq;
|
||||
/**
|
||||
* 加盟商结算账户账号
|
||||
*/
|
||||
private String jszhhz;
|
||||
/**
|
||||
* 酷店掌业务id
|
||||
*/
|
||||
private String kdzBusinessId;
|
||||
/**
|
||||
* 加盟商结算账户开户行
|
||||
*/
|
||||
private String khhjzh;
|
||||
/**
|
||||
* 履约保证金
|
||||
*/
|
||||
private long lvbzj;
|
||||
/**
|
||||
* 履约保证金大写
|
||||
*/
|
||||
private long lybzjdx;
|
||||
/**
|
||||
* 履约保证金大写文本
|
||||
*/
|
||||
private String lybzjwb;
|
||||
/**
|
||||
* 门店地址
|
||||
*/
|
||||
private String mddz;
|
||||
/**
|
||||
* 门店代码
|
||||
*/
|
||||
private String mdmc;
|
||||
/**
|
||||
* 门店名称文本
|
||||
*/
|
||||
private String mdmcwb;
|
||||
/**
|
||||
* 所属大区,ehr代码
|
||||
*/
|
||||
private String oacompany;
|
||||
/**
|
||||
* 营业执照名称
|
||||
*/
|
||||
private String partyb_name;
|
||||
/**
|
||||
* 经营者
|
||||
*/
|
||||
private String partyb_operator;
|
||||
/**
|
||||
* 类型0.个体工商户 1.有限责任公司 2.独资企业 3.自然人经营
|
||||
*/
|
||||
private long partyb_type;
|
||||
/**
|
||||
* 品牌使用费比例,默认值:0.05
|
||||
*/
|
||||
private double ppsyfbl;
|
||||
/**
|
||||
* 配送费率,默认值:以实际结算为准
|
||||
*/
|
||||
private String psfl;
|
||||
/**
|
||||
* 签署动作,默认值:PUBLIC_COMPANY,PUBLIC_OPERATOR
|
||||
*/
|
||||
private String qsdz;
|
||||
/**
|
||||
* 合同开始日期
|
||||
*/
|
||||
private String qsrq;
|
||||
/**
|
||||
* 签约类型,0.转让 1.新签 2.续签 3.迁址 5.新签同异业转化
|
||||
*/
|
||||
private long qylx;
|
||||
/**
|
||||
* 契约锁电子印章,默认值:2731707107593166911
|
||||
*/
|
||||
private String qys_dzyz;
|
||||
/**
|
||||
* 契约锁电子合同分类,默认值:3051420203180101971
|
||||
*/
|
||||
private String qys_htywfl;
|
||||
/**
|
||||
* 非常规营业时间原因(常规时间07:00-23:00)
|
||||
*/
|
||||
private String reason2;
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 此店享受加盟费保证金优惠原因
|
||||
*/
|
||||
private String remark2;
|
||||
/**
|
||||
* 是否补签0.是 1.否
|
||||
*/
|
||||
private long sfbq__add;
|
||||
/**
|
||||
* 营业开始时间
|
||||
*/
|
||||
private String sj1;
|
||||
/**
|
||||
* 营业结束时间
|
||||
*/
|
||||
private String sj2;
|
||||
/**
|
||||
* 社会信用代码
|
||||
*/
|
||||
private String social_credit_code;
|
||||
/**
|
||||
* 食品流通许可证
|
||||
*/
|
||||
private List<String> spltxkz;
|
||||
/**
|
||||
* 申请人姓名
|
||||
*/
|
||||
private String sqr_name;
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
private String sqrq;
|
||||
/**
|
||||
* 第一年度开始时间
|
||||
*/
|
||||
private String start1;
|
||||
/**
|
||||
* 第二年度开始时间
|
||||
*/
|
||||
private String start2;
|
||||
/**
|
||||
* 第三年度开始时间
|
||||
*/
|
||||
private String start3;
|
||||
/**
|
||||
* 流程标题:特许经营合同审批申请2023-{申请人姓名}-{申请日期yyyy-MM-dd}
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 物理印章编码,默认值:201905081151092R
|
||||
*/
|
||||
private String wlyzbm;
|
||||
/**
|
||||
* 用印次数
|
||||
*/
|
||||
private long yycs;
|
||||
/**
|
||||
* 营业执照办理授权书
|
||||
*/
|
||||
private List<String> yyzzblsqs;
|
||||
/**
|
||||
* 营业执照复印件,上传文件
|
||||
*/
|
||||
private List<String> yyzzfyj;
|
||||
/**
|
||||
* 支行
|
||||
*/
|
||||
private String zhihang;
|
||||
/**
|
||||
* SAP签约类型,与签约类型关联,A104-转让 A101-新签 A102-续签 A103-迁址 A105-同业转换
|
||||
* 签约类型 SAP签约类型
|
||||
* 0 A104
|
||||
* 1 A101
|
||||
* 2 A102
|
||||
* 3 A103
|
||||
* 5 A105
|
||||
*/
|
||||
private String zqyty;
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.RegionDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class NewStoreRequest {
|
||||
|
||||
/**
|
||||
* 选址确认书(加盟商签字版)上传文件
|
||||
*/
|
||||
private List<String> accessory_address;
|
||||
/**
|
||||
* 流程发起人工号
|
||||
*/
|
||||
private String apply_user;
|
||||
/**
|
||||
* 所在市
|
||||
*/
|
||||
private String city1;
|
||||
/**
|
||||
* 所属大区的ehr编码
|
||||
*/
|
||||
private String csgs;
|
||||
/**
|
||||
* 次商圈名称 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型
|
||||
*/
|
||||
private String csqmc;
|
||||
/**
|
||||
* 督导
|
||||
*/
|
||||
private String ddxm;
|
||||
/**
|
||||
* 店铺租赁合同 上传文件
|
||||
*/
|
||||
private List<String> dpzlht;
|
||||
/**
|
||||
* 营业结束时间
|
||||
*/
|
||||
private String end_time;
|
||||
/**
|
||||
* 预估营业额
|
||||
*/
|
||||
private Integer forecast_turnover;
|
||||
/**
|
||||
* 门店邀约人
|
||||
*/
|
||||
private String invite_people;
|
||||
/**
|
||||
* 加盟商编号
|
||||
*/
|
||||
private String jms_id;
|
||||
/**
|
||||
* 加盟商客户登记表(完整截图)上传图片
|
||||
*/
|
||||
private List<String> jmskhdjbwzjt;
|
||||
/**
|
||||
* 加盟商类型
|
||||
* 0-新加盟商开单店;1-老加盟商开单店;2-新加盟商开新区域单店;3-新加盟商开老区域单店;4-老加盟商开新区域单店;5-老加盟商开老区域单店;6-直营门店;7-同异业转化;8-老加盟商迁址开新店
|
||||
*/
|
||||
private Integer join_channel;
|
||||
/**
|
||||
* 竞争对手名称
|
||||
*/
|
||||
private String jzdsmc;
|
||||
/**
|
||||
* 酷店掌业务id
|
||||
*/
|
||||
private String kdzBusinessId;
|
||||
/**
|
||||
* 客流量指数名称
|
||||
*/
|
||||
private String kllzsmc;
|
||||
/**
|
||||
* 房东姓名
|
||||
*/
|
||||
private String landlord_name;
|
||||
/**
|
||||
* 房东联系方式
|
||||
*/
|
||||
private String landlord_tel;
|
||||
/**
|
||||
* 门店选址人工号
|
||||
*/
|
||||
private String location_people;
|
||||
/**
|
||||
* 门店月租金
|
||||
*/
|
||||
private Integer mdyzj;
|
||||
/**
|
||||
* 招商工号
|
||||
*/
|
||||
private String merchant_people;
|
||||
/**
|
||||
* 门店名称
|
||||
*/
|
||||
private String name1;
|
||||
/**
|
||||
* 所在省
|
||||
*/
|
||||
private String regio;
|
||||
/**
|
||||
* 预约量房日期yyyy-MM-dd
|
||||
*/
|
||||
private String reservation_date;
|
||||
/**
|
||||
* 合同交房日期yyyy-MM-dd
|
||||
*/
|
||||
private String room_date;
|
||||
/**
|
||||
* 上传建店须知 上传文件
|
||||
*/
|
||||
private List<String> scjdxz;
|
||||
/**
|
||||
* 签约日期yyyy-MM-dd
|
||||
*/
|
||||
private String signing_date;
|
||||
/**
|
||||
* 商圈门店类型
|
||||
*/
|
||||
private String sqmdlx;
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
private String sqrq;
|
||||
/**
|
||||
* 大区
|
||||
*/
|
||||
private String ssdq;
|
||||
/**
|
||||
* 小区
|
||||
*/
|
||||
private String ssxq;
|
||||
/**
|
||||
* 战区
|
||||
*/
|
||||
private String sszq;
|
||||
/**
|
||||
* 营业起始时间
|
||||
*/
|
||||
private String start_time;
|
||||
/**
|
||||
* 此店保证金/元
|
||||
*/
|
||||
private Integer store_bzj;
|
||||
/**
|
||||
* 此店加盟费/元
|
||||
*/
|
||||
private Integer store_jmf;
|
||||
/**
|
||||
* 享受加盟费和保证金优惠原因
|
||||
*/
|
||||
private String store_reason;
|
||||
/**
|
||||
* 所在街道
|
||||
*/
|
||||
private String street;
|
||||
/**
|
||||
* 流程标题:SAP-新店开业申请-{申请人姓名}-{申请日期yyyy-MM-dd}
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 次商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型
|
||||
*/
|
||||
private Integer zcsqlx;
|
||||
/**
|
||||
* 大区名称
|
||||
*/
|
||||
private String zdqms;
|
||||
/**
|
||||
* 是否货款控制:默认=Y(Y-控制)
|
||||
*/
|
||||
private String zhkkz;
|
||||
/**
|
||||
* 加盟商编码
|
||||
*/
|
||||
private String zjmsbm;
|
||||
/**
|
||||
* 加盟商电话
|
||||
*/
|
||||
private String zmddh;
|
||||
/**
|
||||
* 门店经营者代码:10-加盟商 20-店长
|
||||
*/
|
||||
private Integer zmdjyz;
|
||||
/**
|
||||
* 门店经营者:10-加盟商 20-店长
|
||||
*/
|
||||
private String zmdjyz_name;
|
||||
/**
|
||||
* 门店性质代码:默认=20
|
||||
*/
|
||||
private Integer zmdxz;
|
||||
/**
|
||||
* 门店性质:默认=加盟
|
||||
*/
|
||||
private String zmdxz_name;
|
||||
/**
|
||||
* 营业状态:默认值=10(10-营业)
|
||||
*/
|
||||
private Integer zmdzt;
|
||||
/**
|
||||
* 100米周末日均客流量指数
|
||||
*/
|
||||
private Integer zmrjkllzs1;
|
||||
/**
|
||||
* 品牌使用费费率
|
||||
*/
|
||||
private Double zppsyfy;
|
||||
/**
|
||||
* 所在区
|
||||
*/
|
||||
private String zq;
|
||||
/**
|
||||
* 主商圈名称 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型
|
||||
*/
|
||||
private String zsqmc;
|
||||
/**
|
||||
* 所属公司:默认值=1060(1060-鲜丰水果股份)
|
||||
*/
|
||||
private String zssgs;
|
||||
/**
|
||||
* 业务类型:默认=Z1
|
||||
*/
|
||||
private String ztype;
|
||||
/**
|
||||
* 周围500米内二手房均价(元)
|
||||
*/
|
||||
private Integer zwesfj;
|
||||
/**
|
||||
* 小区名称
|
||||
*/
|
||||
private String zxqms;
|
||||
/**
|
||||
* 主要竞争品牌
|
||||
*/
|
||||
private String zxszyjzds;
|
||||
/**
|
||||
* 详细地址(路门牌号)
|
||||
*/
|
||||
private String zxxdz;
|
||||
/**
|
||||
* 线下主要竞争对手 10-品牌水果店;20-夫妻水果店;30-菜场店;40-大商超;50-生鲜店;60-无
|
||||
*/
|
||||
private Integer zxxzyjzds;
|
||||
/**
|
||||
* 门店编码
|
||||
*/
|
||||
private String zymdbm;
|
||||
/**
|
||||
* 战区名称
|
||||
*/
|
||||
private String zzqms;
|
||||
/**
|
||||
* 主商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型
|
||||
*/
|
||||
private Integer zzsqlx;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("提交证照办理请求体")
|
||||
public class SubmitLicenseRequest {
|
||||
@ApiModelProperty("营业执照拍照上传")
|
||||
private String licenseUrl;
|
||||
|
||||
@ApiModelProperty("营业执照名称")
|
||||
private String licenseName;
|
||||
|
||||
@ApiModelProperty("营业执照类型 0:有限责任公司 1:工体工商")
|
||||
private Integer licenseType;
|
||||
|
||||
@ApiModelProperty("营业执照上的法人")
|
||||
private String licenseLegalPerson;
|
||||
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String socialCreditCode;
|
||||
|
||||
@ApiModelProperty("发证日期")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("营业执照经营场所")
|
||||
private String licenseAddress;
|
||||
|
||||
@ApiModelProperty("有效期")
|
||||
private Object validity;
|
||||
|
||||
|
||||
@ApiModelProperty("法人双手持身份证正面+营业执照")
|
||||
private String idCardAndLicense1;
|
||||
|
||||
@ApiModelProperty("法人双手持身份证反面+营业执照")
|
||||
private String idCardAndLicense2;
|
||||
|
||||
@ApiModelProperty("食品经营许可证图片上传")
|
||||
private String foodLicenseUrl;
|
||||
|
||||
@ApiModelProperty("经营者")
|
||||
private String operator;
|
||||
|
||||
@ApiModelProperty("食品经营许可证上的法人")
|
||||
private String foodLicenseLegalPerson;
|
||||
|
||||
@ApiModelProperty("食营经营场所")
|
||||
private String businessPremises;
|
||||
|
||||
@ApiModelProperty("主体业态")
|
||||
private String mainBusiness;
|
||||
|
||||
@ApiModelProperty("经营项目")
|
||||
private String businessProject;
|
||||
|
||||
@ApiModelProperty("许可证编号")
|
||||
private String foodLicenseCode;
|
||||
|
||||
@ApiModelProperty("许可证开始时间")
|
||||
private Date foodLicenseStartTime;
|
||||
|
||||
@ApiModelProperty("许可证截止时间")
|
||||
private Date foodLicenseEndTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("备注图片")
|
||||
private String remarkUrl;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SysBuildResultRequest {
|
||||
@ApiModelProperty("kdz业务id唯一标识")
|
||||
private Long kdzBusinessId;
|
||||
@ApiModelProperty("审核结果 1:成功 0:失败")
|
||||
private Integer auditResult;
|
||||
@ApiModelProperty("通过/失败原因")
|
||||
private String cause = "";
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeNum;
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("系统建店申请")
|
||||
public class SysStoreAppRequest {
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("筹建门店id")
|
||||
private Long shopId;
|
||||
|
||||
private FranInfo franInfo;
|
||||
|
||||
private StoreDetail storeDetail;
|
||||
|
||||
private SupervisorDetail supervisorDetail;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel("加盟商信息")
|
||||
public static class FranInfo {
|
||||
@ApiModelProperty("加盟商类型" +
|
||||
"0-新加盟商开单店;1-老加盟商开单店;" +
|
||||
"2-新加盟商开新区域单店;" +
|
||||
"3-新加盟商开老区域单店;" +
|
||||
"4-老加盟商开新区域单店;" +
|
||||
"5-老加盟商开老区域单店;" +
|
||||
"6-直营门店;" +
|
||||
"7-同异业转化;" +
|
||||
"8-老加盟商迁址开新店")
|
||||
private Integer franchiseeType;
|
||||
|
||||
@ApiModelProperty("门店邀约人id")
|
||||
private String inviteUserId;
|
||||
|
||||
@ApiModelProperty("门店邀约人姓名")
|
||||
private String storeInviteesName;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel("门店信息")
|
||||
public static class StoreDetail{
|
||||
@ApiModelProperty("门店性质")
|
||||
private Integer storeNature;
|
||||
@ApiModelProperty("门店经营者")
|
||||
private Integer storeOperator;
|
||||
@ApiModelProperty("门店名称(默认带入一个门店名称,但是可修改)")
|
||||
private String storeName;
|
||||
@ApiModelProperty("大区描述")
|
||||
private String bigDesc;
|
||||
@ApiModelProperty("大区名称")
|
||||
private String bigName;
|
||||
@ApiModelProperty("大区code")
|
||||
private String bigCode;
|
||||
|
||||
@ApiModelProperty("战区描述")
|
||||
private String fightDesc;
|
||||
@ApiModelProperty("战区描述")
|
||||
private String fightCode;
|
||||
@ApiModelProperty("战区名称")
|
||||
private String fightName;
|
||||
|
||||
@ApiModelProperty("小区code")
|
||||
private String smallCode;
|
||||
@ApiModelProperty("小区描述")
|
||||
private String smallDesc;
|
||||
@ApiModelProperty("小区名称")
|
||||
private String smallName;
|
||||
|
||||
@ApiModelProperty("主商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型")
|
||||
private Integer mainBusinessType;
|
||||
@ApiModelProperty("次商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型")
|
||||
private Integer subBusinessType;
|
||||
@ApiModelProperty("线下主要竞争对手 10-品牌水果店;20-夫妻水果店;30-菜场店;40-大商超;50-生鲜店;60-无")
|
||||
private Integer offlineCompetitor;
|
||||
@ApiModelProperty("线下主要竞争品牌")
|
||||
private String offlineCompetingBrand;
|
||||
@ApiModelProperty("周边500米内二手房均价")
|
||||
private Integer averagePriceSh;
|
||||
@ApiModelProperty("100米周末日均客流量指数 0:1000以下 1:1000-1万 2:1万以上")
|
||||
private Integer averageDailyRs;
|
||||
@ApiModelProperty("商圈门店类型 普通社区店 高档社区店")
|
||||
private String businessStoreType;
|
||||
@ApiModelProperty("预估营业额")
|
||||
private Integer estimatedTurnover;
|
||||
@ApiModelProperty("签约日期")
|
||||
private Date signDate;
|
||||
@ApiModelProperty("房东姓名")
|
||||
private String landlordName;
|
||||
@ApiModelProperty("合同交房日期")
|
||||
private Date contractDeliveryDate;
|
||||
@ApiModelProperty("房东联系电话")
|
||||
private String landlordMobile;
|
||||
@ApiModelProperty("预约量房日期")
|
||||
private Date reservation;
|
||||
@ApiModelProperty("门店月租金")
|
||||
private Integer storeRent;
|
||||
@ApiModelProperty("此店加盟费")
|
||||
private Integer storeFranchiseFee;
|
||||
@ApiModelProperty("此店保证金")
|
||||
private Integer storeSecurityDeposit;
|
||||
@ApiModelProperty("享受加盟费和保证金优惠原因")
|
||||
private String reasons;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel("督导相关信息")
|
||||
public static class SupervisorDetail{
|
||||
|
||||
@ApiModelProperty("督导姓名")
|
||||
private String supervisorName;
|
||||
|
||||
@ApiModelProperty("督导工号")
|
||||
private String supervisorId;
|
||||
|
||||
@ApiModelProperty("大区总姓名")
|
||||
private String regioGeneral;
|
||||
|
||||
@ApiModelProperty("大区总工号")
|
||||
private String regioGeneralId;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.entity.SystemBuildingShopDO;
|
||||
import com.cool.store.request.SysStoreAppRequest;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
public class SysStoreAppResponse {
|
||||
|
||||
@ApiModelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("筹建门店id")
|
||||
private Long shopId;
|
||||
|
||||
private Long auditId;
|
||||
|
||||
private FranInfo franInfo;
|
||||
|
||||
private StoreDetail storeDetail;
|
||||
|
||||
private SupervisorDetail supervisorDetail;
|
||||
|
||||
@Data
|
||||
@ApiModel("加盟商信息")
|
||||
public static class FranInfo {
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String franchiseeName;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private String subregion;
|
||||
|
||||
@ApiModelProperty("加盟商编码")
|
||||
private String partnerNum;
|
||||
|
||||
@ApiModelProperty("加盟商电话")
|
||||
private String franchiseeMobile;
|
||||
|
||||
@ApiModelProperty("加盟商类型" +
|
||||
"0-新加盟商开单店;1-老加盟商开单店;" +
|
||||
"2-新加盟商开新区域单店;" +
|
||||
"3-新加盟商开老区域单店;" +
|
||||
"4-老加盟商开新区域单店;" +
|
||||
"5-老加盟商开老区域单店;" +
|
||||
"6-直营门店;" +
|
||||
"7-同异业转化;" +
|
||||
"8-老加盟商迁址开新店")
|
||||
private Integer franchiseeType;
|
||||
|
||||
@ApiModelProperty("门店邀约人id")
|
||||
private String inviteUserId;
|
||||
|
||||
@ApiModelProperty("门店邀约人姓名")
|
||||
private String storeInviteesName;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel("门店信息")
|
||||
public static class StoreDetail{
|
||||
@ApiModelProperty("门店性质")
|
||||
private Integer storeNature;
|
||||
@ApiModelProperty("门店经营者")
|
||||
private Integer storeOperator;
|
||||
@ApiModelProperty("门店名称(默认带入一个门店名称,但是可修改)")
|
||||
private String storeName;
|
||||
@ApiModelProperty("大区描述")
|
||||
private String bigDesc;
|
||||
@ApiModelProperty("大区名称")
|
||||
private String bigName;
|
||||
@ApiModelProperty("大区code")
|
||||
private String bigCode;
|
||||
|
||||
@ApiModelProperty("战区描述")
|
||||
private String fightDesc;
|
||||
@ApiModelProperty("战区描述")
|
||||
private String fightCode;
|
||||
@ApiModelProperty("战区名称")
|
||||
private String fightName;
|
||||
|
||||
@ApiModelProperty("小区code")
|
||||
private String smallCode;
|
||||
@ApiModelProperty("小区描述")
|
||||
private String smallDesc;
|
||||
@ApiModelProperty("小区名称")
|
||||
private String smallName;
|
||||
|
||||
@ApiModelProperty("主商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型")
|
||||
private Integer mainBusinessType;
|
||||
@ApiModelProperty("次商圈类型 10-社区型;20-商业街边型;30-学校型;40-CBD/办公型;60-医院型;70-菜场型")
|
||||
private Integer subBusinessType;
|
||||
@ApiModelProperty("线下主要竞争对手 10-品牌水果店;20-夫妻水果店;30-菜场店;40-大商超;50-生鲜店;60-无")
|
||||
private Integer offlineCompetitor;
|
||||
@ApiModelProperty("线下主要竞争品牌")
|
||||
private String offlineCompetingBrand;
|
||||
@ApiModelProperty("周边500米内二手房均价")
|
||||
private Integer averagePriceSh;
|
||||
@ApiModelProperty("100米周末日均客流量指数 0:1000以下 1:1000-1万 2:1万以上")
|
||||
private Integer averageDailyRs;
|
||||
@ApiModelProperty("商圈门店类型 普通社区店 高档社区店")
|
||||
private String businessStoreType;
|
||||
@ApiModelProperty("预估营业额")
|
||||
private Integer estimatedTurnover;
|
||||
@ApiModelProperty("签约日期")
|
||||
private Date signDate;
|
||||
@ApiModelProperty("房东姓名")
|
||||
private String landlordName;
|
||||
@ApiModelProperty("合同交房日期")
|
||||
private Date contractDeliveryDate;
|
||||
@ApiModelProperty("房东联系电话")
|
||||
private String landlordMobile;
|
||||
@ApiModelProperty("预约量房日期")
|
||||
private Date reservation;
|
||||
@ApiModelProperty("门店月租金")
|
||||
private Integer storeRent;
|
||||
@ApiModelProperty("此店加盟费")
|
||||
private Integer storeFranchiseFee;
|
||||
@ApiModelProperty("此店保证金")
|
||||
private Integer storeSecurityDeposit;
|
||||
@ApiModelProperty("享受加盟费和保证金优惠原因")
|
||||
private String reasons;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel("督导相关信息")
|
||||
public static class SupervisorDetail{
|
||||
|
||||
@ApiModelProperty("督导姓名")
|
||||
private String supervisorName;
|
||||
|
||||
@ApiModelProperty("督导工号")
|
||||
private String supervisorId;
|
||||
|
||||
@ApiModelProperty("大区总姓名")
|
||||
private String regioGeneral;
|
||||
|
||||
@ApiModelProperty("大区总工号")
|
||||
private String regioGeneralId;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.enums.SmsCodeTypeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||
import com.cool.store.vo.IdentityCardInfoVO;
|
||||
|
||||
@@ -15,5 +17,21 @@ public interface AliyunService {
|
||||
*/
|
||||
IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl, IDCardSideEnum sideEnum) throws ApiException;
|
||||
|
||||
/**
|
||||
* ORC识别证照
|
||||
* @param imageUrl
|
||||
* @return
|
||||
* @throws ApiException
|
||||
*/
|
||||
BusinessLicenseInfoVO getBusinessLicenseInfo(String imageUrl) throws ApiException;
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
* @param mobile
|
||||
* @param codeType
|
||||
* @return
|
||||
*/
|
||||
ResponseResult sendMessage(String mobile, SmsCodeTypeEnum codeType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.FranchiseAgreementRequest;
|
||||
import com.cool.store.request.NewStoreRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
|
||||
/**
|
||||
* 鲜丰水果API(筹备相关)
|
||||
* https://apifox.com/apidoc/shared-c48218f7-4a34-4422-8689-927502f171ff/api-164932487
|
||||
* 密码:aJJq9F7k
|
||||
*/
|
||||
public interface CoolStoreStartFlowService {
|
||||
|
||||
/**
|
||||
* 新店开业流程
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
ResponseResult newStore(NewStoreRequest request);
|
||||
|
||||
/**
|
||||
*特许经营合同
|
||||
* @param request
|
||||
* @param type 0:个人 1:企业
|
||||
* @return
|
||||
*/
|
||||
ResponseResult franchiseAgreement(FranchiseAgreementRequest request,Integer type);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,14 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.SysBuildResultRequest;
|
||||
|
||||
public interface KdzApiService {
|
||||
/**
|
||||
* API审批
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
boolean auditResult(AuditResultRequest request);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.SysStoreAppRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SysStoreAppResponse;
|
||||
|
||||
public interface SysStoreAppService {
|
||||
|
||||
/**
|
||||
* 提交系统建店申请
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
ResponseResult submitSysBuildStore(SysStoreAppRequest request);
|
||||
|
||||
|
||||
SysStoreAppResponse getDefaultValueSysBuildStore(Long lineId, Long shopId);
|
||||
}
|
||||
@@ -2,10 +2,14 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.ocr20191230.models.*;
|
||||
import com.aliyuncs.CommonRequest;
|
||||
import com.aliyuncs.http.MethodType;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.enums.SmsCodeTypeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.AliyunService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||
@@ -33,6 +37,9 @@ public class AliyunServiceImpl implements AliyunService {
|
||||
@Value("${aliyun.accessKeySecret:null}")
|
||||
private String accessKeySecret;
|
||||
|
||||
// @Value("${aliyun.sms.domain}")
|
||||
private String smsDomain;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@@ -133,4 +140,17 @@ public class AliyunServiceImpl implements AliyunService {
|
||||
throw new ApiException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResponseResult sendMessage(String mobile, SmsCodeTypeEnum codeType) {
|
||||
String msgKey = codeType + ":" + mobile;
|
||||
CommonRequest request = new CommonRequest();
|
||||
request.setSysMethod(MethodType.POST);
|
||||
request.setSysDomain(smsDomain);
|
||||
request.setSysVersion("2017-05-25");
|
||||
request.setSysAction("SendSms");
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface AuditResultService {
|
||||
Boolean auditResult(AuditResultRequest request);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dto.message.SendMessageDTO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.google.gson.Gson;
|
||||
@@ -68,6 +69,12 @@ public class CommonService {
|
||||
return (LineFlowService)applicationContext.getBean(workflowSubStageEnum.getClazz());
|
||||
}
|
||||
|
||||
public AuditResultService getAuditService(AuditResultRequest request) {
|
||||
String flag = splitMethod(request.getKdzBusinessId());
|
||||
AuditEnum auditEnum = AuditEnum.getWorkflowSubStageEnum(flag);
|
||||
return (AuditResultService) applicationContext.getBean(auditEnum.getClazz());
|
||||
}
|
||||
|
||||
public void sendMessage(List<String> userIds, Long lineId, MessageEnum message, String... param){
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
return;
|
||||
@@ -140,4 +147,13 @@ public class CommonService {
|
||||
}
|
||||
}
|
||||
|
||||
public static String splitMethod(String kdzBusinessId) {
|
||||
String[] split = kdzBusinessId.split(Constants.D_LINE);
|
||||
if (split.length >= 2) {
|
||||
return split[0];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.FranchiseAgreementRequest;
|
||||
import com.cool.store.request.NewStoreRequest;
|
||||
import com.cool.store.response.InitiatingResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.utils.SecureUtil;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService {
|
||||
|
||||
|
||||
@Value("${xfsg.url}")
|
||||
private String xfsgUrl;
|
||||
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
@Override
|
||||
public ResponseResult newStore(NewStoreRequest request) {
|
||||
log.info("newStore param:{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
String url = xfsgUrl + Constants.NEW_STORE_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
||||
log.info("newStore API response:{}",JSONObject.toJSONString(initiatingResponse));
|
||||
if (initiatingResponse.getCode() != 0L){
|
||||
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
}else {
|
||||
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResponseResult franchiseAgreement(FranchiseAgreementRequest request, Integer type) {
|
||||
log.info("newStore param:{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
String url = null;
|
||||
if (Constants.ONE_INTEGER == type){
|
||||
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_COMPANY + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||
}else if (Constants.ZERO_INTEGER == type){
|
||||
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_PERSON + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||
}
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
||||
log.info("franchiseAgreement API response:{}",JSONObject.toJSONString(initiatingResponse));
|
||||
if (initiatingResponse.getCode() != 0L){
|
||||
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
}else {
|
||||
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String signature = SecureUtil.getSignature(timestamp);
|
||||
requestMap.put("timestamp", timestamp);
|
||||
requestMap.put("signature", signature);
|
||||
}
|
||||
}
|
||||
@@ -6,16 +6,11 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.ReceivingBankEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.FranchiseeSaveRequest;
|
||||
import com.cool.store.request.InitiatingRequest;
|
||||
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.InitiatingResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SigningBaseInfoResponse;
|
||||
@@ -39,7 +34,7 @@ import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class IntentAgreementServiceImpl extends LineFlowService implements IntentAgreementService {
|
||||
public class IntentAgreementServiceImpl extends LineFlowService implements IntentAgreementService,AuditResultService {
|
||||
|
||||
|
||||
@Resource
|
||||
@@ -72,6 +67,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Resource
|
||||
RedisUtilPool redisUtilPool;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -185,7 +183,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
InitiatingDO initiatingDO = request.toInitiatingDO();
|
||||
// LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(request.getLineId());
|
||||
initiatingDO.setKdzBusinessId(lineInfoDO.getId() + "_" + lineInfoDO.getWorkflowSubStageStatus());
|
||||
initiatingDO.setKdzBusinessId(AuditEnum.CONTRACT_INTENTION.getCode() + "_" +lineInfoDO.getId() + "_" + lineInfoDO.getWorkflowSubStageStatus());
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, initiatingDO, InitiatingResponse.class);
|
||||
if (initiatingResponse.getCode() != 0L){
|
||||
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
@@ -260,6 +258,42 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean auditResult(AuditResultRequest request) {
|
||||
try {
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
if (StringUtil.isBlank(lineId)){
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (request.getAuditResult() == 1){
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest,null);
|
||||
}else if (request.getAuditResult() == 0){
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest,null);
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String getLineId(String kdzBusinessId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String signature = SecureUtil.getSignature(timestamp);
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.request.AuditPassRequest;
|
||||
import com.cool.store.request.AuditRejectRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.service.KdzApiService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -20,53 +15,16 @@ import java.util.Objects;
|
||||
@Slf4j
|
||||
public class KdzApiServiceImpl implements KdzApiService {
|
||||
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Override
|
||||
public boolean auditResult(AuditResultRequest request) {
|
||||
if (Objects.isNull(request) || StringUtil.isBlank(request.getKdzBusinessId())){
|
||||
if (Objects.isNull(request) || StringUtil.isBlank(request.getKdzBusinessId())) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = splitMethod(kdzBusinessId);
|
||||
if (StringUtil.isBlank(lineId)){
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
try {
|
||||
if (request.getAuditResult() == 1){
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest,null);
|
||||
}else if (request.getAuditResult() == 0){
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest,null);
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
}
|
||||
return true;
|
||||
Boolean result = commonService.getAuditService(request).auditResult(request);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String splitMethod(String kdzBusinessId){
|
||||
String[] split = kdzBusinessId.split(Constants.D_LINE);
|
||||
if (split.length >= 2){
|
||||
return split[0];
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.AuditEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.prepare.newStore.BusinessDistrictEnum;
|
||||
import com.cool.store.enums.prepare.newStore.OfflineCompetitorEnum;
|
||||
import com.cool.store.enums.prepare.newStore.PassengerFlowEnum;
|
||||
import com.cool.store.enums.prepare.newStore.StoreOperatorEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.NewStoreRequest;
|
||||
import com.cool.store.request.SysStoreAppRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SysStoreAppResponse;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.SysStoreAppService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultService {
|
||||
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
|
||||
@Resource
|
||||
private SystemBuildingShopMapper systemBuildingShopMapper;
|
||||
|
||||
@Resource
|
||||
private LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
PointInfoMapper pointInfoMapper;
|
||||
|
||||
@Resource
|
||||
RegionMapper regionMapper;
|
||||
|
||||
@Resource
|
||||
ThirdDepartmentMapper thirdDepartmentMapper;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserMapper enterpriseUserMapper;
|
||||
|
||||
@Resource
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResponseResult submitSysBuildStore(SysStoreAppRequest request) {
|
||||
log.info("submitSysBuildStore request :{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
//1.操作数据库
|
||||
SystemBuildingShopDO systemBuildingShopDO = SystemBuildingShopDO.convertToSystemBuildingShopDO(request);
|
||||
if (request.getId() == null) {
|
||||
systemBuildingShopMapper.insertSelective(systemBuildingShopDO);
|
||||
} else {
|
||||
systemBuildingShopDO.setId(request.getId());
|
||||
systemBuildingShopMapper.updateByPrimaryKeySelective(systemBuildingShopDO);
|
||||
}
|
||||
//2.查找、组装数组
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(request.getLineId());//线索信息
|
||||
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(request.getLineId(), request.getShopId());//查铺位信息确定铺位所在大区、战区、门店所在省市区街道地址
|
||||
//3.请求鲜丰接口
|
||||
NewStoreRequest apiRequest = convertToNewStoreRequest(request,lineInfoDO,pointInfoDO);
|
||||
return coolStoreStartFlowService.newStore(apiRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysStoreAppResponse getDefaultValueSysBuildStore(Long lineId, Long shopId) {
|
||||
SysStoreAppResponse sysStoreAppResponse = new SysStoreAppResponse();
|
||||
//1.查找数据
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId);
|
||||
SystemBuildingShopDO systemBuildingShopDO = SystemBuildingShopDO.builder().lineId(lineId).shopId(shopId).build();
|
||||
systemBuildingShopDO = systemBuildingShopMapper.selectOne(systemBuildingShopDO);
|
||||
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
//2.组装数据并返回
|
||||
sysStoreAppResponse = polymerization(sysStoreAppResponse,systemBuildingShopDO,lineInfoDO,pointInfoDO);
|
||||
return sysStoreAppResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 聚合返回体
|
||||
* @param systemBuildingShopDO
|
||||
* @param lineInfoDO
|
||||
*/
|
||||
private SysStoreAppResponse polymerization(SysStoreAppResponse sysStoreAppResponse,
|
||||
SystemBuildingShopDO systemBuildingShopDO,
|
||||
LineInfoDO lineInfoDO,
|
||||
PointInfoDO pointInfoDO) {
|
||||
sysStoreAppResponse = from(systemBuildingShopDO,lineInfoDO,pointInfoDO);
|
||||
return sysStoreAppResponse;
|
||||
}
|
||||
|
||||
public SysStoreAppResponse from(SystemBuildingShopDO systemBuildingShopDO,
|
||||
LineInfoDO lineInfoDO,
|
||||
PointInfoDO pointInfoDO) {
|
||||
SysStoreAppResponse.FranInfo franInfo = new SysStoreAppResponse.FranInfo();
|
||||
SysStoreAppResponse.StoreDetail storeDetail = new SysStoreAppResponse.StoreDetail();
|
||||
SysStoreAppResponse.SupervisorDetail supervisorDetail = new SysStoreAppResponse.SupervisorDetail();
|
||||
SysStoreAppResponse sysStoreAppResponse = new SysStoreAppResponse();
|
||||
Long regionId = pointInfoDO.getRegionId();
|
||||
RegionDO bigRegion = regionMapper.getBigRegionByRegionId(regionId);//大区
|
||||
RegionDO fightRegion = regionMapper.getByRegionId(regionId);//战区
|
||||
EnterpriseUserDO enterpriseUserDO = userAuthMappingService.getUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, bigRegion.getId());
|
||||
if (Objects.nonNull(enterpriseUserDO)){
|
||||
// supervisorName
|
||||
supervisorDetail.setSupervisorName(enterpriseUserDO.getName());
|
||||
// supervisorId
|
||||
supervisorDetail.setSupervisorId(enterpriseUserDO.getUserId());
|
||||
}
|
||||
if (Objects.nonNull(bigRegion)){
|
||||
storeDetail.setBigName(bigRegion.getName());
|
||||
storeDetail.setBigCode(bigRegion.getSynDingDeptId());
|
||||
}
|
||||
if (Objects.nonNull(fightRegion)){
|
||||
storeDetail.setFightName(fightRegion.getName());
|
||||
storeDetail.setFightCode(fightRegion.getSynDingDeptId());
|
||||
}
|
||||
if (Objects.nonNull(systemBuildingShopDO)){
|
||||
sysStoreAppResponse.setId(systemBuildingShopDO.getId());
|
||||
sysStoreAppResponse.setLineId(systemBuildingShopDO.getLineId());
|
||||
sysStoreAppResponse.setShopId(systemBuildingShopDO.getShopId());
|
||||
sysStoreAppResponse.setAuditId(systemBuildingShopDO.getAuditId());
|
||||
franInfo.setFranchiseeType(systemBuildingShopDO.getFranchiseeType());
|
||||
franInfo.setStoreInviteesName(systemBuildingShopDO.getStoreInviteesName());
|
||||
franInfo.setInviteUserId(systemBuildingShopDO.getStoreInviteesId());
|
||||
storeDetail.setStoreNature(systemBuildingShopDO.getStoreNature());
|
||||
storeDetail.setStoreOperator(systemBuildingShopDO.getStoreOperator());
|
||||
// bigDesc
|
||||
storeDetail.setBigDesc(systemBuildingShopDO.getBigDesc());
|
||||
// fightDesc
|
||||
storeDetail.setFightDesc(systemBuildingShopDO.getFightDesc());
|
||||
// smallCode
|
||||
storeDetail.setSmallCode(systemBuildingShopDO.getSmallCode());
|
||||
// smallDesc
|
||||
storeDetail.setSmallDesc(systemBuildingShopDO.getSmallDesc());
|
||||
// smallName
|
||||
storeDetail.setSmallName(systemBuildingShopDO.getSmallDesc());
|
||||
// mainBusinessType
|
||||
storeDetail.setMainBusinessType(systemBuildingShopDO.getMainBusinessType());
|
||||
// subBusinessType
|
||||
storeDetail.setSubBusinessType(systemBuildingShopDO.getSubBusinessType());
|
||||
// offlineCompetitor
|
||||
storeDetail.setOfflineCompetitor(systemBuildingShopDO.getOfflineCompetitor());
|
||||
// offlineCompetingBrand
|
||||
storeDetail.setOfflineCompetingBrand(systemBuildingShopDO.getOfflineCompetingBrand());
|
||||
// averagePriceSh
|
||||
storeDetail.setAveragePriceSh(systemBuildingShopDO.getAveragePriceSh());
|
||||
// averageDailyRs
|
||||
storeDetail.setAverageDailyRs(systemBuildingShopDO.getAverageDailyRs());
|
||||
// businessStoreType
|
||||
storeDetail.setBusinessStoreType(systemBuildingShopDO.getBusinessStoreType());
|
||||
// estimatedTurnover
|
||||
storeDetail.setEstimatedTurnover(systemBuildingShopDO.getEstimatedTurnover());
|
||||
// signDate
|
||||
storeDetail.setSignDate(systemBuildingShopDO.getSignDate());
|
||||
// landlordName
|
||||
storeDetail.setLandlordName(systemBuildingShopDO.getLandlordName());
|
||||
// contractDeliveryDate
|
||||
storeDetail.setContractDeliveryDate(systemBuildingShopDO.getContractDeliveryDate());
|
||||
// landlordMobile
|
||||
storeDetail.setLandlordMobile(systemBuildingShopDO.getLandlordMobile());
|
||||
// reservation
|
||||
storeDetail.setReservation(systemBuildingShopDO.getReservation());
|
||||
// storeRent
|
||||
storeDetail.setStoreRent(systemBuildingShopDO.getStoreRent());
|
||||
// storeFranchiseFee
|
||||
storeDetail.setStoreFranchiseFee(systemBuildingShopDO.getStoreFranchiseFee());
|
||||
// storeSecurityDeposit
|
||||
storeDetail.setStoreSecurityDeposit(systemBuildingShopDO.getStoreSecurityDeposit());
|
||||
// reasons
|
||||
storeDetail.setReasons(systemBuildingShopDO.getReasons());
|
||||
// regioGeneral
|
||||
supervisorDetail.setRegioGeneral(systemBuildingShopDO.getRegioGeneral());
|
||||
// regioGeneralId
|
||||
supervisorDetail.setRegioGeneralId(systemBuildingShopDO.getRegioGeneralId());
|
||||
}
|
||||
if (Objects.nonNull(lineInfoDO)){
|
||||
RegionDO byRegionId = regionMapper.getByRegionId(lineInfoDO.getRegionId());
|
||||
franInfo.setSubregion(byRegionId.getName());
|
||||
franInfo.setPartnerNum(lineInfoDO.getPartnerNum());
|
||||
franInfo.setFranchiseeMobile(lineInfoDO.getMobile());
|
||||
franInfo.setFranchiseeName(lineInfoDO.getUsername());
|
||||
}
|
||||
sysStoreAppResponse.setStoreDetail(storeDetail);
|
||||
sysStoreAppResponse.setSupervisorDetail(supervisorDetail);
|
||||
sysStoreAppResponse.setFranInfo(franInfo);
|
||||
return sysStoreAppResponse;
|
||||
}
|
||||
|
||||
public NewStoreRequest convertToNewStoreRequest(
|
||||
SysStoreAppRequest sysStoreAppRequest,
|
||||
LineInfoDO lineInfoDO,
|
||||
PointInfoDO pointInfoDO) {
|
||||
NewStoreRequest newStoreRequest = new NewStoreRequest();
|
||||
ArrayList<String> objects = new ArrayList<>();
|
||||
objects.add("123");
|
||||
// accessory_address
|
||||
newStoreRequest.setAccessory_address(objects);
|
||||
// apply_user
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
//todo 写死
|
||||
newStoreRequest.setApply_user("19110026");
|
||||
// city1
|
||||
newStoreRequest.setCity1(pointInfoDO.getCity());
|
||||
// csgs
|
||||
ThirdDepartmentDO thirdDepartmentDO = thirdDepartmentMapper.getByName(sysStoreAppRequest.getStoreDetail().getBigName());
|
||||
newStoreRequest.setCsgs(thirdDepartmentDO.getDepartmentCode());
|
||||
// csqmc
|
||||
newStoreRequest.setCsqmc(BusinessDistrictEnum.getByCode(sysStoreAppRequest.getStoreDetail().getSubBusinessType()).getDesc());
|
||||
// ddxm
|
||||
EnterpriseUserDO ddxm = enterpriseUserMapper.getUserInfoById(sysStoreAppRequest.getSupervisorDetail().getSupervisorId());//督导
|
||||
newStoreRequest.setDdxm("22090043");
|
||||
// dpzlht
|
||||
newStoreRequest.setDpzlht(objects);
|
||||
// end_time
|
||||
newStoreRequest.setEnd_time(null);
|
||||
// forecast_turnover
|
||||
newStoreRequest.setForecast_turnover(sysStoreAppRequest.getStoreDetail().getEstimatedTurnover());
|
||||
// invite_people
|
||||
//todo xiesi
|
||||
EnterpriseUserDO invitePeople = enterpriseUserMapper.getUserInfoById(sysStoreAppRequest.getFranInfo().getInviteUserId());//邀约人
|
||||
newStoreRequest.setInvite_people("21100037");
|
||||
// jms_id
|
||||
newStoreRequest.setJms_id(lineInfoDO.getPartnerNum());
|
||||
// jmskhdjbwzjt
|
||||
newStoreRequest.setJmskhdjbwzjt(objects);
|
||||
// join_channel
|
||||
newStoreRequest.setJoin_channel(sysStoreAppRequest.getFranInfo().getFranchiseeType());
|
||||
// jzdsmc
|
||||
newStoreRequest.setJzdsmc(OfflineCompetitorEnum.getByCode(sysStoreAppRequest.getStoreDetail().getOfflineCompetitor()).getDesc());
|
||||
// kdzBusinessid
|
||||
newStoreRequest.setKdzBusinessId(AuditEnum.SYS_BUILD.getCode() + "_" +sysStoreAppRequest.getShopId() + "_" +pointInfoDO.getId());
|
||||
// kllzsmc
|
||||
newStoreRequest.setKllzsmc(PassengerFlowEnum.getByCode(sysStoreAppRequest.getStoreDetail().getAverageDailyRs()).getDesc());
|
||||
// landlord_name
|
||||
newStoreRequest.setLandlord_name(sysStoreAppRequest.getStoreDetail().getLandlordName());
|
||||
// landlord_tel
|
||||
newStoreRequest.setLandlord_tel(sysStoreAppRequest.getStoreDetail().getLandlordMobile());
|
||||
// location_people
|
||||
EnterpriseUserDO locationPeople = enterpriseUserMapper.getUserInfoById(pointInfoDO.getDevelopmentManager());//门店选址人
|
||||
//todo 写死
|
||||
newStoreRequest.setLocation_people("21100037");
|
||||
// mdyzj
|
||||
newStoreRequest.setMdyzj(sysStoreAppRequest.getStoreDetail().getStoreRent());
|
||||
// merchant_people
|
||||
EnterpriseUserDO merchantPeople = enterpriseUserMapper.getUserInfoById(lineInfoDO.getInvestmentManager());//招商人工号
|
||||
//todo 写死
|
||||
newStoreRequest.setMerchant_people("22090043");
|
||||
// name1
|
||||
newStoreRequest.setName1(sysStoreAppRequest.getStoreDetail().getStoreName());
|
||||
// regio
|
||||
newStoreRequest.setRegio(pointInfoDO.getProvince());
|
||||
// reservation_date
|
||||
newStoreRequest.setReservation_date(DateUtil.format(sysStoreAppRequest.getStoreDetail().getReservation(), Constants.TIME_STAMP_FLAG));
|
||||
// room_date
|
||||
newStoreRequest.setRoom_date(DateUtil.format(sysStoreAppRequest.getStoreDetail().getContractDeliveryDate(), Constants.TIME_STAMP_FLAG));
|
||||
// scjdxz
|
||||
newStoreRequest.setScjdxz(objects);
|
||||
// signing_date
|
||||
newStoreRequest.setSigning_date(DateUtil.format(sysStoreAppRequest.getStoreDetail().getSignDate(), Constants.TIME_STAMP_FLAG));
|
||||
// sqmdlx
|
||||
newStoreRequest.setSqmdlx(sysStoreAppRequest.getStoreDetail().getBusinessStoreType());
|
||||
// sqrq
|
||||
newStoreRequest.setSqrq(DateUtil.today());
|
||||
// ssdq
|
||||
newStoreRequest.setSsdq(sysStoreAppRequest.getStoreDetail().getBigCode());
|
||||
// ssxq
|
||||
newStoreRequest.setSsxq(sysStoreAppRequest.getStoreDetail().getSmallCode());
|
||||
// sszq
|
||||
newStoreRequest.setSszq(sysStoreAppRequest.getStoreDetail().getFightCode());
|
||||
// start_time
|
||||
newStoreRequest.setStart_time(null);
|
||||
// store_bzj
|
||||
newStoreRequest.setStore_bzj(sysStoreAppRequest.getStoreDetail().getStoreSecurityDeposit());
|
||||
// store_jmf
|
||||
newStoreRequest.setStore_jmf(sysStoreAppRequest.getStoreDetail().getStoreFranchiseFee());
|
||||
// store_reason
|
||||
newStoreRequest.setStore_reason(sysStoreAppRequest.getStoreDetail().getReasons());
|
||||
// street
|
||||
newStoreRequest.setStreet(pointInfoDO.getTownship());
|
||||
// title
|
||||
newStoreRequest.setTitle("SAP-新店开业申请-" + lineInfoDO.getUsername() + "-" + DateUtil.today());
|
||||
// zcsqlx
|
||||
newStoreRequest.setZcsqlx(sysStoreAppRequest.getStoreDetail().getSubBusinessType());
|
||||
// zdqms
|
||||
newStoreRequest.setZdqms(sysStoreAppRequest.getStoreDetail().getBigName());
|
||||
// zhkkz
|
||||
newStoreRequest.setZhkkz("Y");
|
||||
// zjmsbm
|
||||
newStoreRequest.setZjmsbm(lineInfoDO.getPartnerNum());
|
||||
// zmddh
|
||||
newStoreRequest.setZmddh(lineInfoDO.getMobile());
|
||||
// zmdjyz
|
||||
newStoreRequest.setZmdjyz(sysStoreAppRequest.getStoreDetail().getStoreOperator());
|
||||
// zmdjyz_name
|
||||
newStoreRequest.setZmdjyz_name(StoreOperatorEnum.getByCode(sysStoreAppRequest.getStoreDetail().getStoreOperator()).getDesc());
|
||||
// zmdxz
|
||||
newStoreRequest.setZmdxz(20);
|
||||
// zmdxz_name
|
||||
newStoreRequest.setZmdxz_name("加盟");
|
||||
// zmdzt
|
||||
newStoreRequest.setZmdzt(10);
|
||||
// zmrjkllzs1
|
||||
newStoreRequest.setZmrjkllzs1(sysStoreAppRequest.getStoreDetail().getAverageDailyRs());
|
||||
// zppsyfy
|
||||
newStoreRequest.setZppsyfy(0.05);
|
||||
// zq
|
||||
newStoreRequest.setZq(pointInfoDO.getDistrict());
|
||||
// zsqmc
|
||||
newStoreRequest.setZsqmc(BusinessDistrictEnum.getByCode(sysStoreAppRequest.getStoreDetail().getMainBusinessType()).getDesc());
|
||||
// zssgs
|
||||
newStoreRequest.setZssgs("1060");
|
||||
// ztype
|
||||
newStoreRequest.setZtype("Z1");
|
||||
// zwesfj
|
||||
newStoreRequest.setZwesfj(sysStoreAppRequest.getStoreDetail().getAveragePriceSh());
|
||||
// zxqms
|
||||
newStoreRequest.setZxqms(sysStoreAppRequest.getStoreDetail().getSmallCode());
|
||||
// zxszyjzds
|
||||
newStoreRequest.setZxszyjzds(sysStoreAppRequest.getStoreDetail().getOfflineCompetingBrand());
|
||||
// zxxdz
|
||||
newStoreRequest.setZxxdz(pointInfoDO.getAddress());
|
||||
// zxxzyjzds
|
||||
newStoreRequest.setZxxzyjzds(sysStoreAppRequest.getStoreDetail().getOfflineCompetitor());
|
||||
// zymdbm
|
||||
newStoreRequest.setZymdbm(pointInfoDO.getPointCode());
|
||||
// zzqms
|
||||
newStoreRequest.setZzqms(sysStoreAppRequest.getStoreDetail().getFightName());
|
||||
newStoreRequest.setZzsqlx(sysStoreAppRequest.getStoreDetail().getMainBusinessType());
|
||||
// zzsqlx
|
||||
return newStoreRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean auditResult(AuditResultRequest request) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -172,8 +172,24 @@ public class Constants
|
||||
|
||||
public static final String FRANCHISEE_STORE_NUM = "/api/kdz/franchisee/save";
|
||||
|
||||
public static final String NEW_STORE_URL = "/api/coolstore/start-flow/new-store";
|
||||
|
||||
public static final String FRANCHISE_AGREEMENT_COMPANY = "/api/coolstore/start-flow/franchise-agreement-company";
|
||||
|
||||
public static final String FRANCHISE_AGREEMENT_PERSON = "/api/coolstore/start-flow/franchise-agreement-person";
|
||||
|
||||
public static final Integer ZERO_INTEGER = 0;
|
||||
|
||||
public static final Integer ONE_INTEGER = 1;
|
||||
|
||||
public static final String INSERT_FLAG = "insert";
|
||||
|
||||
public static final String UPDATE_FLAG = "update";
|
||||
|
||||
public static final String TIME_STAMP_FLAG = "yyyy-MM-dd";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.SysBuildResultRequest;
|
||||
import com.cool.store.request.XfsgOpenApiRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.KdzApiService;
|
||||
@@ -25,7 +26,7 @@ public class KdzApiController {
|
||||
@Resource
|
||||
KdzApiService kdzApiService;
|
||||
|
||||
@ApiOperation("意向加盟合同审核结果")
|
||||
@ApiOperation("审核结果")
|
||||
@PostMapping("/audit/result")
|
||||
public ResponseResult<Boolean> auditResult(@PathVariable(value = "enterprise-id") String eid,
|
||||
@RequestBody XfsgOpenApiRequest request) {
|
||||
@@ -41,6 +42,8 @@ public class KdzApiController {
|
||||
return ResponseResult.success(kdzApiService.auditResult(auditResultRequest));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean verifyMD5(XfsgOpenApiRequest request, String eid){
|
||||
//签名
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
|
||||
import com.cool.store.request.SysStoreAppRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
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;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/pc/sysStore")
|
||||
@Api(tags = "系统建店")
|
||||
@Slf4j
|
||||
public class SysStoreAppController {
|
||||
|
||||
@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 getDefaultValueSysBuildStore(@RequestParam("lineId") Long lineId,
|
||||
@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(sysStoreAppService.getDefaultValueSysBuildStore(lineId,shopId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.entity.BankdocDO;
|
||||
import com.cool.store.request.BranchBankPageRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 证照办理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/license")
|
||||
@Api(tags = "证照办理")
|
||||
@Slf4j
|
||||
public class ApplyLicenseController {
|
||||
|
||||
|
||||
@ApiOperation("证照办理提交")
|
||||
@PostMapping("/submit")
|
||||
public ResponseResult submitLicense() {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user