puzhibing
2026-04-10 ed838e62602c0a63a64ff4bd144a0d16cc9a7cf8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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);
    }
}