|
@@ -119,6 +119,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
@Resource
|
|
|
private CwProjectReportNumberApplyMapper applyMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private CwRevocationSignatureMapper cwRevocationSignatureMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 保存项目以及其他相关信息
|
|
@@ -1131,6 +1134,386 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
return reportData;
|
|
|
}
|
|
|
|
|
|
+ public CwProjectReportData queryByReId(String id) {
|
|
|
+
|
|
|
+ CwProjectReportData reportData = reportMapper.queryByReId(id);
|
|
|
+
|
|
|
+ //如果质控审核已经完成且审核通过时间存在,则判断审核时间是否已经超过一天,若不超过,则可以重复发起质控审核
|
|
|
+ if (null != reportData && null != reportData.getAuditTime() && "5".equals(reportData.getReviewStatus())){
|
|
|
+ reportData.setRepetitionReviewFlag(getRepetitionReviewFlag(reportData.getAuditTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ //将新增行数据查询出来放入到cwProjectInfoList中
|
|
|
+ CwProjectInfoData cwProjectInfoData = infoMapper.selectByReportId(id);
|
|
|
+ if (null != cwProjectInfoData){
|
|
|
+ reportData.setServedUnitName(cwProjectInfoData.getServedUnitName());
|
|
|
+ reportData.setServedUnitId(cwProjectInfoData.getServedUnitId());
|
|
|
+ reportData.setReportDate(cwProjectInfoData.getReportDate());
|
|
|
+ reportData.setReportType(cwProjectInfoData.getReportType());
|
|
|
+ reportData.setReportNumber(cwProjectInfoData.getReportNumber());
|
|
|
+ reportData.setReportNo(cwProjectInfoData.getReportNo());
|
|
|
+ reportData.setSealType(cwProjectInfoData.getSealType());
|
|
|
+ }
|
|
|
+
|
|
|
+// List<CwProjectInfoData> infoData = new ArrayList<>();
|
|
|
+
|
|
|
+ List<ProjectReportWorkAttachmentDTO> dtoList = new ArrayList<>();
|
|
|
+ List<ProjectReportWorkAttachmentDTO> signatureList = new ArrayList<>();
|
|
|
+ if ( null != reportData){
|
|
|
+ List<ProjectReportWorkAttachmentDTO> dtos = attachmentMapper.selectByInfoId(reportData.getId());
|
|
|
+ if (null != dtos){
|
|
|
+
|
|
|
+ Iterator<ProjectReportWorkAttachmentDTO> it = dtos.iterator();
|
|
|
+ while(it.hasNext()){
|
|
|
+ ProjectReportWorkAttachmentDTO d = it.next();
|
|
|
+ //根据id查出cw_project_report_file文件表的其他信息
|
|
|
+ //未签章附件
|
|
|
+ CwProjectReportFile file = attachmentMapper.selectInfoByFileId(d.getId(),"0");
|
|
|
+ if (null != file) {
|
|
|
+ d.setFileType(file.getFileType());
|
|
|
+ d.setSealType(file.getSealType());
|
|
|
+ d.setSealedFile(file.getSealedFile());
|
|
|
+ d.setSealUser(file.getSealUser());
|
|
|
+ d.setSealDate(file.getSealDate());
|
|
|
+ d.setRemarks(file.getRemarks());
|
|
|
+ UserDTO userDTO = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name = reportMapper.getUserNameById(file.getCreateById());
|
|
|
+ userDTO.setId(file.getCreateById());
|
|
|
+ userDTO.setName(name);
|
|
|
+ d.setCreateBy(userDTO);
|
|
|
+ d.setCreateTime(file.getCreateTime());
|
|
|
+ dtoList.add(d);
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
+
|
|
|
+ //已签章附件
|
|
|
+ CwProjectReportFile signatureFile = attachmentMapper.selectInfoByFileId(d.getId(),"1");
|
|
|
+ if (null != signatureFile){
|
|
|
+ d.setFileType(signatureFile.getFileType());
|
|
|
+ d.setSealType(signatureFile.getSealType());
|
|
|
+ d.setSealedFile(signatureFile.getSealedFile());
|
|
|
+ d.setSealUser(signatureFile.getSealUser());
|
|
|
+ d.setSealDate(signatureFile.getSealDate());
|
|
|
+ d.setRemarks(signatureFile.getRemarks());
|
|
|
+ UserDTO userDTO2 = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name2 = reportMapper.getUserNameById(signatureFile.getCreateById());
|
|
|
+ userDTO2.setId(signatureFile.getCreateById());
|
|
|
+ userDTO2.setName(name2);
|
|
|
+ d.setCreateBy(userDTO2);
|
|
|
+ d.setCreateTime(signatureFile.getCreateTime());
|
|
|
+ signatureList.add(d);
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList(dtoList);
|
|
|
+ reportData.setSignatureFileList(signatureList);
|
|
|
+ }
|
|
|
+
|
|
|
+ //将附件信息查出
|
|
|
+ // 查询附件信息
|
|
|
+ List<WorkAttachmentInfo> fileInfo2 = reportMapper.findDtos(id);
|
|
|
+ List<WorkAttachmentInfo> reportFileList = Lists.newArrayList();
|
|
|
+ if(CollectionUtils.isNotEmpty(dtos) && CollectionUtils.isNotEmpty(fileInfo2)){
|
|
|
+ for (ProjectReportWorkAttachmentDTO dto : dtos) {
|
|
|
+ for (WorkAttachmentInfo workAttachmentDto : fileInfo2) {
|
|
|
+ if(dto.getId().equals(workAttachmentDto.getId())){
|
|
|
+ reportFileList.add(workAttachmentDto);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CollectionUtils.isNotEmpty(dtos)) {
|
|
|
+ for (WorkAttachmentInfo i : reportFileList) {
|
|
|
+ i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList2(reportFileList);
|
|
|
+ //设置历史报告列表
|
|
|
+ //根据项目id查出所有的信息
|
|
|
+ List<CwProjectReportData> byProjectList = reportMapper.getByProjectId(reportData.getProjectId());
|
|
|
+ List<CwProjectInfoData> dataInfoList = new ArrayList<>();
|
|
|
+ if (null != byProjectList) {
|
|
|
+ CwProjectReportData finalReportData1 = reportData;
|
|
|
+ byProjectList.forEach(pro->{
|
|
|
+ //根据reportid查出新增行数据
|
|
|
+ CwProjectInfoData infoData = infoMapper.getByReportId(pro.getId());
|
|
|
+ //根据reportid查出所有的附件信息
|
|
|
+ List<ProjectReportWorkAttachmentDTO> fileList = new ArrayList<>();
|
|
|
+ List<ProjectReportWorkAttachmentDTO> cwFileInfoList = attachmentMapper.selectByInfoIdAndNewLineId(finalReportData1.getId());
|
|
|
+ //历史的附件信息是否是查改reportid对应的所有附件
|
|
|
+ if (null != cwFileInfoList){
|
|
|
+ cwFileInfoList.forEach(fi->{
|
|
|
+ //未签章附件
|
|
|
+ CwProjectReportFile file = attachmentMapper.selectInfoByFileId(fi.getId(),"0");
|
|
|
+ if (null != file) {
|
|
|
+ fi.setFileType(file.getFileType());
|
|
|
+ fi.setSealType(file.getSealType());
|
|
|
+ fi.setSealedFile(file.getSealedFile());
|
|
|
+ fi.setSealUser(file.getSealUser());
|
|
|
+ fi.setSealDate(file.getSealDate());
|
|
|
+ fi.setRemarks(file.getRemarks());
|
|
|
+ UserDTO userDTO = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name = reportMapper.getUserNameById(file.getCreateById());
|
|
|
+ userDTO.setId(file.getCreateById());
|
|
|
+ userDTO.setName(name);
|
|
|
+ fi.setCreateBy(userDTO);
|
|
|
+ fi.setCreateTime(file.getCreateTime());
|
|
|
+ fileList.add(fi);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //设置附件信息
|
|
|
+ infoData.setCwFileInfoList(fileList);
|
|
|
+ if (pro.getStatus().equals("5")) {
|
|
|
+ infoData.setDocumentStatus("已完成");
|
|
|
+ }
|
|
|
+ dataInfoList.add(infoData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ reportData.setCwWorkClientContactDTOList(dataInfoList);
|
|
|
+
|
|
|
+ //将复核数据查出来
|
|
|
+ CwProjectReview review = reviewMapper.selectByReportId(reportData.getId());
|
|
|
+ if ( null != review) {
|
|
|
+ reportData.setReviewStatus(review.getReviewStatus());
|
|
|
+ reportData.setAllPrintNum(review.getAllPrintNum());
|
|
|
+ reportData.setIssueNum(review.getIssueNum());
|
|
|
+ reportData.setPlaceOnFileNum(review.getPlaceOnFileNum());
|
|
|
+ reportData.setPrintedBy(review.getPrintedBy());
|
|
|
+ reportData.setCheckAutograph(review.getCheckAutograph());
|
|
|
+ reportData.setReportTitleType(review.getReportTitleType());
|
|
|
+ reportData.setNeedUpdate1(review.getNeedUpdate1());
|
|
|
+ reportData.setNeedUpdate2(review.getNeedUpdate2());
|
|
|
+ reportData.setNeedUpdate3(review.getNeedUpdate3());
|
|
|
+ reportData.setRemark1(review.getRemark1());
|
|
|
+ reportData.setRemark2(review.getRemark2());
|
|
|
+ reportData.setRemark3(review.getRemark3());
|
|
|
+ reportData.setComputerNo(review.getComputerNo());
|
|
|
+ reportData.setReportReviewNo(review.getReportReviewNo());
|
|
|
+ reportData.setReviewBy(review.getReviewBy());
|
|
|
+ //将一级复核等填入数据查出
|
|
|
+ List<CwProofreadDetail> details = detailMapper.findByReportInfoId(review.getId());
|
|
|
+ if (null != details) {
|
|
|
+ reportData.setDetails(details);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //根据报告类型查询下一节点用户
|
|
|
+ List<ReviewUser> stringList = new ArrayList<>();
|
|
|
+ //如果是苏州分部,这里写死
|
|
|
+ String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
|
|
|
+ if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-苏州分部");
|
|
|
+ }else if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-非苏兴会基字");
|
|
|
+ }
|
|
|
+ reportData.setReviewBys(stringList);
|
|
|
+ } else {
|
|
|
+ //传来的是复核表的id
|
|
|
+ CwProjectReview review = reviewMapper.selectById(id);
|
|
|
+ if (null != review) {
|
|
|
+ reportData = reportMapper.queryById(review.getReportId());
|
|
|
+ if ( null != reportData){
|
|
|
+
|
|
|
+ //如果质控审核已经完成且审核通过时间存在,则判断审核时间是否已经超过一天,若不超过,则可以重复发起质控审核
|
|
|
+ if (null != reportData.getAuditTime() && "5".equals(reportData.getReviewStatus())){
|
|
|
+ reportData.setRepetitionReviewFlag(getRepetitionReviewFlag(reportData.getAuditTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProjectReportWorkAttachmentDTO> dtos = attachmentMapper.selectByInfoId(reportData.getId());
|
|
|
+ if (null != dtos){
|
|
|
+
|
|
|
+ Iterator<ProjectReportWorkAttachmentDTO> it = dtos.iterator();
|
|
|
+ while(it.hasNext()){
|
|
|
+ ProjectReportWorkAttachmentDTO d = it.next();
|
|
|
+ //根据id查出cw_project_report_file文件表的其他信息
|
|
|
+ //未签章附件
|
|
|
+ CwProjectReportFile file = attachmentMapper.selectInfoByFileId(d.getId(),"0");
|
|
|
+ if (null != file) {
|
|
|
+ d.setFileType(file.getFileType());
|
|
|
+ d.setSealType(file.getSealType());
|
|
|
+ d.setSealedFile(file.getSealedFile());
|
|
|
+ d.setSealUser(file.getSealUser());
|
|
|
+ d.setSealDate(file.getSealDate());
|
|
|
+ d.setRemarks(file.getRemarks());
|
|
|
+ UserDTO userDTO = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name = reportMapper.getUserNameById(file.getCreateById());
|
|
|
+ userDTO.setId(file.getCreateById());
|
|
|
+ userDTO.setName(name);
|
|
|
+ d.setCreateBy(userDTO);
|
|
|
+ d.setCreateTime(file.getCreateTime());
|
|
|
+ dtoList.add(d);
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
+
|
|
|
+ //已签章附件
|
|
|
+ CwProjectReportFile signatureFile = attachmentMapper.selectInfoByFileId(d.getId(),"1");
|
|
|
+ if (null != signatureFile){
|
|
|
+ d.setFileType(signatureFile.getFileType());
|
|
|
+ d.setSealType(signatureFile.getSealType());
|
|
|
+ d.setSealedFile(signatureFile.getSealedFile());
|
|
|
+ d.setSealUser(signatureFile.getSealUser());
|
|
|
+ d.setSealDate(signatureFile.getSealDate());
|
|
|
+ d.setRemarks(signatureFile.getRemarks());
|
|
|
+ UserDTO userDTO2 = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name2 = reportMapper.getUserNameById(signatureFile.getCreateById());
|
|
|
+ userDTO2.setId(signatureFile.getCreateById());
|
|
|
+ userDTO2.setName(name2);
|
|
|
+ d.setCreateBy(userDTO2);
|
|
|
+ d.setCreateTime(signatureFile.getCreateTime());
|
|
|
+ signatureList.add(d);
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList(dtoList);
|
|
|
+ reportData.setSignatureFileList(signatureList);
|
|
|
+ }
|
|
|
+ //将附件信息查出
|
|
|
+ // 查询附件信息
|
|
|
+ List<WorkAttachmentInfo> fileInfo2 = reportMapper.findDtos(reportData.getId());
|
|
|
+ List<WorkAttachmentInfo> reportFileList = Lists.newArrayList();
|
|
|
+ if(CollectionUtils.isNotEmpty(dtos) && CollectionUtils.isNotEmpty(fileInfo2)){
|
|
|
+ for (ProjectReportWorkAttachmentDTO dto : dtos) {
|
|
|
+ for (WorkAttachmentInfo workAttachmentDto : fileInfo2) {
|
|
|
+ if(dto.getId().equals(workAttachmentDto.getId())){
|
|
|
+ reportFileList.add(workAttachmentDto);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CollectionUtils.isNotEmpty(dtos)) {
|
|
|
+ for (WorkAttachmentInfo i : reportFileList) {
|
|
|
+ i.setCreateBy(SpringUtil.getBean ( IUserApi.class ).getById(i.getBy()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList2(reportFileList);
|
|
|
+ //设置历史报告列表
|
|
|
+ //根据项目id查出所有的信息
|
|
|
+ List<CwProjectReportData> byProjectList = reportMapper.getByProjectId(reportData.getProjectId());
|
|
|
+ List<CwProjectInfoData> dataInfoList = new ArrayList<>();
|
|
|
+ if (null != byProjectList) {
|
|
|
+ CwProjectReportData finalReportData = reportData;
|
|
|
+ byProjectList.forEach(pro->{
|
|
|
+ //根据reportid查出新增行数据
|
|
|
+ CwProjectInfoData infoData = infoMapper.getByReportId(pro.getId());
|
|
|
+ //根据reportid查出所有的附件信息
|
|
|
+ List<ProjectReportWorkAttachmentDTO> fileList = new ArrayList<>();
|
|
|
+ List<ProjectReportWorkAttachmentDTO> cwFileInfoList = attachmentMapper.selectByInfoIdAndNewLineId(finalReportData.getId());
|
|
|
+ //历史的附件信息是否是查改reportid对应的所有附件
|
|
|
+ if (null != cwFileInfoList){
|
|
|
+ cwFileInfoList.forEach(fi->{
|
|
|
+ //未签章附件
|
|
|
+ CwProjectReportFile file = attachmentMapper.selectInfoByFileId(fi.getId(),"0");
|
|
|
+ if (null != file) {
|
|
|
+ fi.setFileType(file.getFileType());
|
|
|
+ fi.setSealType(file.getSealType());
|
|
|
+ fi.setSealedFile(file.getSealedFile());
|
|
|
+ fi.setSealUser(file.getSealUser());
|
|
|
+ fi.setSealDate(file.getSealDate());
|
|
|
+ fi.setRemarks(file.getRemarks());
|
|
|
+ UserDTO userDTO = new UserDTO();
|
|
|
+ //根据创建人id查出创建人名称
|
|
|
+ String name = reportMapper.getUserNameById(file.getCreateById());
|
|
|
+ userDTO.setId(file.getCreateById());
|
|
|
+ userDTO.setName(name);
|
|
|
+ fi.setCreateBy(userDTO);
|
|
|
+ fi.setCreateTime(file.getCreateTime());
|
|
|
+ fileList.add(fi);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //设置附件信息
|
|
|
+ infoData.setCwFileInfoList(fileList);
|
|
|
+ if (pro.getStatus().equals("5")) {
|
|
|
+ infoData.setDocumentStatus("已完成");
|
|
|
+ }
|
|
|
+ dataInfoList.add(infoData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ reportData.setCwWorkClientContactDTOList(dataInfoList);
|
|
|
+
|
|
|
+ //将复核数据查出来
|
|
|
+// CwProjectReview review = reviewMapper.selectByReportId(reportData.getId());
|
|
|
+// if ( null != review) {
|
|
|
+//
|
|
|
+// }
|
|
|
+ reportData.setReviewStatus(review.getReviewStatus());
|
|
|
+ reportData.setAllPrintNum(review.getAllPrintNum());
|
|
|
+ reportData.setIssueNum(review.getIssueNum());
|
|
|
+ reportData.setPlaceOnFileNum(review.getPlaceOnFileNum());
|
|
|
+ reportData.setPrintedBy(review.getPrintedBy());
|
|
|
+ reportData.setCheckAutograph(review.getCheckAutograph());
|
|
|
+ reportData.setReportTitleType(review.getReportTitleType());
|
|
|
+ reportData.setNeedUpdate1(review.getNeedUpdate1());
|
|
|
+ reportData.setNeedUpdate2(review.getNeedUpdate2());
|
|
|
+ reportData.setNeedUpdate3(review.getNeedUpdate3());
|
|
|
+ reportData.setRemark1(review.getRemark1());
|
|
|
+ reportData.setRemark2(review.getRemark2());
|
|
|
+ reportData.setRemark3(review.getRemark3());
|
|
|
+ reportData.setComputerNo(review.getComputerNo());
|
|
|
+ reportData.setReviewBy(review.getReviewBy());
|
|
|
+
|
|
|
+ //将一级复核等填入数据查出
|
|
|
+ List<CwProofreadDetail> details = detailMapper.findByReportInfoId(review.getId());
|
|
|
+ if (null != details) {
|
|
|
+ reportData.setDetails(details);
|
|
|
+ }
|
|
|
+ //根据报告类型查询下一节点用户
|
|
|
+ List<ReviewUser> stringList = new ArrayList<>();
|
|
|
+ //如果是苏州分部,这里写死
|
|
|
+ String officeId = reportMapper.getCorrelationOfficeIdByName("苏州分公司");
|
|
|
+ if (StringUtils.isNotBlank(officeId) && officeId.contains(reportData.getOfficeId())){
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-苏州分部");
|
|
|
+ }else if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-非苏兴会基字");
|
|
|
+ }
|
|
|
+ reportData.setReviewBys(stringList);
|
|
|
+ //将新增行数据查询出来放入到cwProjectInfoList中
|
|
|
+ cwProjectInfoData = infoMapper.selectByReportId(reportData.getId());
|
|
|
+ if (null != cwProjectInfoData){
|
|
|
+ reportData.setServedUnitName(cwProjectInfoData.getServedUnitName());
|
|
|
+ reportData.setServedUnitId(cwProjectInfoData.getServedUnitId());
|
|
|
+ reportData.setReportDate(cwProjectInfoData.getReportDate());
|
|
|
+ reportData.setReportType(cwProjectInfoData.getReportType());
|
|
|
+ reportData.setReportNumber(cwProjectInfoData.getReportNumber());
|
|
|
+ reportData.setReportNo(cwProjectInfoData.getReportNo());
|
|
|
+ reportData.setSealType(cwProjectInfoData.getSealType());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ CwSignatureAnnotator cwSignatureAnnotator=cwSignatureAnnotatorMapper.getSigById(id);
|
|
|
+ if (ObjectUtil.isNotEmpty(cwSignatureAnnotator)){
|
|
|
+ reportData.setProcInsSigId(cwSignatureAnnotator.getProcInsId());
|
|
|
+ reportData.setSigReason(cwSignatureAnnotator.getReason());
|
|
|
+ }
|
|
|
+ //获取当前登录人角色是否是苏州报告签字盖章代办
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+ if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
|
|
|
+ for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
|
|
|
+ RoleDTO dtoById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
|
|
|
+ if ("szbgqzgzdb".equals(dtoById.getEnName())){
|
|
|
+ reportData.setIsXs("1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return reportData;
|
|
|
+ }
|
|
|
+
|
|
|
public CwProjectReportData queryById2(String id) {
|
|
|
|
|
|
CwProjectReportData reportData = reportMapper.queryById(id);
|
|
@@ -4070,6 +4453,53 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 保存或修改撤回签章流程
|
|
|
+ * @param reportData
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String saveRevocation(CwProjectReportData reportData) {
|
|
|
+ String id="";
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+ if(StringUtils.isNotBlank(reportData.getRevocationId())){
|
|
|
+ CwRevocationSignature cwRevocationSignature = new CwRevocationSignature();
|
|
|
+ cwRevocationSignature.setUpdateById(userDTO.getId());
|
|
|
+ cwRevocationSignature.setUpdateTime(new Date());
|
|
|
+ cwRevocationSignature.setId(reportData.getRevocationId());
|
|
|
+ cwRevocationSignature.setReason(reportData.getRebackReason());
|
|
|
+ cwRevocationSignature.setStatus(reportData.getRebackStatus());
|
|
|
+ cwRevocationSignature.setReportId(reportData.getId());
|
|
|
+ cwRevocationSignatureMapper.updateById(cwRevocationSignature);
|
|
|
+ if ("5".equals(reportData.getRebackStatus())){
|
|
|
+ //重新复核
|
|
|
+ this.rebackReviewSign(reportData.getId());
|
|
|
+ //然后将撤回签章数据进行逻辑删除
|
|
|
+ cwRevocationSignatureMapper.deleteById(reportData.getRevocationId());
|
|
|
+ }
|
|
|
+ id=reportData.getRevocationId();
|
|
|
+ }else {
|
|
|
+ String detailId = UUID.randomUUID().toString().replace("-", "");
|
|
|
+ CwRevocationSignature cwRevocationSignature = new CwRevocationSignature();
|
|
|
+ cwRevocationSignature.setId(detailId);
|
|
|
+ cwRevocationSignature.setReason(reportData.getRebackReason());
|
|
|
+ cwRevocationSignature.setStatus(reportData.getRebackStatus());
|
|
|
+ cwRevocationSignature.setReportId(reportData.getId());
|
|
|
+ cwRevocationSignatureMapper.insert(cwRevocationSignature);
|
|
|
+ id=detailId;
|
|
|
+ }
|
|
|
+ return id;
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 撤回签章 根据id修改状态
|
|
|
+ * @param data
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String updateStatusByIdRe(CwProjectReportData data) {
|
|
|
+ CwRevocationSignature cwRevocationSignature = new CwRevocationSignature();
|
|
|
+ cwRevocationSignature.setId(data.getRevocationId());
|
|
|
+ cwRevocationSignature.setStatus(data.getRebackStatus());
|
|
|
+ cwRevocationSignatureMapper.updateById(cwRevocationSignature);
|
|
|
+ return "操作成功";
|
|
|
+ }
|
|
|
}
|