更新人没写入

This commit is contained in:
苏竹红
2024-04-12 15:33:30 +08:00
parent d4a24069b7
commit 2c5bb9cdb4
10 changed files with 52 additions and 36 deletions

View File

@@ -56,7 +56,7 @@ public class LineInfoDAO {
return lineInfoMapper.updateByPrimaryKeySelective(param); return lineInfoMapper.updateByPrimaryKeySelective(param);
} }
public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus) { public Integer updateWorkflowStage(Long lineId, WorkflowSubStageEnum workflowSubStage, WorkflowSubStageStatusEnum workflowSubStageStatus,String userId) {
if(Objects.isNull(workflowSubStageStatus)){ if(Objects.isNull(workflowSubStageStatus)){
log.info("更新线索阶段,子阶段 和 子阶段状态不能同时为空"); log.info("更新线索阶段,子阶段 和 子阶段状态不能同时为空");
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
@@ -66,6 +66,9 @@ public class LineInfoDAO {
if(Objects.nonNull(workflowSubStage)){ if(Objects.nonNull(workflowSubStage)){
lineInfo.setWorkflowSubStage(workflowSubStage.getCode()); lineInfo.setWorkflowSubStage(workflowSubStage.getCode());
} }
if(StringUtils.isNotEmpty(userId)){
lineInfo.setUpdateUserId(userId);
}
lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode()); lineInfo.setWorkflowSubStageStatus(workflowSubStageStatus.getCode());
return lineInfoMapper.updateByPrimaryKeySelective(lineInfo); return lineInfoMapper.updateByPrimaryKeySelective(lineInfo);
} }

View File

@@ -16,11 +16,13 @@ import com.cool.store.mapper.LinePayMapper;
import com.cool.store.request.AuditRejectRequest; import com.cool.store.request.AuditRejectRequest;
import com.cool.store.request.BranchBankPageRequest; import com.cool.store.request.BranchBankPageRequest;
import com.cool.store.service.BankService; import com.cool.store.service.BankService;
import com.cool.store.utils.StringUtil;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -69,24 +71,27 @@ public class BankServiceImpl extends LineFlowService implements BankService {
} }
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
//更新线索阶段 //更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus()); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_FAIL_55.getCode()); lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_FAIL_55.getCode());
if(StringUtils.isNotEmpty(userId)){
lineInfo.setUpdateUserId(userId);
}
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) { protected Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -24,6 +24,7 @@ import com.cool.store.utils.SecureUtil;
import com.cool.store.utils.StringUtil; import com.cool.store.utils.StringUtil;
import com.cool.store.utils.poi.constant.Constants; import com.cool.store.utils.poi.constant.Constants;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -121,7 +122,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
} }
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
//校验是否是审核节点 //校验是否是审核节点
if (!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) && if (!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) &&
!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) { !lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) {
@@ -137,7 +138,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
//更新线索阶段 //更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus()); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
//更新auditId //更新auditId
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId()); SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineInfo.getId());
if (Objects.nonNull(signingBaseInfoDO)) { if (Objects.nonNull(signingBaseInfoDO)) {
@@ -151,7 +152,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
if ((!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) && if ((!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode()) &&
!lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode()))) { !lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode()))) {
throw new ServiceException(ErrorCodeEnum.NOT_APPROVE_NODE); throw new ServiceException(ErrorCodeEnum.NOT_APPROVE_NODE);
@@ -159,11 +160,13 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
//待审核code 63 处理逻辑 //待审核code 63 处理逻辑
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode())) { if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode())) {
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_65.getCode()); lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_65.getCode());
lineInfo.setUpdateUserId(userId);
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
} }
//待OA审核code 75 处理逻辑 //待OA审核code 75 处理逻辑
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) { if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode())) {
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_80.getCode()); lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_80.getCode());
lineInfo.setUpdateUserId(userId);
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
//更新auditId //更新auditId
intentAgreementMapper.updateAuditId(lineInfo.getId(), auditId); intentAgreementMapper.updateAuditId(lineInfo.getId(), auditId);
@@ -172,7 +175,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
} }
@Override @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) { protected Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -97,19 +97,20 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
} }
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
//更新线索阶段 //更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus()); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
//更新加盟问卷信息 //更新加盟问卷信息
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId()); joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode()); lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
lineInfo.setUpdateUserId(userId);
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
//更新加盟问卷信息 //更新加盟问卷信息
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId()); joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
@@ -118,7 +119,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
@Override @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) { protected Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -46,14 +46,14 @@ public class KdzApiServiceImpl implements KdzApiService {
auditPassRequest.setLineId(lineInfoDO.getId()); auditPassRequest.setLineId(lineInfoDO.getId());
auditPassRequest.setPassReason(request.getCause()); auditPassRequest.setPassReason(request.getCause());
auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage()); auditPassRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest); commonService.getLineFlowService(auditPassRequest.getWorkflowSubStage()).auditPass(auditPassRequest,null);
}else if (request.getAuditResult() == 0){ }else if (request.getAuditResult() == 0){
AuditRejectRequest auditRejectRequest = new AuditRejectRequest(); AuditRejectRequest auditRejectRequest = new AuditRejectRequest();
auditRejectRequest.setLineId(lineInfoDO.getId()); auditRejectRequest.setLineId(lineInfoDO.getId());
auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage()); auditRejectRequest.setWorkflowSubStage(lineInfoDO.getWorkflowSubStage());
auditRejectRequest.setRejectPublicReason(request.getCause()); auditRejectRequest.setRejectPublicReason(request.getCause());
auditRejectRequest.setRejectRealReason(request.getFailureCause()); auditRejectRequest.setRejectRealReason(request.getFailureCause());
commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest); commonService.getLineFlowService(auditRejectRequest.getWorkflowSubStage()).auditReject(auditRejectRequest,null);
} }
}catch (Exception e){ }catch (Exception e){
throw new ServiceException(ErrorCodeEnum.UNKNOWN); throw new ServiceException(ErrorCodeEnum.UNKNOWN);

View File

@@ -41,7 +41,7 @@ public abstract class LineFlowService {
* @return * @return
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean auditPass(AuditPassRequest request){ public Boolean auditPass(AuditPassRequest request,String userId){
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId()); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){ if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
throw new ServiceException(ErrorCodeEnum.WORK_FLOW_STAGE_PASS_ERROR); throw new ServiceException(ErrorCodeEnum.WORK_FLOW_STAGE_PASS_ERROR);
@@ -54,7 +54,7 @@ public abstract class LineFlowService {
auditInfo.setPassReason(request.getPassReason()); auditInfo.setPassReason(request.getPassReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile())); auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
return auditPass(auditId, lineInfo); return auditPass(auditId, lineInfo,userId);
} }
/** /**
@@ -63,7 +63,7 @@ public abstract class LineFlowService {
* @return * @return
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean auditReject(AuditRejectRequest request){ public Boolean auditReject(AuditRejectRequest request,String userId){
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId()); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){ if(!lineInfo.getWorkflowSubStage().equals(request.getWorkflowSubStage())){
throw new ServiceException(ErrorCodeEnum.WORK_FLOW_STAGE_PASS_ERROR); throw new ServiceException(ErrorCodeEnum.WORK_FLOW_STAGE_PASS_ERROR);
@@ -77,7 +77,7 @@ public abstract class LineFlowService {
auditInfo.setRejectRealReason(request.getRejectRealReason()); auditInfo.setRejectRealReason(request.getRejectRealReason());
auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile())); auditInfo.setCertifyFile(JSONObject.toJSONString(request.getCertifyFile()));
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
return auditReject(auditId, lineInfo); return auditReject(auditId, lineInfo,userId);
} }
/** /**
@@ -102,13 +102,14 @@ public abstract class LineFlowService {
Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo); Long auditId = lineAuditInfoDAO.addAuditInfo(auditInfo);
LineInfoDO updateLineInfo = new LineInfoDO(); LineInfoDO updateLineInfo = new LineInfoDO();
updateLineInfo.setId(request.getLineId()); updateLineInfo.setId(request.getLineId());
updateLineInfo.setUpdateUserId(user.getUserId());
updateLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode()); updateLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
lineInfoDAO.updateLineInfo(updateLineInfo); lineInfoDAO.updateLineInfo(updateLineInfo);
LineFollowLogRequest lineFollowLogRequest = new LineFollowLogRequest(); LineFollowLogRequest lineFollowLogRequest = new LineFollowLogRequest();
lineFollowLogRequest.setLineId(request.getLineId()); lineFollowLogRequest.setLineId(request.getLineId());
lineFollowLogRequest.setMessage(String.format("结束跟进原因:%s", request.getRejectRealReason())); lineFollowLogRequest.setMessage(String.format("结束跟进原因:%s", request.getRejectRealReason()));
lineFollowService.addFollowLog(lineFollowLogRequest,user.getUserId(),user.getName()); lineFollowService.addFollowLog(lineFollowLogRequest,user.getUserId(),user.getName());
return auditClose(auditId, lineInfo); return auditClose(auditId, lineInfo,user.getUserId());
} }
protected abstract Boolean initStage(Long auditId, LineInfoDO lineInfo); protected abstract Boolean initStage(Long auditId, LineInfoDO lineInfo);
@@ -119,7 +120,7 @@ public abstract class LineFlowService {
* @param lineInfo * @param lineInfo
* @return * @return
*/ */
protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo); protected abstract Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId);
/** /**
* 审核拒绝 * 审核拒绝
@@ -127,7 +128,7 @@ public abstract class LineFlowService {
* @param lineInfo * @param lineInfo
* @return * @return
*/ */
protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo); protected abstract Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId);
/** /**
* 结束跟进 * 结束跟进
@@ -135,7 +136,7 @@ public abstract class LineFlowService {
* @param lineInfo * @param lineInfo
* @return * @return
*/ */
protected abstract Boolean auditClose(Long auditId, LineInfoDO lineInfo); protected abstract Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId);

View File

@@ -329,7 +329,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){ if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interviewInfo.getInterviewType())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110; workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110;
} }
lineInfoDAO.updateWorkflowStage(interviewInfo.getLineId(), null, workflowSubStageStatus); lineInfoDAO.updateWorkflowStage(interviewInfo.getLineId(), null, workflowSubStageStatus,userId);
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo); return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo);
} }
@@ -385,7 +385,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){ if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120; workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120;
} }
return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus); return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus,null);
} }
@@ -395,7 +395,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
} }
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage()); InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
@@ -409,7 +409,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode()); updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode());
if(!WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){ if(!WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
//更新线索阶段 //更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus()); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
if (WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){ if (WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
//一审稽核 //一审稽核
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode()); auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
@@ -422,6 +422,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
EnterpriseUserDO enterpriseUser = userAuthMappingService.getUserByRoleEnumAndAreaId(UserRoleEnum.SELECT_SITE_MANAGER, lineInfo.getWantShopAreaId()); EnterpriseUserDO enterpriseUser = userAuthMappingService.getUserByRoleEnumAndAreaId(UserRoleEnum.SELECT_SITE_MANAGER, lineInfo.getWantShopAreaId());
String developmentManager = Optional.ofNullable(enterpriseUser).map(EnterpriseUserDO::getUserId).orElse(null); String developmentManager = Optional.ofNullable(enterpriseUser).map(EnterpriseUserDO::getUserId).orElse(null);
updateLine.setDevelopmentManager(developmentManager); updateLine.setDevelopmentManager(developmentManager);
updateLine.setUpdateUserId(userId);
lineInfoDAO.updateLineInfo(updateLine); lineInfoDAO.updateLineInfo(updateLine);
//初始化店铺 //初始化店铺
shopService.initShop(lineInfo); shopService.initShop(lineInfo);
@@ -432,7 +433,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage()); InterviewTypeEnum interviewType = WorkflowSubStageEnum.getInterviewType(lineInfo.getWorkflowSubStage());
if(InterviewTypeEnum.MEET.equals(interviewType)){ if(InterviewTypeEnum.MEET.equals(interviewType)){
return Boolean.FALSE; return Boolean.FALSE;
@@ -445,12 +446,12 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
updateInterviewInfo.setId(interviewInfo.getId()); updateInterviewInfo.setId(interviewInfo.getId());
updateInterviewInfo.setAuditId(auditId); updateInterviewInfo.setAuditId(auditId);
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.NOT_PASS.getCode()); updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.NOT_PASS.getCode());
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, WorkflowSubStageStatusEnum.getInterviewRejectStatus(interviewType)); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, WorkflowSubStageStatusEnum.getInterviewRejectStatus(interviewType),userId);
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0; return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
} }
@Override @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) { protected Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -404,6 +404,8 @@ public class LineServiceImpl implements LineService {
Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId()); Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId());
lineInfoDO.setRegionId(regionId); lineInfoDO.setRegionId(regionId);
lineInfoDO.setInvestmentManager(userId); lineInfoDO.setInvestmentManager(userId);
lineInfoDO.setCreateUserId(userId);
lineInfoDO.setUpdateUserId(userId);
lineInfoDAO.insertOrUpdate(lineInfoDO); lineInfoDAO.insertOrUpdate(lineInfoDO);
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -128,22 +128,22 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
} }
@Override @Override
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) { protected Boolean auditPass(Long auditId, LineInfoDO lineInfo,String userId) {
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage()); WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage(); WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
//更新线索阶段 //更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus()); lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) { protected Boolean auditReject(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override @Override
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) { protected Boolean auditClose(Long auditId, LineInfoDO lineInfo,String userId) {
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -42,13 +42,13 @@ public class LineAuditController {
@ApiOperation("审核通过") @ApiOperation("审核通过")
@PostMapping("/pass") @PostMapping("/pass")
public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){ public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){
return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditPass(request)); return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditPass(request,CurrentUserHolder.getUserId()));
} }
@ApiOperation("审核拒绝") @ApiOperation("审核拒绝")
@PostMapping("/reject") @PostMapping("/reject")
public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){ public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){
return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditReject(request)); return ResponseResult.success(commonService.getLineFlowService(request.getWorkflowSubStage()).auditReject(request,CurrentUserHolder.getUserId()));
} }
@ApiOperation("重新缴费") @ApiOperation("重新缴费")