- 新增物流预览(OaExpress)相关实体、控制器、服务和映射 - 新增快递问题(OaExpressQuestion)相关实体、控制器、服务和映射 - 实现物流预览和快递问题的增删查改功能 - 添加物流预览的及时更新功能- 新增问题反馈(OaFeedback)和服务接口 - 新增项目报工(OaReport)和服务接口 - 添加百世快递路由查询工具类
123 lines
3.5 KiB
Java
123 lines
3.5 KiB
Java
package com.gear.oa.controller;
|
|
|
|
import com.gear.common.annotation.RepeatSubmit;
|
|
import com.gear.common.core.controller.BaseController;
|
|
import com.gear.common.core.domain.PageQuery;
|
|
import com.gear.common.core.domain.R;
|
|
import com.gear.common.core.page.TableDataInfo;
|
|
import com.gear.common.core.validate.AddGroup;
|
|
import com.gear.common.core.validate.EditGroup;
|
|
import com.gear.common.utils.poi.ExcelUtil;
|
|
import com.gear.oa.domain.bo.OaFeedbackBo;
|
|
import com.gear.oa.domain.vo.OaFeedbackVo;
|
|
import com.gear.oa.service.IOaFeedbackService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.constraints.NotEmpty;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 问题反馈
|
|
*
|
|
* @author ruoyi
|
|
* @date 2025-03-28
|
|
*/
|
|
@Validated
|
|
@RequiredArgsConstructor
|
|
@RestController
|
|
@RequestMapping("/oa/feedback")
|
|
public class OaFeedbackController extends BaseController {
|
|
|
|
private final IOaFeedbackService iOaFeedbackService;
|
|
|
|
/**
|
|
* 查询问题反馈列表
|
|
*/
|
|
@GetMapping("/list")
|
|
public TableDataInfo<OaFeedbackVo> list(OaFeedbackBo bo, PageQuery pageQuery) {
|
|
return iOaFeedbackService.queryPageList(bo, pageQuery);
|
|
}
|
|
|
|
/**
|
|
* 查询问题反馈列表
|
|
*/
|
|
@GetMapping("/index-list")
|
|
public TableDataInfo<OaFeedbackVo> indexList(OaFeedbackBo bo, PageQuery pageQuery) {
|
|
return iOaFeedbackService.indexQueryList(bo, pageQuery);
|
|
}
|
|
|
|
/**
|
|
* 导出问题反馈列表
|
|
*/
|
|
@PostMapping("/export")
|
|
public void export(OaFeedbackBo bo, HttpServletResponse response) {
|
|
List<OaFeedbackVo> list = iOaFeedbackService.queryList(bo);
|
|
ExcelUtil.exportExcel(list, "问题反馈", OaFeedbackVo.class, response);
|
|
}
|
|
|
|
/**
|
|
* 获取问题反馈详细信息
|
|
*
|
|
* @param feedbackId 主键
|
|
*/
|
|
@GetMapping("/{feedbackId}")
|
|
public R<OaFeedbackVo> getInfo(@NotNull(message = "主键不能为空")
|
|
@PathVariable Long feedbackId) {
|
|
return R.ok(iOaFeedbackService.queryById(feedbackId));
|
|
}
|
|
|
|
/**
|
|
* 新增问题反馈
|
|
*/
|
|
@RepeatSubmit()
|
|
@PostMapping()
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaFeedbackBo bo) {
|
|
return toAjax(iOaFeedbackService.insertByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 修改问题反馈
|
|
*/
|
|
@RepeatSubmit()
|
|
@PutMapping()
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaFeedbackBo bo) {
|
|
return toAjax(iOaFeedbackService.updateByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 删除问题反馈
|
|
*
|
|
* @param feedbackIds 主键串
|
|
*/
|
|
@DeleteMapping("/{feedbackIds}")
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
@PathVariable Long[] feedbackIds) {
|
|
return toAjax(iOaFeedbackService.deleteWithValidByIds(Arrays.asList(feedbackIds), true));
|
|
}
|
|
/**
|
|
* 删除问题反馈
|
|
*
|
|
* @param feedbackId 主键
|
|
*/
|
|
@DeleteMapping("/remove/{feedbackId}")
|
|
public R<Void> removeItem(@PathVariable("feedbackId") Long feedbackId) {
|
|
return toAjax(iOaFeedbackService.delItem(feedbackId));
|
|
}
|
|
|
|
|
|
/**
|
|
* 修改问题反馈
|
|
*/
|
|
@RepeatSubmit()
|
|
@PutMapping("/toRead")
|
|
public R<Void> toRead(@Validated(EditGroup.class) @RequestBody OaFeedbackBo bo) {
|
|
return toAjax(iOaFeedbackService.updateToRead(bo));
|
|
}
|
|
|
|
}
|