This commit is contained in:
zhangchenbiao
2024-04-07 15:41:12 +08:00
parent bb1ef733c6
commit ca87658f5e
38 changed files with 1664 additions and 74 deletions

View File

@@ -1,11 +1,11 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.request.AddMapEvaluationReportRequest;
import com.cool.store.request.AddPointDetailRequest;
import com.cool.store.request.UpdatePointDetailRequest;
import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ShopPointService;
import com.cool.store.vo.LineUsernameAndMobileVO;
import com.cool.store.vo.point.AuditSettingVO;
import com.cool.store.vo.point.PointDetailVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -13,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author zhangchenbiao
@@ -48,20 +49,20 @@ public class ShopPointController {
@ApiOperation("生成评估报告")
@GetMapping("/generateEvaluationReport")
public ResponseResult<Integer> generateEvaluationReport(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(shopPointService.generateEvaluationReport(pointId));
public ResponseResult<Integer> generateEvaluationReport(@RequestBody PointIdRequest request) {
return ResponseResult.success(shopPointService.generateEvaluationReport(request.getPointId()));
}
@ApiOperation("铺位失效")
@GetMapping("/invalid")
public ResponseResult<Integer> pointInvalid(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(shopPointService.pointInvalid(pointId));
@PostMapping("/invalid")
public ResponseResult<Integer> pointInvalid(@RequestBody PointIdRequest request) {
return ResponseResult.success(shopPointService.pointInvalid(request.getPointId()));
}
@ApiOperation("铺位解绑")
@GetMapping("/unbind")
public ResponseResult<Integer> pointUnbind(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(shopPointService.pointUnbind(pointId));
@PostMapping("/unbind")
public ResponseResult<Integer> pointUnbind(@RequestBody PointIdRequest request) {
return ResponseResult.success(shopPointService.pointUnbind(request.getPointId()));
}
@ApiOperation("配置评估报告")
@@ -71,11 +72,52 @@ public class ShopPointController {
}
@ApiOperation("提交审批")
@GetMapping("/submitAudit")
public ResponseResult<Integer> submitAudit(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(shopPointService.submitAudit(pointId));
@PostMapping("/submitAudit")
public ResponseResult<Integer> submitAudit(@RequestBody @Validated SubmitPointAuditRequest request) {
return ResponseResult.success(shopPointService.submitAudit(request));
}
@ApiOperation("选址审批设置")
@PostMapping("/auditSetting")
public ResponseResult<Integer> auditSetting(@RequestBody AuditSettingRequest request) {
return ResponseResult.success(shopPointService.auditSetting(request));
}
@ApiOperation("获取选址审批设置")
@GetMapping("/getAuditSetting")
public ResponseResult<AuditSettingVO> getAuditSetting() {
return ResponseResult.success(shopPointService.getAuditSetting());
}
@ApiOperation("获取催办用户列表")
@GetMapping("/getTodoUserList")
public ResponseResult<List<String>> getTodoUserList(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(shopPointService.getTodoUserList(pointId));
}
@ApiOperation("营运人员审批")
@PostMapping("/operationUserAudit")
public ResponseResult<Integer> operationUserAudit(@RequestBody @Validated OperationAuditRequest request) {
return ResponseResult.success(shopPointService.operationUserAudit(CurrentUserHolder.getUserId(), request));
}
@ApiOperation("审批")
@PostMapping("/audit")
public ResponseResult<Integer> audit(@RequestBody PointAuditRequest request) {
return ResponseResult.success(shopPointService.audit(CurrentUserHolder.getUserId(), request));
}
@ApiOperation("铺位转让")
@PostMapping("/turnDevelopmentManager")
public ResponseResult<Integer> turnDevelopmentManager(@RequestBody TurnDevelopmentManagerRequest request) {
return ResponseResult.success(shopPointService.turnDevelopmentManager(request));
}
@ApiOperation("获取我负责的加盟商列表")
@GetMapping("/getLineList")
public ResponseResult<List<LineUsernameAndMobileVO>> getLineList() {
return ResponseResult.success(shopPointService.getLineList(CurrentUserHolder.getUserId()));
}
}

View File

@@ -1,6 +1,12 @@
package com.cool.store.job;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LineInterviewDAO;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.entity.LineInterviewDO;
import com.cool.store.enums.InterviewStatusEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.mapper.TrainingExperienceMapper;
@@ -25,6 +31,11 @@ public class XxlJobHandler {
@Resource
LineInfoMapper lineInfoMapper;
@Resource
private LineInterviewDAO lineInterviewDAO;
@Resource
private LineInfoDAO lineInfoDAO;
/**
* 每天都将待体验门店信息变更到体验中
*/
@@ -46,4 +57,19 @@ public class XxlJobHandler {
log.info("------实训体验状态变更结束------");
XxlJobHelper.handleSuccess();
}
@XxlJob("batchUpdateInterviewWorkflowStage")
public void batchUpdateInterviewWorkflowStage() {
log.info("------面谈待审核状态变更------");
List<LineInterviewDO> interviewList = lineInterviewDAO.getWaitAuditInterview();
if (CollectionUtils.isEmpty(interviewList)) {
log.info("------今日没有待更新数据------");
return;
}
List<Long> lineIds = interviewList.stream().map(LineInterviewDO::getLineId).collect(Collectors.toList());
List<Long> interviewIds = interviewList.stream().map(LineInterviewDO::getId).collect(Collectors.toList());
lineInfoDAO.batchUpdateInterviewWorkflowStage(lineIds, WorkflowSubStageEnum.INVITING_INTERVIEWS, WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_20);
lineInterviewDAO.batchUpdateInterviewStatus(interviewIds, InterviewStatusEnum.WAIT_AUDIT);
XxlJobHelper.handleSuccess();
}
}