100 lines
3.3 KiB
Java
100 lines
3.3 KiB
Java
|
|
package com.klp.flow.controller;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
import java.util.Arrays;
|
||
|
|
|
||
|
|
import lombok.RequiredArgsConstructor;
|
||
|
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
import javax.validation.constraints.*;
|
||
|
|
import org.springframework.web.bind.annotation.*;
|
||
|
|
import org.springframework.validation.annotation.Validated;
|
||
|
|
import com.klp.common.annotation.RepeatSubmit;
|
||
|
|
import com.klp.common.annotation.Log;
|
||
|
|
import com.klp.common.core.controller.BaseController;
|
||
|
|
import com.klp.common.core.domain.PageQuery;
|
||
|
|
import com.klp.common.core.domain.R;
|
||
|
|
import com.klp.common.core.validate.AddGroup;
|
||
|
|
import com.klp.common.core.validate.EditGroup;
|
||
|
|
import com.klp.common.enums.BusinessType;
|
||
|
|
import com.klp.common.utils.poi.ExcelUtil;
|
||
|
|
import com.klp.flow.domain.vo.TsComplaintAcceptVo;
|
||
|
|
import com.klp.flow.domain.bo.TsComplaintAcceptBo;
|
||
|
|
import com.klp.flow.service.ITsComplaintAcceptService;
|
||
|
|
import com.klp.common.core.page.TableDataInfo;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 投诉受理单主
|
||
|
|
*
|
||
|
|
* @author klp
|
||
|
|
* @date 2026-06-18
|
||
|
|
*/
|
||
|
|
@Validated
|
||
|
|
@RequiredArgsConstructor
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/flow/complaintAccept")
|
||
|
|
public class TsComplaintAcceptController extends BaseController {
|
||
|
|
|
||
|
|
private final ITsComplaintAcceptService iTsComplaintAcceptService;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 查询投诉受理单主列表
|
||
|
|
*/
|
||
|
|
@GetMapping("/list")
|
||
|
|
public TableDataInfo<TsComplaintAcceptVo> list(TsComplaintAcceptBo bo, PageQuery pageQuery) {
|
||
|
|
return iTsComplaintAcceptService.queryPageList(bo, pageQuery);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 导出投诉受理单主列表
|
||
|
|
*/
|
||
|
|
@Log(title = "投诉受理单主", businessType = BusinessType.EXPORT)
|
||
|
|
@PostMapping("/export")
|
||
|
|
public void export(TsComplaintAcceptBo bo, HttpServletResponse response) {
|
||
|
|
List<TsComplaintAcceptVo> list = iTsComplaintAcceptService.queryList(bo);
|
||
|
|
ExcelUtil.exportExcel(list, "投诉受理单主", TsComplaintAcceptVo.class, response);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 获取投诉受理单主详细信息
|
||
|
|
*
|
||
|
|
* @param acceptId 主键
|
||
|
|
*/
|
||
|
|
@GetMapping("/{acceptId}")
|
||
|
|
public R<TsComplaintAcceptVo> getInfo(@NotNull(message = "主键不能为空")
|
||
|
|
@PathVariable Long acceptId) {
|
||
|
|
return R.ok(iTsComplaintAcceptService.queryById(acceptId));
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 新增投诉受理单主
|
||
|
|
*/
|
||
|
|
@Log(title = "投诉受理单主", businessType = BusinessType.INSERT)
|
||
|
|
@RepeatSubmit()
|
||
|
|
@PostMapping()
|
||
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody TsComplaintAcceptBo bo) {
|
||
|
|
return toAjax(iTsComplaintAcceptService.insertByBo(bo));
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 修改投诉受理单主
|
||
|
|
*/
|
||
|
|
@Log(title = "投诉受理单主", businessType = BusinessType.UPDATE)
|
||
|
|
@RepeatSubmit()
|
||
|
|
@PutMapping()
|
||
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TsComplaintAcceptBo bo) {
|
||
|
|
return toAjax(iTsComplaintAcceptService.updateByBo(bo));
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 删除投诉受理单主
|
||
|
|
*
|
||
|
|
* @param acceptIds 主键串
|
||
|
|
*/
|
||
|
|
@Log(title = "投诉受理单主", businessType = BusinessType.DELETE)
|
||
|
|
@DeleteMapping("/{acceptIds}")
|
||
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||
|
|
@PathVariable Long[] acceptIds) {
|
||
|
|
return toAjax(iTsComplaintAcceptService.deleteWithValidByIds(Arrays.asList(acceptIds), true));
|
||
|
|
}
|
||
|
|
}
|