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

This commit is contained in:
苏竹红
2024-05-27 10:33:38 +08:00
6 changed files with 37 additions and 14 deletions

View File

@@ -83,6 +83,7 @@ public enum ErrorCodeEnum {
TIME_OCCUPIED(500018, "预约时间被占用", null),
LINE_PAY_IS_NOT_EXIST(500019, "意向金信息不存在!", null),
INTENT_PASS(500020, "审核已通过,请刷新页面!", null),
APPOINTMENT_TIME_FAIL(500020, "预约失败,请刷新后再试", null),
POINT_NOT_COMPLETE(600000, "铺位信息未填写完全,请完善后生成评估报告", null),
POINT_NOT_EXIST(600001, "铺位信息不存在", null),

View File

@@ -63,7 +63,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(request.getLineId());
if (!Objects.isNull(lineInfoDO)&&!WorkflowSubStageStatusEnum.INTENT_0.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())) {
if (!Objects.isNull(lineInfoDO) && WorkflowSubStageStatusEnum.INTENT_5.getCode().equals(lineInfoDO.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.INTENT_PASS);
}
//更改线索流程子状态为【待审核】
@@ -87,14 +87,14 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
Map<String, String> requestMap = new HashMap<>();
requestMap.put("partnerUsername",lineInfoParam.getUsername());
requestMap.put("partnerMobile",lineInfoParam.getMobile());
requestMap.put("lineId",String.valueOf(lineInfoParam.getId()));
requestMap.put("partnerUsername", lineInfoParam.getUsername());
requestMap.put("partnerMobile", lineInfoParam.getMobile());
requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
requestMap.put("regionName",openAreaInfoDO.getAreaName());
requestMap.put("regionName", openAreaInfoDO.getAreaName());
commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
MessageEnum.MESSAGE_29,
requestMap);
MessageEnum.MESSAGE_29,
requestMap);
return Boolean.TRUE;
}
@@ -106,7 +106,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
//更新加盟问卷信息
joinIntentionMapper.updateAuditIdByLineId(auditId, lineInfo.getId());
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS);
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS);
return Boolean.TRUE;
}

View File

@@ -115,6 +115,12 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean appointmentTime(AppointmentTimeRequest request) {
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date now = new Date();
if(now.getTime() >= startTime.getTime()){
throw new ServiceException(ErrorCodeEnum.APPOINTMENT_TIME_FAIL);
}
//查询线索信息
//如果是面谈获取招商经理 如果是面试获取大区经理
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
@@ -138,8 +144,6 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if(occupied){
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
}
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
LineCalendarsEventDO calendarsEvent = LineCalendarsEventDO.convertDO(lineInfo, interviewType.getCode(), startTime, endTime, interviewerUserId);
Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent);
WorkflowSubStageStatusEnum workflowSubStageStatus = InterviewTypeEnum.getWorkflowSubStageStatus(interviewType);
@@ -181,6 +185,12 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean modifyAppointmentTime(AppointmentTimeRequest request) {
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date nowTime = new Date();
if(nowTime.getTime() >= startTime.getTime()){
throw new ServiceException(ErrorCodeEnum.APPOINTMENT_TIME_FAIL);
}
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
@@ -199,8 +209,6 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if(Objects.isNull(interviewInfo)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
}
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
Boolean occupied = lineCalendarsEventDAO.isOccupied(interviewType.getCode(), lineInfo.getRegionId(), interviewInfo.getInterviewerUserId(), request.getStartTime(), request.getEndTime(), interviewInfo.getId());
if(occupied){
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);

View File

@@ -229,7 +229,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
.ht_day(timeUtils(request.getContractStartTime(),"day"))
.ht_day2(timeUtils(request.getContractStartEndTime(),"day"))
.ht_month1(timeUtils(request.getContractStartTime(),"month"))
.ht_month2(timeUtils(request.getContractStartEndTime(),",month"))
.ht_month2(timeUtils(request.getContractStartEndTime(),"month"))
.ht_year1(timeUtils(request.getContractStartTime(),"year"))
.ht_year2(timeUtils(request.getContractStartEndTime(),"year"))
.idcard_1(Collections.singletonList(signingBaseInfoDO.getIdCardFront()))

View File

@@ -387,6 +387,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
newStoreRequest.setZmrjkllzs1(PassengerFlowEnum.getByCode(sysStoreAppRequest.getStoreDetail().getAverageDailyRs()).getType());
// zppsyfy
newStoreRequest.setZppsyfy(0.05);
newStoreRequest.setZppsyfy(Double.valueOf(sysStoreAppRequest.getStoreDetail().getUsageRate()));
// zq
newStoreRequest.setZq(pointInfoDO.getDistrict());
// zsqmc

View File

@@ -1,10 +1,12 @@
package com.cool.store.controller.webb;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.SysRoleService;
import com.google.common.collect.Lists;
import com.cool.store.service.UserAuthMappingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -24,6 +27,9 @@ public class SysRoleController {
@Autowired
private SysRoleService sysRoleService;
@Resource
private UserAuthMappingService userAuthMappingService;
@GetMapping(path = "/getXfsgRoles")
public ResponseResult<Map<String, Long>> getXfsgRoles() {
return ResponseResult.success(sysRoleService.getXfsgRoles());
@@ -34,4 +40,11 @@ public class SysRoleController {
List<UserRoleEnum> roleList = Arrays.asList(UserRoleEnum.THEATER_MANAGER, UserRoleEnum.OPERATIONS_MANAGER, UserRoleEnum.REGION_MANAGER);
return ResponseResult.success(sysRoleService.getUserIdByRegionIdWithRolePriority(regionId, roleList));
}
@GetMapping(path = "/getUserByRoleEnumAndRegionId")
@ApiOperation("获取有区域权限和职位")
public ResponseResult<EnterpriseUserDO> getUserByRoleEnumAndRegionId(@RequestParam("regionId") Long regionId, @RequestParam("roleName") String roleName) {
UserRoleEnum userRoleEnum = UserRoleEnum.getByDesc(roleName);
return ResponseResult.success(userAuthMappingService.getUserByRoleEnumAndRegionId(userRoleEnum, regionId));
}
}