|
@@ -98,6 +98,9 @@ public class ProjectListService {
|
|
|
private IFlowableApi flowTaskService;
|
|
|
@Autowired
|
|
|
private ProgramMembersService programMembersService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ProgramCancellationMapper programCancellationMapper;
|
|
|
// @Autowired
|
|
|
// private UserService userService;
|
|
|
|
|
@@ -571,7 +574,7 @@ public class ProjectListService {
|
|
|
BeanUtils.copyProperties(info, dto);
|
|
|
// 查询联系人列表
|
|
|
LambdaQueryWrapper<ProgramProjectListLink> linkWrapper = new LambdaQueryWrapper<>();
|
|
|
- linkWrapper.eq(ProgramProjectListLink::getInfoId, id);
|
|
|
+ linkWrapper.eq(ProgramProjectListLink::getInfoId, info.getId());
|
|
|
linkWrapper.eq(ProgramProjectListLink::getDelFlag, 0);
|
|
|
List<ProgramProjectListLink> links = projectLinkMapper.selectList(linkWrapper);
|
|
|
if (CollectionUtils.isNotEmpty(links)) {
|
|
@@ -579,7 +582,7 @@ public class ProjectListService {
|
|
|
}
|
|
|
// 查询成员列表
|
|
|
LambdaQueryWrapper<ProgramProjectListMember> memberWrapper = new LambdaQueryWrapper<>();
|
|
|
- memberWrapper.eq(ProgramProjectListMember::getInfoId, id);
|
|
|
+ memberWrapper.eq(ProgramProjectListMember::getInfoId, info.getId());
|
|
|
memberWrapper.eq(ProgramProjectListMember::getDelFlag, 0);
|
|
|
List<ProgramProjectListMember> members = projectMemberMapper.selectList(memberWrapper);
|
|
|
if (CollectionUtils.isNotEmpty(members)) {
|
|
@@ -594,7 +597,7 @@ public class ProjectListService {
|
|
|
dto.setMembers(members);
|
|
|
}
|
|
|
// 查询附件信息
|
|
|
- List<WorkAttachmentInfo> files = workContractInfoMapper.findDtos(id);
|
|
|
+ List<WorkAttachmentInfo> files = workContractInfoMapper.findDtos(info.getId());
|
|
|
if (CollectionUtils.isNotEmpty(files)) {
|
|
|
for (WorkAttachmentInfo i : files) {
|
|
|
i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
|
|
@@ -821,6 +824,12 @@ public class ProjectListService {
|
|
|
item.setAuditUserIdsArchive(flowTaskService.getTaskAuditUsers(item.getTaskIdArchive())); // 获取数据审核人
|
|
|
}
|
|
|
}
|
|
|
+ // 作废
|
|
|
+ if (StringUtils.isNotBlank(item.getTaskIdCan()) && StringUtils.isNotBlank(item.getCancellationStatus())) {
|
|
|
+ if ("2".equals(item.getCancellationStatus())) { // “审核中”的数据要获取数据审核人
|
|
|
+ item.setAuditUserIdsCan(flowTaskService.getTaskAuditUsers(item.getTaskIdCan())); // 获取数据审核人
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
for (ProgramProjectListInfo item : pageList.getRecords()) {
|
|
|
//判断项目是否归档
|
|
@@ -1918,4 +1927,43 @@ public class ProjectListService {
|
|
|
}
|
|
|
return "0";
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存作废信息
|
|
|
+ * @param projectListDto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String saveCancellation(ProjectListDto projectListDto) {
|
|
|
+ String canId="";
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+ if (StringUtils.isNotBlank(projectListDto.getCancellId())){
|
|
|
+ ProgramCancellation programCancellation = new ProgramCancellation();
|
|
|
+ programCancellation.setId(projectListDto.getCancellId());
|
|
|
+ programCancellation.setProjectId(projectListDto.getId());
|
|
|
+ programCancellation.setUpdateById(userDTO.getId());
|
|
|
+ programCancellation.setUpdateTime(new Date());
|
|
|
+ programCancellation.setStatus(projectListDto.getStatus());
|
|
|
+ programCancellationMapper.updateById(programCancellation);
|
|
|
+ canId=projectListDto.getCancellId();
|
|
|
+ }else {
|
|
|
+ String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
+ ProgramCancellation programCancellation = new ProgramCancellation();
|
|
|
+ programCancellation.setId(id);
|
|
|
+ programCancellation.setProjectId(projectListDto.getId());
|
|
|
+ programCancellation.setStatus(projectListDto.getStatus());
|
|
|
+ programCancellationMapper.insert(programCancellation);
|
|
|
+ canId=id;
|
|
|
+ }
|
|
|
+ return canId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据id修改作废状态
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String updateStatusByCancellId(ProjectListDto dto) {
|
|
|
+ programCancellationMapper.updateStatusById(dto.getCancellId(),dto.getCancellationStatus());
|
|
|
+ return "操作成功";
|
|
|
+ }
|
|
|
}
|