liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java
@@ -10,7 +10,6 @@
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrLibaTarget;
import com.smartor.domain.IvrLibaTargetAssort;
import com.smartor.domain.IvrLibaTargetVO;
import com.smartor.service.IIvrLibaTargetService;
import io.swagger.annotations.Api;
@@ -39,7 +38,7 @@
     * 查询指标选项库列表
     */
    @ApiOperation("查询指标列表")
    @PreAuthorize("@ss.hasPermi('system:target:list')")
    //@PreAuthorize("@ss.hasPermi('system:target:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrLibaTarget ivrLibaTarget) {
        PageUtils.startPageByPost(ivrLibaTarget.getPageNum(), ivrLibaTarget.getPageSize());
@@ -50,7 +49,7 @@
    /**
     * 导出指标列表
     */
    @PreAuthorize("@ss.hasPermi('system:target:export')")
    //@PreAuthorize("@ss.hasPermi('system:target:export')")
    @Log(title = "指标库", businessType = BusinessType.EXPORT)
    @ApiOperation("导出指标列表")
    @PostMapping("/export")
@@ -61,19 +60,19 @@
    }
    /**
     * 获取指标信息通过targetID
     * 获取指标信息通过id
     */
    @ApiOperation("获取指标信息通过targetID")
    @PreAuthorize("@ss.hasPermi('system:target:query')")
    @GetMapping(value = "/getInfo/{targetID}")
    public AjaxResult getInfo(@PathVariable("targetID") Long targetID) {
        return success(ivrLibaTargetService.selectIvrLibaTargetByTargetID(targetID));
    @ApiOperation("获取指标信息通过id")
    //@PreAuthorize("@ss.hasPermi('system:target:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(ivrLibaTargetService.selectIvrLibaTargetByTargetID(id));
    }
    /**
     * 新增指标
     */
    @PreAuthorize("@ss.hasPermi('system:target:add')")
    //@PreAuthorize("@ss.hasPermi('system:target:add')")
    @Log(title = "指标选项库", businessType = BusinessType.INSERT)
    @ApiOperation("新增指标(这个接口没啥用了,用”新增或修改指标信息“这个接口好一些)")
    @PostMapping("/add")
@@ -85,7 +84,6 @@
     * 新增或修改指标信息
     */
    @ApiOperation("新增或修改指标信息")
    @PreAuthorize("@ss.hasPermi('system:target:edit')")
    @Log(title = "指标选项库", businessType = BusinessType.UPDATE)
    @PostMapping("/saveOrupdateIvrLibaTarget")
    public AjaxResult saveOrupdateIvrLibaTarget(@RequestBody IvrLibaTargetVO ivrLibaTargetVO) {
@@ -96,18 +94,18 @@
     * 删除指标
     */
    @ApiOperation("删除指标")
    @PreAuthorize("@ss.hasPermi('system:target:remove')")
    //@PreAuthorize("@ss.hasPermi('system:target:remove')")
    @Log(title = "指标选项库", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{targetIDs}")
    public AjaxResult remove(@PathVariable Long[] targetIDs) {
        return toAjax(ivrLibaTargetService.deleteIvrLibaTargetByTargetIDs(targetIDs));
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(ivrLibaTargetService.deleteIvrLibaTargetByTargetIDs(ids));
    }
    /**
     * 查询指标选项库列表
     */
    @ApiOperation("查询指标和关联的指标选项")
    @PreAuthorize("@ss.hasPermi('system:target:list')")
    //@PreAuthorize("@ss.hasPermi('system:target:list')")
    @PostMapping("/targetInfo")
    public TableDataInfo targetInfo(@RequestBody IvrLibaTarget ivrLibaTarget) {
        PageUtils.startPageByPost(ivrLibaTarget.getPageNum(), ivrLibaTarget.getPageSize());
@@ -115,7 +113,9 @@
        List<IvrLibaTargetVO> ivrLibaTargetVOS = ivrLibaTargetService.targetInfo(ivrLibaTarget);
        //用于分页
        List<IvrLibaTarget> ivrLibaTargets = ivrLibaTargetService.selectIvrLibaTargetList(null);
        ivrLibaTarget.setPageNum(null);
        ivrLibaTarget.setPageSize(null);
        List<IvrLibaTarget> ivrLibaTargets = ivrLibaTargetService.selectIvrLibaTargetList(ivrLibaTarget);
        //分页
        TableDataInfo rspData = new TableDataInfo();
        rspData.setCode(HttpStatus.SUCCESS);
@@ -125,4 +125,14 @@
        return rspData;
    }
    /**
     * 指标测试问题匹配
     */
    @ApiOperation("指标测试问题匹配")
    @PostMapping("/targetQuesMate")
    public AjaxResult targetQuesMate(@RequestBody IvrLibaTargetVO ivrLibaTarget) {
        return success(ivrLibaTargetService.targetQuesMate(ivrLibaTarget));
    }
}