package com.xiaopeng.maintenance.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.xiaopeng.api.model.maintenance.XpWorkOrder;
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.maintenance.service.IXpWorkOrderService;
|
import io.swagger.annotations.Api;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.GetMapping;
|
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;
|
|
/**
|
* <p>
|
* 管理后台 任务规则设置
|
* </p>
|
*
|
* @author mitao
|
* @since 2026-02-03
|
*/
|
@RestController
|
@Slf4j
|
@Api(tags = "管理后台-工单管理")
|
@RequestMapping("/logan/api/v1/workOrder")
|
public class XpWorkOrderFeignController {
|
@Resource
|
private IXpWorkOrderService workOrderService;
|
|
|
/**
|
* 判断工单是否包含这个类型的id
|
* @param id
|
* @return
|
*/
|
@GetMapping("/include")
|
public R<Boolean> include(@RequestParam Long id){
|
long count = workOrderService.count(new LambdaQueryWrapper<XpWorkOrder>().eq(XpWorkOrder::getFeedbackTypeId, id));
|
if(count>0){
|
return R.ok(true);
|
}
|
return R.ok(false);
|
}
|
}
|