|
@@ -17,6 +17,7 @@ import com.jeeplus.flowable.service.FlowTaskService;
|
|
|
import com.jeeplus.sys.service.UserService;
|
|
|
import com.jeeplus.sys.mapper.UserMapper;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
+import com.jeeplus.sys.utils.DictUtils;
|
|
|
import com.jeeplus.sys.utils.Global;
|
|
|
import com.jeeplus.sys.utils.StringUtils;
|
|
|
import com.jeeplus.sys.utils.UserUtils;
|
|
@@ -41,10 +42,14 @@ import com.jeeplus.test.oss.service.OSSClientService;
|
|
|
import com.jeeplus.test.oss.service.OssService;
|
|
|
import com.jeeplus.test.signature.domain.*;
|
|
|
import com.jeeplus.test.signature.utils.SignaturePostUtil;
|
|
|
+import com.jeeplus.test.utils.FreemarkerUtil;
|
|
|
import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
|
|
|
+import freemarker.template.Configuration;
|
|
|
+import freemarker.template.Template;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.flowable.bpmn.model.FlowNode;
|
|
|
import org.flowable.engine.TaskService;
|
|
|
+import org.flowable.engine.history.HistoricActivityInstance;
|
|
|
import org.flowable.task.api.Task;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -53,7 +58,10 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
@@ -778,6 +786,861 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
return reportData;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public Map getAuditInfoMap(HttpServletResponse response, String id) {
|
|
|
+
|
|
|
+ CwProjectReportData reportData = reportMapper.queryById(id);
|
|
|
+
|
|
|
+ //将新增行数据查询出来放入到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){
|
|
|
+ dtos.forEach(d->{
|
|
|
+ //根据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.getCreateBy());
|
|
|
+ userDTO.setId(file.getCreateBy());
|
|
|
+ userDTO.setName(name);
|
|
|
+ d.setCreateBy(userDTO);
|
|
|
+ d.setCreateDate(file.getCreateDate());
|
|
|
+ dtoList.add(d);
|
|
|
+ }
|
|
|
+
|
|
|
+ //已签章附件
|
|
|
+ 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.getCreateBy());
|
|
|
+ userDTO2.setId(signatureFile.getCreateBy());
|
|
|
+ userDTO2.setName(name2);
|
|
|
+ d.setCreateBy(userDTO2);
|
|
|
+ d.setCreateDate(signatureFile.getCreateDate());
|
|
|
+ signatureList.add(d);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ reportData.setCwFileInfoList(dtoList);
|
|
|
+ reportData.setSignatureFileList(signatureList);
|
|
|
+ }
|
|
|
+ //将附件信息查出
|
|
|
+ // 查询附件信息
|
|
|
+ List<WorkAttachmentDto> fileInfo2 = reportMapper.findDtos(id);
|
|
|
+ if (CollectionUtils.isNotEmpty(dtos)) {
|
|
|
+ for (WorkAttachmentDto i : fileInfo2) {
|
|
|
+ i.setCreateBy(UserUtils.get(i.getBy()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList2(fileInfo2);
|
|
|
+ //设置历史报告列表
|
|
|
+ //根据项目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.getCreateBy());
|
|
|
+ userDTO.setId(file.getCreateBy());
|
|
|
+ userDTO.setName(name);
|
|
|
+ fi.setCreateBy(userDTO);
|
|
|
+ fi.setCreateDate(file.getCreateDate());
|
|
|
+ fileList.add(fi);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //设置附件信息
|
|
|
+ infoData.setCwFileInfoList(fileList);
|
|
|
+ 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<>();
|
|
|
+ if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByS("1");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByS("2");
|
|
|
+ }
|
|
|
+ reportData.setReviewBys(stringList);
|
|
|
+ } else {
|
|
|
+ //传来的是复核表的id
|
|
|
+ CwProjectReview review = reviewMapper.selectById(id);
|
|
|
+ if (null != review) {
|
|
|
+ reportData = reportMapper.queryById(review.getReportId());
|
|
|
+ if ( null != reportData){
|
|
|
+ List<ProjectReportWorkAttachmentDTO> dtos = attachmentMapper.selectByInfoId(reportData.getId());
|
|
|
+ if (null != dtos){
|
|
|
+ dtos.forEach(d->{
|
|
|
+ //根据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.getCreateBy());
|
|
|
+ userDTO.setId(file.getCreateBy());
|
|
|
+ userDTO.setName(name);
|
|
|
+ d.setCreateBy(userDTO);
|
|
|
+ d.setCreateDate(file.getCreateDate());
|
|
|
+ dtoList.add(d);
|
|
|
+ }
|
|
|
+
|
|
|
+ //已签章附件
|
|
|
+ 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.getCreateBy());
|
|
|
+ userDTO2.setId(signatureFile.getCreateBy());
|
|
|
+ userDTO2.setName(name2);
|
|
|
+ d.setCreateBy(userDTO2);
|
|
|
+ d.setCreateDate(signatureFile.getCreateDate());
|
|
|
+ signatureList.add(d);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ reportData.setCwFileInfoList(dtoList);
|
|
|
+ reportData.setSignatureFileList(signatureList);
|
|
|
+ }
|
|
|
+ // 查询附件信息
|
|
|
+ List<WorkAttachmentDto> fileInfo2 = reportMapper.findDtos(reportData.getId());
|
|
|
+ if (CollectionUtils.isNotEmpty(dtos)) {
|
|
|
+ for (WorkAttachmentDto i : fileInfo2) {
|
|
|
+ i.setCreateBy(UserUtils.get(i.getBy()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reportData.setCwFileInfoList2(fileInfo2);
|
|
|
+ //设置历史报告列表
|
|
|
+ //根据项目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.getCreateBy());
|
|
|
+ userDTO.setId(file.getCreateBy());
|
|
|
+ userDTO.setName(name);
|
|
|
+ fi.setCreateBy(userDTO);
|
|
|
+ fi.setCreateDate(file.getCreateDate());
|
|
|
+ fileList.add(fi);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //设置附件信息
|
|
|
+ infoData.setCwFileInfoList(fileList);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ //将新增行数据查询出来放入到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());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ Map data = new HashMap();
|
|
|
+
|
|
|
+
|
|
|
+ data.put("firstAuditName","");
|
|
|
+ data.put("firstAuditDate"," 年 月 日");
|
|
|
+ data.put("secondAuditName","");
|
|
|
+ data.put("secondAuditDate"," 年 月 日");
|
|
|
+ data.put("thirdlyAuditName","");
|
|
|
+ data.put("thirdlyAuditDate"," 年 月 日");
|
|
|
+ //发出人
|
|
|
+ data.put("giveName","");
|
|
|
+ //发出时间
|
|
|
+ data.put("giveDate"," 年 月 日");
|
|
|
+ //归档人
|
|
|
+ data.put("archiveName","");
|
|
|
+ //归档时间
|
|
|
+ data.put("archiveDate"," 年 月 日");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
+ try {
|
|
|
+ List<Flow> flows = flowTaskService.historicTaskList(reportData.getProcInsId3());
|
|
|
+ for (Flow flow : flows) {
|
|
|
+ HistoricActivityInstance histIns = flow.getHistIns();
|
|
|
+ if(StringUtils.isNotBlank(histIns.getActivityName())){
|
|
|
+
|
|
|
+ switch (histIns.getActivityName()){
|
|
|
+ case "开始":
|
|
|
+ if(StringUtils.isNotBlank(flow.getAssigneeName())){
|
|
|
+ data.put("firstAuditName",flow.getAssigneeName());
|
|
|
+ data.put("giveName",flow.getAssigneeName());
|
|
|
+ }else{
|
|
|
+ data.put("firstAuditName","");
|
|
|
+ }
|
|
|
+ if(null != histIns.getEndTime()){
|
|
|
+ data.put("firstAuditDate",sdf.format(histIns.getEndTime()));
|
|
|
+ }else{
|
|
|
+ data.put("firstAuditDate"," 年 月 日");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "二级复核":
|
|
|
+ if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
|
|
|
+ if(StringUtils.isNotBlank(flow.getAssigneeName())){
|
|
|
+ data.put("secondAuditName",flow.getAssigneeName());
|
|
|
+ }else{
|
|
|
+ data.put("secondAuditName","");
|
|
|
+ }
|
|
|
+ if(null != histIns.getEndTime()){
|
|
|
+ data.put("secondAuditDate",sdf.format(histIns.getEndTime()));
|
|
|
+ }else{
|
|
|
+ data.put("secondAuditDate"," 年 月 日");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "三级复核":
|
|
|
+ if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
|
|
|
+ if(StringUtils.isNotBlank(flow.getAssigneeName())){
|
|
|
+ data.put("thirdlyAuditName",flow.getAssigneeName());
|
|
|
+ }else{
|
|
|
+ data.put("thirdlyAuditName","");
|
|
|
+ }
|
|
|
+ if(null != histIns.getEndTime()){
|
|
|
+ data.put("thirdlyAuditDate",sdf.format(histIns.getEndTime()));
|
|
|
+ }else{
|
|
|
+ data.put("thirdlyAuditDate"," 年 月 日");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //报告类型
|
|
|
+ String reportType = DictUtils.getDictLabel(reportData.getReportType(), "cw_report_title_type", "");
|
|
|
+ if(StringUtils.isNotBlank(reportType)){
|
|
|
+ data.put("type",reportType);
|
|
|
+ }else{
|
|
|
+ data.put("type","");
|
|
|
+ }
|
|
|
+ //项目名称
|
|
|
+ if(StringUtils.isNotBlank(reportData.getProjectName())){
|
|
|
+ data.put("projectName",reportData.getProjectName());
|
|
|
+ }else{
|
|
|
+ data.put("projectName","");
|
|
|
+ }
|
|
|
+ //根据项目名称查询合同委托方名称
|
|
|
+ if(StringUtils.isNotBlank(reportData.getProjectId())){
|
|
|
+ String servedUnitName = reportMapper.getServedUnitName(reportData.getProjectId());
|
|
|
+ if(StringUtils.isNotBlank(servedUnitName)){
|
|
|
+ data.put("servedUnitName",servedUnitName);
|
|
|
+ }else{
|
|
|
+ data.put("servedUnitName","");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ data.put("servedUnitName","");
|
|
|
+ }
|
|
|
+ //报告日期
|
|
|
+ if(null != reportData.getReportDate()){
|
|
|
+ data.put("reportDate",sdf.format(reportData.getReportDate()));
|
|
|
+ }else{
|
|
|
+ data.put("reportDate"," 年 月 日");
|
|
|
+ }
|
|
|
+ //报告文号
|
|
|
+ if(StringUtils.isNotBlank(reportData.getReportNo())){
|
|
|
+ data.put("reportNumber",reportData.getReportNo());
|
|
|
+ }else{
|
|
|
+ data.put("reportNumber","");
|
|
|
+ }
|
|
|
+ //共印份数
|
|
|
+ if(StringUtils.isNotBlank(reportData.getAllPrintNum())){
|
|
|
+ data.put("totalCount",reportData.getAllPrintNum());
|
|
|
+ }else{
|
|
|
+ data.put("totalCount","");
|
|
|
+ }
|
|
|
+ //发出份数
|
|
|
+ if(StringUtils.isNotBlank(reportData.getIssueNum())){
|
|
|
+ data.put("giveOutCount",reportData.getIssueNum());
|
|
|
+ }else{
|
|
|
+ data.put("giveOutCount","");
|
|
|
+ }
|
|
|
+ //存档份数
|
|
|
+ if(StringUtils.isNotBlank(reportData.getPlaceOnFileNum())){
|
|
|
+ data.put("archiveCount",reportData.getPlaceOnFileNum());
|
|
|
+ }else{
|
|
|
+ data.put("archiveCount","");
|
|
|
+ }
|
|
|
+ //打印人签名
|
|
|
+ if(StringUtils.isNotBlank(reportData.getPrintedBy())){
|
|
|
+ data.put("printName",reportData.getPrintedBy());
|
|
|
+ }else{
|
|
|
+ data.put("printName","");
|
|
|
+ }
|
|
|
+ //校对人签名
|
|
|
+ if(StringUtils.isNotBlank(reportData.getCheckAutograph())){
|
|
|
+ data.put("proofreadName",reportData.getCheckAutograph());
|
|
|
+ }else{
|
|
|
+ data.put("proofreadName","");
|
|
|
+ }
|
|
|
+ //计算机文号
|
|
|
+ if(StringUtils.isNotBlank(reportData.getComputerNo())){
|
|
|
+ data.put("pcNumber",reportData.getComputerNo());
|
|
|
+ }else{
|
|
|
+ data.put("pcNumber","");
|
|
|
+ }
|
|
|
+ //一级复核需提请关注或修改的事项
|
|
|
+ if(StringUtils.isNotBlank(reportData.getNeedUpdate1())){
|
|
|
+ data.put("s114",reportData.getNeedUpdate1());
|
|
|
+ }else{
|
|
|
+ data.put("s114","");
|
|
|
+ }
|
|
|
+ //一级复核备注
|
|
|
+ if(StringUtils.isNotBlank(reportData.getRemark1())){
|
|
|
+ data.put("s115",reportData.getRemark1());
|
|
|
+ }else{
|
|
|
+ data.put("s115","");
|
|
|
+ }
|
|
|
+ //二级复核需提请关注或修改的事项
|
|
|
+ if(StringUtils.isNotBlank(reportData.getNeedUpdate2())){
|
|
|
+ data.put("s214",reportData.getNeedUpdate2());
|
|
|
+ }else{
|
|
|
+ data.put("s214","");
|
|
|
+ }
|
|
|
+ //二级复核备注
|
|
|
+ if(StringUtils.isNotBlank(reportData.getRemark2())){
|
|
|
+ data.put("s215",reportData.getRemark2());
|
|
|
+ }else{
|
|
|
+ data.put("s215","");
|
|
|
+ }
|
|
|
+ //三级复核需提请关注或修改的事项
|
|
|
+ if(StringUtils.isNotBlank(reportData.getNeedUpdate3())){
|
|
|
+ data.put("s314",reportData.getNeedUpdate3());
|
|
|
+ }else{
|
|
|
+ data.put("s314","");
|
|
|
+ }
|
|
|
+ //三级复核备注
|
|
|
+ if(StringUtils.isNotBlank(reportData.getRemark3())){
|
|
|
+ data.put("s315",reportData.getRemark3());
|
|
|
+ }else{
|
|
|
+ data.put("s315","");
|
|
|
+ }
|
|
|
+
|
|
|
+ data.put("archiveName","");
|
|
|
+ data.put("archiveDate","");
|
|
|
+ List<CwProofreadDetail> details = reportData.getDetails();
|
|
|
+ Map map = disposeViewList(details);
|
|
|
+ data.putAll(map);
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(reportData.getReportId())){
|
|
|
+ //根据报告id查询归档信息
|
|
|
+ CwProjectReportArchiveDTO cwProjectReportArchiveDTO = cwProjectReportArchiveMapper.queryByReportId(reportData.getReportId());
|
|
|
+
|
|
|
+ if(null != cwProjectReportArchiveDTO){
|
|
|
+ if(null != cwProjectReportArchiveDTO.getAuditDate()){
|
|
|
+ data.put("archiveDate",sdf.format(cwProjectReportArchiveDTO.getAuditDate()));
|
|
|
+ data.put("giveDate",sdf.format(cwProjectReportArchiveDTO.getAuditDate()));
|
|
|
+ }else{
|
|
|
+ data.put("archiveDate"," 年 月 日");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Flow> archiveFlows = flowTaskService.historicTaskList(cwProjectReportArchiveDTO.getProcInsId());
|
|
|
+ for (Flow flow : archiveFlows) {
|
|
|
+ HistoricActivityInstance histIns = flow.getHistIns();
|
|
|
+ if(StringUtils.isNotBlank(histIns.getActivityName())){
|
|
|
+
|
|
|
+ switch (histIns.getActivityName()){
|
|
|
+ case "归档员审核":
|
|
|
+ if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
|
|
|
+ if(StringUtils.isNotBlank(flow.getAssigneeName())){
|
|
|
+ data.put("archiveName",flow.getAssigneeName());
|
|
|
+ }else{
|
|
|
+ data.put("archiveName","");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Map disposeViewList(List<CwProofreadDetail> detailList){
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("s111","");
|
|
|
+ map.put("s112","");
|
|
|
+ map.put("s113","");
|
|
|
+
|
|
|
+ map.put("s121","");
|
|
|
+ map.put("s122","");
|
|
|
+ map.put("s123","");
|
|
|
+
|
|
|
+ map.put("s131","");
|
|
|
+ map.put("s132","");
|
|
|
+ map.put("s133","");
|
|
|
+
|
|
|
+ map.put("s141","");
|
|
|
+ map.put("s142","");
|
|
|
+ map.put("s143","");
|
|
|
+
|
|
|
+ map.put("s151","");
|
|
|
+ map.put("s152","");
|
|
|
+ map.put("s153","");
|
|
|
+
|
|
|
+ map.put("s161","");
|
|
|
+ map.put("s162","");
|
|
|
+ map.put("s163","");
|
|
|
+
|
|
|
+ map.put("s171","");
|
|
|
+ map.put("s172","");
|
|
|
+ map.put("s173","");
|
|
|
+
|
|
|
+ map.put("s181","");
|
|
|
+ map.put("s182","");
|
|
|
+ map.put("s183","");
|
|
|
+
|
|
|
+ map.put("s191","");
|
|
|
+ map.put("s192","");
|
|
|
+ map.put("s193","");
|
|
|
+
|
|
|
+ map.put("s1101","");
|
|
|
+ map.put("s1102","");
|
|
|
+ map.put("s1103","");
|
|
|
+
|
|
|
+ map.put("s211","");
|
|
|
+ map.put("s212","");
|
|
|
+ map.put("s213","");
|
|
|
+
|
|
|
+ map.put("s221","");
|
|
|
+ map.put("s222","");
|
|
|
+ map.put("s223","");
|
|
|
+
|
|
|
+ map.put("s231","");
|
|
|
+ map.put("s232","");
|
|
|
+ map.put("s233","");
|
|
|
+
|
|
|
+ map.put("s311","");
|
|
|
+ map.put("s312","");
|
|
|
+ map.put("s313","");
|
|
|
+
|
|
|
+ map.put("s321","");
|
|
|
+ map.put("s322","");
|
|
|
+ map.put("s323","");
|
|
|
+
|
|
|
+ map.put("s331","");
|
|
|
+ map.put("s332","");
|
|
|
+ map.put("s333","");
|
|
|
+
|
|
|
+ map.put("s341","");
|
|
|
+ map.put("s342","");
|
|
|
+ map.put("s343","");
|
|
|
+ if(detailList.size()>0){
|
|
|
+ for (CwProofreadDetail info : detailList) {
|
|
|
+ switch (info.getTypeName()){
|
|
|
+ case "已在现场进行技术性的逐张、详细复核且修改完善,并保证数据的正确性":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s111","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s112","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s113","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "复核后 已填列 “完成业务工作核对清单”":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s121","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s122","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s123","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "重要审验程序是否适当,是否得以较好地实施,是否实现了审验目标":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s131","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s132","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s133","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "重点审验项目的证据是否充分、适当":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s141","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s142","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s143","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "审验范围是否充分":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s151","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s152","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s153","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "建议调整的不符事项和未调整不符事项的处理是否恰当":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s161","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s162","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s163","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "工作底稿中重要的勾稽关系是否正确":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s171","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s172","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s173","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "执业过程中发现的问题及其对会计报表和业务报告的影响,项目组对这些问题的处理是否恰当":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s181","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s182","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s183","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "已审会计报表总体上是否合理、可信":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s191","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s192","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s193","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "校对业务报告及附送资料的文字表述无误":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s1101","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s1102","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s1103","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case "对审验过程中的重大会计审计问题,重大调整事项及重要的工作底稿进行复核无误":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s211","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s212","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s213","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "对前两级复核人所认同的事项提出质疑":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s221","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s222","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s223","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "与项目组沟通,能以所收集的证据来证明其所根据具体的审验环境和审验证据得出的结论和意见是恰当的":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s231","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s232","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s233","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ case "审验程序的恰当性":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s311","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s312","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s313","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "工作底稿的充分性":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s321","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s322","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s323","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "审验过程中是否存在重大遗漏":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s331","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s332","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s333","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "审验工作是否符合的质量要求":
|
|
|
+ if(StringUtils.isNotBlank(info.getReviewComments())){
|
|
|
+ switch (info.getReviewComments()){
|
|
|
+ case "1":
|
|
|
+ map.put("s341","√");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("s342","√");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("s343","√");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
public ResponseEntity deleteByIds(String ids) {
|
|
|
String idArray[] =ids.split(",");
|
|
|
//删除 cw_project_report_new_line表信息 cw_project_report_file信息 work_attachment_id表信息
|