This commit is contained in:
zhangchenbiao
2024-04-29 17:08:02 +08:00
parent 8c9afa3017
commit 93f31b8dee
5 changed files with 54 additions and 15 deletions

View File

@@ -211,8 +211,6 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
updateEvent.setEndTime(endTime);
updateEvent.setInterviewDate(startTime);
lineCalendarsEventDAO.updateCalendarsEvent(updateEvent);
JSONObject jsonObject = new JSONObject();
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.MODIFY_INTERVIEW_TIME, jsonObject);
return true;
}
@@ -394,9 +392,11 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
WorkflowSubStageStatusEnum workflowSubStageStatus = null;
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_42;
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.FIRST_INTERVIEW_REAPPOINTMENT, new JSONObject());
}
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120;
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_REAPPOINTMENT, new JSONObject());
}
return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus,null);
}
@@ -414,14 +414,19 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
updateInterviewInfo.setId(interviewInfo.getId());
updateInterviewInfo.setAuditId(auditId);
updateInterviewInfo.setInterviewStatus(InterviewStatusEnum.PASS.getCode());
if(!WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.equals(workflowSubStageEnum)){
//更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
if (WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
//一审稽核
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
}
}else{
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS, new JSONObject());
}
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
//更新线索阶段
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
//一审稽核
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT, new JSONObject());
}
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
LineInfoDO updateLine = new LineInfoDO();
updateLine.setId(lineInfo.getId());
updateLine.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
@@ -436,7 +441,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
//二审稽核
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.TWO.getCode());
//发送短信
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_PASS, null);
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_SUCCESS, null);
}
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
}

View File

@@ -11,7 +11,6 @@ import com.cool.store.enums.point.*;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.*;
import com.cool.store.service.*;
import com.cool.store.utils.GeoMapUtil;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.AuditInfoVO;
@@ -362,13 +361,25 @@ public class PointServiceImpl implements PointService {
//没有下一节点 审批通过
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
initUploadRentContract(pointInfo);
}
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, pointInfo.getPointName(), pointInfo.getAddress());
}
return pointInfoDAO.updatePointInfo(updatePoint);
}
/**
* 初始化上传租赁合同阶段
* @param pointInfo
*/
private void initUploadRentContract(PointInfoDO pointInfo) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(pointInfo.getLineId());
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
JSONObject templateParam = new JSONObject();
templateParam.put("pointName", pointInfo.getPointName());
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Integer audit(String userId, PointAuditRequest request) {
@@ -424,7 +435,7 @@ public class PointServiceImpl implements PointService {
pointInfoUpdate.setId(pointId);
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
initUploadRentContract(pointInfo);
}
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, pointInfo.getPointName(), pointInfo.getAddress());
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
@@ -740,6 +751,10 @@ public class PointServiceImpl implements PointService {
if(PointStatusEnum.POINT_STATUS_5.getCode().equals(pointInfo.getPointStatus())){
selectStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12;
updateStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
JSONObject templateParam = new JSONObject();
templateParam.put("pointName", pointInfo.getPointName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(pointInfo.getLineId());
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
}
updateStatusList.add(selectStatus);
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
@@ -875,6 +890,10 @@ public class PointServiceImpl implements PointService {
}
Long auditId = shopAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, AuditTypeEnum.UPLOAD_RENT_CONTRACT));
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
if(AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())){
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, new JSONObject());
}
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)){
//审核通过铺位变为已签约
PointInfoDO updatePoint = new PointInfoDO();