From 93f31b8deebfb3c90c9bead86ecd50eb87d65554 Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Mon, 29 Apr 2024 17:08:02 +0800 Subject: [PATCH] fix --- .../java/com/cool/store/enums/SMSMsgEnum.java | 17 +++++++++++-- .../mapper/PointDetailInfoMapper.xml | 3 ++- .../store/request/OperationAuditRequest.java | 1 + .../impl/LineInterviewServiceImpl.java | 23 ++++++++++------- .../store/service/impl/PointServiceImpl.java | 25 ++++++++++++++++--- 5 files changed, 54 insertions(+), 15 deletions(-) diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/SMSMsgEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/SMSMsgEnum.java index a36f0774e..bcf7d4a33 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/SMSMsgEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/SMSMsgEnum.java @@ -7,8 +7,21 @@ package com.cool.store.enums; */ public enum SMSMsgEnum { - MODIFY_INTERVIEW_TIME("修改面审时间","", "SMS_464760909"), - SECOND_INTERVIEW_PASS("二审面试通过","", "SMS_464760909"), + INTERVIEW_APPOINTMENT_SUCCESS("邀约面谈成功", "", "SMS_465930408"), + FIRST_INTERVIEW_APPOINTMENT_SUCCESS("一次面审待预约", "", "SMS_465915456"), + FIRST_INTERVIEW_REMIND("一次面审1小时提醒", "", "SMS_465935440"), + FIRST_INTERVIEW_REAPPOINTMENT("一次面审重新预约", "", "SMS_465935442"), + INTENTION_PAYMENT("意向金待缴费", "", "SMS_465950414"), + INTENTION_PAYMENT_FAIL("意向金缴费失败", "", "SMS_465975442"), + INTENTION_PAYMENT_SUCCESS("意向金审核通过", "", "SMS_465885415"), + INTENTION_PROTOCOL_FAIL("意向协议审核未通过", "", "SMS_465910434"), + SECOND_INTERVIEW_APPOINTMENT("二审面审待预约", "", "SMS_465950416"), + SECOND_INTERVIEW_REMIND("二审前1小时提醒", "", "SMS_465925428"), + SECOND_INTERVIEW_REAPPOINTMENT("二审重新预约", "", "SMS_465940421"), + SECOND_INTERVIEW_SUCCESS("二审面审成功", "", "SMS_465980397"), + SELECT_SUCCESS("选铺成功", "", "SMS_465890428"), + RENT_CONTRACT_AUDIT_FAIL("租赁合同上传未通过", "", "SMS_465955429"), + SHOP_EXPERIENCE("门店体验安排", "", "SMS_465900449"), ; private String title; diff --git a/coolstore-partner-dao/src/main/resources/mapper/PointDetailInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/PointDetailInfoMapper.xml index 64c03e3ab..51c3c9799 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/PointDetailInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/PointDetailInfoMapper.xml @@ -127,7 +127,8 @@ convenient_score = #{update.convenientScore}, environment_score = #{update.environmentScore}, rent_contract = #{update.rentContract}, - map_evaluation_report = #{update.mapEvaluationReport} + map_evaluation_report = #{update.mapEvaluationReport}, + picture_obj = #{update.pictureObj}, where id = #{update.id} diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/OperationAuditRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/OperationAuditRequest.java index d94d85998..baaffc4c1 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/request/OperationAuditRequest.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/OperationAuditRequest.java @@ -91,6 +91,7 @@ public class OperationAuditRequest { pointDetailInfo.setClerkFee(request.getClerkFee()); pointDetailInfo.setOperationUserSign(request.getOperationUserSign()); pointDetailInfo.setOperationUserSignTime(new Date()); + pointDetailInfo.setStaffFee(String.valueOf((request.getShopManagerNum() * request.getShopManagerFee()) + (request.getClerkNum() * request.getClerkFee()))); return pointDetailInfo; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java index 597208a17..f934940a7 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java @@ -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; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java index 8d5e2f95a..6fcbcea9a 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java @@ -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();