施工进度概况
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaReportDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaReportDetailBo;
|
||||
import com.ruoyi.oa.service.IOaReportDetailService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/reportDetail")
|
||||
public class OaReportDetailController extends BaseController {
|
||||
|
||||
private final IOaReportDetailService iOaReportDetailService;
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情列表
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaReportDetailVo> list(OaReportDetailBo bo, PageQuery pageQuery) {
|
||||
return iOaReportDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设计项目汇报详情列表
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:export")
|
||||
@Log(title = "设计项目汇报详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaReportDetailBo bo, HttpServletResponse response) {
|
||||
List<OaReportDetailVo> list = iOaReportDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计项目汇报详情", OaReportDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计项目汇报详情详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<OaReportDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iOaReportDetailService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报详情
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:add")
|
||||
@Log(title = "设计项目汇报详情", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaReportDetailBo bo) {
|
||||
return toAjax(iOaReportDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报详情
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:edit")
|
||||
@Log(title = "设计项目汇报详情", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaReportDetailBo bo) {
|
||||
return toAjax(iOaReportDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设计项目汇报详情
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:reportDetail:remove")
|
||||
@Log(title = "设计项目汇报详情", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iOaReportDetailService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.OaReportSummaryVo;
|
||||
import com.ruoyi.oa.domain.bo.OaReportSummaryBo;
|
||||
import com.ruoyi.oa.service.IOaReportSummaryService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/reportSummary")
|
||||
public class OaReportSummaryController extends BaseController {
|
||||
|
||||
private final IOaReportSummaryService iOaReportSummaryService;
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述列表
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaReportSummaryVo> list(OaReportSummaryBo bo, PageQuery pageQuery) {
|
||||
return iOaReportSummaryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设计项目汇报概述列表
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:export")
|
||||
@Log(title = "设计项目汇报概述", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaReportSummaryBo bo, HttpServletResponse response) {
|
||||
List<OaReportSummaryVo> list = iOaReportSummaryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计项目汇报概述", OaReportSummaryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计项目汇报概述详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<OaReportSummaryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iOaReportSummaryService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报概述
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:add")
|
||||
@Log(title = "设计项目汇报概述", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaReportSummaryBo bo) {
|
||||
return toAjax(iOaReportSummaryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报概述
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:edit")
|
||||
@Log(title = "设计项目汇报概述", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaReportSummaryBo bo) {
|
||||
return toAjax(iOaReportSummaryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设计项目汇报概述
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:reportSummary:remove")
|
||||
@Log(title = "设计项目汇报概述", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iOaReportSummaryService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情对象 oa_report_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_report_detail")
|
||||
public class OaReportDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 关联汇报概述ID(oa_report_summary.id)
|
||||
*/
|
||||
private Long summaryId;
|
||||
/**
|
||||
* 设备唯一编号
|
||||
*/
|
||||
private String deviceCode;
|
||||
/**
|
||||
* 设备类别
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 设备生产说明
|
||||
*/
|
||||
private String deviceDescription;
|
||||
/**
|
||||
* 汇报详情内容(含文字、图像说明等)
|
||||
*/
|
||||
private String reportDetail;
|
||||
/**
|
||||
* 关联图像 OSS ID 列表(逗号分隔)
|
||||
*/
|
||||
private String ossIds;
|
||||
/**
|
||||
* 删除标志(0 正常,1 删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述对象 oa_report_summary
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_report_summary")
|
||||
public class OaReportSummary extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 汇报标题
|
||||
*/
|
||||
private String reportTitle;
|
||||
/**
|
||||
* 汇报日期
|
||||
*/
|
||||
private Date reportDate;
|
||||
/**
|
||||
* 汇报人
|
||||
*/
|
||||
private String reporter;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 删除标志(0 正常,1 删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情业务对象 oa_report_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaReportDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联汇报概述ID(oa_report_summary.id)
|
||||
*/
|
||||
@NotNull(message = "关联汇报概述ID(oa_report_summary.id)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long summaryId;
|
||||
|
||||
/**
|
||||
* 设备唯一编号
|
||||
*/
|
||||
@NotBlank(message = "设备唯一编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备类别
|
||||
*/
|
||||
@NotBlank(message = "设备类别不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 设备生产说明
|
||||
*/
|
||||
@NotBlank(message = "设备生产说明不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String deviceDescription;
|
||||
|
||||
/**
|
||||
* 汇报详情内容(含文字、图像说明等)
|
||||
*/
|
||||
@NotBlank(message = "汇报详情内容(含文字、图像说明等)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String reportDetail;
|
||||
|
||||
/**
|
||||
* 关联图像 OSS ID 列表(逗号分隔)
|
||||
*/
|
||||
@NotBlank(message = "关联图像 OSS ID 列表(逗号分隔)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String ossIds;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述业务对象 oa_report_summary
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaReportSummaryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 汇报标题
|
||||
*/
|
||||
@NotBlank(message = "汇报标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String reportTitle;
|
||||
|
||||
/**
|
||||
* 汇报日期
|
||||
*/
|
||||
@NotNull(message = "汇报日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date reportDate;
|
||||
|
||||
/**
|
||||
* 汇报人
|
||||
*/
|
||||
@NotBlank(message = "汇报人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String reporter;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情视图对象 oa_report_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaReportDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联汇报概述ID(oa_report_summary.id)
|
||||
*/
|
||||
@ExcelProperty(value = "关联汇报概述ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "o=a_report_summary.id")
|
||||
private Long summaryId;
|
||||
|
||||
/**
|
||||
* 设备唯一编号
|
||||
*/
|
||||
@ExcelProperty(value = "设备唯一编号")
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备类别
|
||||
*/
|
||||
@ExcelProperty(value = "设备类别")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 设备生产说明
|
||||
*/
|
||||
@ExcelProperty(value = "设备生产说明")
|
||||
private String deviceDescription;
|
||||
|
||||
/**
|
||||
* 汇报详情内容(含文字、图像说明等)
|
||||
*/
|
||||
@ExcelProperty(value = "汇报详情内容", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "含=文字、图像说明等")
|
||||
private String reportDetail;
|
||||
|
||||
/**
|
||||
* 关联图像 OSS ID 列表(逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "关联图像 OSS ID 列表", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "逗=号分隔")
|
||||
private String ossIds;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述视图对象 oa_report_summary
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaReportSummaryVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 汇报标题
|
||||
*/
|
||||
@ExcelProperty(value = "汇报标题")
|
||||
private String reportTitle;
|
||||
|
||||
/**
|
||||
* 汇报日期
|
||||
*/
|
||||
@ExcelProperty(value = "汇报日期")
|
||||
private Date reportDate;
|
||||
|
||||
/**
|
||||
* 汇报人
|
||||
*/
|
||||
@ExcelProperty(value = "汇报人")
|
||||
private String reporter;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ExcelProperty(value = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.oa.domain.OaReportSummary;
|
||||
import com.ruoyi.oa.domain.bo.OaReportSummaryBo;
|
||||
import com.ruoyi.oa.domain.vo.OaReportSummaryVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述Mapper接口
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
public interface OaReportSummaryMapper extends BaseMapperPlus<OaReportSummaryMapper, OaReportSummary, OaReportSummaryVo> {
|
||||
Page<OaReportSummaryVo> selectVoPageWithProject(@Param("page") Page<?> page,
|
||||
@Param("bo") OaReportSummaryBo bo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaReportDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaReportDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaReportDetailBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
public interface IOaReportDetailService {
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情
|
||||
*/
|
||||
OaReportDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情列表
|
||||
*/
|
||||
TableDataInfo<OaReportDetailVo> queryPageList(OaReportDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情列表
|
||||
*/
|
||||
List<OaReportDetailVo> queryList(OaReportDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报详情
|
||||
*/
|
||||
Boolean insertByBo(OaReportDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报详情
|
||||
*/
|
||||
Boolean updateByBo(OaReportDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设计项目汇报详情信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaReportSummary;
|
||||
import com.ruoyi.oa.domain.vo.OaReportSummaryVo;
|
||||
import com.ruoyi.oa.domain.bo.OaReportSummaryBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述Service接口
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
public interface IOaReportSummaryService {
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述
|
||||
*/
|
||||
OaReportSummaryVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述列表
|
||||
*/
|
||||
TableDataInfo<OaReportSummaryVo> queryPageList(OaReportSummaryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述列表
|
||||
*/
|
||||
List<OaReportSummaryVo> queryList(OaReportSummaryBo bo);
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报概述
|
||||
*/
|
||||
Boolean insertByBo(OaReportSummaryBo bo);
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报概述
|
||||
*/
|
||||
Boolean updateByBo(OaReportSummaryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设计项目汇报概述信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaReportDetailBo;
|
||||
import com.ruoyi.oa.domain.vo.OaReportDetailVo;
|
||||
import com.ruoyi.oa.domain.OaReportDetail;
|
||||
import com.ruoyi.oa.mapper.OaReportDetailMapper;
|
||||
import com.ruoyi.oa.service.IOaReportDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设计项目汇报详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaReportDetailServiceImpl implements IOaReportDetailService {
|
||||
|
||||
private final OaReportDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情
|
||||
*/
|
||||
@Override
|
||||
public OaReportDetailVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaReportDetailVo> queryPageList(OaReportDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<OaReportDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报详情列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaReportDetailVo> queryList(OaReportDetailBo bo) {
|
||||
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaReportDetail> buildQueryWrapper(OaReportDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaReportDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getSummaryId() != null, OaReportDetail::getSummaryId, bo.getSummaryId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceCode()), OaReportDetail::getDeviceCode, bo.getDeviceCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCategory()), OaReportDetail::getCategory, bo.getCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceDescription()), OaReportDetail::getDeviceDescription, bo.getDeviceDescription());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReportDetail()), OaReportDetail::getReportDetail, bo.getReportDetail());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOssIds()), OaReportDetail::getOssIds, bo.getOssIds());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报详情
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaReportDetailBo bo) {
|
||||
OaReportDetail add = BeanUtil.toBean(bo, OaReportDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报详情
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaReportDetailBo bo) {
|
||||
OaReportDetail update = BeanUtil.toBean(bo, OaReportDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaReportDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设计项目汇报详情
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaReportSummaryBo;
|
||||
import com.ruoyi.oa.domain.vo.OaReportSummaryVo;
|
||||
import com.ruoyi.oa.domain.OaReportSummary;
|
||||
import com.ruoyi.oa.mapper.OaReportSummaryMapper;
|
||||
import com.ruoyi.oa.service.IOaReportSummaryService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设计项目汇报概述Service业务层处理
|
||||
*
|
||||
* @author cpy
|
||||
* @date 2025-05-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaReportSummaryServiceImpl implements IOaReportSummaryService {
|
||||
|
||||
private final OaReportSummaryMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述
|
||||
*/
|
||||
@Override
|
||||
public OaReportSummaryVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaReportSummaryVo> queryPageList(OaReportSummaryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaReportSummary> lqw = buildQueryWrapper(bo);
|
||||
// Page<OaReportSummaryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<OaReportSummaryVo> result = baseMapper.selectVoPageWithProject(pageQuery.build(), bo);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设计项目汇报概述列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaReportSummaryVo> queryList(OaReportSummaryBo bo) {
|
||||
LambdaQueryWrapper<OaReportSummary> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaReportSummary> buildQueryWrapper(OaReportSummaryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaReportSummary> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReportTitle()), OaReportSummary::getReportTitle, bo.getReportTitle());
|
||||
lqw.eq(bo.getReportDate() != null, OaReportSummary::getReportDate, bo.getReportDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReporter()), OaReportSummary::getReporter, bo.getReporter());
|
||||
lqw.eq(bo.getProjectId() != null, OaReportSummary::getProjectId, bo.getProjectId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设计项目汇报概述
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaReportSummaryBo bo) {
|
||||
OaReportSummary add = BeanUtil.toBean(bo, OaReportSummary.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设计项目汇报概述
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaReportSummaryBo bo) {
|
||||
OaReportSummary update = BeanUtil.toBean(bo, OaReportSummary.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaReportSummary entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设计项目汇报概述
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaReportDetailMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaReportDetail" id="OaReportDetailResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="summaryId" column="summary_id"/>
|
||||
<result property="deviceCode" column="device_code"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="deviceDescription" column="device_description"/>
|
||||
<result property="reportDetail" column="report_detail"/>
|
||||
<result property="ossIds" column="oss_ids"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.OaReportSummaryMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaReportSummary" id="OaReportSummaryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="reportTitle" column="report_title"/>
|
||||
<result property="reportDate" column="report_date"/>
|
||||
<result property="reporter" column="reporter"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectVoPageWithProject" resultType="com.ruoyi.oa.domain.vo.OaReportSummaryVo">
|
||||
SELECT
|
||||
s.id,
|
||||
s.report_title AS reportTitle,
|
||||
s.report_date AS reportDate,
|
||||
s.reporter,
|
||||
s.project_id AS projectId,
|
||||
s.remark,
|
||||
p.project_name AS projectName
|
||||
FROM oa_report_summary s
|
||||
LEFT JOIN sys_oa_project p ON s.project_id = p.project_id
|
||||
<where>
|
||||
<if test="bo.reportTitle != null and bo.reportTitle != ''">
|
||||
AND s.report_title LIKE CONCAT('%', #{bo.reportTitle}, '%')
|
||||
</if>
|
||||
<if test="bo.reportDate != null">
|
||||
AND s.report_date = #{bo.reportDate}
|
||||
</if>
|
||||
<if test="bo.reporter != null and bo.reporter != ''">
|
||||
AND s.reporter LIKE CONCAT('%', #{bo.reporter}, '%')
|
||||
</if>
|
||||
<if test="bo.projectId != null">
|
||||
AND s.project_id = #{bo.projectId}
|
||||
</if>
|
||||
AND s.del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user