@@ -130,6 +130,7 @@ public enum OperateType { | |||
AGENCY_STATUS("渠道状态变更"), | |||
//解除车牌占用 | |||
RELEASE_PLATE_APPLY("解除车牌占用申请"), | |||
RELEASE_PLATE_REVIEW("解除车牌审核"), | |||
; | |||
private final String value; |
@@ -1,5 +1,6 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ias.ass; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||
import lombok.Getter; | |||
@@ -17,7 +18,7 @@ import javax.validation.constraints.NotNull; | |||
@Setter | |||
public class ReleasePlateReviewRequest extends AbstractSignTypeRequest<ReleasePlateReviewResponse> { | |||
protected ReleasePlateReviewRequest() { | |||
public ReleasePlateReviewRequest() { | |||
super(AssServiceCmd.RELEASEPLATEREVIEW); | |||
} | |||
@@ -29,6 +30,11 @@ public class ReleasePlateReviewRequest extends AbstractSignTypeRequest<ReleasePl | |||
private String failReason;//审核不通过原因 | |||
@NotNull | |||
private SourceType sourceIn;//来源 | |||
@NotBlank | |||
private String openId;//审核人openId | |||
public void relatedValid(ErrorMsgBuilder builder) { | |||
if (pass == 0) { | |||
builder.validFieldTrue("failReason", hasText(failReason), "审核不通过时,审核不通过原因不能为空"); |
@@ -10,4 +10,6 @@ import cn.com.taiji.core.entity.ass.AssVehicleRelieve; | |||
* @description: | |||
*/ | |||
public interface AssVehicleRelieveRepo extends AbstractJpaRepo<AssVehicleRelieve, String> { | |||
AssVehicleRelieve findByOrderNo(String assOrderNo); | |||
} |
@@ -0,0 +1,77 @@ | |||
package cn.com.taiji.managew.api.ass; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.web.ApiResponse; | |||
import cn.com.taiji.managew.api.MyValidController; | |||
import cn.com.taiji.managew.dto.ass.ReleasePlateReviewRequestDTO; | |||
import cn.com.taiji.managew.manager.ass.ReleasePlateManager; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import javax.validation.Valid; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/8/9 9:41 | |||
* @Filename:ReleasePlateController | |||
* @description: | |||
*/ | |||
@Api(tags = {"售后-解除车牌占用"}) | |||
@RestController | |||
@RequestMapping("/api/afterSale/releasePlate") | |||
public class ReleasePlateController extends MyValidController { | |||
@Autowired | |||
private ReleasePlateManager releasePlateManager; | |||
// @ApiOperation("订单申请") | |||
// @PostMapping("/apply") | |||
// public ApiResponse<Void> apply(@Validated @RequestBody RealsePlateRequestDTO req) throws ManagerException { | |||
// releasePlateManager.apply(req); | |||
// return ApiResponse.success(); | |||
// } | |||
@ApiOperation("申请解除车牌审核") | |||
@PostMapping("/review") | |||
public ApiResponse<Void> review(@Valid @RequestBody ReleasePlateReviewRequestDTO req) throws ManagerException { | |||
releasePlateManager.review(req); | |||
return ApiResponse.success(); | |||
} | |||
// //用户查询、列表 | |||
// @ApiOperation("解除车牌占用列表") | |||
// @PostMapping("/list") | |||
// public ApiResponse<ReleasePlateListResponDTO> list(@Validated @RequestBody ReleasePlateListRequestDTO req) throws ManagerException { | |||
// ReleasePlateListResponDTO responDTO = releasePlateManager.list(req); | |||
// return ApiResponse.of(responDTO); | |||
// } | |||
// | |||
// //客服查询、列表 | |||
// @ApiOperation("客服查询列表") | |||
// @PostMapping("/relesePlateList") | |||
// public ApiResponse<ReleasePlateListResponDTO> relesePlateList(@Validated @RequestBody RelesePlateListkfRequestDTO req) throws ManagerException { | |||
// ReleasePlateListResponDTO responDTO = releasePlateManager.relesePlateList(req); | |||
// return ApiResponse.of(responDTO); | |||
// } | |||
// | |||
// @ApiOperation("单一订单查询") | |||
// @PostMapping("/view") | |||
// public ApiResponse<ReleasePlateDetailResponseDTO> view(@Validated @RequestBody ReleasePlateDetailRequestDTO req) throws ManagerException { | |||
// ReleasePlateDetailResponseDTO response = releasePlateManager.detail(req); | |||
// return ApiResponse.of(response); | |||
// } | |||
// | |||
// // App通过车牌号车牌颜色查询占用情况 | |||
// @ApiOperation("车牌占用情况查询") | |||
// @PostMapping("/occupyQuery") | |||
// public ApiResponse<ReleasePlateQueryResponsetDTO> occupyQuery(@Valid @RequestBody ReleasePlateQueryRequestDTO req) throws ManagerException { | |||
// ReleasePlateQueryResponsetDTO res = releasePlateManager.occupyQuery(req); | |||
// return ApiResponse.of(res); | |||
// } | |||
} |
@@ -0,0 +1,35 @@ | |||
package cn.com.taiji.managew.dto.ass; | |||
import cn.com.taiji.common.pub.StringTools; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.core.dto.AbstractStaffBizRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
@Data | |||
@ApiModel(description = "售后订单-解除车牌占用审核") | |||
public class ReleasePlateReviewRequestDTO extends AbstractStaffBizRequestDTO { | |||
@ApiModelProperty(value = "售后订单编号", required = true) | |||
@NotBlank | |||
private String orderNo; | |||
@ApiModelProperty(value = "是否通过 0否1是", required = true) | |||
@NotNull | |||
private Integer pass; | |||
@ApiModelProperty(value = "审核不通过原因", required = true) | |||
private String failReason; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
super.validate(validator); | |||
if (pass == 0) { | |||
validator.validField("failReason",StringTools.isEmpty(failReason), "审核不通过时,审核不通过原因不能为空"); | |||
} | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
package cn.com.taiji.managew.manager.ass; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.managew.dto.ass.ReleasePlateReviewRequestDTO; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/8/12 9:20 | |||
* @Filename:ReleasePlateManager | |||
* @description: | |||
*/ | |||
public interface ReleasePlateManager { | |||
void review(ReleasePlateReviewRequestDTO req) throws ManagerException; | |||
} |
@@ -0,0 +1,29 @@ | |||
package cn.com.taiji.managew.manager.ass; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.core.entity.dict.log.OperateType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ReleasePlateReviewRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.ass.ReleasePlateReviewResponse; | |||
import cn.com.taiji.managew.dto.ass.ReleasePlateReviewRequestDTO; | |||
import cn.com.taiji.managew.manager.AbstractManagewManager; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/8/12 9:21 | |||
* @Filename:ReleasePlateManagerImpl | |||
* @description: | |||
*/ | |||
@Service | |||
public class ReleasePlateManagerImpl extends AbstractManagewManager implements ReleasePlateManager{ | |||
@Override | |||
public void review(ReleasePlateReviewRequestDTO req) throws ManagerException { | |||
ReleasePlateReviewRequest request = copyProperties(req, new ReleasePlateReviewRequest()); | |||
request.setSourceIn(req.getOrderSource()); | |||
request.setOpenId(findOpenIdByToken(req.getAccessToken())); | |||
ReleasePlateReviewResponse response = jsonPostRepeat(request); | |||
sysPersistOperateLog(OperateType.RELEASE_PLATE_REVIEW,response.getId(),req.getOrderSource(),findOpenIdByToken(req.getAccessToken()),"解除车牌占用审核"); | |||
} | |||
} |