Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -152,7 +152,9 @@ public class CommonConstants {
|
|||||||
public static final String DEAULT_INVESTMENT_JOBNUMBER = "020125244825417786";
|
public static final String DEAULT_INVESTMENT_JOBNUMBER = "020125244825417786";
|
||||||
// public static final String DEAULT_SELECT_SITE_MANAGER = "09080211";
|
// public static final String DEAULT_SELECT_SITE_MANAGER = "09080211";
|
||||||
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
|
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
|
||||||
|
// 【铺位1】所属战区没有战区经理、营运经理和大区经理,开店负责人展示【王磊】
|
||||||
|
// public static final String DEAULT_SHOP_MANAGER_USER_ID = "19060164";
|
||||||
|
public static final String DEAULT_SHOP_MANAGER_USER_ID = "23483622251259165";
|
||||||
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
|
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
|
||||||
|
|
||||||
public static final String YUN_XUE_TANG_SUC_CODE = "10000";
|
public static final String YUN_XUE_TANG_SUC_CODE = "10000";
|
||||||
|
|||||||
@@ -188,6 +188,9 @@ public enum ErrorCodeEnum {
|
|||||||
AUDIT_RESULT_FALSE(109012, "意向加盟合同API本次调用结果与上一次不一致", null),
|
AUDIT_RESULT_FALSE(109012, "意向加盟合同API本次调用结果与上一次不一致", null),
|
||||||
|
|
||||||
|
|
||||||
|
TIME_NULL_FALSE(109013, "有时间为空", null),
|
||||||
|
|
||||||
|
|
||||||
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
||||||
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
||||||
SHOP_ID_IS_NULL(103003,"验参shopId失败,为空",null),
|
SHOP_ID_IS_NULL(103003,"验参shopId失败,为空",null),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
public enum ExamStatusEnum {
|
public enum ExamStatusEnum {
|
||||||
|
|
||||||
NOT_START(0, "未开始"),
|
NOT_START(0, "未开始"),
|
||||||
PASS(1, "通过"),
|
PASS(1, "正考通过"),
|
||||||
NOT_PASS(2, "不通过");
|
NOT_PASS(2, "不通过");
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public enum MessageEnum {
|
|||||||
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_21("加盟商已登记一位员工,请及时安排培训", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
MESSAGE_21("加盟商已登记一位员工,请及时安排培训", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
||||||
MESSAGE_22("您收到一位员工由您带教,请查收", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
MESSAGE_22("您收到一位员工由您带教,请查收", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
||||||
MESSAGE_23("您有一个门店待发布加盟费/保证金账单,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_23("您有一个门店待发布加盟费/保证金账单,请查收", "##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_24("您有一个门店待预约三方验收时间,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_24("您有一个门店待预约三方验收时间,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_25("您有一个门店待进行三方验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_25("您有一个门店待进行三方验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
//缴纳意向金,装修款
|
//缴纳意向金,装修款
|
||||||
PAY_DEPOSIT_45(45,"待缴费"),
|
PAY_DEPOSIT_45(45,"待缴费"),
|
||||||
PAY_DEPOSIT_50(50,"已缴费"),
|
PAY_DEPOSIT_50(50,"已缴费"),
|
||||||
PAY_FAIL_55(55,"缴费失败"),
|
PAY_FAIL_55(55,"审核未通过"),
|
||||||
|
|
||||||
//签署意向协议
|
//签署意向协议
|
||||||
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public enum ShopSubStageStatusEnum {
|
|||||||
SHOP_SUB_STAGE_STATUS_71(ShopSubStageEnum.SHOP_STAGE_7, 710, "待缴费", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_71(ShopSubStageEnum.SHOP_STAGE_7, 710, "待缴费", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_72(ShopSubStageEnum.SHOP_STAGE_7, 720, "待审核", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_72(ShopSubStageEnum.SHOP_STAGE_7, 720, "待审核", Boolean.FALSE),
|
||||||
SHOP_SUB_STAGE_STATUS_73(ShopSubStageEnum.SHOP_STAGE_7, 730, "已缴费", Boolean.TRUE),
|
SHOP_SUB_STAGE_STATUS_73(ShopSubStageEnum.SHOP_STAGE_7, 730, "已缴费", Boolean.TRUE),
|
||||||
SHOP_SUB_STAGE_STATUS_74(ShopSubStageEnum.SHOP_STAGE_7, 740, "缴费失败", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_74(ShopSubStageEnum.SHOP_STAGE_7, 740, "审核不通过", Boolean.FALSE),
|
||||||
|
|
||||||
//加盟合同签约
|
//加盟合同签约
|
||||||
SHOP_SUB_STAGE_STATUS_80(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),
|
SHOP_SUB_STAGE_STATUS_80(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class EmployeeTrainingDAO {
|
|||||||
|
|
||||||
public Integer unCompleteNum(Long shopId) {
|
public Integer unCompleteNum(Long shopId) {
|
||||||
Example example = new Example(EmployeeTrainingDO.class);
|
Example example = new Example(EmployeeTrainingDO.class);
|
||||||
example.createCriteria().andEqualTo("shopId", shopId).andCondition("theoreticalExamStatus != 1").andCondition("practical_exam_status != 1", 1);
|
example.createCriteria().andEqualTo("shopId", shopId).andCondition("theoretical_exam_status != 1").andCondition("practical_exam_status != 1");
|
||||||
return employeeTrainingMapper.selectCountByExample(example);
|
return employeeTrainingMapper.selectCountByExample(example);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,5 +68,13 @@ public class FranchiseeDO {
|
|||||||
* 签约类型:0-个人签约;1-企业签约
|
* 签约类型:0-个人签约;1-企业签约
|
||||||
*/
|
*/
|
||||||
private long signType;
|
private long signType;
|
||||||
|
/**
|
||||||
|
* 营业期限
|
||||||
|
*/
|
||||||
|
private String businessTerm;
|
||||||
|
/**
|
||||||
|
* 法人
|
||||||
|
*/
|
||||||
|
private String legalPerson;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -435,4 +435,9 @@ public class FranchiseAgreementRequest {
|
|||||||
* 装修合同业务分类,默认:3121375929356587766
|
* 装修合同业务分类,默认:3121375929356587766
|
||||||
*/
|
*/
|
||||||
private String zxhtywfl;
|
private String zxhtywfl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法定代表人或负责人
|
||||||
|
*/
|
||||||
|
private String fddbr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public class FranchiseeSaveRequest {
|
|||||||
franchiseeDO.setIdCardAddress(this.idCardAddress);
|
franchiseeDO.setIdCardAddress(this.idCardAddress);
|
||||||
franchiseeDO.setIdCardBackUrl(this.idCardBackUrl);
|
franchiseeDO.setIdCardBackUrl(this.idCardBackUrl);
|
||||||
franchiseeDO.setIdCardFrontUrl(this.idCardFrontUrl);
|
franchiseeDO.setIdCardFrontUrl(this.idCardFrontUrl);
|
||||||
franchiseeDO.setSex(this.sex);
|
|
||||||
franchiseeDO.setSignType(this.signType);
|
franchiseeDO.setSignType(this.signType);
|
||||||
return franchiseeDO;
|
return franchiseeDO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,14 @@ package com.cool.store.request;
|
|||||||
|
|
||||||
import com.cool.store.entity.InitiatingDO;
|
import com.cool.store.entity.InitiatingDO;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class InitiatingRequest {
|
public class InitiatingRequest {
|
||||||
@@ -105,6 +108,10 @@ public class InitiatingRequest {
|
|||||||
|
|
||||||
private String csfzName;
|
private String csfzName;
|
||||||
|
|
||||||
|
private Date signStartTime;
|
||||||
|
|
||||||
|
private Date signEndTime;
|
||||||
|
|
||||||
|
|
||||||
public InitiatingDO toInitiatingDO() {
|
public InitiatingDO toInitiatingDO() {
|
||||||
InitiatingDO initiatingDO = new InitiatingDO();
|
InitiatingDO initiatingDO = new InitiatingDO();
|
||||||
@@ -115,14 +122,14 @@ public class InitiatingRequest {
|
|||||||
initiatingDO.setTitle("加盟意向协议-" + this.signName + "-" + dateTime);
|
initiatingDO.setTitle("加盟意向协议-" + this.signName + "-" + dateTime);
|
||||||
initiatingDO.setApply_date(this.apply_date);
|
initiatingDO.setApply_date(this.apply_date);
|
||||||
initiatingDO.setJms_id_card(this.idCardNo);
|
initiatingDO.setJms_id_card(this.idCardNo);
|
||||||
if (StringUtil.isNotBlank(this.businessLicenseAddress)){
|
if (StringUtil.isNotBlank(this.businessLicenseAddress)) {
|
||||||
initiatingDO.setJms_id_card_address(this.businessLicenseAddress);
|
initiatingDO.setJms_id_card_address(this.businessLicenseAddress);
|
||||||
}else if (StringUtil.isNotBlank(this.idCardAddress)){
|
} else if (StringUtil.isNotBlank(this.idCardAddress)) {
|
||||||
initiatingDO.setJms_id_card_address(this.idCardAddress);
|
initiatingDO.setJms_id_card_address(this.idCardAddress);
|
||||||
}
|
}
|
||||||
if (StringUtil.isNotBlank(this.businessLicenseCode)){
|
if (StringUtil.isNotBlank(this.businessLicenseCode)) {
|
||||||
initiatingDO.setJms_id_card(this.businessLicenseCode);
|
initiatingDO.setJms_id_card(this.businessLicenseCode);
|
||||||
}else if (StringUtil.isNotBlank(this.idCardNo)){
|
} else if (StringUtil.isNotBlank(this.idCardNo)) {
|
||||||
initiatingDO.setJms_id_card(this.idCardNo);
|
initiatingDO.setJms_id_card(this.idCardNo);
|
||||||
}
|
}
|
||||||
initiatingDO.setJms_name(this.signName);
|
initiatingDO.setJms_name(this.signName);
|
||||||
@@ -133,12 +140,12 @@ public class InitiatingRequest {
|
|||||||
initiatingDO.setAnnex1(this.annex1);
|
initiatingDO.setAnnex1(this.annex1);
|
||||||
initiatingDO.setAnnex2(this.annex2);
|
initiatingDO.setAnnex2(this.annex2);
|
||||||
initiatingDO.setAnnex3(this.annex3);
|
initiatingDO.setAnnex3(this.annex3);
|
||||||
initiatingDO.setQy_year(this.qy_year);
|
initiatingDO.setQy_year(timeUtils(this.signStartTime,"year"));
|
||||||
initiatingDO.setQy_month(this.qy_month);
|
initiatingDO.setQy_month(timeUtils(this.signStartTime,"month"));
|
||||||
initiatingDO.setQy_day(this.qy_day);
|
initiatingDO.setQy_day(timeUtils(this.signStartTime,"day"));
|
||||||
initiatingDO.setJy_year(this.jy_year);
|
initiatingDO.setJy_year(timeUtils(this.signEndTime,"year"));
|
||||||
initiatingDO.setJy_month(this.jy_month);
|
initiatingDO.setJy_month(timeUtils(this.signEndTime,"month"));
|
||||||
initiatingDO.setJy_day(this.jy_day);
|
initiatingDO.setJy_day(timeUtils(this.signEndTime,"day"));
|
||||||
initiatingDO.setYxjzz(this.yxjzz);
|
initiatingDO.setYxjzz(this.yxjzz);
|
||||||
initiatingDO.setXyqx_month(this.xyqx_month);
|
initiatingDO.setXyqx_month(this.xyqx_month);
|
||||||
initiatingDO.setJmf(this.jmf);
|
initiatingDO.setJmf(this.jmf);
|
||||||
@@ -160,4 +167,21 @@ public class InitiatingRequest {
|
|||||||
initiatingDO.setJmyxjdx(this.jmyxjdx);
|
initiatingDO.setJmyxjdx(this.jmyxjdx);
|
||||||
return initiatingDO;
|
return initiatingDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int timeUtils(Date time, String type) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(time);
|
||||||
|
switch (type){
|
||||||
|
case "year":
|
||||||
|
return calendar.get(Calendar.YEAR);
|
||||||
|
case "month":
|
||||||
|
return calendar.get(Calendar.MONTH) + 1;
|
||||||
|
case "day":
|
||||||
|
return calendar.get(Calendar.DAY_OF_MONTH);
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -15,8 +16,10 @@ public class TrainingExperienceDistributionRequest {
|
|||||||
@ApiModelProperty("用户信息表partnerId")
|
@ApiModelProperty("用户信息表partnerId")
|
||||||
private String partnerId;
|
private String partnerId;
|
||||||
@ApiModelProperty("体验门店id")
|
@ApiModelProperty("体验门店id")
|
||||||
|
@NotNull(message = "门店id为空")
|
||||||
private String storeId;
|
private String storeId;
|
||||||
@ApiModelProperty("门店名")
|
@ApiModelProperty("门店名")
|
||||||
|
@NotNull(message = "门店名为空")
|
||||||
private String storeName;
|
private String storeName;
|
||||||
@ApiModelProperty("开始体验时间")
|
@ApiModelProperty("开始体验时间")
|
||||||
private Date experienceStartTime;
|
private Date experienceStartTime;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class FranchiseFeeResponse {
|
|||||||
@ApiModelProperty("审核原因")
|
@ApiModelProperty("审核原因")
|
||||||
private String result;
|
private String result;
|
||||||
|
|
||||||
@ApiModelProperty("审核状态")
|
@ApiModelProperty("审核状态 0通过,1拒绝")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
public static LinePay from(LinePayDO linePayDO) {
|
public static LinePay from(LinePayDO linePayDO) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.request.FranchiseeSaveRequest;
|
import com.cool.store.request.FranchiseeSaveRequest;
|
||||||
import com.cool.store.request.InitiatingRequest;
|
import com.cool.store.request.InitiatingRequest;
|
||||||
import com.cool.store.request.IntentAgreementSubmitRequest;
|
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||||
@@ -26,7 +27,7 @@ public interface IntentAgreementService {
|
|||||||
|
|
||||||
ResponseResult initiating(InitiatingRequest request,LoginUserInfo user);
|
ResponseResult initiating(InitiatingRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user);
|
ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException;
|
||||||
|
|
||||||
InitiatingRequest getOaDetail(String mobile, String idCardNo);
|
InitiatingRequest getOaDetail(String mobile, String idCardNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
List<UserAuthMappingDO> userAuthByMappingIds = userAuthMappingMapper.getUserAuthByMappingIds(Collections.singletonList(String.valueOf(regionId)));
|
List<UserAuthMappingDO> userAuthByMappingIds = userAuthMappingMapper.getUserAuthByMappingIds(Collections.singletonList(String.valueOf(regionId)));
|
||||||
if (CollectionUtils.isNotEmpty(userAuthByMappingIds)) {
|
if (CollectionUtils.isNotEmpty(userAuthByMappingIds)) {
|
||||||
List<String> sendUserIds = userAuthByMappingIds.stream().map(UserAuthMappingDO::getUserId).collect(Collectors.toList());
|
List<String> sendUserIds = userAuthByMappingIds.stream().map(UserAuthMappingDO::getUserId).collect(Collectors.toList());
|
||||||
sendUsers.addAll(sendUserIds);
|
if (CollectionUtils.isNotEmpty(sendUserIds)){
|
||||||
|
sendUsers = enterpriseUserRoleMapper.getUserIdsByRoleIds(Collections.singletonList("130000000"), sendUserIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sendUsers.add(shopInfoDO.getSupervisorUserId());
|
sendUsers.add(shopInfoDO.getSupervisorUserId());
|
||||||
|
|||||||
@@ -99,8 +99,9 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
String url = xfsgUrl + Constants.FIRST_ORDER +
|
String url = xfsgUrl + Constants.FIRST_ORDER +
|
||||||
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature") +
|
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature") +
|
||||||
"&storeCode=" + shopNum;
|
"&storeCode=" + shopNum;
|
||||||
|
Long start = System.currentTimeMillis();
|
||||||
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
||||||
log.info("get url:{},jsonObject:{}", url, jsonObject);
|
log.info("get url:{},jsonObject:{},耗时:{}", url, jsonObject,System.currentTimeMillis() - start);
|
||||||
Boolean flag = (Boolean) jsonObject.get("data");
|
Boolean flag = (Boolean) jsonObject.get("data");
|
||||||
return flag;
|
return flag;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
||||||
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.INTERVIEW);
|
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.INTERVIEW);
|
||||||
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
|
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
|
||||||
|
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getFirstInterviewer() != null).map(LineInfoDO::getFirstInterviewer).collect(Collectors.toList());
|
||||||
|
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
|
||||||
|
|
||||||
List<InterviewPendingVO> list = new ArrayList<>();
|
List<InterviewPendingVO> list = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
@@ -132,7 +134,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
if (lineInterviewDO != null){
|
if (lineInterviewDO != null){
|
||||||
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
|
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
|
||||||
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
|
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
|
||||||
interviewPendingVO.setInterviewer(userInfo.getName());
|
interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getFirstInterviewer(),new EnterpriseUserDO()).getName());
|
||||||
}
|
}
|
||||||
list.add(interviewPendingVO);
|
list.add(interviewPendingVO);
|
||||||
});
|
});
|
||||||
@@ -154,6 +156,9 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
||||||
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.SECOND_INTERVIEW);
|
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.SECOND_INTERVIEW);
|
||||||
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
|
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
|
||||||
|
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getSecondInterviewer() != null).map(LineInfoDO::getSecondInterviewer).collect(Collectors.toList());
|
||||||
|
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
|
||||||
|
|
||||||
|
|
||||||
List<InterviewPendingVO> list = new ArrayList<>();
|
List<InterviewPendingVO> list = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x->{
|
lineInfoDOS.forEach(x->{
|
||||||
@@ -163,7 +168,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
if (lineInterviewDO != null){
|
if (lineInterviewDO != null){
|
||||||
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
|
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
|
||||||
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
|
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
|
||||||
interviewPendingVO.setInterviewer(userInfo.getName());
|
interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getSecondInterviewer(),new EnterpriseUserDO()).getName());
|
||||||
}
|
}
|
||||||
list.add(interviewPendingVO);
|
list.add(interviewPendingVO);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -131,15 +131,14 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId());
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId());
|
||||||
franchiseFeeDO.setAuditId(shopAuditInfoDO.getId());
|
franchiseFeeDO.setAuditId(shopAuditInfoDO.getId());
|
||||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||||
|
// ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
// LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
// Map<String, String> requestMap = new HashMap<>();
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
// requestMap.put("storeName", shopInfoDO.getShopName());
|
||||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
// requestMap.put("partnerName", lineInfoDO.getUsername());
|
||||||
requestMap.put("partnerName", lineInfoDO.getUsername());
|
// requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
||||||
requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
// requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
|
||||||
requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
|
// commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
|
||||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.cool.store.context.LoginUserInfo;
|
|||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.*;
|
import com.cool.store.mapper.*;
|
||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
@@ -12,12 +13,14 @@ import com.cool.store.request.*;
|
|||||||
import com.cool.store.response.InitiatingResponse;
|
import com.cool.store.response.InitiatingResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.response.SigningBaseInfoResponse;
|
import com.cool.store.response.SigningBaseInfoResponse;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
import com.cool.store.service.IntentAgreementService;
|
import com.cool.store.service.IntentAgreementService;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.SecureUtil;
|
import com.cool.store.utils.SecureUtil;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
|
import com.cool.store.vo.BusinessLicenseInfoVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -70,6 +73,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
@Resource
|
@Resource
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
AliyunService aliyunService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -138,6 +144,11 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||||
//更新线索阶段
|
//更新线索阶段
|
||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||||
|
Map<String, String> requestMap = new HashMap<>();
|
||||||
|
requestMap.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||||
|
requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_32,requestMap);
|
||||||
}
|
}
|
||||||
//更新auditId
|
//更新auditId
|
||||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
|
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
|
||||||
@@ -188,6 +199,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
|
verifyDate(request);
|
||||||
Map<String, Object> requestMap = new HashMap<>();
|
Map<String, Object> requestMap = new HashMap<>();
|
||||||
fillSignatureInfo(requestMap);
|
fillSignatureInfo(requestMap);
|
||||||
String url = xfsgUrl + Constants.INTENTION_CONTRACT_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
String url = xfsgUrl + Constants.INTENTION_CONTRACT_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||||
@@ -211,6 +223,15 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void verifyDate(InitiatingRequest request) {
|
||||||
|
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);
|
||||||
|
}
|
||||||
|
if (request.getSignStartTime().after(request.getSignEndTime())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.TIME_FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
||||||
String redisKey = "OA:" + mobile + idCardNo;
|
String redisKey = "OA:" + mobile + idCardNo;
|
||||||
@@ -222,7 +243,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) {
|
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException {
|
||||||
log.info("save request:{}", JSONObject.toJSONString(request));
|
log.info("save request:{}", JSONObject.toJSONString(request));
|
||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
@@ -247,11 +268,24 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
if (Objects.isNull(lineInfoDO)) {
|
if (Objects.isNull(lineInfoDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
if ("1".equals(lineInfoDO.getSex())){
|
||||||
|
franchiseeDO.setSex(1);
|
||||||
|
}else if ("2".equals(lineInfoDO.getSex())){
|
||||||
|
franchiseeDO.setSex(0);
|
||||||
|
}
|
||||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoDO.getWantShopAreaId());
|
||||||
franchiseeDO.setProvinceCode(String.valueOf(openAreaInfoDO.getParentId()));
|
franchiseeDO.setProvinceCode(String.valueOf(openAreaInfoDO.getParentId()));
|
||||||
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
|
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
|
||||||
//todo 操作人工号 暂时写死
|
//todo 操作人工号 暂时写死
|
||||||
franchiseeDO.setOperator("22090043");
|
franchiseeDO.setOperator("22090043");
|
||||||
|
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(lineInfoDO.getId());
|
||||||
|
//如果是企业加盟,需要传有效期和法人
|
||||||
|
if (Objects.nonNull(memberQuestionDO) && Constants.TWO_INTEGER.equals(memberQuestionDO.getJoinType())){
|
||||||
|
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null,lineInfoDO.getId());
|
||||||
|
BusinessLicenseInfoVO businessLicenseInfo = aliyunService.getBusinessLicenseInfo(signingBaseInfoDO.getBusinessLicense());
|
||||||
|
franchiseeDO.setBusinessTerm(businessLicenseInfo.getValidPeriod());
|
||||||
|
franchiseeDO.setLegalPerson(businessLicenseInfo.getLegalPerson());
|
||||||
|
}
|
||||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
|
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, franchiseeDO, InitiatingResponse.class);
|
||||||
//更新线索(进入蓄水池并回填加盟商编码)
|
//更新线索(进入蓄水池并回填加盟商编码)
|
||||||
if (initiatingResponse.getCode() == 0) {
|
if (initiatingResponse.getCode() == 0) {
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||||
//更新加盟问卷信息
|
//更新加盟问卷信息
|
||||||
joinIntentionMapper.updateAuditIdByLineId(auditId, lineInfo.getId());
|
joinIntentionMapper.updateAuditIdByLineId(auditId, lineInfo.getId());
|
||||||
|
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
requestMap.put("partnerName",lineInfo.getUsername());
|
requestMap.put("partnerName",lineInfo.getUsername());
|
||||||
requestMap.put("partnerMobile",lineInfo.getMobile());
|
requestMap.put("partnerMobile",lineInfo.getMobile());
|
||||||
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
|
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
|
||||||
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20,requestMap);
|
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
|
||||||
}
|
}
|
||||||
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
|
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
|
||||||
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
|
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
if (lineInfo==null){
|
if (lineInfo==null){
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
lineInfo.setUpdateUserId(user.getUserId());
|
||||||
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
|
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
|
||||||
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
|
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
lineInfoDAO.updateLineInfo(lineInfo);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.vo.AuditInfoVO;
|
import com.cool.store.vo.AuditInfoVO;
|
||||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||||
@@ -904,6 +905,12 @@ public class PointServiceImpl implements PointService {
|
|||||||
shopRentInfo.setId(rentContract.getId());
|
shopRentInfo.setId(rentContract.getId());
|
||||||
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||||
}
|
}
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
||||||
|
Map<String, String> messageMap = new HashMap<>();
|
||||||
|
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||||
|
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
|
||||||
|
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_15, messageMap);
|
||||||
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -953,7 +960,11 @@ public class PointServiceImpl implements PointService {
|
|||||||
updateShop.setId(shopId);
|
updateShop.setId(shopId);
|
||||||
updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage());
|
updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage());
|
||||||
List<UserRoleEnum> roleList = Arrays.asList(UserRoleEnum.THEATER_MANAGER, UserRoleEnum.OPERATIONS_MANAGER, UserRoleEnum.REGION_MANAGER);
|
List<UserRoleEnum> roleList = Arrays.asList(UserRoleEnum.THEATER_MANAGER, UserRoleEnum.OPERATIONS_MANAGER, UserRoleEnum.REGION_MANAGER);
|
||||||
updateShop.setShopManagerUserId(sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList));
|
String shopManagerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList);
|
||||||
|
if(StringUtils.isBlank(shopManagerUserId)){
|
||||||
|
shopManagerUserId = CommonConstants.DEAULT_SHOP_MANAGER_USER_ID;
|
||||||
|
}
|
||||||
|
updateShop.setShopManagerUserId(shopManagerUserId);
|
||||||
shopInfoDAO.updateShopInfo(updateShop);
|
shopInfoDAO.updateShopInfo(updateShop);
|
||||||
//发送验证码
|
//发送验证码
|
||||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED);
|
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED);
|
||||||
|
|||||||
@@ -203,12 +203,12 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
.hkbzj(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
.hkbzj(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
||||||
.hkbzjdx(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
.hkbzjdx(Integer.valueOf(franchiseFeeDO.getLoanMargin()))
|
||||||
.hkbzjwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getLoanMargin())))
|
.hkbzjwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getLoanMargin())))
|
||||||
.ht_day(DateTime.of(request.getContractStartTime()).getDay())
|
.ht_day(timeUtils(request.getContractStartTime(),"day"))
|
||||||
.ht_day2(DateTime.of(request.getContractStartEndTime()).getDay())
|
.ht_day2(timeUtils(request.getContractStartEndTime(),"day"))
|
||||||
.ht_month1(DateTime.of(request.getContractStartTime()).getMonth())
|
.ht_month1(timeUtils(request.getContractStartTime(),"month"))
|
||||||
.ht_month2(DateTime.of(request.getContractStartEndTime()).getMonth())
|
.ht_month2(timeUtils(request.getContractStartEndTime(),",month"))
|
||||||
.ht_year1(DateTime.of(request.getContractStartTime()).getYear())
|
.ht_year1(timeUtils(request.getContractStartTime(),"year"))
|
||||||
.ht_year2(DateTime.of(request.getContractStartEndTime()).getYear())
|
.ht_year2(timeUtils(request.getContractStartEndTime(),"year"))
|
||||||
.idcard_1(Collections.singletonList(signingBaseInfoDO.getIdCardFront()))
|
.idcard_1(Collections.singletonList(signingBaseInfoDO.getIdCardFront()))
|
||||||
.idcard_2(Collections.singletonList(signingBaseInfoDO.getIdCardReverse()))
|
.idcard_2(Collections.singletonList(signingBaseInfoDO.getIdCardReverse()))
|
||||||
.idcard_address(signingBaseInfoDO.getIdCardAddress())
|
.idcard_address(signingBaseInfoDO.getIdCardAddress())
|
||||||
@@ -225,26 +225,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
.jmf2(Integer.valueOf(franchiseFeeDO.getFirstYearFee()))
|
.jmf2(Integer.valueOf(franchiseFeeDO.getFirstYearFee()))
|
||||||
.jmf3(Integer.valueOf(franchiseFeeDO.getSecondYearFee()))
|
.jmf3(Integer.valueOf(franchiseFeeDO.getSecondYearFee()))
|
||||||
.jmf4(Integer.valueOf(franchiseFeeDO.getThirdYearFee()))
|
.jmf4(Integer.valueOf(franchiseFeeDO.getThirdYearFee()))
|
||||||
.jmfday1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getDay())
|
.jmfday1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"day"))
|
||||||
.jmfday2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getDay())
|
.jmfday2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"day"))
|
||||||
.jmfday3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getDay())
|
.jmfday3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"day"))
|
||||||
.jmfday4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getDay())
|
.jmfday4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"day"))
|
||||||
.jmfday5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getDay())
|
.jmfday5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"day"))
|
||||||
.jmfday6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getDay())
|
.jmfday6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"day"))
|
||||||
.jmfdx(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee()))
|
.jmfdx(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee()))
|
||||||
.jmfmonth1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getMonth())
|
.jmfmonth1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"month"))
|
||||||
.jmfmonth2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getMonth())
|
.jmfmonth2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"month"))
|
||||||
.jmfmonth3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getMonth())
|
.jmfmonth3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"month"))
|
||||||
.jmfmonth4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getMonth())
|
.jmfmonth4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"month"))
|
||||||
.jmfmonth5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getMonth())
|
.jmfmonth5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"month"))
|
||||||
.jmfmonth6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getMonth())
|
.jmfmonth6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"month"))
|
||||||
.jmfwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee())))
|
.jmfwb(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee())))
|
||||||
.jmfyear1(DateTime.of(franchiseFeeDO.getFirstYearStartTime()).getYear())
|
.jmfyear1(timeUtils(franchiseFeeDO.getFirstYearStartTime(),"year"))
|
||||||
.jmfyear2(DateTime.of(franchiseFeeDO.getFirstYearEndTime()).getYear())
|
.jmfyear2(timeUtils(franchiseFeeDO.getFirstYearEndTime(),"year"))
|
||||||
.jmfyear3(DateTime.of(franchiseFeeDO.getSecondYearStartTime()).getYear())
|
.jmfyear3(timeUtils(franchiseFeeDO.getSecondYearStartTime(),"year"))
|
||||||
.jmfyear4(DateTime.of(franchiseFeeDO.getSecondYearEndTime()).getYear())
|
.jmfyear4(timeUtils(franchiseFeeDO.getSecondYearEndTime(),"year"))
|
||||||
.jmfyear5(DateTime.of(franchiseFeeDO.getThirdYearStartTime()).getYear())
|
.jmfyear5(timeUtils(franchiseFeeDO.getThirdYearStartTime(),"year"))
|
||||||
.jmfyear6(DateTime.of(franchiseFeeDO.getThirdYearEndTime()).getYear())
|
.jmfyear6(timeUtils(franchiseFeeDO.getThirdYearEndTime(),"year"))
|
||||||
.jmsdkjt(temp)
|
.jmsdkjt(temp)
|
||||||
.jmsdm(lineInfoDO.getPartnerNum())
|
.jmsdm(lineInfoDO.getPartnerNum())
|
||||||
.jmshtzt(0)
|
.jmshtzt(0)
|
||||||
@@ -291,6 +291,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
.yyzzfyj(temp)
|
.yyzzfyj(temp)
|
||||||
.zhihang(linePayDO.getBranchBankName())
|
.zhihang(linePayDO.getBranchBankName())
|
||||||
.zqyty(SignTypeEnum.getWorkflowStageByCode(request.getSignType()).getSap())
|
.zqyty(SignTypeEnum.getWorkflowStageByCode(request.getSignType()).getSap())
|
||||||
|
.fddbr(licenseTransactDO.getLicenseLegalPerson())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,8 +421,24 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean rePay(Long shopId) {
|
public Boolean rePay(Long shopId) {
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
|
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74);
|
||||||
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_7);
|
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_8);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int timeUtils(Date time, String type) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(time);
|
||||||
|
switch (type){
|
||||||
|
case "year":
|
||||||
|
return calendar.get(Calendar.YEAR);
|
||||||
|
case "month":
|
||||||
|
return calendar.get(Calendar.MONTH) + 1;
|
||||||
|
case "day":
|
||||||
|
return calendar.get(Calendar.DAY_OF_MONTH);
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
|
||||||
import com.cool.store.entity.TempUserDetailDO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.MessageEnum;
|
import com.cool.store.enums.MessageEnum;
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
@@ -59,6 +56,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PreparationService preparationService;
|
private PreparationService preparationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RegionDao regionDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TempUserDetailListVO userList(Long shopId) {
|
public TempUserDetailListVO userList(Long shopId) {
|
||||||
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
||||||
@@ -138,8 +138,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> userIdList = enterpriseUserRoleDao.getUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.TRAINER.getCode()));
|
List<String> userIdList = enterpriseUserRoleDao.getUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.TRAINER.getCode()));
|
||||||
|
RegionDO regionDO = regionDao.getRegionById(shopInfoDO.getRegionId());
|
||||||
//
|
//
|
||||||
userIdList = enterpriseUserDAO.getUserIdListByRegionId(shopInfoDO.getRegionId(), userIdList);
|
userIdList = enterpriseUserDAO.getUserIdListByRegionId(Long.valueOf(regionDO.getParentId()), userIdList);
|
||||||
|
|
||||||
Map<String, String> messageMap = new HashMap<>();
|
Map<String, String> messageMap = new HashMap<>();
|
||||||
messageMap.put("userName", tempUserDetailRequest.getName());
|
messageMap.put("userName", tempUserDetailRequest.getName());
|
||||||
|
|||||||
@@ -69,14 +69,14 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
|||||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||||
//message
|
//message
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
// Map<String, String> requestMap = new HashMap<>();
|
||||||
LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
|
// LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
|
||||||
requestMap.put("partnerUsername",byLineId.getUsername());
|
// requestMap.put("partnerUsername",byLineId.getUsername());
|
||||||
requestMap.put("partnerMobile",byLineId.getMobile());
|
// requestMap.put("partnerMobile",byLineId.getMobile());
|
||||||
requestMap.put("lineId",String.valueOf(request.getLineId()));
|
// requestMap.put("lineId",String.valueOf(request.getLineId()));
|
||||||
commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
|
// commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
|
||||||
MessageEnum.MESSAGE_32,
|
// MessageEnum.MESSAGE_32,
|
||||||
requestMap);
|
// requestMap);
|
||||||
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
|
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
|
||||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
|
|||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.request.FranchiseeSaveRequest;
|
import com.cool.store.request.FranchiseeSaveRequest;
|
||||||
import com.cool.store.request.InitiatingRequest;
|
import com.cool.store.request.InitiatingRequest;
|
||||||
import com.cool.store.response.InitiatingResponse;
|
import com.cool.store.response.InitiatingResponse;
|
||||||
@@ -42,7 +43,7 @@ public class PCIntentAgreementController {
|
|||||||
|
|
||||||
@PostMapping(path = "/franchisee/save")
|
@PostMapping(path = "/franchisee/save")
|
||||||
@ApiOperation("kdz -> xfsg 加盟商新增")
|
@ApiOperation("kdz -> xfsg 加盟商新增")
|
||||||
public ResponseResult save(@RequestBody FranchiseeSaveRequest request) {
|
public ResponseResult save(@RequestBody FranchiseeSaveRequest request) throws ApiException {
|
||||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
return intentAgreementService.save(request,user);
|
return intentAgreementService.save(request,user);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||||
import com.cool.store.enums.ExperienceStatusEnum;
|
|
||||||
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.TrainingExperienceService;
|
import com.cool.store.service.TrainingExperienceService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.websocket.server.PathParam;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/pc/training/experience/")
|
@RequestMapping("/pc/training/experience/")
|
||||||
@@ -25,7 +23,7 @@ public class PCTrainingExperienceController {
|
|||||||
|
|
||||||
@ApiOperation("实训体验分配或更新")
|
@ApiOperation("实训体验分配或更新")
|
||||||
@PostMapping("/distribution")
|
@PostMapping("/distribution")
|
||||||
public ResponseResult<Boolean> distribution(@RequestBody TrainingExperienceDistributionRequest request) {
|
public ResponseResult<Boolean> distribution(@RequestBody @Validated TrainingExperienceDistributionRequest request) {
|
||||||
return ResponseResult.success(trainingExperienceService.distribution(request));
|
return ResponseResult.success(trainingExperienceService.distribution(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user