进度控制开发,任务模式bug修正
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressDetailBo;
|
||||
import com.ruoyi.oa.domain.bo.SysOaProjectBo;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressDetailVo;
|
||||
import com.ruoyi.oa.domain.vo.SysOaProjectVo;
|
||||
import com.ruoyi.oa.service.IOaProgressDetailService;
|
||||
import com.ruoyi.oa.service.ISysOaProjectService;
|
||||
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.OaProgressVo;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressBo;
|
||||
import com.ruoyi.oa.service.IOaProgressService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 进度管理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/progress")
|
||||
public class OaProgressController extends BaseController {
|
||||
|
||||
private final IOaProgressService iOaProgressService;
|
||||
|
||||
private final ISysOaProjectService projectService;
|
||||
|
||||
private final IOaProgressDetailService detailService;
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaProgressVo> list(OaProgressBo bo, PageQuery pageQuery) {
|
||||
return iOaProgressService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@GetMapping("/one-list")
|
||||
public TableDataInfo<SysOaProjectVo> oneList(SysOaProjectBo bo, PageQuery pageQuery) {
|
||||
return projectService.queryPageList2(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@GetMapping("/two-list")
|
||||
public TableDataInfo<OaProgressVo> twoList(OaProgressBo bo, PageQuery pageQuery) {
|
||||
bo.setParentId(0L);
|
||||
return iOaProgressService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@GetMapping("/three-list")
|
||||
public TableDataInfo<OaProgressVo> threeList(OaProgressBo bo, PageQuery pageQuery) {
|
||||
return iOaProgressService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@GetMapping("/four-list")
|
||||
public TableDataInfo<OaProgressDetailVo> fourList(OaProgressDetailBo bo, PageQuery pageQuery) {
|
||||
return detailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出进度管理列表
|
||||
*/
|
||||
@Log(title = "进度管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaProgressBo bo, HttpServletResponse response) {
|
||||
List<OaProgressVo> list = iOaProgressService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "进度管理", OaProgressVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取进度管理详细信息
|
||||
*
|
||||
* @param progressId 主键
|
||||
*/
|
||||
@GetMapping("/{progressId}")
|
||||
public R<OaProgressVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long progressId) {
|
||||
return R.ok(iOaProgressService.queryById(progressId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增进度管理
|
||||
*/
|
||||
@Log(title = "进度管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaProgressBo bo) {
|
||||
return toAjax(iOaProgressService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改进度管理
|
||||
*/
|
||||
@Log(title = "进度管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaProgressBo bo) {
|
||||
return toAjax(iOaProgressService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除进度管理
|
||||
*
|
||||
* @param progressIds 主键串
|
||||
*/
|
||||
@Log(title = "进度管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{progressIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] progressIds) {
|
||||
return toAjax(iOaProgressService.deleteWithValidByIds(Arrays.asList(progressIds), true));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/key-list")
|
||||
public R<List<OaProgressDetail>> getKeyList() {
|
||||
return R.ok(iOaProgressService.getKeyList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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.OaProgressDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressDetailBo;
|
||||
import com.ruoyi.oa.service.IOaProgressDetailService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 进度扩展
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/progressDetail")
|
||||
public class OaProgressDetailController extends BaseController {
|
||||
|
||||
private final IOaProgressDetailService iOaProgressDetailService;
|
||||
|
||||
/**
|
||||
* 查询进度扩展列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<OaProgressDetailVo> list(OaProgressDetailBo bo, PageQuery pageQuery) {
|
||||
return iOaProgressDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出进度扩展列表
|
||||
*/
|
||||
@Log(title = "进度扩展", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(OaProgressDetailBo bo, HttpServletResponse response) {
|
||||
List<OaProgressDetailVo> list = iOaProgressDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "进度扩展", OaProgressDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取进度扩展详细信息
|
||||
*
|
||||
* @param detailId 主键
|
||||
*/
|
||||
@GetMapping("/{detailId}")
|
||||
public R<OaProgressDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long detailId) {
|
||||
return R.ok(iOaProgressDetailService.queryById(detailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增进度扩展
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody OaProgressDetailBo bo) {
|
||||
return toAjax(iOaProgressDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改进度扩展
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OaProgressDetailBo bo) {
|
||||
return toAjax(iOaProgressDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除进度扩展
|
||||
*
|
||||
* @param detailIds 主键串
|
||||
*/
|
||||
@DeleteMapping("/{detailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] detailIds) {
|
||||
return toAjax(iOaProgressDetailService.deleteWithValidByIds(Arrays.asList(detailIds), true));
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,6 @@ public class SysOaProjectController extends BaseController {
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
@SaCheckPermission("oa:project:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<SysOaProjectVo> list(SysOaProjectBo bo, PageQuery pageQuery) {
|
||||
return iSysOaProjectService.queryPageList(bo, pageQuery);
|
||||
@@ -57,7 +56,6 @@ public class SysOaProjectController extends BaseController {
|
||||
/**
|
||||
* 导出项目管理列表
|
||||
*/
|
||||
@SaCheckPermission("oa:project:export")
|
||||
@Log(title = "项目管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SysOaProjectBo bo, HttpServletResponse response) {
|
||||
@@ -70,7 +68,6 @@ public class SysOaProjectController extends BaseController {
|
||||
*
|
||||
* @param projectId 主键
|
||||
*/
|
||||
@SaCheckPermission("oa:project:query")
|
||||
@GetMapping("/{projectId}")
|
||||
public R<SysOaProjectVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@@ -101,7 +98,6 @@ public class SysOaProjectController extends BaseController {
|
||||
/**
|
||||
* 新增项目管理
|
||||
*/
|
||||
@SaCheckPermission("oa:project:add")
|
||||
@Log(title = "项目管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@@ -112,7 +108,6 @@ public class SysOaProjectController extends BaseController {
|
||||
/**
|
||||
* 修改项目管理
|
||||
*/
|
||||
@SaCheckPermission("oa:project:edit")
|
||||
@Log(title = "项目管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@@ -126,7 +121,6 @@ public class SysOaProjectController extends BaseController {
|
||||
*
|
||||
* @param projectIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("oa:project:remove")
|
||||
@Log(title = "项目管理", businessType = BusinessType.DELETE)
|
||||
@DSTransactional
|
||||
@DeleteMapping("/{projectIds}")
|
||||
@@ -138,7 +132,6 @@ public class SysOaProjectController extends BaseController {
|
||||
/**
|
||||
* 查询项目是否存在出库记录
|
||||
*/
|
||||
@SaCheckPermission("oa:project:list")
|
||||
@GetMapping("/outWare/list")
|
||||
public TableDataInfo<SysOaOutWarehouseListVo> outWareList(SysOaWarehouseDetailBo bo, PageQuery pageQuery) {
|
||||
return iSysOaProjectService.queryOutWarePageList(bo, pageQuery);
|
||||
|
||||
75
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/OaProgress.java
Normal file
75
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/OaProgress.java
Normal file
@@ -0,0 +1,75 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 进度管理对象 oa_progress
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_progress")
|
||||
public class OaProgress extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "progress_id")
|
||||
private Long progressId;
|
||||
/**
|
||||
* 所属项目ID(可根据实际需要)
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 进度类型:1-项目进度;2-付款进度(可根据实际约定)
|
||||
*/
|
||||
private Long type;
|
||||
/**
|
||||
* 进度名称
|
||||
*/
|
||||
private String progressName;
|
||||
/**
|
||||
* 父进度ID,0或NULL表示没有父节点
|
||||
*/
|
||||
private Long parentId;
|
||||
/**
|
||||
* 删除标志:0-正常;1-删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
/**
|
||||
* 排序字段(如需)
|
||||
*/
|
||||
private Long sort;
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String timeRemark;
|
||||
|
||||
/**
|
||||
* 状态位
|
||||
*/
|
||||
private Long status;
|
||||
/**
|
||||
* 套数
|
||||
*/
|
||||
private Long amount;
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 进度扩展对象 oa_progress_detail
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("oa_progress_detail")
|
||||
public class OaProgressDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "detail_id")
|
||||
private Long detailId;
|
||||
/**
|
||||
* 关联的进度ID,关联 project_progress.id
|
||||
*/
|
||||
private Long progressId;
|
||||
/**
|
||||
* 子进度名称
|
||||
*/
|
||||
private String detailName;
|
||||
/**
|
||||
* 计划开始日期(项目进度)
|
||||
*/
|
||||
private Date planStartDate;
|
||||
/**
|
||||
* 计划结束日期(项目进度)
|
||||
*/
|
||||
private Date planEndDate;
|
||||
/**
|
||||
* 实际开始日期(项目进度)
|
||||
*/
|
||||
private Date actualStartDate;
|
||||
/**
|
||||
* 实际结束日期(项目进度)
|
||||
*/
|
||||
private Date actualEndDate;
|
||||
/**
|
||||
* 完成百分比(项目进度)
|
||||
*/
|
||||
private BigDecimal completePercent;
|
||||
/**
|
||||
* 计划付款日期(付款进度)
|
||||
*/
|
||||
private Date planPayDate;
|
||||
/**
|
||||
* 应付金额(付款进度)
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
/**
|
||||
* 已付金额(付款进度)
|
||||
*/
|
||||
private BigDecimal paidAmount;
|
||||
/**
|
||||
* 删除标志:0-正常;1-删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 子进度状态
|
||||
*/
|
||||
private Long detailStatus;
|
||||
|
||||
private String department;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 进度管理业务对象 oa_progress
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaProgressBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long progressId;
|
||||
|
||||
/**
|
||||
* 所属项目ID(可根据实际需要)
|
||||
*/
|
||||
@NotNull(message = "所属项目ID(可根据实际需要)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 进度类型:1-项目进度;2-付款进度(可根据实际约定)
|
||||
*/
|
||||
private Long type;
|
||||
|
||||
/**
|
||||
* 进度名称
|
||||
*/
|
||||
private String progressName;
|
||||
|
||||
/**
|
||||
* 父进度ID,0或NULL表示没有父节点
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 排序字段(如需)
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String timeRemark;
|
||||
|
||||
/**
|
||||
* 状态位
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 套数
|
||||
*/
|
||||
private Long amount;
|
||||
|
||||
private List<OaProgressDetailBo> detailList;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 进度扩展业务对象 oa_progress_detail
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OaProgressDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 关联的进度ID,关联 project_progress.id
|
||||
*/
|
||||
private Long progressId;
|
||||
|
||||
/**
|
||||
* 子进度名称
|
||||
*/
|
||||
private String detailName;
|
||||
|
||||
/**
|
||||
* 计划开始日期(项目进度)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planStartDate;
|
||||
|
||||
/**
|
||||
* 计划结束日期(项目进度)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planEndDate;
|
||||
|
||||
/**
|
||||
* 实际开始日期(项目进度)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualStartDate;
|
||||
|
||||
/**
|
||||
* 实际结束日期(项目进度)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date actualEndDate;
|
||||
|
||||
/**
|
||||
* 完成百分比(项目进度)
|
||||
*/
|
||||
private BigDecimal completePercent;
|
||||
|
||||
/**
|
||||
* 计划付款日期(付款进度)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date planPayDate;
|
||||
|
||||
/**
|
||||
* 应付金额(付款进度)
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 已付金额(付款进度)
|
||||
*/
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 子进度状态
|
||||
*/
|
||||
private Long detailStatus;
|
||||
|
||||
/**
|
||||
* 负责部门
|
||||
*/
|
||||
private String department;
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -119,5 +119,6 @@ public class EmployeeOffboardingVo {
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
private List<EmployeeFilesVo> fileList;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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_progress_detail
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaProgressDetailVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 关联的进度ID,关联 project_progress.id
|
||||
*/
|
||||
@ExcelProperty(value = "关联的进度ID,关联 project_progress.id")
|
||||
private Long progressId;
|
||||
|
||||
/**
|
||||
* 子进度名称
|
||||
*/
|
||||
@ExcelProperty(value = "子进度名称")
|
||||
private String detailName;
|
||||
|
||||
/**
|
||||
* 计划开始日期(项目进度)
|
||||
*/
|
||||
@ExcelProperty(value = "计划开始日期(项目进度)")
|
||||
private Date planStartDate;
|
||||
|
||||
/**
|
||||
* 计划结束日期(项目进度)
|
||||
*/
|
||||
@ExcelProperty(value = "计划结束日期(项目进度)")
|
||||
private Date planEndDate;
|
||||
|
||||
/**
|
||||
* 实际开始日期(项目进度)
|
||||
*/
|
||||
@ExcelProperty(value = "实际开始日期(项目进度)")
|
||||
private Date actualStartDate;
|
||||
|
||||
/**
|
||||
* 实际结束日期(项目进度)
|
||||
*/
|
||||
@ExcelProperty(value = "实际结束日期(项目进度)")
|
||||
private Date actualEndDate;
|
||||
|
||||
/**
|
||||
* 完成百分比(项目进度)
|
||||
*/
|
||||
@ExcelProperty(value = "完成百分比(项目进度)")
|
||||
private BigDecimal completePercent;
|
||||
|
||||
/**
|
||||
* 计划付款日期(付款进度)
|
||||
*/
|
||||
@ExcelProperty(value = "计划付款日期(付款进度)")
|
||||
private Date planPayDate;
|
||||
|
||||
/**
|
||||
* 应付金额(付款进度)
|
||||
*/
|
||||
@ExcelProperty(value = "应付金额(付款进度)")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 已付金额(付款进度)
|
||||
*/
|
||||
@ExcelProperty(value = "已付金额(付款进度)")
|
||||
private BigDecimal paidAmount;
|
||||
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
@ExcelProperty(value = "备注(如需)")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 子进度状态
|
||||
*/
|
||||
@ExcelProperty(value = "子进度状态")
|
||||
private Long detailStatus;
|
||||
|
||||
/**
|
||||
* 负责部门
|
||||
*/
|
||||
private String department;
|
||||
|
||||
private Long remainTime;
|
||||
|
||||
}
|
||||
111
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/OaProgressVo.java
Normal file
111
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/OaProgressVo.java
Normal file
@@ -0,0 +1,111 @@
|
||||
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 com.ruoyi.oa.domain.OaProgress;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 进度管理视图对象 oa_progress
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OaProgressVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long progressId;
|
||||
|
||||
/**
|
||||
* 所属项目ID(可根据实际需要)
|
||||
*/
|
||||
@ExcelProperty(value = "所属项目ID(可根据实际需要)")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 所属项目ID(可根据实际需要)
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 所属项目ID(可根据实际需要)
|
||||
*/
|
||||
private String projectNum;
|
||||
|
||||
/**
|
||||
* 进度类型:1-项目进度;2-付款进度(可根据实际约定)
|
||||
*/
|
||||
@ExcelProperty(value = "进度类型:1-项目进度;2-付款进度(可根据实际约定)")
|
||||
private Long type;
|
||||
|
||||
/**
|
||||
* 进度名称
|
||||
*/
|
||||
@ExcelProperty(value = "进度名称")
|
||||
private String progressName;
|
||||
|
||||
/**
|
||||
* 父进度ID,0或NULL表示没有父节点
|
||||
*/
|
||||
@ExcelProperty(value = "父进度ID,0或NULL表示没有父节点")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 排序字段(如需)
|
||||
*/
|
||||
@ExcelProperty(value = "排序字段(如需)")
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
@ExcelProperty(value = "备注(如需)")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 备注(如需)
|
||||
*/
|
||||
private String timeRemark;
|
||||
|
||||
/**
|
||||
* 状态位
|
||||
*/
|
||||
@ExcelProperty(value = "状态位")
|
||||
private Long status;
|
||||
|
||||
/**
|
||||
* 套数
|
||||
*/
|
||||
private Long amount;
|
||||
|
||||
private List<OaProgressVo> children;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
// 新增统计字段
|
||||
private Long progressSize;
|
||||
private Long finishCount;
|
||||
private Double completionPercent;
|
||||
private Long remainTime;
|
||||
private Double detailCompletePercent;
|
||||
private String nowLevel;
|
||||
private Long nowLevelId;
|
||||
// 项目合同金额
|
||||
private Double funds;
|
||||
|
||||
}
|
||||
@@ -11,6 +11,8 @@ import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import com.ruoyi.oa.domain.SysOaTask;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -23,6 +25,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@NoArgsConstructor
|
||||
public class SysOaProjectVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -219,4 +222,6 @@ public class SysOaProjectVo {
|
||||
* 最近更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private List<OaProgressVo> progressList;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,6 @@ public class UserFilesVo {
|
||||
private String phonenumber;
|
||||
|
||||
private List<EmployeeFilesVo> fileList;
|
||||
|
||||
private String files;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressDetailVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 进度扩展Mapper接口
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface OaProgressDetailMapper extends BaseMapperPlus<OaProgressDetailMapper, OaProgressDetail, OaProgressDetailVo> {
|
||||
|
||||
Page<OaProgressDetailVo> selectVoPagePlus(@Param("page") Page<Object> build,@Param(Constants.WRAPPER) LambdaQueryWrapper<OaProgressDetail> lqw);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.oa.domain.OaProgress;
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 进度管理Mapper接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface OaProgressMapper extends BaseMapperPlus<OaProgressMapper, OaProgress, OaProgressVo> {
|
||||
|
||||
/**
|
||||
* 获取关键字列表
|
||||
* @return
|
||||
*/
|
||||
List<OaProgressDetail> getKeyList();
|
||||
|
||||
Page<OaProgressVo> selectVoPagePlus(@Param("page") Page<Object> build,@Param(Constants.WRAPPER) QueryWrapper<OaProgress> lqw);
|
||||
}
|
||||
@@ -42,4 +42,5 @@ public interface SysOaProjectMapper extends BaseMapperPlus<SysOaProjectMapper, S
|
||||
|
||||
Page<SysOaProjectVo> selectFileVoList(@Param("page") Page<Object> build, @Param(Constants.WRAPPER) QueryWrapper<SysOaProject> sysOaProjectQueryWrapper);
|
||||
|
||||
Page<SysOaProjectVo> selectVoAndProgress(@Param("page") Page<Object> build, @Param(Constants.WRAPPER) LambdaQueryWrapper<SysOaProject> sysOaProjectQueryWrapper);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressDetailVo;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressDetailBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 进度扩展Service接口
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface IOaProgressDetailService {
|
||||
|
||||
/**
|
||||
* 查询进度扩展
|
||||
*/
|
||||
OaProgressDetailVo queryById(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询进度扩展列表
|
||||
*/
|
||||
TableDataInfo<OaProgressDetailVo> queryPageList(OaProgressDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询进度扩展列表
|
||||
*/
|
||||
List<OaProgressDetailVo> queryList(OaProgressDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增进度扩展
|
||||
*/
|
||||
Boolean insertByBo(OaProgressDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改进度扩展
|
||||
*/
|
||||
Boolean updateByBo(OaProgressDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除进度扩展信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressVo;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 进度管理Service接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface IOaProgressService {
|
||||
|
||||
/**
|
||||
* 查询进度管理
|
||||
*/
|
||||
OaProgressVo queryById(Long progressId);
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
TableDataInfo<OaProgressVo> queryPageList(OaProgressBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
List<OaProgressVo> queryList(OaProgressBo bo);
|
||||
|
||||
/**
|
||||
* 新增进度管理
|
||||
*/
|
||||
Boolean insertByBo(OaProgressBo bo);
|
||||
|
||||
/**
|
||||
* 修改进度管理
|
||||
*/
|
||||
Boolean updateByBo(OaProgressBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除进度管理信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取关键字
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OaProgressDetail> getKeyList();
|
||||
|
||||
}
|
||||
@@ -66,4 +66,12 @@ public interface ISysOaProjectService {
|
||||
List<SysOaProjectVo> getProjectDataByMonthAndDate();
|
||||
|
||||
TableDataInfo<SysOaProjectVo> queryFiles(SysOaWarehouseDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询进度使用的查询接口
|
||||
* @param bo
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
TableDataInfo<SysOaProjectVo> queryPageList2(SysOaProjectBo bo, PageQuery pageQuery);
|
||||
}
|
||||
|
||||
@@ -20,9 +20,8 @@ import com.ruoyi.oa.domain.EmployeeFiles;
|
||||
import com.ruoyi.oa.mapper.EmployeeFilesMapper;
|
||||
import com.ruoyi.oa.service.IEmployeeFilesService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 文件档案管理Service业务层处理
|
||||
@@ -85,10 +84,16 @@ public class EmployeeFilesServiceImpl implements IEmployeeFilesService {
|
||||
public Boolean insertByBo(UserFilesVo userFilesVo) {
|
||||
// 删除该用户所有的文件,重新填入
|
||||
// baseMapper.deleteByUserId(userFilesVo.getUserId()); 似乎不用删
|
||||
List<EmployeeFilesVo> fileList = userFilesVo.getFileList();
|
||||
fileList.forEach(file -> {
|
||||
EmployeeFiles employeeFiles = BeanUtil.toBean(file, EmployeeFiles.class);
|
||||
employeeFiles.setFilePath(file.getFilePath());
|
||||
List<String> fileUrls = new ArrayList<>();
|
||||
if (userFilesVo.getUserId() != null){
|
||||
fileUrls = Arrays.stream( userFilesVo.getFiles().split(","))
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
fileUrls.forEach(file -> {
|
||||
EmployeeFiles employeeFiles = new EmployeeFiles();
|
||||
employeeFiles.setFilePath(file);
|
||||
employeeFiles.setUserId(userFilesVo.getUserId());
|
||||
baseMapper.insert(employeeFiles);
|
||||
});
|
||||
|
||||
@@ -8,6 +8,9 @@ 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 com.ruoyi.oa.domain.EmployeeFiles;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeFilesVo;
|
||||
import com.ruoyi.oa.mapper.EmployeeFilesMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import liquibase.pro.packaged.A;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -38,6 +41,9 @@ public class EmployeeOffboardingServiceImpl implements IEmployeeOffboardingServi
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private EmployeeFilesMapper filesMapper;
|
||||
|
||||
/**
|
||||
* 查询离职管理
|
||||
*/
|
||||
@@ -58,7 +64,11 @@ public class EmployeeOffboardingServiceImpl implements IEmployeeOffboardingServi
|
||||
Page<EmployeeOffboardingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(item -> {
|
||||
SysUser sysUser = userService.selectUserByIdAndNotDelFlag(item.getUserId());
|
||||
item.setNickName(sysUser.getUserName());
|
||||
item.setNickName(sysUser.getNickName());
|
||||
LambdaQueryWrapper<EmployeeFiles> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(EmployeeFiles::getUserId, sysUser.getUserId());
|
||||
List<EmployeeFilesVo> employeeFiles = filesMapper.selectVoList(queryWrapper);
|
||||
item.setFileList(employeeFiles);
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
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.OaProgressDetailBo;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressDetailVo;
|
||||
import com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.mapper.OaProgressDetailMapper;
|
||||
import com.ruoyi.oa.service.IOaProgressDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 进度扩展Service业务层处理
|
||||
*
|
||||
* @author hdka2
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaProgressDetailServiceImpl implements IOaProgressDetailService {
|
||||
|
||||
private final OaProgressDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询进度扩展
|
||||
*/
|
||||
@Override
|
||||
public OaProgressDetailVo queryById(Long detailId){
|
||||
return baseMapper.selectVoById(detailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度扩展列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaProgressDetailVo> queryPageList(OaProgressDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaProgressDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<OaProgressDetailVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度扩展列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaProgressDetailVo> queryList(OaProgressDetailBo bo) {
|
||||
LambdaQueryWrapper<OaProgressDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<OaProgressDetail> buildQueryWrapper(OaProgressDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<OaProgressDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getProgressId() != null, OaProgressDetail::getProgressId, bo.getProgressId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDetailName()), OaProgressDetail::getDetailName, bo.getDetailName());
|
||||
lqw.eq(bo.getPlanStartDate() != null, OaProgressDetail::getPlanStartDate, bo.getPlanStartDate());
|
||||
lqw.eq(bo.getPlanEndDate() != null, OaProgressDetail::getPlanEndDate, bo.getPlanEndDate());
|
||||
lqw.eq(bo.getActualStartDate() != null, OaProgressDetail::getActualStartDate, bo.getActualStartDate());
|
||||
lqw.eq(bo.getActualEndDate() != null, OaProgressDetail::getActualEndDate, bo.getActualEndDate());
|
||||
lqw.eq(bo.getCompletePercent() != null, OaProgressDetail::getCompletePercent, bo.getCompletePercent());
|
||||
lqw.eq(bo.getPlanPayDate() != null, OaProgressDetail::getPlanPayDate, bo.getPlanPayDate());
|
||||
lqw.eq(bo.getPayAmount() != null, OaProgressDetail::getPayAmount, bo.getPayAmount());
|
||||
lqw.eq(bo.getPaidAmount() != null, OaProgressDetail::getPaidAmount, bo.getPaidAmount());
|
||||
lqw.eq(bo.getDetailStatus() != null, OaProgressDetail::getDetailStatus, bo.getDetailStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增进度扩展
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaProgressDetailBo bo) {
|
||||
OaProgressDetail add = BeanUtil.toBean(bo, OaProgressDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setDetailId(add.getDetailId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改进度扩展
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaProgressDetailBo bo) {
|
||||
OaProgressDetail update = BeanUtil.toBean(bo, OaProgressDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaProgressDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除进度扩展
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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 com.ruoyi.oa.domain.OaProgressDetail;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressDetailBo;
|
||||
import com.ruoyi.oa.service.IOaProgressDetailService;
|
||||
import com.ruoyi.oa.service.ISysOaProjectService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.OaProgressBo;
|
||||
import com.ruoyi.oa.domain.vo.OaProgressVo;
|
||||
import com.ruoyi.oa.domain.OaProgress;
|
||||
import com.ruoyi.oa.mapper.OaProgressMapper;
|
||||
import com.ruoyi.oa.service.IOaProgressService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 进度管理Service业务层处理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class OaProgressServiceImpl implements IOaProgressService {
|
||||
|
||||
private final OaProgressMapper baseMapper;
|
||||
|
||||
private final IOaProgressDetailService detailService;
|
||||
|
||||
private final ISysOaProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询进度管理
|
||||
*/
|
||||
@Override
|
||||
public OaProgressVo queryById(Long progressId){
|
||||
return baseMapper.selectVoById(progressId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<OaProgressVo> queryPageList(OaProgressBo bo, PageQuery pageQuery) {
|
||||
QueryWrapper<OaProgress> lqw = buildQueryWrapper(bo);
|
||||
Page<OaProgressVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进度管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<OaProgressVo> queryList(OaProgressBo bo) {
|
||||
QueryWrapper<OaProgress> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private QueryWrapper<OaProgress> buildQueryWrapper(OaProgressBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
QueryWrapper<OaProgress> lqw = Wrappers.query();
|
||||
lqw.eq("op.del_flag", 0);
|
||||
lqw.eq(bo.getProjectId() != null, "op.project_id", bo.getProjectId());
|
||||
lqw.eq(bo.getType() != null, "op.type", bo.getType());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProgressName()), "op.progress_name", bo.getProgressName());
|
||||
lqw.eq(bo.getParentId() != null, "op.parent_id", bo.getParentId());
|
||||
lqw.eq(bo.getStatus() != null, "op.status", bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增进度管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(OaProgressBo bo) {
|
||||
OaProgress add = BeanUtil.toBean(bo, OaProgress.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
List<OaProgressDetailBo> detailList = bo.getDetailList();
|
||||
for (OaProgressDetailBo detailBo : detailList) {
|
||||
detailBo.setProgressId(add.getProgressId());
|
||||
detailService.insertByBo(detailBo);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改进度管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(OaProgressBo bo) {
|
||||
OaProgress update = BeanUtil.toBean(bo, OaProgress.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(OaProgress entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除进度管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OaProgressDetail> getKeyList() {
|
||||
return baseMapper.getKeyList();
|
||||
}
|
||||
}
|
||||
@@ -206,6 +206,19 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 进度使用的查询接口
|
||||
* @param bo
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<SysOaProjectVo> queryPageList2(SysOaProjectBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysOaProject> lqw = buildQueryWrapper(bo);
|
||||
Page<SysOaProjectVo> result = baseMapper.selectVoAndProgress(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private QueryWrapper<SysOaProject> buildOutWareQueryWrapper(SysOaWarehouseDetailBo bo) {
|
||||
QueryWrapper<SysOaProject> lqw = Wrappers.query();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.projec_name", bo.getProjectName());
|
||||
|
||||
@@ -158,10 +158,11 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
|
||||
List<Long> workerIdList = new ArrayList<>();
|
||||
// 拿到所有的执行人id列表进行遍历添加
|
||||
if (bo.getWorkerId()!=null) {
|
||||
workerIdList = Arrays.stream( bo.getWorkerIds().split(","))
|
||||
workerIdList = Arrays.stream(bo.getWorkerIds().split(","))
|
||||
.map(Long::valueOf)
|
||||
.collect(Collectors.toList());
|
||||
}else{
|
||||
// 适配文件上传
|
||||
bo.setBeginTime(new Date());
|
||||
bo.setCompletedTime(new Date());
|
||||
bo.setFinishTime(new Date());
|
||||
|
||||
Reference in New Issue
Block a user