mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-17 19:51:53 +08:00
[feat] 新增项目进度管理
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projectschedule;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projectschedule.ProjectScheduleDO;
|
||||
import cn.iocoder.yudao.module.pms.service.projectschedule.ProjectScheduleService;
|
||||
|
||||
@Tag(name = "管理后台 - 项目进度管理")
|
||||
@RestController
|
||||
@RequestMapping("/pms/project-schedule")
|
||||
@Validated
|
||||
public class ProjectScheduleController {
|
||||
|
||||
@Resource
|
||||
private ProjectScheduleService projectScheduleService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目进度管理")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:create')")
|
||||
public CommonResult<Long> createProjectSchedule(@Valid @RequestBody ProjectScheduleSaveReqVO createReqVO) {
|
||||
return success(projectScheduleService.createProjectSchedule(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新项目进度管理")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:update')")
|
||||
public CommonResult<Boolean> updateProjectSchedule(@Valid @RequestBody ProjectScheduleSaveReqVO updateReqVO) {
|
||||
projectScheduleService.updateProjectSchedule(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除项目进度管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:delete')")
|
||||
public CommonResult<Boolean> deleteProjectSchedule(@RequestParam("id") Long id) {
|
||||
projectScheduleService.deleteProjectSchedule(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得项目进度管理")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:query')")
|
||||
public CommonResult<ProjectScheduleRespVO> getProjectSchedule(@RequestParam("id") Long id) {
|
||||
ProjectScheduleDO projectSchedule = projectScheduleService.getProjectSchedule(id);
|
||||
return success(BeanUtils.toBean(projectSchedule, ProjectScheduleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得项目进度管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:query')")
|
||||
public CommonResult<PageResult<ProjectScheduleRespVO>> getProjectSchedulePage(@Valid ProjectSchedulePageReqVO pageReqVO) {
|
||||
PageResult<ProjectScheduleDO> pageResult = projectScheduleService.getProjectSchedulePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectScheduleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出项目进度管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-schedule:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportProjectScheduleExcel(@Valid ProjectSchedulePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ProjectScheduleDO> list = projectScheduleService.getProjectSchedulePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "项目进度管理.xls", "数据", ProjectScheduleRespVO.class,
|
||||
BeanUtils.toBean(list, ProjectScheduleRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 项目进度管理分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProjectSchedulePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "项目id", example = "26813")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "项目负责人")
|
||||
private String projectLeader;
|
||||
|
||||
@Schema(description = "主专业")
|
||||
private String major;
|
||||
|
||||
@Schema(description = "其他专业")
|
||||
private String minorMajors;
|
||||
|
||||
@Schema(description = "其他主要项目组成员")
|
||||
private String minorUserIds;
|
||||
|
||||
@Schema(description = "规模")
|
||||
private String scale;
|
||||
|
||||
@Schema(description = "项目概况")
|
||||
private String survey;
|
||||
|
||||
@Schema(description = "相关批复文件url", example = "https://www.iocoder.cn")
|
||||
private String replyFileUrl;
|
||||
|
||||
@Schema(description = "当前阶段")
|
||||
private String stage;
|
||||
|
||||
@Schema(description = "已完成的项目阶段")
|
||||
private String preStage;
|
||||
|
||||
@Schema(description = "工作进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "外部合同商议时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] contractNegotiationTime;
|
||||
|
||||
@Schema(description = "已完成百分比")
|
||||
private BigDecimal completed;
|
||||
|
||||
@Schema(description = "截至本月累计完成百分比")
|
||||
private BigDecimal accumulatedCompletion;
|
||||
|
||||
@Schema(description = "本月新增完工比")
|
||||
private BigDecimal newlyIncreasedCompletion;
|
||||
|
||||
@Schema(description = "已完成产值")
|
||||
private BigDecimal finishOutput;
|
||||
|
||||
@Schema(description = "本月新增产值")
|
||||
private BigDecimal newlyIncreasedOutput;
|
||||
|
||||
@Schema(description = "累积产值")
|
||||
private BigDecimal accumulatedOutput;
|
||||
|
||||
@Schema(description = "竣工时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] completionTime;
|
||||
|
||||
@Schema(description = "单选")
|
||||
private Boolean choose;
|
||||
|
||||
@Schema(description = "竣工报告附件url", example = "https://www.iocoder.cn")
|
||||
private String completionFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
@Schema(description = "是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户id", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -0,0 +1,132 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 项目进度管理 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProjectScheduleRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28495")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26813")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectLeader;
|
||||
|
||||
@Schema(description = "主专业", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("主专业")
|
||||
private String major;
|
||||
|
||||
@Schema(description = "其他专业")
|
||||
@ExcelProperty("其他专业")
|
||||
private String minorMajors;
|
||||
|
||||
@Schema(description = "其他主要项目组成员")
|
||||
@ExcelProperty("其他主要项目组成员")
|
||||
private String minorUserIds;
|
||||
|
||||
@Schema(description = "规模", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("规模")
|
||||
private String scale;
|
||||
|
||||
@Schema(description = "项目概况", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目概况")
|
||||
private String survey;
|
||||
|
||||
@Schema(description = "相关批复文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("相关批复文件url")
|
||||
private String replyFileUrl;
|
||||
|
||||
@Schema(description = "当前阶段", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("当前阶段")
|
||||
private String stage;
|
||||
|
||||
@Schema(description = "已完成的项目阶段", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("已完成的项目阶段")
|
||||
private String preStage;
|
||||
|
||||
@Schema(description = "工作进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工作进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "外部合同商议时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("外部合同商议时间")
|
||||
private LocalDateTime contractNegotiationTime;
|
||||
|
||||
@Schema(description = "已完成百分比", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("已完成百分比")
|
||||
private BigDecimal completed;
|
||||
|
||||
@Schema(description = "截至本月累计完成百分比")
|
||||
@ExcelProperty("截至本月累计完成百分比")
|
||||
private BigDecimal accumulatedCompletion;
|
||||
|
||||
@Schema(description = "本月新增完工比")
|
||||
@ExcelProperty("本月新增完工比")
|
||||
private BigDecimal newlyIncreasedCompletion;
|
||||
|
||||
@Schema(description = "已完成产值")
|
||||
@ExcelProperty("已完成产值")
|
||||
private BigDecimal finishOutput;
|
||||
|
||||
@Schema(description = "本月新增产值")
|
||||
@ExcelProperty("本月新增产值")
|
||||
private BigDecimal newlyIncreasedOutput;
|
||||
|
||||
@Schema(description = "累积产值")
|
||||
@ExcelProperty("累积产值")
|
||||
private BigDecimal accumulatedOutput;
|
||||
|
||||
@Schema(description = "竣工时间")
|
||||
@ExcelProperty("竣工时间")
|
||||
private LocalDateTime completionTime;
|
||||
|
||||
@Schema(description = "单选")
|
||||
@ExcelProperty("单选")
|
||||
private Boolean choose;
|
||||
|
||||
@Schema(description = "竣工报告附件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("竣工报告附件url")
|
||||
private String completionFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("更新人")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -0,0 +1,116 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 项目进度管理新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProjectScheduleSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28495")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26813")
|
||||
@NotNull(message = "项目id不能为空")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "项目负责人不能为空")
|
||||
private String projectLeader;
|
||||
|
||||
@Schema(description = "主专业", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "主专业不能为空")
|
||||
private String major;
|
||||
|
||||
@Schema(description = "其他专业")
|
||||
private String minorMajors;
|
||||
|
||||
@Schema(description = "其他主要项目组成员")
|
||||
private String minorUserIds;
|
||||
|
||||
@Schema(description = "规模", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "规模不能为空")
|
||||
private String scale;
|
||||
|
||||
@Schema(description = "项目概况", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "项目概况不能为空")
|
||||
private String survey;
|
||||
|
||||
@Schema(description = "相关批复文件url", example = "https://www.iocoder.cn")
|
||||
private String replyFileUrl;
|
||||
|
||||
@Schema(description = "当前阶段", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "当前阶段不能为空")
|
||||
private String stage;
|
||||
|
||||
@Schema(description = "已完成的项目阶段", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "已完成的项目阶段不能为空")
|
||||
private String preStage;
|
||||
|
||||
@Schema(description = "工作进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工作进展不能为空")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "外部合同商议时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "外部合同商议时间不能为空")
|
||||
private LocalDateTime contractNegotiationTime;
|
||||
|
||||
@Schema(description = "已完成百分比", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "已完成百分比不能为空")
|
||||
private BigDecimal completed;
|
||||
|
||||
@Schema(description = "截至本月累计完成百分比")
|
||||
private BigDecimal accumulatedCompletion;
|
||||
|
||||
@Schema(description = "本月新增完工比")
|
||||
private BigDecimal newlyIncreasedCompletion;
|
||||
|
||||
@Schema(description = "已完成产值")
|
||||
private BigDecimal finishOutput;
|
||||
|
||||
@Schema(description = "本月新增产值")
|
||||
private BigDecimal newlyIncreasedOutput;
|
||||
|
||||
@Schema(description = "累积产值")
|
||||
private BigDecimal accumulatedOutput;
|
||||
|
||||
@Schema(description = "竣工时间")
|
||||
private LocalDateTime completionTime;
|
||||
|
||||
@Schema(description = "单选")
|
||||
private Boolean choose;
|
||||
|
||||
@Schema(description = "竣工报告附件url", example = "https://www.iocoder.cn")
|
||||
private String completionFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "创建人不能为空")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "更新人不能为空")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "租户id不能为空")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -14,12 +14,15 @@ public class ProjectDetailDO extends ProjectDO {
|
||||
* 跟踪部门
|
||||
*/
|
||||
private String trackingDepName;
|
||||
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
private String projectManagerName;
|
||||
|
||||
/**
|
||||
* 客户公司
|
||||
*/
|
||||
private String customerCompanyName;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,131 @@
|
||||
package cn.iocoder.yudao.module.pms.dal.dataobject.projectschedule;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 项目进度管理 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("pms_project_schedule")
|
||||
@KeySequence("pms_project_schedule_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProjectScheduleDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectLeader;
|
||||
/**
|
||||
* 主专业
|
||||
*/
|
||||
private String major;
|
||||
/**
|
||||
* 其他专业
|
||||
*/
|
||||
private String minorMajors;
|
||||
/**
|
||||
* 其他主要项目组成员
|
||||
*/
|
||||
private String minorUserIds;
|
||||
/**
|
||||
* 规模
|
||||
*/
|
||||
private String scale;
|
||||
/**
|
||||
* 项目概况
|
||||
*/
|
||||
private String survey;
|
||||
/**
|
||||
* 相关批复文件url
|
||||
*/
|
||||
private String replyFileUrl;
|
||||
/**
|
||||
* 当前阶段
|
||||
*/
|
||||
private String stage;
|
||||
/**
|
||||
* 已完成的项目阶段
|
||||
*/
|
||||
private String preStage;
|
||||
/**
|
||||
* 工作进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 外部合同商议时间
|
||||
*/
|
||||
private LocalDateTime contractNegotiationTime;
|
||||
/**
|
||||
* 已完成百分比
|
||||
*/
|
||||
private BigDecimal completed;
|
||||
/**
|
||||
* 截至本月累计完成百分比
|
||||
*/
|
||||
private BigDecimal accumulatedCompletion;
|
||||
/**
|
||||
* 本月新增完工比
|
||||
*/
|
||||
private BigDecimal newlyIncreasedCompletion;
|
||||
/**
|
||||
* 已完成产值
|
||||
*/
|
||||
private BigDecimal finishOutput;
|
||||
/**
|
||||
* 本月新增产值
|
||||
*/
|
||||
private BigDecimal newlyIncreasedOutput;
|
||||
/**
|
||||
* 累积产值
|
||||
*/
|
||||
private BigDecimal accumulatedOutput;
|
||||
/**
|
||||
* 竣工时间
|
||||
*/
|
||||
private LocalDateTime completionTime;
|
||||
/**
|
||||
* 单选
|
||||
*/
|
||||
private Boolean choose;
|
||||
/**
|
||||
* 竣工报告附件url
|
||||
*/
|
||||
private String completionFileUrl;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updator;
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.pms.dal.mysql.projectschedule;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projectschedule.ProjectScheduleDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo.*;
|
||||
|
||||
/**
|
||||
* 项目进度管理 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectScheduleMapper extends BaseMapperX<ProjectScheduleDO> {
|
||||
|
||||
default PageResult<ProjectScheduleDO> selectPage(ProjectSchedulePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProjectScheduleDO>()
|
||||
.eqIfPresent(ProjectScheduleDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(ProjectScheduleDO::getProjectLeader, reqVO.getProjectLeader())
|
||||
.eqIfPresent(ProjectScheduleDO::getMajor, reqVO.getMajor())
|
||||
.eqIfPresent(ProjectScheduleDO::getMinorMajors, reqVO.getMinorMajors())
|
||||
.eqIfPresent(ProjectScheduleDO::getMinorUserIds, reqVO.getMinorUserIds())
|
||||
.eqIfPresent(ProjectScheduleDO::getScale, reqVO.getScale())
|
||||
.eqIfPresent(ProjectScheduleDO::getSurvey, reqVO.getSurvey())
|
||||
.eqIfPresent(ProjectScheduleDO::getReplyFileUrl, reqVO.getReplyFileUrl())
|
||||
.eqIfPresent(ProjectScheduleDO::getStage, reqVO.getStage())
|
||||
.eqIfPresent(ProjectScheduleDO::getPreStage, reqVO.getPreStage())
|
||||
.eqIfPresent(ProjectScheduleDO::getProgress, reqVO.getProgress())
|
||||
.betweenIfPresent(ProjectScheduleDO::getContractNegotiationTime, reqVO.getContractNegotiationTime())
|
||||
.eqIfPresent(ProjectScheduleDO::getCompleted, reqVO.getCompleted())
|
||||
.eqIfPresent(ProjectScheduleDO::getAccumulatedCompletion, reqVO.getAccumulatedCompletion())
|
||||
.eqIfPresent(ProjectScheduleDO::getNewlyIncreasedCompletion, reqVO.getNewlyIncreasedCompletion())
|
||||
.eqIfPresent(ProjectScheduleDO::getFinishOutput, reqVO.getFinishOutput())
|
||||
.eqIfPresent(ProjectScheduleDO::getNewlyIncreasedOutput, reqVO.getNewlyIncreasedOutput())
|
||||
.eqIfPresent(ProjectScheduleDO::getAccumulatedOutput, reqVO.getAccumulatedOutput())
|
||||
.betweenIfPresent(ProjectScheduleDO::getCompletionTime, reqVO.getCompletionTime())
|
||||
.eqIfPresent(ProjectScheduleDO::getChoose, reqVO.getChoose())
|
||||
.eqIfPresent(ProjectScheduleDO::getCompletionFileUrl, reqVO.getCompletionFileUrl())
|
||||
.eqIfPresent(ProjectScheduleDO::getFinalEditor, reqVO.getFinalEditor())
|
||||
.eqIfPresent(ProjectScheduleDO::getCreator, reqVO.getCreator())
|
||||
.betweenIfPresent(ProjectScheduleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ProjectScheduleDO::getUpdator, reqVO.getUpdator())
|
||||
.betweenIfPresent(ProjectScheduleDO::getUpdateTime, reqVO.getUpdateTime())
|
||||
.eqIfPresent(ProjectScheduleDO::getDeleted, reqVO.getDeleted())
|
||||
.orderByDesc(ProjectScheduleDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.pms.service.projectschedule;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projectschedule.ProjectScheduleDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 项目进度管理 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ProjectScheduleService {
|
||||
|
||||
/**
|
||||
* 创建项目进度管理
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProjectSchedule(@Valid ProjectScheduleSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新项目进度管理
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProjectSchedule(@Valid ProjectScheduleSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除项目进度管理
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProjectSchedule(Long id);
|
||||
|
||||
/**
|
||||
* 获得项目进度管理
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 项目进度管理
|
||||
*/
|
||||
ProjectScheduleDO getProjectSchedule(Long id);
|
||||
|
||||
/**
|
||||
* 获得项目进度管理分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 项目进度管理分页
|
||||
*/
|
||||
PageResult<ProjectScheduleDO> getProjectSchedulePage(ProjectSchedulePageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -0,0 +1,71 @@
|
||||
package cn.iocoder.yudao.module.pms.service.projectschedule;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projectschedule.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projectschedule.ProjectScheduleDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.pms.dal.mysql.projectschedule.ProjectScheduleMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.pms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 项目进度管理 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ProjectScheduleServiceImpl implements ProjectScheduleService {
|
||||
|
||||
@Resource
|
||||
private ProjectScheduleMapper projectScheduleMapper;
|
||||
|
||||
@Override
|
||||
public Long createProjectSchedule(ProjectScheduleSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProjectScheduleDO projectSchedule = BeanUtils.toBean(createReqVO, ProjectScheduleDO.class);
|
||||
projectScheduleMapper.insert(projectSchedule);
|
||||
// 返回
|
||||
return projectSchedule.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProjectSchedule(ProjectScheduleSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProjectScheduleExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProjectScheduleDO updateObj = BeanUtils.toBean(updateReqVO, ProjectScheduleDO.class);
|
||||
projectScheduleMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProjectSchedule(Long id) {
|
||||
// 校验存在
|
||||
validateProjectScheduleExists(id);
|
||||
// 删除
|
||||
projectScheduleMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProjectScheduleExists(Long id) {
|
||||
if (projectScheduleMapper.selectById(id) == null) {
|
||||
throw exception(PROJECT_SCHEDULE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectScheduleDO getProjectSchedule(Long id) {
|
||||
return projectScheduleMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectScheduleDO> getProjectSchedulePage(ProjectSchedulePageReqVO pageReqVO) {
|
||||
return projectScheduleMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user