Merge #26 into master from cc_20260105_partner
feat:测试 * cc_20260105_partner: (8 commits squashed) - feat:加盟商意向书字段调整 - feat:意向审核 - feat:加盟商意向申请 - feat:新增其他备注 - feat:返回信息缺失 - feat:资质阶段审核完成才回成为加盟商 - feat:大区查询阶段状态是6 - feat:测试 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/26
This commit is contained in:
@@ -80,18 +80,18 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
redisUtilPool.delKey(key);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_6,
|
||||
map);
|
||||
// WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
// WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
// //更新线索阶段
|
||||
// lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
// String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
// redisUtilPool.delKey(key);
|
||||
// HashMap<String, String> map = new HashMap<>();
|
||||
// map.put("partnerUsername",lineInfo.getUsername());
|
||||
// map.put("partnerMobile",lineInfo.getMobile());
|
||||
// commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
// MessageEnum.MESSAGE_6,
|
||||
// map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.INTENT_5;
|
||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
import static com.cool.store.utils.poi.DateUtils.SPECIAL_DATE_START;
|
||||
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD_HH_MM_SS;
|
||||
@@ -107,8 +107,18 @@ public class DeskServiceImpl implements DeskService {
|
||||
|
||||
@Override
|
||||
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()), keyword);
|
||||
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(userId);
|
||||
List<LineInfoDO> lineInfoDOS = null;
|
||||
if (userRoleIds.contains(UserRoleEnum.REGION_MANAGER.getCode())){
|
||||
//大区总 根据管辖查询
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(userId);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
lineInfoDOS = lineInfoDAO.listByInvestmentManager(null, Arrays.asList(INTENT_6.getCode()), keyword,authRegionIds);
|
||||
}else {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(INTENT_5.getCode()), keyword,null);
|
||||
}
|
||||
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -135,7 +145,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
@Override
|
||||
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()), keyword);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()), keyword,null);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
@@ -165,7 +175,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
public PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user, String keyword) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
|
||||
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()), keyword);
|
||||
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode()), keyword,null);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
|
||||
@@ -142,7 +142,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
public Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
if (!lineInfo.getWorkflowStage().equals(WorkflowStageEnum.INTENT.getCode())){
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
|
||||
@@ -85,15 +85,6 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||
// if ((Objects.nonNull(request.getAreaCode()) && Objects.nonNull(lineInfoDO) && StringUtils.isBlank(lineInfoDO.getInvestmentManager())) || (Objects.isNull(lineInfoDO))) {
|
||||
// EnterpriseUserDO userByRoleNameAndAreaId = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.SUPERVISION, Long.valueOf(request.getAreaCode()));
|
||||
// lineInfoParam.setInvestmentManager(userByRoleNameAndAreaId.getUserId());
|
||||
// }
|
||||
//强加盟 前期不确定意向区域
|
||||
// if (lineInfoParam.getWantShopAreaId() != null&&lineInfoDO.getJoinMode()==1) {
|
||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||
// lineInfoParam.setRegionId(regionId);
|
||||
// }
|
||||
if (StringUtils.isBlank(lineInfoParam.getInvestmentManager()) &&StringUtils.isBlank(lineInfoDO.getInvestmentManager())) {
|
||||
lineInfoParam.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
lineInfoParam.setLineStatus(0);
|
||||
@@ -116,32 +107,46 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
public Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
WorkflowSubStageEnum nextStage = null;
|
||||
WorkflowSubStageStatusEnum nextStageStatus = null;
|
||||
Integer workflowSubStageStatus = lineInfo.getWorkflowSubStageStatus();
|
||||
Boolean flag = false;
|
||||
if (WorkflowSubStageStatusEnum.INTENT_5.getCode().equals(workflowSubStageStatus)){
|
||||
//如果状态为待加盟商审核 则下一阶段不变
|
||||
nextStage = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
nextStageStatus = WorkflowSubStageStatusEnum.INTENT_6;
|
||||
}else {
|
||||
//如果状态为待大区总审核
|
||||
nextStage = workflowSubStageEnum.getNextStage();
|
||||
nextStageStatus = nextStage.getInitStatus();
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStageStatus, userId,flag);
|
||||
//更新加盟问卷信息
|
||||
qualificationsInfoDAO.updateAuditIdByLineId(auditId, lineInfo.getId());
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfo.getId());
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo()) || qualificationsInfoDO.getIdCardNo().length() < 6) {
|
||||
throw new ServiceException(ErrorCodeEnum.CREATE_PASSWORD_FAIL);
|
||||
if ( flag ){
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfo.getId());
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo()) || qualificationsInfoDO.getIdCardNo().length() < 6) {
|
||||
throw new ServiceException(ErrorCodeEnum.CREATE_PASSWORD_FAIL);
|
||||
}
|
||||
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||
//生成密码和盐值
|
||||
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
|
||||
getPasswordDTO.setPassword(substring);
|
||||
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||
hyPartnerUserInfoDO.setUpdateTime(new Date());
|
||||
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);
|
||||
}
|
||||
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||
//生成密码和盐值
|
||||
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
|
||||
getPasswordDTO.setPassword(substring);
|
||||
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||
hyPartnerUserInfoDO.setUpdateTime(new Date());
|
||||
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -804,6 +804,10 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
List<Integer> bigRegionManagerList = Arrays.asList(INTENT_6.getCode());
|
||||
if (bigRegionManagerList.contains(lineInfo.getWorkflowSubStageStatus())) {
|
||||
return getUsersByRolesAndRegion(Arrays.asList(REGION_MANAGER), lineInfo.getInvestRegionId());
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,10 +168,10 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
|
||||
@Override
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
// WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
// WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
// //更新线索阶段
|
||||
// lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user