Merge branch 'dev_PMS' of code.gitlink.org.cn:Gitlink/microservices into dev_PMS_ZPK_merge_master
This commit is contained in:
commit
a526995a58
|
|
@ -393,14 +393,14 @@ public class PmsProjectIssuesController extends BaseController {
|
|||
return pmsProjectTestsheetIssuesService.getProjectIssueLinkTestcaseList(issueId, pmProjectId);
|
||||
}
|
||||
|
||||
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"pms:pmsProjectIssues:edit"}, logical = Logical.OR)
|
||||
@PostMapping("/import")
|
||||
@ApiOperation(value = "导入工作项")
|
||||
public AjaxResult importIssuesFromFile(@PathVariable String enterpriseIdentifier, @RequestPart("file") MultipartFile file, @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
|
||||
return success(pmsProjectIssuesService.importIssuesFromFile(enterpriseIdentifier, file, pmProjectId));
|
||||
}
|
||||
|
||||
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"pms:pmsProjectIssues:edit"}, logical = Logical.OR)
|
||||
@GetMapping("/export")
|
||||
@ApiOperation(value = "导出工作项")
|
||||
public void exportIssues(HttpServletResponse response, @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
|
||||
|
|
|
|||
|
|
@ -111,6 +111,14 @@ public class PmsProjectSprintController extends BaseController {
|
|||
return toAjax(pmsProjectSprintService.insertPmsProjectSprint(pmsProjectSprintInputVo.toPmsProjectSprint()));
|
||||
}
|
||||
|
||||
@RequiresPermissions("pms:pmsProjectSprint:add")
|
||||
@Log(title = "项目迭代", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/findOrCreate")
|
||||
@ApiOperation(value = "查询或新增项目迭代(迭代名、负责人、项目id相同的会返回该迭代)")
|
||||
public AjaxResult findOrCreate(@RequestBody @Validated PmsProjectSprintInputVo pmsProjectSprintInputVo) {
|
||||
return success(pmsProjectSprintService.findOrCreatePmsProjectSprint(pmsProjectSprintInputVo.toPmsProjectSprint()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目迭代
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -71,4 +71,6 @@ public interface PmsProjectSprintMapper
|
|||
List<PmsProjectSprint> selectPmsProjectSprintBYIds(@Param("testSheetLinkSprintIds") Long[] testSheetLinkSprintIds);
|
||||
|
||||
int deletePmsProjectSprintByProjectId(@Param("projectId") Long projectId);
|
||||
|
||||
PmsProjectSprint selectLatestSprintByProjectIdAndNameAndAssigneeId(@Param("pmsProjectId") Long pmsProjectId, @Param("sprintName") String sprintName, @Param("sprintAssigneeId") Long sprintAssigneeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,4 +67,6 @@ public interface IPmsProjectSprintService
|
|||
List<PmsProjectSprintSimpleVo> selectPmsProjectSimpleSprintByIds(Long[] testSheetLinkSprintIds);
|
||||
|
||||
JSONArray getPmsProjectSprintBurnDownChart(Long pmSprintId);
|
||||
|
||||
PmsProjectSprintSimpleVo findOrCreatePmsProjectSprint(PmsProjectSprint pmsProjectSprint);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,22 @@ public class PmsProjectSprintServiceImpl implements IPmsProjectSprintService
|
|||
return pmsProjectSprintMapper.insertPmsProjectSprint(pmsProjectSprint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PmsProjectSprintSimpleVo findOrCreatePmsProjectSprint(PmsProjectSprint pmsProjectSprint) {
|
||||
pmsProjectService.selectAndCheckPmsProjectById(pmsProjectSprint.getPmsProjectId());
|
||||
PmsProjectSprint existingSprint = pmsProjectSprintMapper.selectLatestSprintByProjectIdAndNameAndAssigneeId(pmsProjectSprint.getPmsProjectId(), pmsProjectSprint.getSprintName(), pmsProjectSprint.getSprintAssigneeId());
|
||||
PmsProjectSprintSimpleVo sprintSimpleVo = new PmsProjectSprintSimpleVo();
|
||||
if (existingSprint == null) {
|
||||
insertPmsProjectSprint(pmsProjectSprint);
|
||||
sprintSimpleVo.setSprintName(pmsProjectSprint.getSprintName());
|
||||
sprintSimpleVo.setId(pmsProjectSprint.getId());
|
||||
} else {
|
||||
sprintSimpleVo.setSprintName(existingSprint.getSprintName());
|
||||
sprintSimpleVo.setId(existingSprint.getId());
|
||||
}
|
||||
return sprintSimpleVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目迭代
|
||||
*
|
||||
|
|
|
|||
|
|
@ -175,4 +175,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{testSheetLinkSprintId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectLatestSprintByProjectIdAndNameAndAssigneeId"
|
||||
resultMap="PmsProjectSprintResult">
|
||||
<include refid="selectPmsProjectSprintVo"/>
|
||||
where pms_project_id = #{pmsProjectId}
|
||||
and sprint_name = #{sprintName}
|
||||
and sprint_assignee_id = #{sprintAssigneeId}
|
||||
order by id desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue