Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -2,8 +2,8 @@ package com.cool.store.enums;
|
||||
|
||||
public enum AuditEnum {
|
||||
|
||||
CONTRACT_INTENTION("intention", "意向加盟合同API","IntentAgreementServiceImpl"),
|
||||
SYS_BUILD("sysBuild", "系统建店API","SysStoreAppServiceImpl"),
|
||||
CONTRACT_INTENTION("intention", "意向加盟合同API","intentAgreementServiceImpl"),
|
||||
SYS_BUILD("sysBuild", "系统建店API","sysStoreAppServiceImpl"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
public enum AuditTypeEnum {
|
||||
VISUAL_ACCEPTANCE(0, "视觉验收"),
|
||||
TRAINING_REGISTRATION_APPROVAL(1, "培训登记审批"),
|
||||
OPENING_OPERATION_PLAN(2, "开业运营方案"),
|
||||
LICENSE_APPROVAL(3, "证照审批"),
|
||||
SYS_BUILD(4, "系统建店"),
|
||||
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String name;
|
||||
|
||||
private AuditTypeEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.enums.point;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -129,4 +130,16 @@ public enum ShopSubStageEnum {
|
||||
}
|
||||
}
|
||||
|
||||
public static ShopSubStageEnum getByShopSubStage(Integer shopSubStage) {
|
||||
if(Objects.isNull(shopSubStage)){
|
||||
return null;
|
||||
}
|
||||
for (ShopSubStageEnum value : ShopSubStageEnum.values()) {
|
||||
if (value.getShopSubStage().equals(shopSubStage)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopStageEnum
|
||||
* @Description:店铺阶段
|
||||
* @date 2024-04-10 17:34
|
||||
*/
|
||||
public enum ShopSubStageFieldEnum {
|
||||
|
||||
SHOP_STAGE_3(30, "系统建店", "systemSetup"),
|
||||
SHOP_STAGE_4(40, "证照办理", "licenseProcessing"),
|
||||
SHOP_STAGE_5(50, "员工招聘", "trainingRegistration"),
|
||||
SHOP_STAGE_6(60, "加盟商/员工培训", "trainingForFranchisee"),
|
||||
SHOP_STAGE_7(70, "缴纳加盟费/保证金", "franchiseFeeDeposit"),
|
||||
SHOP_STAGE_8( 80, "加盟合同签约", "contractSigning"),
|
||||
SHOP_STAGE_9( 90, "设计阶段", "storeDesign"),
|
||||
SHOP_STAGE_11(110, "施工阶段", "construction"),
|
||||
SHOP_STAGE_12(120, "三方验收", "tripleAcceptance"),
|
||||
SHOP_STAGE_13(130, "视觉验收", "visualAcceptance"),
|
||||
SHOP_STAGE_14(140, "开业运营方案", "marketPlanning"),
|
||||
SHOP_STAGE_15(150, "首批订货清单", "initialDeliveryList"),
|
||||
;
|
||||
|
||||
//子阶段
|
||||
private Integer shopSubStage;
|
||||
|
||||
//子阶段名称
|
||||
private String shopSubStageName;
|
||||
|
||||
//属性名称
|
||||
private String filed;
|
||||
|
||||
ShopSubStageFieldEnum(Integer shopSubStage, String shopSubStageName, String planCompleteDays) {
|
||||
this.shopSubStage = shopSubStage;
|
||||
this.shopSubStageName = shopSubStageName;
|
||||
this.filed = planCompleteDays;
|
||||
}
|
||||
|
||||
|
||||
public Integer getShopSubStage() {
|
||||
return shopSubStage;
|
||||
}
|
||||
|
||||
public String getShopSubStageName() {
|
||||
return shopSubStageName;
|
||||
}
|
||||
|
||||
|
||||
public String getFiled() {
|
||||
return filed;
|
||||
}
|
||||
|
||||
public static ShopSubStageFieldEnum getByShopSubStage(Integer shopSubStage) {
|
||||
if(Objects.isNull(shopSubStage)){
|
||||
return null;
|
||||
}
|
||||
for (ShopSubStageFieldEnum value : ShopSubStageFieldEnum.values()) {
|
||||
if (value.getShopSubStage().equals(shopSubStage)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -125,8 +125,8 @@ public class LineInfoDAO {
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
public List<LineInfoDO> publicLineList(PublicLineListRequest publicLineListRequest) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.publicLineList(publicLineListRequest);
|
||||
public List<LineInfoDO> publicLineList(PublicLineListRequest publicLineListRequest,Boolean publicFlag) {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.publicLineList(publicLineListRequest,publicFlag);
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ public class OpenAcceptanceInfoDAO {
|
||||
private OpenAcceptanceInfoMapper openAcceptanceInfoMapper;
|
||||
|
||||
|
||||
public List<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest){
|
||||
public List<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest) {
|
||||
|
||||
return openAcceptanceInfoMapper.openAcceptanceList(openAcceptanceRequest);
|
||||
}
|
||||
|
||||
@@ -28,5 +29,10 @@ public class OpenAcceptanceInfoDAO {
|
||||
return openAcceptanceInfoMapper.insertSelective(openAcceptanceInfoDO);
|
||||
}
|
||||
|
||||
|
||||
public OpenAcceptanceInfoDO selectOne(OpenAcceptanceInfoDO acceptanceInfoDO) {
|
||||
return openAcceptanceInfoMapper.selectOne(acceptanceInfoDO);
|
||||
}
|
||||
public int updateByPrimaryKeySelective(OpenAcceptanceInfoDO acceptanceInfoDO) {
|
||||
return openAcceptanceInfoMapper.updateByPrimaryKeySelective(acceptanceInfoDO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
* @param publicLineListRequest
|
||||
* @return
|
||||
*/
|
||||
List<LineInfoDO> publicLineList(@Param("request") PublicLineListRequest publicLineListRequest);
|
||||
List<LineInfoDO> publicLineList(@Param("request") PublicLineListRequest publicLineListRequest, @Param("publicFlag") Boolean publicFlag);
|
||||
|
||||
/**
|
||||
* 根据lineId判断是更新还是插入
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
||||
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -436,14 +436,20 @@
|
||||
<select id="publicLineList" resultMap="BaseResultMap">
|
||||
select * from xfsg_line_info
|
||||
where deleted = 0 and line_status = 0 and join_status = 0
|
||||
<if test="publicFlag">
|
||||
and investment_manager is not null
|
||||
</if>
|
||||
<if test="publicFlag==false">
|
||||
and investment_manager is null
|
||||
</if>
|
||||
<if test="request.userName != null and request.username!=''">
|
||||
and username = #{request.userName}
|
||||
and username like concat('%',#{request.userName},'%')
|
||||
</if>
|
||||
<if test="request.mobile != null and request.mobile!=''">
|
||||
and mobile = #{request.mobile}
|
||||
and mobile like concat('%', #{request.mobile},'%')
|
||||
</if>
|
||||
<if test="request.keyword != null and request.keyword!=''">
|
||||
and (username like #{request.keyword} or mobile like #{request.keyword})
|
||||
and (username like concat('%',#{request.keyword},'%') or mobile like concat('%', #{request.keyword},'%'))
|
||||
</if>
|
||||
<if test="request.lineSource != null">
|
||||
and line_source = #{request.lineSource}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<select id="getInterviewByLineId" resultMap="BaseResultMap">
|
||||
select * from
|
||||
xfsg_line_interview
|
||||
where line_id = #{lineId}
|
||||
where line_id = #{lineId} and interview_status = 3
|
||||
and deleted = '0'
|
||||
</select>
|
||||
|
||||
|
||||
@@ -18,4 +18,11 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
<select id="selectBykeyAndType" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
||||
select *
|
||||
from xfsg_shop_audit_info
|
||||
where shop_id = #{shopId}
|
||||
and audit_type = 4
|
||||
and deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,8 +1,17 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "xfsg_open_acceptance_info")
|
||||
public class OpenAcceptanceInfoDO {
|
||||
@Id
|
||||
@@ -43,72 +52,72 @@ public class OpenAcceptanceInfoDO {
|
||||
* 系统建店是否合格 0-不合格 1-合格
|
||||
*/
|
||||
@Column(name = "system_setup")
|
||||
private Byte systemSetup;
|
||||
private Boolean systemSetup;
|
||||
|
||||
/**
|
||||
* 证照办理是否合格
|
||||
*/
|
||||
@Column(name = "license_processing")
|
||||
private Byte licenseProcessing;
|
||||
private Boolean licenseProcessing;
|
||||
|
||||
/**
|
||||
* 缴纳加盟费/保证金是否合格
|
||||
*/
|
||||
@Column(name = "franchise_fee_deposit")
|
||||
private Byte franchiseFeeDeposit;
|
||||
private Boolean franchiseFeeDeposit;
|
||||
|
||||
/**
|
||||
* 加盟合同签约是否合格
|
||||
*/
|
||||
@Column(name = "contract_signing")
|
||||
private Byte contractSigning;
|
||||
private Boolean contractSigning;
|
||||
|
||||
/**
|
||||
* 培训登记是否合格
|
||||
*/
|
||||
@Column(name = "training_registration")
|
||||
private Byte trainingRegistration;
|
||||
private Boolean trainingRegistration;
|
||||
|
||||
/**
|
||||
* 加盟商/员工培训是否合格
|
||||
*/
|
||||
@Column(name = "training_for_franchisee")
|
||||
private Byte trainingForFranchisee;
|
||||
private Boolean trainingForFranchisee;
|
||||
|
||||
/**
|
||||
* 新店设计是否合格
|
||||
*/
|
||||
@Column(name = "store_design")
|
||||
private Byte storeDesign;
|
||||
private Boolean storeDesign;
|
||||
|
||||
/**
|
||||
* 工程施工是否合格
|
||||
*/
|
||||
private Byte construction;
|
||||
private Boolean construction;
|
||||
|
||||
/**
|
||||
* 三方验收是否合格
|
||||
*/
|
||||
@Column(name = "triple_acceptance")
|
||||
private Byte tripleAcceptance;
|
||||
private Boolean tripleAcceptance;
|
||||
|
||||
/**
|
||||
* 视觉验收是否合格
|
||||
*/
|
||||
@Column(name = "visual_acceptance")
|
||||
private Byte visualAcceptance;
|
||||
private Boolean visualAcceptance;
|
||||
|
||||
/**
|
||||
* 市调和活动策划是否合格
|
||||
*/
|
||||
@Column(name = "market_planning")
|
||||
private Byte marketPlanning;
|
||||
private Boolean marketPlanning;
|
||||
|
||||
/**
|
||||
* 首批配送清单是否合格
|
||||
*/
|
||||
@Column(name = "initial_delivery_list")
|
||||
private Byte initialDeliveryList;
|
||||
private Boolean initialDeliveryList;
|
||||
|
||||
/**
|
||||
* 删除标识
|
||||
@@ -127,359 +136,4 @@ public class OpenAcceptanceInfoDO {
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取line_info.id
|
||||
*
|
||||
* @return shop_id - line_info.id
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置line_info.id
|
||||
*
|
||||
* @param shopId line_info.id
|
||||
*/
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取计划开业时间
|
||||
*
|
||||
* @return plan_open_time - 计划开业时间
|
||||
*/
|
||||
public Date getPlanOpenTime() {
|
||||
return planOpenTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置计划开业时间
|
||||
*
|
||||
* @param planOpenTime 计划开业时间
|
||||
*/
|
||||
public void setPlanOpenTime(Date planOpenTime) {
|
||||
this.planOpenTime = planOpenTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验收状态
|
||||
*
|
||||
* @return acceptance_status - 验收状态
|
||||
*/
|
||||
public Integer getAcceptanceStatus() {
|
||||
return acceptanceStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置验收状态
|
||||
*
|
||||
* @param acceptanceStatus 验收状态
|
||||
*/
|
||||
public void setAcceptanceStatus(Integer acceptanceStatus) {
|
||||
this.acceptanceStatus = acceptanceStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验收时间
|
||||
*
|
||||
* @return acceptance_time - 验收时间
|
||||
*/
|
||||
public Date getAcceptanceTime() {
|
||||
return acceptanceTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置验收时间
|
||||
*
|
||||
* @param acceptanceTime 验收时间
|
||||
*/
|
||||
public void setAcceptanceTime(Date acceptanceTime) {
|
||||
this.acceptanceTime = acceptanceTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统建店是否合格 0-不合格 1-合格
|
||||
*
|
||||
* @return system_setup - 系统建店是否合格 0-不合格 1-合格
|
||||
*/
|
||||
public Byte getSystemSetup() {
|
||||
return systemSetup;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置系统建店是否合格 0-不合格 1-合格
|
||||
*
|
||||
* @param systemSetup 系统建店是否合格 0-不合格 1-合格
|
||||
*/
|
||||
public void setSystemSetup(Byte systemSetup) {
|
||||
this.systemSetup = systemSetup;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取证照办理是否合格
|
||||
*
|
||||
* @return license_processing - 证照办理是否合格
|
||||
*/
|
||||
public Byte getLicenseProcessing() {
|
||||
return licenseProcessing;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置证照办理是否合格
|
||||
*
|
||||
* @param licenseProcessing 证照办理是否合格
|
||||
*/
|
||||
public void setLicenseProcessing(Byte licenseProcessing) {
|
||||
this.licenseProcessing = licenseProcessing;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缴纳加盟费/保证金是否合格
|
||||
*
|
||||
* @return franchise_fee_deposit - 缴纳加盟费/保证金是否合格
|
||||
*/
|
||||
public Byte getFranchiseFeeDeposit() {
|
||||
return franchiseFeeDeposit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置缴纳加盟费/保证金是否合格
|
||||
*
|
||||
* @param franchiseFeeDeposit 缴纳加盟费/保证金是否合格
|
||||
*/
|
||||
public void setFranchiseFeeDeposit(Byte franchiseFeeDeposit) {
|
||||
this.franchiseFeeDeposit = franchiseFeeDeposit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取加盟合同签约是否合格
|
||||
*
|
||||
* @return contract_signing - 加盟合同签约是否合格
|
||||
*/
|
||||
public Byte getContractSigning() {
|
||||
return contractSigning;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置加盟合同签约是否合格
|
||||
*
|
||||
* @param contractSigning 加盟合同签约是否合格
|
||||
*/
|
||||
public void setContractSigning(Byte contractSigning) {
|
||||
this.contractSigning = contractSigning;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取培训登记是否合格
|
||||
*
|
||||
* @return training_registration - 培训登记是否合格
|
||||
*/
|
||||
public Byte getTrainingRegistration() {
|
||||
return trainingRegistration;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置培训登记是否合格
|
||||
*
|
||||
* @param trainingRegistration 培训登记是否合格
|
||||
*/
|
||||
public void setTrainingRegistration(Byte trainingRegistration) {
|
||||
this.trainingRegistration = trainingRegistration;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取加盟商/员工培训是否合格
|
||||
*
|
||||
* @return training_for_franchisee - 加盟商/员工培训是否合格
|
||||
*/
|
||||
public Byte getTrainingForFranchisee() {
|
||||
return trainingForFranchisee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置加盟商/员工培训是否合格
|
||||
*
|
||||
* @param trainingForFranchisee 加盟商/员工培训是否合格
|
||||
*/
|
||||
public void setTrainingForFranchisee(Byte trainingForFranchisee) {
|
||||
this.trainingForFranchisee = trainingForFranchisee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新店设计是否合格
|
||||
*
|
||||
* @return store_design - 新店设计是否合格
|
||||
*/
|
||||
public Byte getStoreDesign() {
|
||||
return storeDesign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置新店设计是否合格
|
||||
*
|
||||
* @param storeDesign 新店设计是否合格
|
||||
*/
|
||||
public void setStoreDesign(Byte storeDesign) {
|
||||
this.storeDesign = storeDesign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工程施工是否合格
|
||||
*
|
||||
* @return construction - 工程施工是否合格
|
||||
*/
|
||||
public Byte getConstruction() {
|
||||
return construction;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工程施工是否合格
|
||||
*
|
||||
* @param construction 工程施工是否合格
|
||||
*/
|
||||
public void setConstruction(Byte construction) {
|
||||
this.construction = construction;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取三方验收是否合格
|
||||
*
|
||||
* @return triple_acceptance - 三方验收是否合格
|
||||
*/
|
||||
public Byte getTripleAcceptance() {
|
||||
return tripleAcceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置三方验收是否合格
|
||||
*
|
||||
* @param tripleAcceptance 三方验收是否合格
|
||||
*/
|
||||
public void setTripleAcceptance(Byte tripleAcceptance) {
|
||||
this.tripleAcceptance = tripleAcceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视觉验收是否合格
|
||||
*
|
||||
* @return visual_acceptance - 视觉验收是否合格
|
||||
*/
|
||||
public Byte getVisualAcceptance() {
|
||||
return visualAcceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视觉验收是否合格
|
||||
*
|
||||
* @param visualAcceptance 视觉验收是否合格
|
||||
*/
|
||||
public void setVisualAcceptance(Byte visualAcceptance) {
|
||||
this.visualAcceptance = visualAcceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取市调和活动策划是否合格
|
||||
*
|
||||
* @return market_planning - 市调和活动策划是否合格
|
||||
*/
|
||||
public Byte getMarketPlanning() {
|
||||
return marketPlanning;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置市调和活动策划是否合格
|
||||
*
|
||||
* @param marketPlanning 市调和活动策划是否合格
|
||||
*/
|
||||
public void setMarketPlanning(Byte marketPlanning) {
|
||||
this.marketPlanning = marketPlanning;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首批配送清单是否合格
|
||||
*
|
||||
* @return initial_delivery_list - 首批配送清单是否合格
|
||||
*/
|
||||
public Byte getInitialDeliveryList() {
|
||||
return initialDeliveryList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置首批配送清单是否合格
|
||||
*
|
||||
* @param initialDeliveryList 首批配送清单是否合格
|
||||
*/
|
||||
public void setInitialDeliveryList(Byte initialDeliveryList) {
|
||||
this.initialDeliveryList = initialDeliveryList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取删除标识
|
||||
*
|
||||
* @return deleted - 删除标识
|
||||
*/
|
||||
public Boolean getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置删除标识
|
||||
*
|
||||
* @param deleted 删除标识
|
||||
*/
|
||||
public void setDeleted(Boolean deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return update_time - 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class ShopAuditInfoDO {
|
||||
* 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批
|
||||
*/
|
||||
@Column(name = "audit_type")
|
||||
private Byte auditType;
|
||||
private Integer auditType;
|
||||
|
||||
/**
|
||||
* 提交人ID
|
||||
@@ -37,7 +37,7 @@ public class ShopAuditInfoDO {
|
||||
* 结果类型 0通过,1拒绝
|
||||
*/
|
||||
@Column(name = "result_type")
|
||||
private Byte resultType;
|
||||
private Integer resultType;
|
||||
|
||||
/**
|
||||
* 通过原因
|
||||
@@ -111,7 +111,7 @@ public class ShopAuditInfoDO {
|
||||
*
|
||||
* @return audit_type - 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批
|
||||
*/
|
||||
public Byte getAuditType() {
|
||||
public Integer getAuditType() {
|
||||
return auditType;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ShopAuditInfoDO {
|
||||
*
|
||||
* @param auditType 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批
|
||||
*/
|
||||
public void setAuditType(Byte auditType) {
|
||||
public void setAuditType(Integer auditType) {
|
||||
this.auditType = auditType;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class ShopAuditInfoDO {
|
||||
*
|
||||
* @return result_type - 结果类型 0通过,1拒绝
|
||||
*/
|
||||
public Byte getResultType() {
|
||||
public Integer getResultType() {
|
||||
return resultType;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class ShopAuditInfoDO {
|
||||
*
|
||||
* @param resultType 结果类型 0通过,1拒绝
|
||||
*/
|
||||
public void setResultType(Byte resultType) {
|
||||
public void setResultType(Integer resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,4 +19,7 @@ public class AuditResultRequest {
|
||||
|
||||
@ApiModelProperty("通过/失败原因")
|
||||
private String cause = "";
|
||||
|
||||
@ApiModelProperty("门店编码(系统建店时使用)")
|
||||
private String storeNum;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class ShopAcceptanceRequest {
|
||||
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("开业时间")
|
||||
private Date planOpenTime;
|
||||
|
||||
@ApiModelProperty("店铺子阶段验收结果")
|
||||
private List<ShopStageAcceptanceRequest> shopStageAcceptanceList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class ShopStageAcceptanceRequest {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 店铺阶段
|
||||
*/
|
||||
@ApiModelProperty("店铺子阶段")
|
||||
private Integer shopSubStage;
|
||||
|
||||
|
||||
@ApiModelProperty("是否合格 0:不合格 1:合格")
|
||||
private Boolean result;
|
||||
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
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 {
|
||||
@@ -29,6 +26,21 @@ public class SysStoreAppResponse {
|
||||
|
||||
private SupervisorDetail supervisorDetail;
|
||||
|
||||
private AuditDetail auditDetail;
|
||||
|
||||
|
||||
@Data
|
||||
public static class AuditDetail {
|
||||
@ApiModelProperty("0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批 4-系统建店")
|
||||
private Integer auditType;
|
||||
@ApiModelProperty("结果类型 0通过,1拒绝")
|
||||
private Integer resultType;
|
||||
@ApiModelProperty("通过原因")
|
||||
private String passReason;
|
||||
@ApiModelProperty("拒绝原因")
|
||||
private String rejectReason;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel("加盟商信息")
|
||||
public static class FranInfo {
|
||||
@@ -54,7 +66,7 @@ public class SysStoreAppResponse {
|
||||
"6-直营门店;" +
|
||||
"7-同异业转化;" +
|
||||
"8-老加盟商迁址开新店")
|
||||
private Integer franchiseeType;
|
||||
private Integer franchiseeType;
|
||||
|
||||
@ApiModelProperty("门店邀约人id")
|
||||
private String inviteUserId;
|
||||
@@ -65,7 +77,7 @@ public class SysStoreAppResponse {
|
||||
|
||||
@Data
|
||||
@ApiModel("门店信息")
|
||||
public static class StoreDetail{
|
||||
public static class StoreDetail {
|
||||
@ApiModelProperty("门店性质")
|
||||
private Integer storeNature;
|
||||
@ApiModelProperty("门店经营者")
|
||||
@@ -132,7 +144,7 @@ public class SysStoreAppResponse {
|
||||
|
||||
@Data
|
||||
@ApiModel("督导相关信息")
|
||||
public static class SupervisorDetail{
|
||||
public static class SupervisorDetail {
|
||||
|
||||
@ApiModelProperty("督导姓名")
|
||||
private String supervisorName;
|
||||
@@ -149,6 +161,4 @@ public class SysStoreAppResponse {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class OpenAcceptanceInfoListVO {
|
||||
private Long largeRegionId;
|
||||
|
||||
@ApiModelProperty("大区名称")
|
||||
private Long largeRegionName;
|
||||
private String largeRegionName;
|
||||
@ApiModelProperty("计划开业时间")
|
||||
private Date planOpenTime;
|
||||
@ApiModelProperty("验收状态 0:未验收 1:已验收")
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class ShopStageAcceptanceVO {
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 店铺阶段
|
||||
*/
|
||||
@ApiModelProperty("店铺子阶段")
|
||||
private Integer shopSubStage;
|
||||
|
||||
|
||||
/**
|
||||
* 店铺阶段
|
||||
*/
|
||||
@ApiModelProperty("店铺子阶段名称")
|
||||
private String shopSubStageName;
|
||||
|
||||
|
||||
/**
|
||||
* 实际完成时间
|
||||
*/
|
||||
@ApiModelProperty("实际完成时间")
|
||||
private String actualCompleteTime;
|
||||
|
||||
|
||||
@ApiModelProperty("是否合格 0:不合格 1:合格")
|
||||
private Boolean result;
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public interface LineService {
|
||||
* @param loginUserInfo
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PublicLineListVO> getPublicLineList(PublicLineListRequest publicLineListRequest, LoginUserInfo loginUserInfo);
|
||||
PageInfo<PublicLineListVO> getPublicLineList(PublicLineListRequest publicLineListRequest, LoginUserInfo loginUserInfo ,Boolean publicFlag);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,36 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-22 14:41
|
||||
*/
|
||||
public interface OpenAcceptanceInfoService {
|
||||
|
||||
/**
|
||||
* 开业验收列表
|
||||
* @param openAcceptanceRequest
|
||||
* @return
|
||||
*/
|
||||
PageInfo<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest);
|
||||
|
||||
/**
|
||||
* 获取验收阶段
|
||||
* @param shopId 店铺id
|
||||
* @return
|
||||
*/
|
||||
List<ShopStageAcceptanceVO> acceptanceStageList(Long shopId);
|
||||
|
||||
/**
|
||||
* 验收
|
||||
* @param shopAcceptanceRequest
|
||||
*/
|
||||
void acceptance(ShopAcceptanceRequest shopAcceptanceRequest, String userId);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package com.cool.store.service.impl;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Service("AuditResultService")
|
||||
public interface AuditResultService {
|
||||
Boolean auditResult(AuditResultRequest request);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
@@ -34,7 +33,7 @@ import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class IntentAgreementServiceImpl extends LineFlowService implements IntentAgreementService,AuditResultService {
|
||||
public class IntentAgreementServiceImpl extends LineFlowService implements IntentAgreementService, AuditResultService {
|
||||
|
||||
|
||||
@Resource
|
||||
@@ -119,7 +118,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
//校验是否是审核节点
|
||||
if (!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) &&
|
||||
!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) {
|
||||
@@ -135,7 +134,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
}
|
||||
//更新auditId
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
|
||||
@@ -148,7 +147,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
if ((!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) &&
|
||||
!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode()))) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_APPROVE_NODE);
|
||||
@@ -183,24 +182,24 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
InitiatingDO initiatingDO = request.toInitiatingDO();
|
||||
// LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(request.getLineId());
|
||||
initiatingDO.setKdzBusinessId(AuditEnum.CONTRACT_INTENTION.getCode() + "_" +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());
|
||||
}else {
|
||||
String redisKey = "OA:"+request.getMobile()+request.getIdCardNo();
|
||||
redisUtilPool.setString(redisKey,JSONObject.toJSONString(request));
|
||||
if (initiatingResponse.getCode() != 0L) {
|
||||
return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
} else {
|
||||
String redisKey = "OA:" + request.getMobile() + request.getIdCardNo();
|
||||
redisUtilPool.setString(redisKey, JSONObject.toJSONString(request));
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
||||
String redisKey = "OA:"+mobile+idCardNo;
|
||||
String redisKey = "OA:" + mobile + idCardNo;
|
||||
String responseString = redisUtilPool.getString(redisKey);
|
||||
if (StringUtils.isNotBlank(responseString)){
|
||||
if (StringUtils.isNotBlank(responseString)) {
|
||||
InitiatingRequest initiatingRequest = JSONObject.parseObject(responseString, InitiatingRequest.class);
|
||||
return initiatingRequest;
|
||||
}
|
||||
@@ -219,7 +218,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
FranchiseeDO franchiseeDO = request.toFranchiseeDO();
|
||||
//查银行信息
|
||||
LinePayDO linePayDO = linePayMapper.getLinePayByLineId(request.getLineId());
|
||||
if (Objects.isNull(linePayDO)){
|
||||
if (Objects.isNull(linePayDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_PAY_FALSE);
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -230,7 +229,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
franchiseeDO.setBankSub(linePayDO.getBranchBankCode());
|
||||
//查城市信息
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(request.getLineId());
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
||||
@@ -241,7 +240,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
franchiseeDO.setOperator("22090043");
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
|
||||
//更新线索(进入蓄水池并回填加盟商编码)
|
||||
if (initiatingResponse.getCode() == 0){
|
||||
if (initiatingResponse.getCode() == 0) {
|
||||
LineInfoDO lineInfoParam = new LineInfoDO();
|
||||
lineInfoParam.setId(request.getLineId());
|
||||
//蓄水池
|
||||
@@ -249,12 +248,12 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfoParam.setPartnerNum(initiatingResponse.getData());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoParam);
|
||||
}
|
||||
if (initiatingResponse.getCode() != 0){
|
||||
if (initiatingResponse.getCode() != 0) {
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
return new ResponseResult(500,initiatingResponse.getMessage(),initiatingResponse.getData());
|
||||
}else {
|
||||
return new ResponseResult(200000,initiatingResponse.getMessage(),initiatingResponse.getData());
|
||||
return new ResponseResult(500, initiatingResponse.getMessage(), initiatingResponse.getData());
|
||||
} else {
|
||||
return new ResponseResult(200000, initiatingResponse.getMessage(), initiatingResponse.getData());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,35 +262,36 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
try {
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
if (StringUtil.isBlank(lineId)){
|
||||
if (StringUtil.isBlank(lineId)) {
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (request.getAuditResult() == 1){
|
||||
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){
|
||||
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);
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest, null);
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String getLineId(String kdzBusinessId) {
|
||||
return null;
|
||||
String lindId = kdzBusinessId.substring(kdzBusinessId.indexOf("_") + 1, kdzBusinessId.lastIndexOf("_"));
|
||||
return lindId;
|
||||
}
|
||||
|
||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||
|
||||
@@ -168,9 +168,9 @@ public class LineServiceImpl implements LineService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PublicLineListVO> getPublicLineList(PublicLineListRequest publicLineListRequest, LoginUserInfo loginUserInfo) {
|
||||
public PageInfo<PublicLineListVO> getPublicLineList(PublicLineListRequest publicLineListRequest, LoginUserInfo loginUserInfo, Boolean publicFlag) {
|
||||
PageHelper.startPage(publicLineListRequest.getPageNum(), publicLineListRequest.getPageSize());
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.publicLineList(publicLineListRequest);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.publicLineList(publicLineListRequest,publicFlag);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.OpenAcceptanceInfoDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.OpenAcceptanceInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageFieldEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.service.OpenAcceptanceInfoService;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
@@ -21,10 +35,94 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
@Resource
|
||||
private OpenAcceptanceInfoDAO openAcceptanceInfoDAO;
|
||||
|
||||
@Resource
|
||||
private EnterpriseUserDAO userDAO;
|
||||
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
|
||||
@Resource
|
||||
private RegionDao regionDao;
|
||||
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
public PageInfo<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest) {
|
||||
PageHelper.startPage(openAcceptanceRequest.getPageNum(), openAcceptanceRequest.getPageSize());
|
||||
List<OpenAcceptanceInfoListVO> resultList = openAcceptanceInfoDAO.openAcceptanceList(openAcceptanceRequest);
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for (OpenAcceptanceInfoListVO vo : resultList) {
|
||||
userIdList.add(vo.getSupervisorUserId());
|
||||
userIdList.add(vo.getShopManagerUserId());
|
||||
userIdList.add(vo.getAcceptanceUserId());
|
||||
userIdList.add(vo.getInvestmentManager());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(userIdList)) {
|
||||
Map<String, String> userNameMap = userDAO.getUserNameMap(userIdList);
|
||||
for (OpenAcceptanceInfoListVO vo : resultList) {
|
||||
vo.setSupervisorUserName(userNameMap.get(vo.getSupervisorUserId()));
|
||||
vo.setShopManagerUserName(userNameMap.get(vo.getShopManagerUserId()));
|
||||
vo.setAcceptanceUserName(userNameMap.get(vo.getAcceptanceUserId()));
|
||||
vo.setInvestmentManagerName(userNameMap.get(vo.getInvestmentManager()));
|
||||
if (vo.getRegionId() != null) {
|
||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(vo.getRegionId());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, vo.getRegionId()));
|
||||
vo.setRegionId(vo.getRegionId());
|
||||
vo.setRegionName(regionNameMap.get(vo.getRegionId()));
|
||||
vo.setLargeRegionId(bigRegionIdByAreaId);
|
||||
vo.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return new PageInfo<>(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopStageAcceptanceVO> acceptanceStageList(Long shopId) {
|
||||
|
||||
List<ShopStageInfoDO> stageInfoDOList = shopStageInfoDAO.getShopStageInfo(shopId, ShopStageEnum.SHOP_STAGE_2.getShopStage());
|
||||
List<ShopStageAcceptanceVO> result = new ArrayList<>();
|
||||
OpenAcceptanceInfoDO openAcceptanceInfoDO = openAcceptanceInfoDAO.selectOne(OpenAcceptanceInfoDO.builder().shopId(shopId).build());
|
||||
stageInfoDOList.forEach(stageInfoDO -> {
|
||||
ShopStageAcceptanceVO shopStageAcceptanceVO = new ShopStageAcceptanceVO();
|
||||
shopStageAcceptanceVO.setShopId(stageInfoDO.getShopId());
|
||||
shopStageAcceptanceVO.setShopSubStage(stageInfoDO.getShopSubStage());
|
||||
shopStageAcceptanceVO.setId(stageInfoDO.getId());
|
||||
shopStageAcceptanceVO.setActualCompleteTime(stageInfoDO.getActualCompleteTime());
|
||||
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.getByShopSubStage(stageInfoDO.getShopSubStage());
|
||||
if (shopSubStageEnum != null) {
|
||||
shopStageAcceptanceVO.setShopSubStageName(shopSubStageEnum.getShopSubStageName());
|
||||
}
|
||||
ShopSubStageFieldEnum shopSubStageFieldEnum = ShopSubStageFieldEnum.getByShopSubStage(stageInfoDO.getShopSubStage());
|
||||
if (shopSubStageFieldEnum != null) {
|
||||
shopStageAcceptanceVO.setResult(ReflectUtil.getFieldValue(openAcceptanceInfoDO, shopSubStageFieldEnum.getFiled()) == null ?
|
||||
null : (Boolean) ReflectUtil.getFieldValue(openAcceptanceInfoDO, shopSubStageFieldEnum.getFiled()));
|
||||
}
|
||||
result.add(shopStageAcceptanceVO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptance(ShopAcceptanceRequest shopAcceptanceRequest, String userId) {
|
||||
OpenAcceptanceInfoDO openAcceptanceInfoDO = openAcceptanceInfoDAO.selectOne(OpenAcceptanceInfoDO.builder().shopId(shopAcceptanceRequest.getShopId()).build());
|
||||
if(openAcceptanceInfoDO == null){
|
||||
throw new ServiceException("该店铺不存在");
|
||||
}
|
||||
if(openAcceptanceInfoDO.getAcceptanceStatus() != null && openAcceptanceInfoDO.getAcceptanceStatus() == 1){
|
||||
throw new ServiceException("该店铺已验收完成,不能再次验收");
|
||||
}
|
||||
shopAcceptanceRequest.getShopStageAcceptanceList().forEach(shopStageAcceptanceRequest -> {
|
||||
ShopSubStageFieldEnum shopSubStageFieldEnum = ShopSubStageFieldEnum.getByShopSubStage(shopStageAcceptanceRequest.getShopSubStage());
|
||||
if (shopSubStageFieldEnum != null) {
|
||||
ReflectUtil.setFieldValue(openAcceptanceInfoDO, shopSubStageFieldEnum.getFiled(), shopStageAcceptanceRequest.getResult());
|
||||
}
|
||||
});
|
||||
openAcceptanceInfoDO.setAcceptanceStatus(1);
|
||||
openAcceptanceInfoDO.setAcceptanceUserId(userId);
|
||||
openAcceptanceInfoDO.setPlanOpenTime(shopAcceptanceRequest.getPlanOpenTime());
|
||||
openAcceptanceInfoDO.setAcceptanceTime(new Date());
|
||||
openAcceptanceInfoDAO.updateByPrimaryKeySelective(openAcceptanceInfoDO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ 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.AuditTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.prepare.newStore.BusinessDistrictEnum;
|
||||
@@ -20,6 +21,7 @@ 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.PreparationService;
|
||||
import com.cool.store.service.SysStoreAppService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
@@ -61,6 +63,15 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
|
||||
@Resource
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
|
||||
@Resource
|
||||
PreparationService preparationService;
|
||||
|
||||
@Resource
|
||||
ShopAuditInfoMapper shopAuditInfoMapper;
|
||||
|
||||
@Resource
|
||||
ShopInfoMapper shopInfoMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResponseResult submitSysBuildStore(SysStoreAppRequest request) {
|
||||
@@ -94,6 +105,15 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
|
||||
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
//2.组装数据并返回
|
||||
sysStoreAppResponse = polymerization(sysStoreAppResponse,systemBuildingShopDO,lineInfoDO,pointInfoDO);
|
||||
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectBykeyAndType(shopId);
|
||||
if (Objects.nonNull(shopAuditInfoDO)){
|
||||
SysStoreAppResponse.AuditDetail auditDetail = new SysStoreAppResponse.AuditDetail();
|
||||
auditDetail.setAuditType(shopAuditInfoDO.getAuditType());
|
||||
auditDetail.setPassReason(shopAuditInfoDO.getPassReason());
|
||||
auditDetail.setRejectReason(shopAuditInfoDO.getRejectReason());
|
||||
auditDetail.setResultType(shopAuditInfoDO.getResultType());
|
||||
sysStoreAppResponse.setAuditDetail(auditDetail);
|
||||
}
|
||||
return sysStoreAppResponse;
|
||||
}
|
||||
|
||||
@@ -353,7 +373,39 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
|
||||
|
||||
@Override
|
||||
public Boolean auditResult(AuditResultRequest request) {
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
Long shopId = getShopId(kdzBusinessId);
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
//1.成功/失败原因
|
||||
try {
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.SYS_BUILD.getCode());
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||
if (request.getAuditResult() == 0){
|
||||
shopAuditInfoDO.setResultType(1);
|
||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
||||
}else if (request.getAuditResult() == 1){
|
||||
shopAuditInfoDO.setResultType(0);
|
||||
shopAuditInfoDO.setPassReason(request.getCause());
|
||||
}
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
}catch (Exception e){
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
}finally {
|
||||
//2.校验建店与加盟签约合同是否完成 并初始化后续流程数据
|
||||
preparationService.contractAndBuildStoreCompletion(shopId);
|
||||
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
||||
shopInfoDO.setId(shopId);
|
||||
shopInfoDO.setStoreNum(request.getStoreNum());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
private Long getShopId(String kdzBusinessId) {
|
||||
String shopId = kdzBusinessId.substring(kdzBusinessId.indexOf("_") + 1,kdzBusinessId.lastIndexOf("_"));
|
||||
return Long.valueOf(shopId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.wx.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.UserChannelEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.http.WechatRest;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
@@ -123,6 +122,15 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
}
|
||||
hyPartnerUserInfoDO.setUserChannelId(channelId);
|
||||
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
||||
//授权的时候 新增线索 放到公海
|
||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||
lineInfoDO.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoDO.setMobile(hyPartnerUserInfoDO.getMobile());
|
||||
lineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_0.getCode());
|
||||
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
lineInfoDAO.insertOrUpdate(lineInfoDO);
|
||||
}else {
|
||||
hyPartnerUserInfoDO.setOpenid(openid);
|
||||
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
|
||||
|
||||
@@ -62,9 +62,16 @@ public class LineInfoController {
|
||||
|
||||
@ApiOperation("公海线索")
|
||||
@PostMapping("/getPublicLineList")
|
||||
public ResponseResult<PageInfo<PublicLineListVO>> getTeamLineList(@RequestBody PublicLineListRequest publicLineListRequest) {
|
||||
public ResponseResult<PageInfo<PublicLineListVO>> getPublicLineList(@RequestBody PublicLineListRequest publicLineListRequest) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(lineService.getPublicLineList(publicLineListRequest,user));
|
||||
return ResponseResult.success(lineService.getPublicLineList(publicLineListRequest,user,Boolean.TRUE));
|
||||
}
|
||||
|
||||
@ApiOperation("待分配线索")
|
||||
@PostMapping("/getAssignedLineList")
|
||||
public ResponseResult<PageInfo<PublicLineListVO>> getAssignedLineList(@RequestBody PublicLineListRequest publicLineListRequest) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(lineService.getPublicLineList(publicLineListRequest,user,Boolean.FALSE));
|
||||
}
|
||||
|
||||
@ApiOperation("我负责的加盟商")
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OpenAcceptanceInfoService;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
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.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author byd
|
||||
@@ -32,4 +36,21 @@ public class OpenAcceptanceInfoController {
|
||||
return ResponseResult.success(openAcceptanceInfoService.openAcceptanceList(openAcceptanceRequest));
|
||||
}
|
||||
|
||||
@GetMapping(path = "/acceptanceStageList")
|
||||
@ApiOperation("开业验收阶段结果列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
})
|
||||
public ResponseResult<List<ShopStageAcceptanceVO>> acceptanceStageList(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(openAcceptanceInfoService.acceptanceStageList(shopId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("开业验收")
|
||||
@PostMapping(path = "/acceptance")
|
||||
public ResponseResult<Boolean> acceptance(@RequestBody ShopAcceptanceRequest shopAcceptanceRequest) {
|
||||
openAcceptanceInfoService.acceptance(shopAcceptanceRequest, CurrentUserHolder.getUserId());
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ trtc.sdkAppId=1600026212
|
||||
trtc.secretKey=e036b654c665f649f053a01ff6f5652a826980027be298d4d49949f6e26434a5
|
||||
trtc.video.callback.secretKey=ur4wq2iFbRI03Q35
|
||||
|
||||
weixin.appId=wx085c84fe42691bf1
|
||||
weixin.appSecret=58e89c9ec4ade1d094bbe21836a19ec4
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=2ddea4374abeace05e83c948392c2952
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
|
||||
@@ -49,8 +49,8 @@ trtc.sdkAppId=1600026212
|
||||
trtc.secretKey=e036b654c665f649f053a01ff6f5652a826980027be298d4d49949f6e26434a5
|
||||
trtc.video.callback.secretKey=ur4wq2iFbRI03Q35
|
||||
|
||||
weixin.appId=wx085c84fe42691bf1
|
||||
weixin.appSecret=58e89c9ec4ade1d094bbe21836a19ec4
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=2ddea4374abeace05e83c948392c2952
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
|
||||
@@ -61,7 +61,7 @@ trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.appSecret=2ddea4374abeace05e83c948392c2952
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
|
||||
@@ -60,8 +60,8 @@ trtc.sdkAppId=1600026212
|
||||
trtc.secretKey=e036b654c665f649f053a01ff6f5652a826980027be298d4d49949f6e26434a5
|
||||
trtc.video.callback.secretKey=ur4wq2iFbRI03Q35
|
||||
|
||||
weixin.appId=wx085c84fe42691bf1
|
||||
weixin.appSecret=58e89c9ec4ade1d094bbe21836a19ec4
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=2ddea4374abeace05e83c948392c2952
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
|
||||
Reference in New Issue
Block a user