- 将表名从"oa_"前缀改为"wms_"前缀 - 更新相关控制器的@RequestMapping路径 - 移除WmsReportSummaryMapper.xml中的projectId查询条件 - 注释掉rxgood页面的"涉及项目"列
110 lines
3.6 KiB
Java
110 lines
3.6 KiB
Java
package com.klp.controller;
|
|
|
|
import com.klp.common.annotation.Log;
|
|
import com.klp.common.annotation.RepeatSubmit;
|
|
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.page.TableDataInfo;
|
|
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.domain.bo.WmsReportDetailBo;
|
|
import com.klp.domain.vo.WmsReportDetailVo;
|
|
import com.klp.service.IWmsReportDetailService;
|
|
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-05-13
|
|
*/
|
|
@Validated
|
|
@RequiredArgsConstructor
|
|
@RestController
|
|
@RequestMapping("/wms/reportDetail")
|
|
public class WmsReportDetailController extends BaseController {
|
|
|
|
private final IWmsReportDetailService IWmsReportDetailService;
|
|
|
|
/**
|
|
* 查询设计项目汇报详情列表
|
|
*/
|
|
@GetMapping("/list")
|
|
public TableDataInfo<WmsReportDetailVo> list(WmsReportDetailBo bo, PageQuery pageQuery) {
|
|
return IWmsReportDetailService.queryPageList(bo, pageQuery);
|
|
}
|
|
|
|
/**
|
|
* 导出设计项目汇报详情列表
|
|
*/
|
|
@Log(title = "设计项目汇报详情", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
public void export(WmsReportDetailBo bo, HttpServletResponse response) {
|
|
List<WmsReportDetailVo> list = IWmsReportDetailService.queryList(bo);
|
|
ExcelUtil.exportExcel(list, "设计项目汇报详情", WmsReportDetailVo.class, response);
|
|
}
|
|
|
|
/**
|
|
* 获取设计项目汇报详情详细信息
|
|
*
|
|
* @param id 主键
|
|
*/
|
|
@GetMapping("/{id}")
|
|
public R<WmsReportDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
|
@PathVariable Long id) {
|
|
return R.ok(IWmsReportDetailService.queryById(id));
|
|
}
|
|
// /**
|
|
// * 获取设计项目汇报详情详细信息
|
|
// *
|
|
// * @param projectId 主键
|
|
// */
|
|
// @GetMapping("/project/{projectId}")
|
|
// public R<List<WmsReportDetailVo>> listReportDetailByProjectId(@NotNull(message = "主键不能为空")
|
|
// @PathVariable Long projectId) {
|
|
// return R.ok(IWmsReportDetailService.queryByProjectId(projectId));
|
|
// }
|
|
|
|
/**
|
|
* 新增设计项目汇报详情
|
|
*/
|
|
@Log(title = "设计项目汇报详情", businessType = BusinessType.INSERT)
|
|
@RepeatSubmit()
|
|
@PostMapping()
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsReportDetailBo bo) {
|
|
return toAjax(IWmsReportDetailService.insertByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 修改设计项目汇报详情
|
|
*/
|
|
@Log(title = "设计项目汇报详情", businessType = BusinessType.UPDATE)
|
|
@RepeatSubmit()
|
|
@PutMapping()
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsReportDetailBo bo) {
|
|
return toAjax(IWmsReportDetailService.updateByBo(bo));
|
|
}
|
|
|
|
/**
|
|
* 删除设计项目汇报详情
|
|
*
|
|
* @param ids 主键串
|
|
*/
|
|
@DeleteMapping("/{ids}")
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
@PathVariable Long[] ids) {
|
|
return toAjax(IWmsReportDetailService.deleteWithValidByIds(Arrays.asList(ids), true));
|
|
}
|
|
}
|