|
@@ -4,6 +4,8 @@ package org.springblade.manager.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
import org.springblade.manager.entity.ProjectInfo;
|
|
|
import org.springblade.manager.entity.WbsTreePrivate;
|
|
@@ -27,6 +29,7 @@ import java.util.List;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/synchronousRecord")
|
|
|
+@Api(value = "WBS同步记录表接口", tags = "WBS同步记录表接口")
|
|
|
public class WbsTreeSynchronousRecordController {
|
|
|
/**
|
|
|
* 服务对象
|
|
@@ -41,6 +44,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
* @param query 分页对象
|
|
|
* @return 所有数据
|
|
|
*/
|
|
|
+ @ApiOperation(value = "分页查询")
|
|
|
@GetMapping("/page")
|
|
|
public R<IPage<WbsTreeSynchronousRecord>> selectAll(WbsTreeSynchronousRecord record, Query query) {
|
|
|
LambdaQueryWrapper<WbsTreeSynchronousRecord> lambda = new QueryWrapper().lambda();
|
|
@@ -79,6 +83,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
* @param id 主键
|
|
|
* @return 单条数据
|
|
|
*/
|
|
|
+ @ApiOperation(value = "通过主键查询单条数据")
|
|
|
@GetMapping("getById")
|
|
|
public R<WbsTreeSynchronousRecord> selectOne(@RequestParam Long id) {
|
|
|
return R.data(this.mWbsTreeSynchronousRecordService.getById(id));
|
|
@@ -91,6 +96,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
* @param mWbsTreeSynchronousRecord 实体对象
|
|
|
* @return 新增结果
|
|
|
*/
|
|
|
+ @ApiOperation(value = "新增数据")
|
|
|
@PostMapping("add")
|
|
|
public R<WbsTreeSynchronousRecord> insert(@RequestBody WbsTreeSynchronousRecord mWbsTreeSynchronousRecord) {
|
|
|
|
|
@@ -127,6 +133,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
/**
|
|
|
* 认证接口是否正在同步
|
|
|
*/
|
|
|
+ @ApiOperation(value = "认证接口是否正在同步")
|
|
|
@PostMapping("getNodeStatus")
|
|
|
public R<WbsTreeSynchronousRecord> getNodeStatus(@RequestParam Long id) {
|
|
|
return R.data(this.mWbsTreeSynchronousRecordService.getNodeStatus(id));
|
|
@@ -138,6 +145,7 @@ public class WbsTreeSynchronousRecordController {
|
|
|
*
|
|
|
* @param nodeIds 节点ids 逗号拼接
|
|
|
*/
|
|
|
+ @ApiOperation(value = "获取当前项目的模板项目")
|
|
|
@GetMapping("getTempProject")
|
|
|
public R<List<WbsTreeSynchronousRecordVo>> getProjectTemplate(@RequestParam String nodeIds) {
|
|
|
if (StringUtil.isBlank(nodeIds)) {
|
|
@@ -146,5 +154,17 @@ public class WbsTreeSynchronousRecordController {
|
|
|
return R.data(this.mWbsTreeSynchronousRecordService.getProjectTemplate(nodeIds));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 添加同步记录查询功能
|
|
|
+ * 采用定时查询模式展示进度条
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "添加同步记录查询功能")
|
|
|
+ @GetMapping("querySyncRecord")
|
|
|
+ public R<List<WbsTreeSynchronousRecord>> querySyncRecord(@RequestParam Long projectId) {
|
|
|
+ return R.data(this.mWbsTreeSynchronousRecordService.list(new QueryWrapper<WbsTreeSynchronousRecord>().lambda()
|
|
|
+ .eq(WbsTreeSynchronousRecord::getProjectId, projectId)
|
|
|
+ .ne(WbsTreeSynchronousRecord::getStatus, 2)
|
|
|
+ ));
|
|
|
+ }
|
|
|
}
|
|
|
|