Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
zhangchenbiao
2024-05-24 17:52:47 +08:00
8 changed files with 94 additions and 29 deletions

View File

@@ -0,0 +1,41 @@
package com.cool.store.enums;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public enum ApiErrorCodeEnum {
LINE_INFO("lineInfoDO","线索信息确实"),
FRANCHISE_FEE("franchiseFeeDO","缴费信息缺失"),
SIGNING_BASE_INFO("signingBaseInfoDO","签约信息缺失"),
LINE_PAY("linePayDO","缴款信息缺失"),
POINT_INFO("pointInfoDO","铺位信息缺失"),
SYSTEM_BUILDING_SHOP("systemBuildingShopDO","建店数据缺失"),
LICENSE_TRANSACT("licenseTransactDO","证照办理数据缺失"),
THIRD_DEPARTMENT("thirdDepartmentDO","三方部门表缺失"),
;
private String errorMessage;
private String code;
ApiErrorCodeEnum(String code, String errorMessage) {
this.code = code;
this.errorMessage = errorMessage;
}
public String getErrorMessage() {
return errorMessage;
}
public String getCode() {
return code;
}
protected static final Map<String, ApiErrorCodeEnum> map = Arrays.stream(values()).collect(
Collectors.toMap(ApiErrorCodeEnum::getCode, Function.identity(), (a, b)->a));
public static ApiErrorCodeEnum getByCode(String code) {
return map.get(code);
}
}

View File

@@ -108,11 +108,12 @@ public class LineInfoDAO {
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus); List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus);
return lineInfo; return lineInfo;
} }
public List<LineInfoDO> listByInterview(String interviewId, Integer interviewType,List<Integer> subStageStatus) { public List<LineInfoDO> listByInterview(String interviewId, Integer interviewType,Integer pendingInterviewStatus,
Integer notPassingTheInterview,List<Integer> subStageStatus) {
if (StringUtils.isBlank(interviewId)){ if (StringUtils.isBlank(interviewId)){
return null; return null;
} }
List<LineInfoDO> lineInfo = lineInfoMapper.listByInterview(interviewId,interviewType,subStageStatus); List<LineInfoDO> lineInfo = lineInfoMapper.listByInterview(interviewId,interviewType,pendingInterviewStatus,notPassingTheInterview,subStageStatus);
return lineInfo; return lineInfo;
} }

View File

@@ -33,7 +33,11 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
* @param codes * @param codes
* @return * @return
*/ */
List<LineInfoDO> listByInterview(@Param("interviewId") String interviewId, @Param("interviewType") Integer interviewType, @Param("codes") List<Integer> codes); List<LineInfoDO> listByInterview(@Param("interviewId") String interviewId,
@Param("interviewType") Integer interviewType,
@Param("pendingInterviewStatus") Integer pendingInterviewStatus,
@Param("notPassingTheInterview") Integer notPassingTheInterview,
@Param("codes") List<Integer> codes);
/** /**
* 我的线索列表 * 我的线索列表

View File

@@ -330,17 +330,28 @@
<select id="listByInterview" resultMap="BaseResultMap"> <select id="listByInterview" resultMap="BaseResultMap">
select * from xfsg_line_info select * from xfsg_line_info
where deleted = 0 and line_status = 1 where deleted = 0 and line_status = 1
<if test="interviewType != null and interviewType == 1">
and first_interviewer = #{interviewId}
</if>
<if test="interviewType != null and interviewType == 2">
and second_interviewer = #{interviewId}
</if>
<if test="codes !=null and codes.size>0"> <if test="codes !=null and codes.size>0">
<foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=","> <foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=",">
#{code} #{code}
</foreach> </foreach>
</if> </if>
<if test="pendingInterviewStatus != null ">
and ((workflow_sub_stage_status = #{pendingInterviewStatus}
<if test="interviewType != null and interviewType == 1">
and first_interviewer = #{interviewId}
</if>
<if test="interviewType != null and interviewType == 2">
and second_interviewer = #{interviewId}
</if>
)
</if>
<if test="notPassingTheInterview != null ">
or (workflow_sub_stage_status = #{notPassingTheInterview}
and investment_manager = #{interviewId}
))
</if>
</select> </select>

View File

@@ -114,8 +114,7 @@ public class DeskServiceImpl implements DeskService {
public PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) { public PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.INTERVIEW.getCode(), List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.INTERVIEW.getCode(),
Arrays.asList(WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_40.getCode(), WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_30.getCode(),WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_40.getCode(),null);
WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_30.getCode()));
PageInfo page = new PageInfo(lineInfoDOS); PageInfo page = new PageInfo(lineInfoDOS);
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS); Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList()); List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
@@ -147,8 +146,7 @@ public class DeskServiceImpl implements DeskService {
public PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) { public PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.SECOND_INTERVIEW.getCode(), List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.SECOND_INTERVIEW.getCode(),
Arrays.asList(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_105.getCode(), WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_105.getCode(), WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_115.getCode(),null);
WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_115.getCode()));
PageInfo page = new PageInfo(lineInfoDOS); PageInfo page = new PageInfo(lineInfoDOS);
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS); Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList()); List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());

View File

@@ -163,29 +163,52 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
Long shopId = request.getShopId(); Long shopId = request.getShopId();
//线索信息 //线索信息
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
if (Objects.isNull(lineInfoDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("lineInfoDO").getErrorMessage());
}
//缴费信息 //缴费信息
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId); FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
if (Objects.isNull(franchiseFeeDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("franchiseFeeDO").getErrorMessage());
}
//线索id //线索id
Long lineId = shopInfoDO.getLineId(); Long lineId = shopInfoDO.getLineId();
//签约信息 //签约信息
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineId); SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineId);
if (Objects.isNull(signingBaseInfoDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("signingBaseInfoDO").getErrorMessage());
}
//缴款信息 //缴款信息
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId); LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
if (Objects.isNull(linePayDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("linePayDO").getErrorMessage());
}
//铺位信息 //铺位信息
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId); PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
if (Objects.isNull(pointInfoDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("pointInfoDO").getErrorMessage());
}
//建店数据 //建店数据
SystemBuildingShopDO systemBuildingShopDO = systemBuildingShopMapper.selectOne(SystemBuildingShopDO.builder().shopId(shopId).lineId(lineId).build()); SystemBuildingShopDO systemBuildingShopDO = systemBuildingShopMapper.selectOne(SystemBuildingShopDO.builder().shopId(shopId).lineId(lineId).build());
if (Objects.isNull(systemBuildingShopDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("systemBuildingShopDO").getErrorMessage());
}
//证照办理 //证照办理
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId); LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
if (Objects.isNull(licenseTransactDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("licenseTransactDO").getErrorMessage());
}
ThirdDepartmentDO thirdDepartmentDO = new ThirdDepartmentDO(); ThirdDepartmentDO thirdDepartmentDO = new ThirdDepartmentDO();
if (Objects.nonNull(systemBuildingShopDO)) { if (Objects.nonNull(systemBuildingShopDO)) {
//三方部门表 //三方部门表
thirdDepartmentDO = thirdDepartmentMapper.getByName(systemBuildingShopDO.getBigName()); thirdDepartmentDO = thirdDepartmentMapper.getByName(systemBuildingShopDO.getBigName());
if (Objects.isNull(thirdDepartmentDO)){
throw new ServiceException(109014,ApiErrorCodeEnum.getByCode("thirdDepartmentDO").getErrorMessage());
}
} }
//找不到的url统一用这个 //找不到的url统一用这个
List<String> temp = new ArrayList<>(); List<String> temp = new ArrayList<>();
temp.add("object"); temp.add("object");
Convert.digitToChinese(123);
return FranchiseAgreementRequest.builder() return FranchiseAgreementRequest.builder()
// todo .apply_user(user.getJobNumber()) // todo .apply_user(user.getJobNumber())
.apply_user("20230724") .apply_user("20230724")

View File

@@ -68,15 +68,8 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
if (currentDate.before(request.getExperienceStartTime())) { if (currentDate.before(request.getExperienceStartTime())) {
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 LineInfoDO msgLineInfo = lineInfoMapper.getByLineId(request.getLineId());
// Map<String, String> requestMap = new HashMap<>(); commonService.sendSms(msgLineInfo.getMobile(), SMSMsgEnum.SHOP_EXPERIENCE);
// 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())) { } 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());

View File

@@ -110,12 +110,6 @@ public class XxlJobHandler {
WorkflowSubStageStatusEnum storeExperience90 = WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90; WorkflowSubStageStatusEnum storeExperience90 = WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90;
lineInfoMapper.toExperiencing(lineIds, storeExperience90.getCode()); 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("------实训体验状态变更结束------"); log.info("------实训体验状态变更结束------");
XxlJobHelper.handleSuccess(); XxlJobHelper.handleSuccess();
} }