Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -10,7 +10,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
public enum ExamStatusEnum {
|
||||
|
||||
NOT_START(0, "未开始"),
|
||||
PASS(1, "通过"),
|
||||
PASS(1, "正考通过"),
|
||||
NOT_PASS(2, "不通过");
|
||||
|
||||
private Integer code;
|
||||
|
||||
@@ -86,7 +86,7 @@ public enum ShopSubStageStatusEnum {
|
||||
//开业运营方案
|
||||
SHOP_SUB_STAGE_STATUS_140(ShopSubStageEnum.SHOP_STAGE_14, 1400, "待上传", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_141(ShopSubStageEnum.SHOP_STAGE_14, 1420, "待审核", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_142(ShopSubStageEnum.SHOP_STAGE_14, 1430,"审核不通过", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_142(ShopSubStageEnum.SHOP_STAGE_14, 1430,"审核不通过", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_143(ShopSubStageEnum.SHOP_STAGE_14, 1440, "已完成", Boolean.TRUE),
|
||||
|
||||
//首批订货清单
|
||||
|
||||
@@ -331,10 +331,10 @@
|
||||
select * from xfsg_line_info
|
||||
where deleted = 0 and line_status = 1
|
||||
<if test="interviewType != null and interviewType == 1">
|
||||
and investment_manager = #{interviewId}
|
||||
and first_interviewer = #{interviewId}
|
||||
</if>
|
||||
<if test="interviewType != null and interviewType == 2">
|
||||
and investment_manager = #{interviewId}
|
||||
and second_interviewer = #{interviewId}
|
||||
</if>
|
||||
<if test="codes !=null and codes.size>0">
|
||||
<foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=",">
|
||||
|
||||
@@ -68,5 +68,13 @@ public class FranchiseeDO {
|
||||
* 签约类型:0-个人签约;1-企业签约
|
||||
*/
|
||||
private long signType;
|
||||
/**
|
||||
* 营业期限
|
||||
*/
|
||||
private String businessTerm;
|
||||
/**
|
||||
* 法人
|
||||
*/
|
||||
private String legalPerson;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.FranchiseeSaveRequest;
|
||||
import com.cool.store.request.InitiatingRequest;
|
||||
import com.cool.store.request.IntentAgreementSubmitRequest;
|
||||
@@ -26,7 +27,7 @@ public interface IntentAgreementService {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
|
||||
flag = Boolean.TRUE;
|
||||
}else {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140;
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
|
||||
shopSubStageStatusEnum, auditId);
|
||||
|
||||
@@ -99,8 +99,9 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
||||
String url = xfsgUrl + Constants.FIRST_ORDER +
|
||||
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature") +
|
||||
"&storeCode=" + shopNum;
|
||||
Long start = System.currentTimeMillis();
|
||||
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");
|
||||
return flag;
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -535,15 +535,12 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
fitmentCheckVO.setRegion(regionNameMap.get(regionId));
|
||||
fitmentCheckVO.setFightManager(fightManger.get(regionId));
|
||||
if (lineId != null) {
|
||||
fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager());
|
||||
fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager()));
|
||||
fitmentCheckVO.setSitterId(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager());
|
||||
fitmentCheckVO.setSitterName(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager()));
|
||||
fitmentCheckVO.setPartnerName(lineInfoDOMap.get(lineId).getUsername());
|
||||
LineInfoDO a = lineInfoDOMap.getOrDefault(lineId, new LineInfoDO());
|
||||
fitmentCheckVO.setInvestmentManagerId(a.getInvestmentManager());
|
||||
fitmentCheckVO.setInvestmentManager(a.getInvestmentManager());
|
||||
fitmentCheckVO.setSitterId(a.getDevelopmentManager());
|
||||
fitmentCheckVO.setSitterName(a.getDevelopmentManager());
|
||||
fitmentCheckVO.setPartnerName(a.getUsername());
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDOSMap.get(shopId);
|
||||
if (shopId != null) {
|
||||
@@ -555,7 +552,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus());
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId,new ShopStageInfoDO()).getShopSubStageStatus());
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
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.ResponseResult;
|
||||
import com.cool.store.response.SigningBaseInfoResponse;
|
||||
import com.cool.store.service.AliyunService;
|
||||
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 com.cool.store.vo.BusinessLicenseInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -70,6 +73,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Resource
|
||||
AliyunService aliyunService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -180,6 +186,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_31,
|
||||
requestMap);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT_FAIL);
|
||||
}
|
||||
//更新auditId
|
||||
intentAgreementMapper.updateAuditId(lineInfo.getId(), auditId);
|
||||
@@ -237,7 +244,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) {
|
||||
public ResponseResult save(FranchiseeSaveRequest request, LoginUserInfo user) throws ApiException {
|
||||
log.info("save request:{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
@@ -262,6 +269,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (lineInfoDO.getPartnerNum() != null){
|
||||
return new ResponseResult(200000,null,null);
|
||||
}
|
||||
if ("1".equals(lineInfoDO.getSex())){
|
||||
franchiseeDO.setSex(1);
|
||||
}else if ("2".equals(lineInfoDO.getSex())){
|
||||
@@ -272,6 +282,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
franchiseeDO.setCityCode(String.valueOf(openAreaInfoDO.getId()));
|
||||
//todo 操作人工号 暂时写死
|
||||
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);
|
||||
//更新线索(进入蓄水池并回填加盟商编码)
|
||||
if (initiatingResponse.getCode() == 0) {
|
||||
@@ -308,9 +326,6 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
//鲜丰系统不稳定,会出现调用成功但内部状态未更改的情况,这时直接返回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());
|
||||
|
||||
@@ -272,7 +272,8 @@ public class LineServiceImpl implements LineService {
|
||||
if (lineInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
||||
lineInfo.setUpdateUserId(user.getUserId());
|
||||
lineInfo.setUpdateTime(new Date());
|
||||
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
|
||||
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
|
||||
@@ -223,7 +223,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
return firstOrder;
|
||||
} catch (Exception e) {
|
||||
log.error("获取鲜丰订货金异常或更新状态失败");
|
||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
||||
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.FranchiseeSaveRequest;
|
||||
import com.cool.store.request.InitiatingRequest;
|
||||
import com.cool.store.response.InitiatingResponse;
|
||||
@@ -42,7 +43,7 @@ public class PCIntentAgreementController {
|
||||
|
||||
@PostMapping(path = "/franchisee/save")
|
||||
@ApiOperation("kdz -> xfsg 加盟商新增")
|
||||
public ResponseResult save(@RequestBody FranchiseeSaveRequest request) {
|
||||
public ResponseResult save(@RequestBody FranchiseeSaveRequest request) throws ApiException {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return intentAgreementService.save(request,user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user