fix:十二分制-移动端接口;PC端接口补充
This commit is contained in:
@@ -7,6 +7,7 @@ import com.cool.store.request.tp.TpAppealApplyRequest;
|
||||
import com.cool.store.request.tp.TpApplyAuditRequest;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import com.cool.store.request.tp.TpApplyRequest;
|
||||
import com.cool.store.response.AuditInfoResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.tp.TpApplyService;
|
||||
import com.cool.store.vo.tp.*;
|
||||
@@ -19,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -65,7 +67,6 @@ public class TpApplyController {
|
||||
return ResponseResult.success(tpApplyService.rewardAudit(request));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("惩处申请提交or保存")
|
||||
@PostMapping("/penaltyApplySubmit")
|
||||
public ResponseResult<Boolean> penaltyApplySubmit(@RequestBody @Validated TpApplyRequest request) {
|
||||
@@ -125,4 +126,24 @@ public class TpApplyController {
|
||||
public ResponseResult<Boolean> appealAudit(@RequestBody @Validated TpApplyAuditRequest request) {
|
||||
return ResponseResult.success(tpApplyService.appealAudit(request));
|
||||
}
|
||||
|
||||
@ApiOperation("根据申请单id批量删除")
|
||||
@PostMapping("/deleteBatch")
|
||||
public ResponseResult<Boolean> deleteBatch(@RequestBody List<Long> applyIds) {
|
||||
return ResponseResult.success(tpApplyService.deleteBatch(applyIds));
|
||||
}
|
||||
|
||||
@ApiOperation("审批记录列表")
|
||||
@GetMapping("/auditRecords")
|
||||
@ApiImplicitParam(name = "applyId", value = "申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<List<AuditInfoResponse>> auditRecords(@NotNull(message = "申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.getAuditRecordList(applyId));
|
||||
}
|
||||
|
||||
@ApiOperation("完成缴费")
|
||||
@PostMapping("/completePayment")
|
||||
@ApiImplicitParam(name = "applyId", value = "申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<Boolean> completePayment(@NotNull(message = "申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.completePayment(applyId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.tp.TpFormTypeEnum;
|
||||
import com.cool.store.request.tp.TpAppealApplyRequest;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import com.cool.store.request.tp.TpApplyRequest;
|
||||
import com.cool.store.request.tp.TpRuleQueryRequest;
|
||||
import com.cool.store.response.AuditInfoResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.tp.TpApplyService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.tp.mini.MiniTpApplyListVO;
|
||||
import com.cool.store.vo.tp.mini.MiniTpPenaltyApplyVO;
|
||||
import com.cool.store.vo.tp.mini.MiniTpRewardApplyVO;
|
||||
import com.cool.store.vo.tp.mini.MiniTpRuleListVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 十二分制-申请单 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/10
|
||||
*/
|
||||
@Api(tags = "十二分制-申请单")
|
||||
@RestController
|
||||
@RequestMapping("/mini/tp/apply")
|
||||
@RequiredArgsConstructor
|
||||
public class MiniTpApplyController {
|
||||
private final TpApplyService tpApplyService;
|
||||
|
||||
@ApiOperation("加分申请提交or保存")
|
||||
@PostMapping("/rewardApplySubmit")
|
||||
public ResponseResult<Boolean> rewardApplySubmit(@RequestBody @Validated TpApplyRequest request) {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
request.setSource(1);
|
||||
request.setApplyUserId(user.getPartnerId());
|
||||
request.setApplyUserName(user.getUsername());
|
||||
return ResponseResult.success(tpApplyService.rewardApplySubmit(request));
|
||||
}
|
||||
|
||||
@ApiOperation("加分申请单详情")
|
||||
@GetMapping("/rewardDetail")
|
||||
@ApiImplicitParam(name = "applyId", value = "加分申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<MiniTpRewardApplyVO> rewardDetail(@NotNull(message = "加分申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.getMiniRewardApplyDetail(applyId));
|
||||
}
|
||||
|
||||
@ApiOperation("加分申请单分页查询")
|
||||
@GetMapping("/rewardPage")
|
||||
public ResponseResult<PageInfo<MiniTpApplyListVO>> rewardPage(TpApplyQueryRequest request) {
|
||||
request.setType(TpFormTypeEnum.REWARD.getType());
|
||||
return ResponseResult.success(tpApplyService.getMiniApplyList(request));
|
||||
}
|
||||
|
||||
@ApiOperation("惩处申请单详情")
|
||||
@GetMapping("/penaltyDetail")
|
||||
@ApiImplicitParam(name = "applyId", value = "惩处申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<MiniTpPenaltyApplyVO> penaltyDetail(@NotNull(message = "惩处申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.getMiniPenaltyApplyDetail(applyId));
|
||||
}
|
||||
|
||||
@ApiOperation("惩处申请单分页查询")
|
||||
@GetMapping("/penaltyPage")
|
||||
public ResponseResult<PageInfo<MiniTpApplyListVO>> penaltyPage(TpApplyQueryRequest request) {
|
||||
request.setIsPenalty(true);
|
||||
request.setIsDraft(0);
|
||||
return ResponseResult.success(tpApplyService.getMiniApplyList(request));
|
||||
}
|
||||
|
||||
@ApiOperation("复议申请提交or保存")
|
||||
@PostMapping("/appealApplySubmit")
|
||||
public ResponseResult<Boolean> appealApplySubmit(@RequestBody @Validated TpAppealApplyRequest request) {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
request.setSource(1);
|
||||
request.setApplyUserId(user.getPartnerId());
|
||||
request.setApplyUserName(user.getUsername());
|
||||
return ResponseResult.success(tpApplyService.appealApplySubmit(request));
|
||||
}
|
||||
|
||||
@ApiOperation("审批记录列表")
|
||||
@GetMapping("/auditRecords")
|
||||
@ApiImplicitParam(name = "applyId", value = "申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<List<AuditInfoResponse>> auditRecords(@NotNull(message = "申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.getAuditRecordList(applyId));
|
||||
}
|
||||
|
||||
@ApiOperation("规则分页查询")
|
||||
@GetMapping("/rulePage")
|
||||
@ApiImplicitParam(name = "type", value = "规则类型,0惩处 1加分", required = true, dataType = "Integer", paramType = "query")
|
||||
public ResponseResult<PageInfo<MiniTpRuleListVO>> rewardRulePage(@NotNull(message = "规则类型不能为空") Integer type) {
|
||||
TpRuleQueryRequest request = new TpRuleQueryRequest();
|
||||
request.setType(type);
|
||||
request.setStatus(1);
|
||||
return ResponseResult.success(tpApplyService.getMiniRulePage(request));
|
||||
}
|
||||
|
||||
@ApiOperation("认罚缴款")
|
||||
@PostMapping("/acceptPenalty")
|
||||
@ApiImplicitParam(name = "applyId", value = "惩处申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<Boolean> acceptPenalty(@NotNull(message = "惩处申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.acceptPenalty(applyId));
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,16 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dao.tp.TpApplyFormDAO;
|
||||
import com.cool.store.dto.*;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.entity.tp.TpApplyFormDO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopStatusEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.enums.tp.TpFormStatusEnum;
|
||||
import com.cool.store.mapper.ApplyLicenseMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||
@@ -22,39 +18,28 @@ import com.cool.store.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.ZxjpApiRequest;
|
||||
import com.cool.store.request.bigdata.LatestOrderDateRequest;
|
||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import com.cool.store.response.bigdata.LatestOrderDateResponse;
|
||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.service.tp.TpApplyService;
|
||||
import com.cool.store.utils.MDCUtils;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@@ -121,6 +106,10 @@ public class XxlJobHandler {
|
||||
StoreDao storeDao;
|
||||
@Resource
|
||||
ThirdBigDataService thirdBigDataService;
|
||||
@Resource
|
||||
TpApplyFormDAO tpApplyFormDAO;
|
||||
@Resource
|
||||
TpApplyService tpApplyService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -457,4 +446,36 @@ public class XxlJobHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 十二分制惩处申请单复议逾期
|
||||
*/
|
||||
@XxlJob("tpPenaltyAppealOverdue")
|
||||
public void tpPenaltyAppealOverdue() {
|
||||
MDCUtils.put(CommonConstants.REQUEST_ID, UUID.randomUUID().toString());
|
||||
log.info("------start tpPenaltyAppealOverdue------");
|
||||
boolean hasNext = true;
|
||||
int pageNum = 1;
|
||||
int pageSize = CommonConstants.BATCH_SIZE;
|
||||
TpApplyQueryRequest request = new TpApplyQueryRequest();
|
||||
request.setStatus(TpFormStatusEnum.PASS.getStatus());
|
||||
request.setIsPenalty(true);
|
||||
request.setIsDraft(0);
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<TpApplyFormDO> list = tpApplyFormDAO.getEffectiveList(request);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
break;
|
||||
}
|
||||
hasNext = list.size() >= pageSize;
|
||||
List<Long> applyIds = CollStreamUtil.toList(list, TpApplyFormDO::getId);
|
||||
try {
|
||||
tpApplyFormDAO.updateStatusBatch(applyIds, TpFormStatusEnum.EFFECTIVE);
|
||||
} catch (Exception e) {
|
||||
log.error("超过申诉期,更新申请单状态失败", e);
|
||||
}
|
||||
pageNum++;
|
||||
}
|
||||
log.info("------end tpPenaltyAppealOverdue------");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user