Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -127,6 +127,7 @@ public enum ErrorCodeEnum {
|
||||
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
|
||||
INTERVIEW_STATUS_NOT_TRANSFER(1021116, "当前面审状态不允许转让! 面审状态:{0}", null),
|
||||
MOBILE_WECHAT_EXIST(1021116, "此号码已绑定其他微信", null),
|
||||
INTERVIEW_STATUS_WAS_AUDITED(1021117, "当前面审已审核", null),
|
||||
|
||||
ROOM_STATUS_ERROR(10211156, "当前面审房间状态不允许进行该操作!", null),
|
||||
MOBILE_APP_NOT_ONLINE_ERROR(10211157, "呼叫失败,请确认呼出号码正确并检查是否安装并打开呼叫插件", null),
|
||||
@@ -184,6 +185,8 @@ public enum ErrorCodeEnum {
|
||||
|
||||
NEW_STORE_FALSE(109011, "新店开业流程API调用失败", null),
|
||||
|
||||
AUDIT_RESULT_FALSE(109012, "意向加盟合同API本次调用结果与上一次不一致", null),
|
||||
|
||||
|
||||
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
||||
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
||||
|
||||
@@ -47,6 +47,16 @@ public enum MessageEnum {
|
||||
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_27("您有一个门店需要上传首批订货清单,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_28("您有一个门店需要进行视觉验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
MESSAGE_29("您有一份加盟申请书,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n##### 意向加盟区域:${regionName}\n"),
|
||||
MESSAGE_30("您收到一份加盟意向协议信息审核,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n##### 信息提交时间:${submitTime}\n"),
|
||||
MESSAGE_31("您提交的一份加盟意向协议OA审核未通过,请查收","##### 加盟商姓名:${partnerUsername}\n##### 信息提交时间:${submitTime}\n"),
|
||||
MESSAGE_32("您有一位加盟商待安排体验门店及体验时间,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_33("您有一位加盟商已放弃门店体验,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private String title;
|
||||
@@ -94,6 +104,8 @@ public enum MessageEnum {
|
||||
case MESSAGE_7:
|
||||
case MESSAGE_8:
|
||||
case MESSAGE_9:
|
||||
case MESSAGE_29:
|
||||
case MESSAGE_30:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId=" + corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=clue×tamp=" + System.currentTimeMillis() + "&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_3:
|
||||
@@ -117,6 +129,9 @@ public enum MessageEnum {
|
||||
case MESSAGE_20:
|
||||
case MESSAGE_23:
|
||||
case MESSAGE_10_1:
|
||||
case MESSAGE_31:
|
||||
case MESSAGE_32:
|
||||
case MESSAGE_33:
|
||||
//跳转我的加盟商的加盟商详情都可以使用这个
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId=" + corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=franchiseeDetails×tamp=" + System.currentTimeMillis() + "&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
|
||||
@@ -86,7 +86,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
* @Date: 2024/5/3
|
||||
* @description:根据区域id查询所有处于XXX的店铺
|
||||
*/
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("subStageStatus")List<Integer> subStageStatus,@Param("request")String request);
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("shopSubStage") Integer shopSubStage,@Param("subStageStatus")List<Integer> subStageStatus,@Param("keyWord")String keyWord);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
select
|
||||
xsi.id,xsi.line_id as lineId,xsi.region_id as regionId,xsi.shop_name as shopName,xsi.store_num as storeNum
|
||||
from xfsg_shop_info xsi
|
||||
join xfsg_shop_stage_info xssi on xssi.shop_id = xsi.id
|
||||
left join xfsg_shop_stage_info xssi on xssi.shop_id = xsi.id
|
||||
where
|
||||
xsi.deleted = 0
|
||||
<if test="regionIds != null and regionIds.size() > 0">
|
||||
@@ -161,15 +161,15 @@
|
||||
</foreach>
|
||||
</if>
|
||||
AND xssi.shop_sub_stage_status != -100
|
||||
and xssi.shop_sub_stage = 120
|
||||
and xssi.shop_sub_stage = #{shopSubStage}
|
||||
<if test="subStageStatus != null and subStageStatus.size()>0">
|
||||
and xssi.shop_sub_stage_status in
|
||||
<foreach collection="subStageStatus" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request != null and request != '' ">
|
||||
and xsi.shop_name Like concat("%",#{request},"%") or xsi.shop_num Like concat("%",#{request},"%")
|
||||
<if test="keyWord != null and keyWord != '' ">
|
||||
and xsi.shop_name Like concat("%",#{keyWord},"%") or xsi.store_num Like concat("%",#{keyWord},"%")
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ public class LineInfoDO {
|
||||
/**
|
||||
* 申请人姓名
|
||||
*/
|
||||
@Column(name = "username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
@@ -166,6 +167,7 @@ public class LineInfoDO {
|
||||
/**
|
||||
* 加盟商编码
|
||||
*/
|
||||
@Column(name = "partner_num")
|
||||
private String partnerNum;
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -16,7 +17,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class AcceptanceListRequest {
|
||||
@ApiModelProperty("门店名称或编码")
|
||||
private String request;
|
||||
private String keyWord;
|
||||
@ApiModelProperty("阶段状态")
|
||||
private List<Integer> subStageStatus;
|
||||
private Integer pageNum;
|
||||
|
||||
@@ -28,13 +28,13 @@ public class OpeningOperationPlanRequest {
|
||||
private String surveyResult;
|
||||
|
||||
@ApiModelProperty("调研结果url")
|
||||
private List<String> surveyResultUrl;
|
||||
private String surveyResultUrl;
|
||||
|
||||
@ApiModelProperty("活动主题")
|
||||
private String activityTheme;
|
||||
|
||||
@ApiModelProperty("活动主题url")
|
||||
private List<String> activityThemeUrl;
|
||||
private String activityThemeUrl;
|
||||
|
||||
@ApiModelProperty("筹备人员ids")
|
||||
private List<String> preparationUserIds;
|
||||
@@ -49,12 +49,8 @@ public class OpeningOperationPlanRequest {
|
||||
openingOperationPlanDO.setShopId(this.shopId);
|
||||
openingOperationPlanDO.setPlanSource(this.planSource);
|
||||
openingOperationPlanDO.setSurveyResult(this.surveyResult);
|
||||
if (CollectionUtils.isNotEmpty(this.surveyResultUrl)) {
|
||||
openingOperationPlanDO.setSurveyResultUrl(String.join(",", this.surveyResultUrl));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(this.activityThemeUrl)) {
|
||||
openingOperationPlanDO.setActivityThemeUrl(String.join(",", this.activityThemeUrl));
|
||||
}
|
||||
openingOperationPlanDO.setSurveyResultUrl(this.surveyResultUrl);
|
||||
openingOperationPlanDO.setActivityThemeUrl( this.activityThemeUrl);
|
||||
if (CollectionUtils.isNotEmpty(this.preparationUserIds)) {
|
||||
openingOperationPlanDO.setPreparationUserIds(String.join(",", this.preparationUserIds));
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@ public class OpeningOperationPlanVO {
|
||||
private String surveyResult;
|
||||
|
||||
@ApiModelProperty("调研结果url")
|
||||
private List<String> surveyResultUrl;
|
||||
private String surveyResultUrl;
|
||||
|
||||
@ApiModelProperty("活动主题")
|
||||
private String activityTheme;
|
||||
|
||||
@ApiModelProperty("活动主题url")
|
||||
private List<String> activityThemeUrl;
|
||||
private String activityThemeUrl;
|
||||
|
||||
@ApiModelProperty("筹备人员name")
|
||||
private List<UserNameDTO> preparationUsers;
|
||||
@@ -61,12 +61,8 @@ public class OpeningOperationPlanVO {
|
||||
this.submittedUserId = openingOperationPlanDO.getSubmittedUserId();
|
||||
this.submissionTime = openingOperationPlanDO.getSubmissionTime();
|
||||
this.routeCompleted = openingOperationPlanDO.getRouteCompleted();
|
||||
if (StringUtils.isNotBlank(openingOperationPlanDO.getActivityThemeUrl())) {
|
||||
this.activityThemeUrl = Arrays.asList(openingOperationPlanDO.getActivityThemeUrl().split(",")) ;
|
||||
}
|
||||
if (StringUtils.isNotBlank(openingOperationPlanDO.getSurveyResultUrl())) {
|
||||
this.surveyResultUrl = Arrays.asList(openingOperationPlanDO.getSurveyResultUrl().split(",")) ;
|
||||
}
|
||||
this.activityThemeUrl = openingOperationPlanDO.getActivityThemeUrl();
|
||||
this.surveyResultUrl = openingOperationPlanDO.getSurveyResultUrl();
|
||||
this.activityTheme = openingOperationPlanDO.getActivityTheme();
|
||||
this.surveyResult = openingOperationPlanDO.getSurveyResult();
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
||||
requestMap.put("partnerName,", lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
||||
log.info("submitLicense SMS requestMap:{}",JSONObject.toJSONString(requestMap));
|
||||
commonService.sendMessage(Collections.singletonList(shopInfoDO.getSupervisorUserId()), MessageEnum.MESSAGE_17, requestMap);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -8,10 +8,7 @@ import com.cool.store.entity.BankdocDO;
|
||||
import com.cool.store.entity.BanktypeDO;
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.mapper.LinePayMapper;
|
||||
import com.cool.store.request.AuditRejectRequest;
|
||||
import com.cool.store.request.BranchBankPageRequest;
|
||||
@@ -48,6 +45,9 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
@Resource
|
||||
private LineAuditInfoDAO lineAuditInfoDAO;
|
||||
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
@Override
|
||||
public List<BanktypeDO> listBank() {
|
||||
List<BanktypeDO> bankList = bankDAO.listBank();
|
||||
@@ -71,6 +71,7 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT_SUCCESS);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus(),null);
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(),request.getSubStageStatus(),null);
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.cool.store.service.IntentAgreementService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.SecureUtil;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -73,12 +75,6 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||
// if (Objects.nonNull(request.getIdCardNo()) || Objects.nonNull(request.getBusinessLicenseCode())) {
|
||||
// SigningBaseInfoDO isExist = intentAgreementMapper.judge(request);
|
||||
// if (Objects.nonNull(isExist)) {
|
||||
// throw new ServiceException(ErrorCodeEnum.BUSINESS_LICENSE_OR_ID_CARD_REPEAT);
|
||||
// }
|
||||
// }
|
||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||
if (submitStatus) {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||
@@ -87,6 +83,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername", lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoDO.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_30,
|
||||
requestMap);
|
||||
return Boolean.TRUE;
|
||||
|
||||
}
|
||||
@@ -156,12 +160,21 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_65.getCode());
|
||||
lineInfo.setUpdateUserId(userId);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PROTOCOL_FAIL);
|
||||
}
|
||||
//待OA审核code 75 处理逻辑
|
||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) {
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_80.getCode());
|
||||
lineInfo.setUpdateUserId(userId);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
//message
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername", lineInfo.getUsername());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_31,
|
||||
requestMap);
|
||||
}
|
||||
//更新auditId
|
||||
intentAgreementMapper.updateAuditId(lineInfo.getId(), auditId);
|
||||
@@ -260,33 +273,39 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
public Boolean auditResult(AuditResultRequest request) {
|
||||
try {
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
if (StringUtil.isBlank(lineId)) {
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (request.getAuditResult() == 1) {
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest, null);
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.UNKNOWN);
|
||||
String kdzBusinessId = request.getKdzBusinessId();
|
||||
String lineId = getLineId(kdzBusinessId);
|
||||
String redisKey = "kdzBusinessId:" + kdzBusinessId;
|
||||
if (StringUtil.isBlank(lineId)) {
|
||||
throw new ServiceException(ErrorCodeEnum.BUSINESS_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(Long.valueOf(lineId));
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
String auditResult = redisUtilPool.getString(redisKey);
|
||||
if (WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())){
|
||||
//鲜丰系统不稳定,会出现调用成功但内部状态未更改的情况,这时直接返回true即可
|
||||
return true;
|
||||
}
|
||||
if (StringUtil.isNotBlank(auditResult) && !auditResult.equals(String.valueOf(request.getAuditResult()))) {
|
||||
throw new ServiceException(ErrorCodeEnum.AUDIT_RESULT_FALSE);
|
||||
}
|
||||
if (request.getAuditResult() == 1) {
|
||||
AuditPassRequest auditPassRequest = new AuditPassRequest();
|
||||
auditPassRequest.setLineId(lineInfoDO.getId());
|
||||
auditPassRequest.setPassReason(request.getCause());
|
||||
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest, null);
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
|
||||
auditRejectRequest.setLineId(lineInfoDO.getId());
|
||||
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
|
||||
auditRejectRequest.setRejectPublicReason(request.getCause());
|
||||
auditRejectRequest.setRejectRealReason(request.getFailureCause());
|
||||
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest, null);
|
||||
}
|
||||
redisUtilPool.setString(redisKey, JSONObject.toJSONString(request.getAuditResult()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@@ -49,6 +52,9 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(JoinIntentionRequest request) {
|
||||
@@ -76,6 +82,16 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||
memberQuestionDO.setLineId(lineInfoParam.getId());
|
||||
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoParam.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoParam.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoParam.getId()));
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||
requestMap.put("regionName",openAreaInfoDO.getAreaName());
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_29,
|
||||
requestMap);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("appointmentTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, startTime));
|
||||
messageMap.put("interviewUsername", enterpriseUserDAO.getUserName(lineInfo.getInvestmentManager()));
|
||||
messageMap.put("interviewUsername", enterpriseUserDAO.getUserName(interviewerUserId));
|
||||
commonService.sendMessage(Arrays.asList(interviewerUserId), messageEnum, messageMap);
|
||||
if(Objects.nonNull(investmentManagerMessageEnum)){
|
||||
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), investmentManagerMessageEnum, messageMap);
|
||||
@@ -413,7 +413,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
@@ -421,6 +421,9 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
if(Objects.isNull(interviewInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||
}
|
||||
if(!InterviewStatusEnum.WAIT_AUDIT.getCode().equals(interviewInfo.getInterviewStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_STATUS_WAS_AUDITED);
|
||||
}
|
||||
LineInterviewDO updateInterviewInfo = new LineInterviewDO();
|
||||
updateInterviewInfo.setId(interviewInfo.getId());
|
||||
updateInterviewInfo.setAuditId(auditId);
|
||||
@@ -428,7 +431,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS, null);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.FIRST_INTERVIEW_APPOINTMENT_SUCCESS, null);
|
||||
}
|
||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||
//更新线索阶段
|
||||
@@ -455,6 +458,13 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.TWO.getCode());
|
||||
//发送短信
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_SUCCESS, null);
|
||||
String wantShopName = hyOpenAreaInfoDAO.selectNameMapById(lineInfo.getWantShopAreaId());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("partnerMobile", lineInfo.getMobile());
|
||||
messageMap.put("wantShopName", wantShopName);
|
||||
commonService.sendMessage(Arrays.asList(developmentManager), MessageEnum.MESSAGE_14, messageMap);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
//todo 建店还未开始时
|
||||
requestMap.put("storeName","XXX");
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.partner.PartnerOpenNewShopPageDTO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.OpenNewShopRecordDO;
|
||||
import com.cool.store.entity.SigningBaseInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
@@ -59,6 +60,8 @@ public class OpenNewShopServiceImpl implements OpenNewShopService {
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -137,6 +140,13 @@ public class OpenNewShopServiceImpl implements OpenNewShopService {
|
||||
|
||||
@Override
|
||||
public IsSubmitOpenNewShopVO isSubmitOpenNewShop(Long lineId) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
if(Objects.isNull(lineInfo)){
|
||||
return new IsSubmitOpenNewShopVO(Boolean.FALSE, null);
|
||||
}
|
||||
if(lineInfo.getJoinStatus() != 2){
|
||||
return new IsSubmitOpenNewShopVO(Boolean.FALSE, null);
|
||||
}
|
||||
//首先获取有没有待审核的记录
|
||||
OpenNewShopRecordDO openNewShopRecord = openNewShopRecordDAO.getWaitAuditOpenNewShopRecord(lineId);
|
||||
if(Objects.nonNull(openNewShopRecord)){
|
||||
|
||||
@@ -77,31 +77,27 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
throw new ServiceException(ErrorCodeEnum.SURVEYRESULT_LENGTH_FALSE);
|
||||
}
|
||||
String userId = userInfo.getUserId();
|
||||
try {
|
||||
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
|
||||
Long planId;
|
||||
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
|
||||
if (!Objects.isNull(selectByShopId)) {
|
||||
//提交修改
|
||||
openingOperationPlanDO.setId(selectByShopId.getId());
|
||||
openingOperationPlanDO.setUpdateTime(new Date());
|
||||
openingOperationPlanDO.setUpdateUserId(userId);
|
||||
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
|
||||
} else {
|
||||
//新增
|
||||
openingOperationPlanDO.setSubmissionTime(new Date());
|
||||
openingOperationPlanDO.setSubmittedUserId(userId);
|
||||
openingOperationPlanDO.setCreateTime(new Date());
|
||||
openingOperationPlanDO.setCreateUserId(userId);
|
||||
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
||||
return planId;
|
||||
} catch (Exception e) {
|
||||
log.error("addNewPlan Exception:{}", e);
|
||||
return null;
|
||||
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
|
||||
Long planId;
|
||||
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
|
||||
if (!Objects.isNull(selectByShopId)) {
|
||||
//提交修改
|
||||
openingOperationPlanDO.setId(selectByShopId.getId());
|
||||
openingOperationPlanDO.setUpdateTime(new Date());
|
||||
openingOperationPlanDO.setUpdateUserId(userId);
|
||||
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
|
||||
} else {
|
||||
//新增
|
||||
openingOperationPlanDO.setSubmissionTime(new Date());
|
||||
openingOperationPlanDO.setSubmittedUserId(userId);
|
||||
openingOperationPlanDO.setCreateTime(new Date());
|
||||
openingOperationPlanDO.setCreateUserId(userId);
|
||||
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
||||
return planId;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,7 +120,6 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
openingOperationPlanVO.setShopName(shopInfo.getShopName());
|
||||
return openingOperationPlanVO;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -219,12 +214,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
|
||||
@Override
|
||||
public Boolean getStatus(Long shopId) {
|
||||
try{
|
||||
try {
|
||||
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
|
||||
String shopNum = shopInfo.getStoreNum();
|
||||
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopNum);
|
||||
return firstOrder;
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
log.error("获取鲜丰订货金异常或更新状态失败");
|
||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class SeeAcceptanceServiceImpl implements SeeAcceptanceService {
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus(),request.getRequest());
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_13.getShopSubStage(),request.getSubStageStatus(),request.getKeyWord());
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
|
||||
@@ -145,6 +145,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(shopInfoDO.getLineId());
|
||||
log.info("submitSignFranchise franchiseAgreementRequest :{}",JSONObject.toJSONString(franchiseAgreementRequest));
|
||||
ResponseResult responseResult = coolStoreStartFlowService.franchiseAgreement(franchiseAgreementRequest, memberQuestionDO.getJoinType());
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
lineInfoDO.setJoinStatus(2);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
return responseResult;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
||||
import com.cool.store.service.TrainingExperienceService;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -42,15 +43,13 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
@Resource
|
||||
EnterpriseUserMapper enterpriseUserMapper;
|
||||
|
||||
@Resource
|
||||
RegionMapper regionMapper;
|
||||
|
||||
@Resource
|
||||
UserAuthMappingMapper userAuthMappingMapper;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserRoleMapper enterpriseUserRoleMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean distribution(TrainingExperienceDistributionRequest request) {
|
||||
@@ -69,6 +68,15 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
if (currentDate.before(request.getExperienceStartTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
//message
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
|
||||
requestMap.put("partnerUsername",byLineId.getUsername());
|
||||
requestMap.put("partnerMobile",byLineId.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(request.getLineId()));
|
||||
commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_32,
|
||||
requestMap);
|
||||
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
@@ -94,10 +102,19 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SECOND_INTERVIEW_APPOINTMENT);
|
||||
} else {
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoDO.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoDO.getId()));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_33,
|
||||
requestMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -107,6 +107,13 @@ public class XxlJobHandler {
|
||||
List<Long> lineIds = leaseBaseInfoDOS.stream().map(LeaseBaseInfoDO::getLineId).collect(Collectors.toList());
|
||||
WorkflowSubStageStatusEnum storeExperience90 = WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90;
|
||||
lineInfoMapper.toExperiencing(lineIds, storeExperience90.getCode());
|
||||
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, String> lineInfoMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile));
|
||||
leaseBaseInfoDOS.forEach(e -> {
|
||||
commonService.sendSms(lineInfoMap.get(e.getLineId()), SMSMsgEnum.SHOP_EXPERIENCE);
|
||||
});
|
||||
|
||||
log.info("------实训体验状态变更结束------");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user