Quellcode durchsuchen

资料缺失说明流程[归档]

[user3] vor 4 Jahren
Ursprung
Commit
ddefa1c15e
25 geänderte Dateien mit 8660 neuen und 27 gelöschten Zeilen
  1. 7 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportRecordDao.java
  2. 368 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectMaterialDefectRecord.java
  3. 434 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectMaterialDefectRecordService.java
  4. 48 1
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java
  5. 527 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java
  6. 5 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportRecordController.java
  7. 28 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  8. 18 5
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java
  9. 27 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  10. 206 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  11. 123 5
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  12. 32 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java
  13. 3 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  14. 1 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewTwoController.java
  15. 200 10
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  16. 37 2
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportRecordDao.xml
  17. 55 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  18. 19 0
      src/main/webapp/static/common/jeeplus.js
  19. 52 2
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp
  20. 1058 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionForm.jsp
  21. 1119 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionModify.jsp
  22. 1709 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionAudit.jsp
  23. 855 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionModify.jsp
  24. 1677 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionView.jsp
  25. 52 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

+ 7 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportRecordDao.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.projectcontentinfo.dao;
 
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -36,6 +37,12 @@ public interface ProjectReportRecordDao extends CrudDao<ProjectReportRecord> {
      * @return
      */
     ProjectReportRecord getRuralProjectReportRecord(String id);
+    /**
+     * 根据id查询归档资料缺失信息
+     * @param mid
+     * @return
+     */
+    ProjectMaterialDefectRecord getProjectMaterialDefectRecord(@Param("mid") String mid);
 
     int updateRuralProjectReportRecord(ProjectReportRecord projectReportRecord);
 

+ 368 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectMaterialDefectRecord.java

@@ -0,0 +1,368 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectcontentinfo.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 归档-
+ * 资料缺失说明entity
+ */
+public class ProjectMaterialDefectRecord extends ActEntity<ProjectMaterialDefectRecord> {
+
+	private static final long serialVersionUID = 1L;
+	private ProjectReportData report;		// 报告id
+	private String companyId;		// 公司id
+	private String officeId;		// 部门id
+	private Date date;		// 审批日期
+	private String status;		// 审批状态
+	private String processInstanceId;		// 流程号
+	private Date startDate; //开始日期
+	private Date endDate; //结束日期
+	private String clientName;
+	private String contractNum;
+	private String projectName;
+	private String projectNum;
+	private String contractName;
+	private int numberCount;
+	private String view;
+	private String home;
+	private User signCostOne;		// 签字造价师一
+	private User signCostTwo;		// 签字造价师二
+	private String reportId;		//项目id
+	private Date accomplishDate;  //归档完成时间
+	private String condition;    //判定条件
+	private String flag;    //判定条件
+	private String holdFlag;    //暂存判定条件
+
+	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
+	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
+	private List<ProjectTemplateInfo> fileOtherList;   //其他文件
+	private ProjectReportData projectReportData;		// 报告信息(仅作为展示用)
+	private List<String> chargeCriterionList;	//合同收费标准
+
+	private Integer type;//(1:ProjectReportRecord  2:RuralProjectReportRecord)
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	public String getReportId() {
+		return reportId;
+	}
+
+	public void setReportId(String reportId) {
+		this.reportId = reportId;
+	}
+
+	public ProjectMaterialDefectRecord() {
+		super();
+	}
+
+	public ProjectMaterialDefectRecord(String id){
+		super(id);
+	}
+
+	// 流程任务
+	private Task task;
+	private Map<String, Object> variables;
+	// 运行中的流程实例
+	private ProcessInstance processInstance;
+	// 历史的流程实例
+	private HistoricProcessInstance historicProcessInstance;
+	// 流程定义
+	private ProcessDefinition processDefinition;
+
+	private List<Workattachment> workAttachments = Lists.newArrayList();
+
+	public List<Workattachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<Workattachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	@ExcelField(title="公司id", align=2, sort=8)
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+
+	@ExcelField(title="部门id", align=2, sort=9)
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ExcelField(title="归档日期", align=2, sort=13)
+	public Date getDate() {
+		return date;
+	}
+
+	public void setDate(Date date) {
+		this.date = date;
+	}
+
+	@ExcelField(title="归档状态", align=2, sort=14)
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	@ExcelField(title="流程号", align=2, sort=15)
+	public String getProcessInstanceId() {
+		return processInstanceId;
+	}
+
+	public void setProcessInstanceId(String processInstanceId) {
+		this.processInstanceId = processInstanceId;
+	}
+
+	public ProjectReportData getReport() {
+		return report;
+	}
+
+	public void setReport(ProjectReportData report) {
+		this.report = report;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getClientName() {
+		return clientName;
+	}
+
+	public void setClientName(String clientName) {
+		this.clientName = clientName;
+	}
+
+	public String getContractNum() {
+		return contractNum;
+	}
+
+	public void setContractNum(String contractNum) {
+		this.contractNum = contractNum;
+	}
+
+	public String getContractName() {
+		return contractName;
+	}
+
+	public void setContractName(String contractName) {
+		this.contractName = contractName;
+	}
+
+	public Task getTask() {
+		return task;
+	}
+
+	public void setTask(Task task) {
+		this.task = task;
+	}
+
+	public Map<String, Object> getVariables() {
+		return variables;
+	}
+
+	public void setVariables(Map<String, Object> variables) {
+		this.variables = variables;
+	}
+
+	public ProcessInstance getProcessInstance() {
+		return processInstance;
+	}
+
+	public void setProcessInstance(ProcessInstance processInstance) {
+		this.processInstance = processInstance;
+	}
+
+	public HistoricProcessInstance getHistoricProcessInstance() {
+		return historicProcessInstance;
+	}
+
+	public void setHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) {
+		this.historicProcessInstance = historicProcessInstance;
+	}
+
+	public ProcessDefinition getProcessDefinition() {
+		return processDefinition;
+	}
+
+	public void setProcessDefinition(ProcessDefinition processDefinition) {
+		this.processDefinition = processDefinition;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
+	public String getProjectNum() {
+		return projectNum;
+	}
+
+	public void setProjectNum(String projectNum) {
+		this.projectNum = projectNum;
+	}
+
+	public int getNumberCount() {
+		return numberCount;
+	}
+
+	public void setNumberCount(int numberCount) {
+		this.numberCount = numberCount;
+	}
+
+	public String getView() {
+		return view;
+	}
+
+	public void setView(String view) {
+		this.view = view;
+	}
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+
+	public User getSignCostOne() {
+		return signCostOne;
+	}
+
+	public void setSignCostOne(User signCostOne) {
+		this.signCostOne = signCostOne;
+	}
+
+	public User getSignCostTwo() {
+		return signCostTwo;
+	}
+
+	public void setSignCostTwo(User signCostTwo) {
+		this.signCostTwo = signCostTwo;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getAccomplishDate() {
+		return accomplishDate;
+	}
+
+	public void setAccomplishDate(Date accomplishDate) {
+		this.accomplishDate = accomplishDate;
+	}
+
+	public String getCondition() {
+		return condition;
+	}
+
+	public void setCondition(String condition) {
+		this.condition = condition;
+	}
+
+	public String getFlag() {
+		return flag;
+	}
+
+	public void setFlag(String flag) {
+		this.flag = flag;
+	}
+
+
+	public List<ProjectTemplateInfo> getFileAttachmentList() {
+		return fileAttachmentList;
+	}
+
+	public void setFileAttachmentList(List<ProjectTemplateInfo> fileAttachmentList) {
+		this.fileAttachmentList = fileAttachmentList;
+	}
+
+	public List<ProjectTemplateInfo> getFileGistdataList() {
+		return fileGistdataList;
+	}
+
+	public void setFileGistdataList(List<ProjectTemplateInfo> fileGistdataList) {
+		this.fileGistdataList = fileGistdataList;
+	}
+
+	public List<ProjectTemplateInfo> getFileOtherList() {
+		return fileOtherList;
+	}
+
+	public void setFileOtherList(List<ProjectTemplateInfo> fileOtherList) {
+		this.fileOtherList = fileOtherList;
+	}
+
+	public String getHoldFlag() {
+		return holdFlag;
+	}
+
+	public void setHoldFlag(String holdFlag) {
+		this.holdFlag = holdFlag;
+	}
+
+	public ProjectReportData getProjectReportData() {
+		return projectReportData;
+	}
+
+	public void setProjectReportData(ProjectReportData projectReportData) {
+		this.projectReportData = projectReportData;
+	}
+
+	public List<String> getChargeCriterionList() {
+		return chargeCriterionList;
+	}
+
+	public void setChargeCriterionList(List<String> chargeCriterionList) {
+		this.chargeCriterionList = chargeCriterionList;
+	}
+}

+ 434 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectMaterialDefectRecordService.java

@@ -0,0 +1,434 @@
+package com.jeeplus.modules.projectcontentinfo.service;
+
+import com.google.common.collect.Maps;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportRecordDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.dao.WorkattachmentDao;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.activiti.engine.*;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+@Service
+@Transactional(readOnly = true)
+public class ProjectMaterialDefectRecordService extends CrudService<ProjectReportRecordDao, ProjectReportRecord> {
+    @Autowired
+    private WorkattachmentDao workattachmentDao;
+    @Autowired
+    private WorkattachmentService workattachmentService;
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    protected TaskService taskService;
+    @Autowired
+    protected HistoryService historyService;
+    @Autowired
+    protected RepositoryService repositoryService;
+    @Autowired
+    private IdentityService identityService;
+    @Autowired
+    private ActTaskService actTaskService;
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
+    @Autowired
+    private WorkActivityMenuService workActivityMenuService;
+    @Autowired
+    private WorkActivityProcessService workActivityProcessService;
+    @Autowired
+    private ActivityService activityService;
+    @Autowired
+    private WorkActivityProcessDao workActivityProcessDao;
+    @Autowired
+    private ProjectReportDataService projectReportDataService;
+    @Autowired
+    private RuralProjectMessageService ruralProjectMessageService;
+    @Autowired
+    private RuralProjectMessageDao ruralProjectMessageDao;
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
+    @Autowired
+    ProjectReportRecordDao projectReportRecordDao;
+    /**
+     * 获取归档资料说明信息
+     * @param id
+     * @return
+     */
+    public ProjectMaterialDefectRecord getMaterialDefectRecord(String id) {
+        ProjectMaterialDefectRecord materialDefectRecord= dao.getProjectMaterialDefectRecord(id);
+        if (materialDefectRecord!=null && StringUtils.isNotBlank(materialDefectRecord.getId())){
+            Workattachment workattachment = new Workattachment();
+            workattachment.setAttachmentId(id);
+            workattachment.setAttachmentFlag("99");
+            materialDefectRecord.setWorkAttachments(workattachmentService.findList(workattachment));
+            workattachmentService.attachmentManageOnUrl(materialDefectRecord.getWorkAttachments());
+        }
+        materialDefectRecord.setUploadMode(uploadMode);
+        return materialDefectRecord;
+    }
+
+
+    @Transactional(readOnly = false)
+    public void saveDefectRecordWorkattachments(ProjectMaterialDefectRecord materialDefectRecord) {
+        List<Workattachment> workattachments = materialDefectRecord.getWorkAttachments();
+        if (workattachments!=null && workattachments.size()!=0){
+            for (Workattachment workattachment:workattachments){
+                if (workattachment.getId() == null) {
+                    continue;
+                }
+                if (workattachment.DEL_FLAG_NORMAL.equals(workattachment.getDelFlag())) {
+                    workattachment.setAttachmentId(materialDefectRecord.getId());
+                    workattachment.setAttachmentFlag("99");
+                    workattachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (com.jeeplus.common.utils.StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
+                        workattachment.preInsert();
+                        workattachmentDao.insert(workattachment);
+                    } else {
+                        workattachment.preUpdate();
+                        workattachmentDao.update(workattachment);
+                    }
+                } else {
+                    workattachmentDao.delete(workattachment);
+                }
+            }
+        }
+
+    }
+    /**
+     * 资料缺失说明审核流程
+     * @param materialDefectRecord
+     */
+    @Transactional(readOnly = false)
+    public String descriptionAuditSave(ProjectMaterialDefectRecord materialDefectRecord,List<User> auditUsers) {
+        String flag = materialDefectRecord.getAct().getFlag();
+        ProjectMaterialDefectRecord projectReportRecord = null;
+        // 对不同环节的业务逻辑进行操作
+        Act act = materialDefectRecord.getAct();
+        String taskDefKey = act.getTaskDefKey();
+        if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit")  ) {
+            actTaskService.claim(act.getTaskId(), UserUtils.getUser().getId());
+            projectReportRecord = getMaterialDefectRecord(materialDefectRecord.getId());
+        }else {
+            projectReportRecord = materialDefectRecord;
+            saveDefectRecordWorkattachments(materialDefectRecord);
+            flag = "yes";
+        }
+        projectReportRecord.setAccomplishDate(new Date());
+        User user= UserUtils.get(projectReportRecord.getCreateBy().getId());
+        String title =  "报告名称:"+projectReportRecord.getReport().getName();
+        String str = "资料缺失说明申请,主委托方:"+projectReportRecord.getClientName()+",申请人:"+projectReportRecord.getCreateBy().getName()+",所属部门:"+UserUtils.getSelectOffice().getName();
+
+        if (StringUtils.isBlank(act.getComment())){
+            act.setComment(flag.equals("yes")?"同意":"驳回");
+        }
+        String comment = "";
+        if (projectReportRecord.getStatus().equals("4")){
+            comment = ("yes".equals(flag)?"[重新申请] ":"[已撤销] ");
+        }else {
+            comment = ("yes".equals(flag)?"[同意] ":"[驳回] ")+act.getComment();
+        }
+        //yes 的时候状态为审核通过 否则为未通过
+        //1 审核中 2 未通过
+        projectReportRecord.setStatus(("yes".equals(flag) ? "2" : "4"));
+        Map<String, Object> vars = Maps.newHashMap();
+        //业务逻辑对应的条件表达式
+        String exp = "";
+        String taskCount = "";
+        String notifyRole = "";
+        int key = 0;
+        String enname = "";
+        List<Activity> activitieList = activityService.getByProcessInstanceId(projectReportRecord.getProcessInstanceId());
+        WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+        if (activitieList != null && activitieList.size() != 0) {
+            workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+            workActivityMenu.setActivities(activitieList);
+        }
+
+        WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+        WorkActivityProcess selectProcess = new WorkActivityProcess();
+        selectProcess.setProcessInstanceId(projectReportRecord.getProcessInstanceId());
+        List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+        List<Activity> activities = workActivityMenu.getActivities();
+        if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("materialDefectRecord")) {
+            key = 1;
+            for (int i = 0; i < workActivityProcesses.size(); i++) {
+                WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+                if (taskDefKey.equals(activityProcess.getActivityTask()) && !taskDefKey.equals("modifyApply")) {
+                    taskCount = activityProcess.getCount()+"";
+                    workActivityProcess = activityProcess;
+                    if (!workActivityProcess.getIsApproval().equals("0")) {
+                        workActivityProcess.setId("");
+                    }
+                    exp = "pass";
+                    if (!"yes".equals(flag)) {
+                        projectReportRecord.setStatus("4");
+                        workActivityProcess.setIsApproval("2");
+                        String returnBack = "-1";
+                        for (Activity activity : activities) {
+                            if (activity.getCount() == activityProcess.getCount()) {
+                                notifyRole = activity.getName();
+                                returnBack = activity.getReturnBack();
+                                break;
+                            }
+                        }
+                        if (returnBack.equals("0")) {
+                            workActivityProcess.setId("");
+                        }
+
+                    } else {
+                        workActivityProcess.setIsApproval("1");
+                    }
+                }else if(taskDefKey.equals("modifyApply")){
+                    taskCount = "0";
+                    notifyRole = "调整报告";
+                    exp = "pass";
+                    workActivityProcess.setId("");
+                    workActivityProcess.setCount(0);
+                    if (!"yes".equals(flag)) {
+                        projectReportRecord.setStatus("3");
+                        workActivityProcess.setIsApproval("2");
+                    } else {
+                        workActivityProcess.setIsApproval("1");
+                    }
+                    break;
+                }
+            }
+        } else {
+            workActivityMenu.setProcessType("materialDefectRecord");
+            for (int i = 0; i < workActivityProcesses.size(); i++) {
+                WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+                workActivityProcess = activityProcess;
+                String count = activityProcess.getCount() + "";
+                if (!workActivityProcess.getIsApproval().equals("0")) {
+                    workActivityProcess.setId("");
+                }
+                // 审核环节
+                if ("bzshb".equals(taskDefKey) && count.contains("1")) {
+                    taskCount = "1";
+                    exp = "pass";
+                    if ("yes".equals(flag)) {
+                        workActivityProcessService.insertAuditsByType(auditUsers,materialDefectRecord.getProcessInstanceId(),2,1);
+
+                        notifyRole = "总审审批";
+                        workActivityProcess.setIsApproval("1");
+                        enname = "bzshb";
+                        vars.put("bzshbList", auditUsers);
+                        vars.put("bzshbcount",auditUsers.size());
+                    } else {
+                        notifyRole = "调整报告";
+                        workActivityProcess.setIsApproval("2");
+                    }
+                    break;
+                } else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+                    notifyRole = "总审审批";
+                    taskCount = "0";
+                    exp = "pass";
+                    workActivityProcess.setCount(0);
+                    enname = "bzshb";
+                    if (!"yes".equals(flag)) {
+                        projectReportRecord.setStatus("3");
+                    }
+                    break;
+                } else if ("apply_end".equals(taskDefKey)) {
+                }
+
+            }
+        }
+        // 设置意见
+        act.setComment(("yes".equals(flag) ? "[同意] " : "[驳回] ") + act.getComment());
+        projectReportRecord.preUpdate();
+        // 提交流程任务
+        vars.put(exp, "yes".equals(flag) ? true : false);
+        vars.put("passs", true);
+        workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,projectReportRecord.getProcessInstanceId(),taskDefKey,"modifyApply",flag,comment, activities);
+        // 提交流程任务
+        actTaskService.complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
+        boolean state = actTaskService.isProcessEnd(act.getProcInsId());
+        List<User> users = new ArrayList<>();
+        List<User> userList = new ArrayList<>();
+        //获取项目信息
+        RuralProjectRecords record = ruralProjectRecordsService.getById(materialDefectRecord.getReportId());
+
+        if (!state) {
+            String titleStr = "项目【"+ record.getProjectName()+"】归档资料缺失说明完成";
+            String content = "项目【"+ record.getProjectName()+"】归档资料缺失说明完成";
+            users.add(projectReportRecord.getCreateBy());
+            if ("yes".equals(flag)) {
+                ProjectReportData projectReportData =projectReportRecord.getReport();
+                projectReportData.setFileStatus("3");
+                projectReportDataService.updateFileStatus(projectReportData);
+                projectReportRecord.setStatus("5");
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(projectReportRecord.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                workProjectNotifyService
+                        .save(UtilNotify
+                                .saveNotify(projectReportRecord.getId(),
+                                        projectReportRecord.getCreateBy(),
+                                        projectReportRecord.getCompanyId(),
+                                        titleStr,
+                                        content,
+                                        "99",
+                                        "0",
+                                        "待通知",
+                                        notifyRole));
+
+            } else {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(projectReportRecord.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                if (StringUtils.isNotBlank(projectReportRecord.getStatus()) && !projectReportRecord.getStatus().equals("3")){
+                    projectReportRecord.setStatus("4");
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(projectReportRecord.getId(),
+                                            projectReportRecord.getCreateBy(),
+                                            projectReportRecord.getCompanyId(),
+                                            title,
+                                            str,
+                                            "99",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+                }
+            }
+            workActivityProcessService.deleteProcessIdAuditUsers(projectReportRecord.getProcessInstanceId());
+        } else {
+            if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("materialDefectRecord")) {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(projectReportRecord.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                WorkProjectNotify workProjectNotify = UtilNotify
+                        .saveNotify(projectReportRecord.getId(),
+                                new User(),
+                                projectReportRecord.getCompanyId(),
+                                title,
+                                str,
+                                "99",
+                                "0",
+                                "待审批",
+                                notifyRole);
+                List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+                        activities,
+                        workProjectNotify,
+                        taskDefKey,
+                        flag,
+                        taskCount,
+                        projectReportRecord.getCreateBy(),
+                        user.getOffice().getId(),
+                        "10");
+                for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+                    users.add(workProjectNotify1.getUser());
+                    workProjectNotify1.setId("");
+                    workProjectNotify1.setIsNewRecord(false);
+                    workProjectNotifyService
+                            .save(workProjectNotify1);
+                }
+
+            } else {
+                if (!"yes".equals(flag)) {//驳回待办信息
+                    str = "项目【"+ record.getProjectName()+"】归档资料缺失说明被驳回,请重新提交";
+                    title = "项目【"+ record.getProjectName()+"】归档资料缺失说明被驳回";
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(projectReportRecord.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(projectReportRecord.getId(),
+                                            projectReportRecord.getCreateBy(),
+                                            projectReportRecord.getCompanyId(),
+                                            title,
+                                            str,
+                                            "99",
+                                            "0",
+                                            "重新申请",
+                                            notifyRole));
+                    users.add( projectReportRecord.getCreateBy());
+                } else {
+                    if (StringUtils.isNotBlank(enname)) {//驳回重新归档
+                        str = "项目【"+ record.getProjectName()+"】归档资料缺失说明重新提交,待审批";
+                        title = "项目【"+ record.getProjectName()+"】归档资料缺失说明重新提交,待审批";
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(projectReportRecord.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        WorkProjectNotify workProjectNotify = UtilNotify
+                                .saveNotify(projectReportRecord.getId(),
+                                        new User(),
+                                        projectReportRecord.getCompanyId(),
+                                        title,
+                                        str,
+                                        "99",
+                                        "0",
+                                        "待审批",
+                                        notifyRole);
+                        users.addAll(auditUsers);
+                        for (User user1 : users) {
+                            workProjectNotify.setUser(user1);
+                            workProjectNotify.setId("");
+                            workProjectNotify.setIsNewRecord(false);
+                            workProjectNotifyService
+                                    .save(workProjectNotify);
+                        }
+                    }else {
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(projectReportRecord.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        users.add(projectReportRecord.getCreateBy());
+                        workProjectNotifyService
+                                .save(UtilNotify
+                                        .saveNotify(projectReportRecord.getId(),
+                                                projectReportRecord.getCreateBy(),
+                                                projectReportRecord.getCompanyId(),
+                                                title,
+                                                str,
+                                                "99",
+                                                "0",
+                                                "重新申请",
+                                                notifyRole));
+                    }
+                }
+            }
+        }
+        if (users!=null && users.size()!=0) {
+            for (User u : users) {
+                UserUtils.pushIm(u.getId(),title);
+            }
+        }
+        if (users!=null && userList.size()!=0) {
+            for (User u : userList) {
+                UserUtils.pushMeIm(u.getId());
+            }
+        }
+        ruralProjectMessageDao.updateProjectMaterialDefectRecord(projectReportRecord);
+        return "保存审核意见成功!";
+    }
+}

+ 48 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java

@@ -11,8 +11,10 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportRecordDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
@@ -80,6 +82,8 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 	@Autowired
 	private RuralProjectMessageService ruralProjectMessageService;
 	@Autowired
+	private RuralProjectMessageDao ruralProjectMessageDao;
+	@Autowired
 	private RuralProjectRecordsService ruralProjectRecordsService;
 	@Autowired
 	ProjectReportRecordDao projectReportRecordDao;
@@ -112,6 +116,25 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		return projectReportRecord;
 	}
 
+
+	/**
+	 * 获取归档资料说明信息
+	 * @param id
+	 * @return
+	 */
+	public ProjectMaterialDefectRecord getMaterialDefectRecord(String id) {
+		ProjectMaterialDefectRecord materialDefectRecord= dao.getProjectMaterialDefectRecord(id);
+		if (materialDefectRecord!=null && StringUtils.isNotBlank(materialDefectRecord.getId())){
+			Workattachment workattachment = new Workattachment();
+			workattachment.setAttachmentId(id);
+			workattachment.setAttachmentFlag("99");
+			materialDefectRecord.setWorkAttachments(workattachmentService.findList(workattachment));
+			workattachmentService.attachmentManageOnUrl(materialDefectRecord.getWorkAttachments());
+		}
+		materialDefectRecord.setUploadMode(uploadMode);
+		return materialDefectRecord;
+	}
+
 	/**
 	 * 获取归档编号
 	 * @param reportId
@@ -176,9 +199,33 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 				}
 			}
 		}
-
 	}
+	@Transactional(readOnly = false)
+	public void saveDefectRecordWorkattachments(ProjectMaterialDefectRecord materialDefectRecord) {
+		List<Workattachment> workattachments = materialDefectRecord.getWorkAttachments();
+		if (workattachments!=null && workattachments.size()!=0){
+			for (Workattachment workattachment:workattachments){
+				if (workattachment.getId() == null) {
+					continue;
+				}
+				if (workattachment.DEL_FLAG_NORMAL.equals(workattachment.getDelFlag())) {
+					workattachment.setAttachmentId(materialDefectRecord.getId());
+					workattachment.setAttachmentFlag("99");
+					workattachment.setAttachmentUser(UserUtils.getUser().getId());
+					if (com.jeeplus.common.utils.StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
+						workattachment.preInsert();
+						workattachmentDao.insert(workattachment);
+					} else {
+						workattachment.preUpdate();
+						workattachmentDao.update(workattachment);
+					}
+				} else {
+					workattachmentDao.delete(workattachment);
+				}
+			}
+		}
 
+	}
 	/**
 	 * 提交存储
 	 * @param projectReportRecord

+ 527 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java

@@ -0,0 +1,527 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.projectcontentinfo.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
+import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectMaterialDefectRecordService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportRecordService;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageNewService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 报告归档Controller
+ * @author 杨帆
+ * @version 2018-06-22
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectReportDefectRecord/projectReportDefectRecord")
+public class ProjectReportDefectRecordController extends BaseController {
+
+	@Autowired
+	private ProjectReportRecordService projectReportRecordService;
+	@Autowired
+	private ActTaskService actTaskService;
+	@Autowired
+	private ProjectReportDataService projectReportDataService;
+	@Autowired
+	private RuralProjectRecordsService projectRecordsService;
+	@Autowired
+	private ProjectMaterialDefectRecordService materialDefectRecordService;
+	@Autowired
+	private ProjectEngineeringService engineeringService;
+	@Autowired
+	private RuralProjectMessageNewService ruralProjectMessageService;
+	@Autowired
+	private ProjectTemplateService projectTemplateService;
+	/**
+	 * 跳转到资料缺失说明页面
+	 */
+	@RequestMapping(value = "formDescription")
+	public String formDescription(ProjectMaterialDefectRecord materialDefectRecord, Model model) throws Exception {
+		//查询“配农网”工程类型id
+		String engineeringId = engineeringService.getEngineeringId("202");
+		if (StringUtils.isBlank(materialDefectRecord.getView()) || !materialDefectRecord.getView().equals("view")){
+			if(StringUtils.isBlank(materialDefectRecord.getId())){
+				materialDefectRecord.setCreateDate(new Date());
+				materialDefectRecord.setCreateBy(UserUtils.getUser());
+			}
+		}
+		ProjectReportData projectReportData = new ProjectReportData();
+		ProjectRecords projectRecords = new ProjectRecords();
+		projectReportData.setFileStatus("1");
+		ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(materialDefectRecord.getReportId());
+		if(null != reportData){
+			if (StringUtils.isBlank(materialDefectRecord.getView()) || !materialDefectRecord.getView().equals("view")){
+
+			}else{
+//                ProjectReportRecord projectReportRecordInfo =ruralProjectMessageService.getProjectReportRecord(reportData.getId());
+//                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecordInfo, projectReportRecord);
+			}
+		}
+		//获取项目信息
+		RuralProjectRecords ruralProjectRecords = projectRecordsService.get(materialDefectRecord.getReportId());
+		MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
+		//获取合同信息
+		WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(projectRecords.getWorkContractInfo().getId());
+		projectRecords.setWorkContractInfo(projectContractInfo);
+		reportData.setProject(projectRecords);
+		materialDefectRecord.setReport(reportData);
+		materialDefectRecord.setUploadMode(uploadMode);
+		model.addAttribute("materialDefectRecord", materialDefectRecord);
+		model.addAttribute("project", materialDefectRecord.getReport().getProject());
+
+		ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+		//添加项目类型
+		relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+		relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+		//判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+		String money=ruralProjectRecords.getSubmitMoney();
+		Integer approvalMoney=null;
+		if(StringUtils.isBlank(money)){
+			approvalMoney=1;
+		}else{
+			approvalMoney=Integer.parseInt(money);
+		}
+		switch (approvalMoney){
+			case 0:
+				//金额为0
+				relateInfo.setAttachmentProjectApprovalMoney(null);
+				break;
+			case 1:
+				//500w以下金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("1");
+				break;
+			case 2:
+				//500w以上金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("2");
+				break;
+		}
+
+		//添加报告类型
+		relateInfo.setRequiredStage(2);
+		relateInfo.setId(ruralProjectRecords.getId());
+		//查询报告文件、依据性文件、其他文件必填列表以及数据
+		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+		for (MainDictDetail mainDict : mainDictDetails) {
+			relateInfo.setAttachType(mainDict.getValue());
+			switch (mainDict.getValue()) {
+				case "11":
+					List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: fileAttachmentList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					materialDefectRecord.setFileAttachmentList(fileAttachmentList);
+					break;
+				case "12":
+					List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectTemplateList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					materialDefectRecord.setFileGistdataList(projectTemplateList);
+					break;
+				case "13":
+					List<ProjectTemplateInfo> projectOtherList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectOtherList) {
+						if ("其他资料".equals(info.getAttachName())){
+							info.setMustFlag(1);
+							//判定必填项的下的是否有附件信息
+							if (info.getWorkAttachments().size()!=0){
+								info.setFileFlag(1);
+							}
+						}else{
+							if (1==info.getMustFlag()){
+								info.setMustFlag(0);
+							}
+						}
+					}
+					materialDefectRecord.setFileOtherList(projectOtherList);
+					break;
+			}
+
+		}
+
+		if(null != projectContractInfo){
+			if(projectContractInfo.getWorkClientInfoList().size()>0){
+				model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+			}
+		}
+
+		if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("view")){
+			return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+		}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("modiftApply")){
+			ProcessInstance processInstance = actTaskService.getProcIns(materialDefectRecord.getProcessInstanceId());
+			if (processInstance!=null) {
+				Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+				Act act = new Act();
+				act.setTaskId(taskInfok.getId());
+				act.setTaskName(taskInfok.getName());
+				act.setProcDefId(taskInfok.getProcessDefinitionId());
+				act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+				act.setProcInsId(taskInfok.getProcessInstanceId());
+				act.setTask(taskInfok);
+				materialDefectRecord.setAct(act);
+			}
+			return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
+		}
+		return "modules/ruralprojectrecords/record/cost/projectRecordDescriptionForm";
+	}
+
+	/**
+	 * 保存归档资料缺失说明
+	 */
+	@RequestMapping(value = "saveDefectRecord")
+	public String saveDefectRecord(ProjectMaterialDefectRecord materialDefectRecord, Model model, RedirectAttributes redirectAttributes,Integer saveAuditFlag) throws Exception{
+		if (!beanValidator(model, materialDefectRecord)){
+			return formDescription(materialDefectRecord, model);
+		}
+		try {
+			//获取创建者信息
+			User user = materialDefectRecord.getCreateBy();
+			String sta = materialDefectRecord.getStatus();
+			if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+				addMessage(redirectAttributes, "您不是申请人,无法修改");
+				if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+				}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+				}
+				return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+			}
+			//状态设置为审核中
+			materialDefectRecord.setStatus("2");
+			String processInstanceId ="";
+			if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+				processInstanceId = projectReportRecordService.getMaterialDefectRecord(materialDefectRecord.getId()).getProcessInstanceId();
+			}
+			Map<String, Object> variables = new HashMap<>();
+			if(!materialDefectRecord.getIsNewRecord()){//编辑表单保存
+				ProjectMaterialDefectRecord t = projectReportRecordService.getMaterialDefectRecord(materialDefectRecord.getId());//从数据库取出记录的值
+				if(null != saveAuditFlag){
+					if(1 == saveAuditFlag && t.getStatus().equals("2")){
+						addMessage(redirectAttributes, "报告归档资料缺失说明已送审,请勿重复送审");
+						if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+							return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+						}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+							return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+						}
+						return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+					}
+					if(t.getStatus().equals("5")){
+						addMessage(redirectAttributes, "报告归档资料缺失说明已登记完成,无法再次送审");
+						if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+							return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+						}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+							return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+						}
+						return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+					}
+				}
+				MyBeanUtils.copyBeanNotNull2Bean(materialDefectRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+				if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("modify")){
+					materialDefectRecord.setStatus("2");
+				}
+				ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+			}else {//新增表单保存
+//                ProjectReportRecord reportRecord = projectReportRecordService.getprojectReportRecord(materialDefectRecord.getReport().getId());//从数据库取出记录的值
+//                if(null !=reportRecord){
+//                    projectReportRecord.setId(reportRecord.getId());
+//                }
+				ruralProjectMessageService.saveProjectReportRecord(materialDefectRecord,variables,processInstanceId);//保存
+			}
+			addMessage(redirectAttributes, "保存报告归档资料缺失说明成功");
+		}catch (Exception e){
+			addMessage(redirectAttributes, "保存报告归档资料缺失说明失败");
+			logger.error("保存报告归档资料缺失说明失败",e);
+		}
+		if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixun")){
+			return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+		}else if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+			return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+		}
+		return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+	}
+
+	/**
+	 * 查看,增加,编辑报告归档表单页面
+	 */
+	@RequestMapping(value = "formDescriptionModify")
+	public String formDescriptionModify(ProjectMaterialDefectRecord materialDefectRecord, Model model) {
+		//查询“配农网”工程类型id
+		String engineeringId = engineeringService.getEngineeringId("202");
+		ProjectMaterialDefectRecord defectRecord = projectReportRecordService.getMaterialDefectRecord(materialDefectRecord.getId());
+		try {
+			MyBeanUtils.copyBeanNotNull2Bean(materialDefectRecord, defectRecord);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		if(StringUtils.isBlank(defectRecord.getId())){
+			defectRecord.setCreateDate(new Date());
+			defectRecord.setCreateBy(UserUtils.getUser());
+		}
+		//获取项目信息
+		RuralProjectRecords ruralProjectRecords = projectRecordsService.get(defectRecord.getReportId());
+		ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+		//添加项目类型
+		relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+		relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+		//判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+		String money=ruralProjectRecords.getSubmitMoney();
+		Integer approvalMoney=null;
+		if(StringUtils.isBlank(money)){
+			approvalMoney=1;
+		}else{
+			approvalMoney=Integer.parseInt(money);
+		}
+		switch (approvalMoney){
+			case 0:
+				//金额为0
+				relateInfo.setAttachmentProjectApprovalMoney(null);
+				break;
+			case 1:
+				//500w以下金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("1");
+				break;
+			case 2:
+				//500w以上金额状态
+				relateInfo.setAttachmentProjectApprovalMoney("2");
+				break;
+		}
+
+		//添加报告类型
+		relateInfo.setRequiredStage(2);
+		relateInfo.setId(ruralProjectRecords.getId());
+		//查询报告文件、依据性文件、其他文件必填列表以及数据
+		List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+		for (MainDictDetail mainDict : mainDictDetails) {
+			relateInfo.setAttachType(mainDict.getValue());
+			switch (mainDict.getValue()) {
+				case "11":
+					List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: fileAttachmentList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					defectRecord.setFileAttachmentList(fileAttachmentList);
+					break;
+				case "12":
+					List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectTemplateList) {
+						info.setAttachTypes(info.getAttachTypes().toLowerCase());
+						if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+							if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+								if(!info.getAttachTypes().contains("zip")){
+									info.setAttachTypes(info.getAttachTypes()+",zip");
+								}
+								if(!info.getAttachTypes().contains("rar")){
+									info.setAttachTypes(info.getAttachTypes()+",rar");
+								}
+							}
+						}
+						if (1==info.getMustFlag()){
+							info.setMustFlag(0);
+						}
+					}
+					defectRecord.setFileGistdataList(projectTemplateList);
+					break;
+				case "13":
+					List<ProjectTemplateInfo> projectOtherList = projectTemplateService.getProjectTemplateList(relateInfo);
+					for (ProjectTemplateInfo info: projectOtherList) {
+						if ("其他资料".equals(info.getAttachName())){
+							info.setMustFlag(1);
+							//判定必填项的下的是否有附件信息
+							if (info.getWorkAttachments().size()!=0){
+								info.setFileFlag(1);
+							}
+						}else{
+							if (1==info.getMustFlag()){
+								info.setMustFlag(0);
+							}
+						}
+					}
+					defectRecord.setFileOtherList(projectOtherList);
+					break;
+			}
+
+		}
+
+		ProjectRecords projectRecords = new ProjectRecords();
+		try {
+			MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		//获取合同信息
+		WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+		projectRecords.setWorkContractInfo(projectContractInfo);
+		defectRecord.getReport().setProject(projectRecords);
+		model.addAttribute("materialDefectRecord", defectRecord);
+		model.addAttribute("workClientInfoName", defectRecord.getClientName());
+		model.addAttribute("project", defectRecord.getReport().getProject());
+
+		if(StringUtils.isNotBlank(defectRecord.getProcessInstanceId())){
+			ProcessInstance processInstance = actTaskService.getProcIns(defectRecord.getProcessInstanceId());
+			if (processInstance!=null) {
+				Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+				Act act = new Act();
+				act.setTaskId(taskInfok.getId());
+				act.setTaskName(taskInfok.getName());
+				act.setProcDefId(taskInfok.getProcessDefinitionId());
+				act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+				act.setProcInsId(taskInfok.getProcessInstanceId());
+				act.setTask(taskInfok);
+				defectRecord.setAct(act);
+			}
+		}
+
+		if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("view")){
+			return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+		}else if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("modify")){
+			return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
+		}else if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("zixunModify")){
+			return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
+		}
+		if("1".equals(defectRecord.getStatus()) || "3".equals(defectRecord.getStatus())){
+			return "modules/ruralprojectrecords/record/cost/projectRecordDescriptionForm";
+		}
+		return "modules/ruralprojectrecords/record/cost/projectRecordDescriptionForm";
+	}
+
+	//归档资料缺失说明
+	@RequestMapping(value = {"descriptionAuditSave"})
+	public String descriptionAuditSave(ProjectMaterialDefectRecord materialDefectRecord, HttpServletRequest request, HttpServletResponse response, Model model,
+									   RedirectAttributes redirectAttributes) {
+		try {
+			ProjectMaterialDefectRecord defectRecord = materialDefectRecordService.getMaterialDefectRecord(materialDefectRecord.getId());
+			MyBeanUtils.copyBeanNotNull2Bean(materialDefectRecord, defectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			//查询项目新增报告信息
+			ProjectReportData reportData = projectReportDataService.get(defectRecord.getReport().getId());
+			// 对不同环节的业务逻辑进行操作
+			List<User> users = null;
+			User auditUser = null;
+			String taskDefKey =  defectRecord.getAct().getTaskDefKey();
+			 if ("bzshb".equals(taskDefKey)){
+				users = UserUtils.getByProssType(defectRecord.getProcessInstanceId(),5);
+				if (users==null ) {
+					users = Lists.newArrayList();
+					//查询总审人员信息(新增报告选择得总审人员)
+					User zsUser = UserUtils.get(reportData.getBzshbUserId());
+					users.add(zsUser);
+				}
+			}else if ("modifyApply".equals(taskDefKey)){
+				users = UserUtils.getByProssType(defectRecord.getProcessInstanceId(),1);
+			}
+
+			String flag = defectRecord.getAct().getFlag();
+			if ("yes".equals(flag) && (users==null || users.size()==0)){
+				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+			}else {
+				String str = materialDefectRecordService.descriptionAuditSave(defectRecord,users);
+				addMessage(redirectAttributes, str);
+			}
+		}catch (Exception e){
+			logger.error("Exception e:"+e);
+			addMessage(redirectAttributes, "报告归档流程审批失败");
+		}
+		if (StringUtils.isNotBlank(materialDefectRecord.getHome()) && materialDefectRecord.getHome().equals("home")){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(materialDefectRecord.getHome()) && "notifyList".equals(materialDefectRecord.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}else {
+			RuralProjectRecords ruralProjectRecords = projectRecordsService.get(materialDefectRecord.getReportId());
+			if(StringUtils.isNotBlank(materialDefectRecord.getCondition())){
+				if("earlyArchive".equals(materialDefectRecord.getCondition())){
+					return "redirect:"+Global.getAdminPath()+"/project/projectEarlyPigeonhole/?repage";
+				}else if("completionArchive".equals(materialDefectRecord.getCondition())) {
+					return "redirect:" + Global.getAdminPath() + "/project/projectCompletionPigeonhole/?repage";
+				}
+			}
+			if(null != ruralProjectRecords){
+				return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+			}
+			if (StringUtils.isNotBlank(materialDefectRecord.getView()) && materialDefectRecord.getView().equals("zixunModify")){
+				return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+			}
+			return "redirect:"+Global.getAdminPath()+"/project/projectEarlyPigeonhole/?repage";
+		}
+	}
+}

+ 5 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportRecordController.java

@@ -14,8 +14,10 @@ import javax.validation.ConstraintViolationException;
 
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectMaterialDefectRecordService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
@@ -26,6 +28,7 @@ import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -62,6 +65,8 @@ public class ProjectReportRecordController extends BaseController {
 	private ProjectReportDataService projectReportDataService;
 	@Autowired
 	private RuralProjectRecordsService projectRecordsService;
+	@Autowired
+	private ProjectMaterialDefectRecordService materialDefectRecordService;
 
 	@ModelAttribute
 	public ProjectReportRecord get(@RequestParam(required=false) String id) {

+ 28 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java

@@ -43,6 +43,8 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private Integer projectReportStatus; //报告状态
     private Integer projectReportStatusTwo; //报告签发状态
     private Integer projectReportRecordStatus; //归档状态
+    private Integer defectRecordStatus; //归档资料缺失说明状态
+
     private Integer downProjectReportRecordStatus; //线下归档状态
     private String reportedState;   //上报状态
     private String contractId;   //合同id
@@ -52,6 +54,8 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private String prdtId;
     private String prdtProcessinstanceId;//流程2流程id
     private String prrProcessInstanceId;
+    private String pmdrProcessInstanceId;//资料缺失说明流程id
+    private String pmdrId; //归档资料缺失说明id
     private Integer flag;
     private String flagAdmin;
     private String flagArchive;
@@ -699,4 +703,28 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     public void setReportedAuditNotifyFlag(Integer reportedAuditNotifyFlag) {
         this.reportedAuditNotifyFlag = reportedAuditNotifyFlag;
     }
+
+    public Integer getDefectRecordStatus() {
+        return defectRecordStatus;
+    }
+
+    public void setDefectRecordStatus(Integer defectRecordStatus) {
+        this.defectRecordStatus = defectRecordStatus;
+    }
+
+    public String getPmdrProcessInstanceId() {
+        return pmdrProcessInstanceId;
+    }
+
+    public void setPmdrProcessInstanceId(String pmdrProcessInstanceId) {
+        this.pmdrProcessInstanceId = pmdrProcessInstanceId;
+    }
+
+    public String getPmdrId() {
+        return pmdrId;
+    }
+
+    public void setPmdrId(String pmdrId) {
+        this.pmdrId = pmdrId;
+    }
 }

+ 18 - 5
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java

@@ -5,10 +5,7 @@ package com.jeeplus.modules.ruralprojectrecords.dao;
 
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportDataTwo;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
-import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
@@ -61,19 +58,35 @@ public interface RuralProjectMessageDao extends CrudDao<RuralProjectRecords> {
      * @return
      */
     int insertProjectReportRecord(ProjectReportRecord projectReportRecord);
+    /**
+     * 添加归档信息
+     * @param projectMaterialDefectRecord
+     * @return
+     */
+    int insertProjectMaterialDefectRecord(ProjectMaterialDefectRecord projectMaterialDefectRecord);
 
     /**
      * 修改归档信息
      * @param projectReportRecord
      * @return
      */
-    int updateProjectReportRecord(ProjectReportRecord projectReportRecord);
+    int updateProjectReportRecord(ProjectReportRecord projectReportRecord); /**
+     * 修改归档信息
+     * @param projectMaterialDefectRecord
+     * @return
+     */
+    int updateProjectMaterialDefectRecord(ProjectMaterialDefectRecord projectMaterialDefectRecord);
 
     /**
      * 更新流程实例ID
      * @return
      */
     int updateProcessInstanceId(ProjectReportRecord workReimbursement);
+    /**
+     * 更新流程实例ID
+     * @return
+     */
+    int updateDefectRecordProcessInstanceId(ProjectMaterialDefectRecord projectMaterialDefectRecord);
 
     /**
      * 查询归档信息

+ 27 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -70,6 +70,9 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private Integer projectReportStatus; //报告状态
 	private Integer projectReportStatusTwo; //报告流程2状态
 	private Integer projectReportRecordStatus; //归档状态
+	private Integer defectRecordStatus; //归档资料缺失说明状态
+	private String pmdrProcessInstanceId; //归档资料缺失说明流程id
+	private String pmdrId; //归档资料缺失说明id
 	private Integer downProjectReportRecordStatus; //线下归档状态
 
 	private String prrProcessInstanceId; //线上归档流程号
@@ -1489,4 +1492,28 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setReportedAuditNotifyFlag(Integer reportedAuditNotifyFlag) {
 		this.reportedAuditNotifyFlag = reportedAuditNotifyFlag;
 	}
+
+	public Integer getDefectRecordStatus() {
+		return defectRecordStatus;
+	}
+
+	public void setDefectRecordStatus(Integer defectRecordStatus) {
+		this.defectRecordStatus = defectRecordStatus;
+	}
+
+	public String getPmdrProcessInstanceId() {
+		return pmdrProcessInstanceId;
+	}
+
+	public void setPmdrProcessInstanceId(String pmdrProcessInstanceId) {
+		this.pmdrProcessInstanceId = pmdrProcessInstanceId;
+	}
+
+	public String getPmdrId() {
+		return pmdrId;
+	}
+
+	public void setPmdrId(String pmdrId) {
+		this.pmdrId = pmdrId;
+	}
 }

+ 206 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -1442,9 +1442,41 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
     }
 
     @Transactional(readOnly = false)
+    public void saveDefectRecordWorkattachments(ProjectMaterialDefectRecord materialDefectRecord) {
+        List<Workattachment> workattachments = materialDefectRecord.getWorkAttachments();
+        if (workattachments!=null && workattachments.size()!=0){
+            for (Workattachment workattachment:workattachments){
+                if (workattachment.getId() == null) {
+                    continue;
+                }
+                if (workattachment.DEL_FLAG_NORMAL.equals(workattachment.getDelFlag())) {
+                    workattachment.setAttachmentId(materialDefectRecord.getId());
+                    workattachment.setAttachmentFlag("99");
+                    workattachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (com.jeeplus.common.utils.StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
+                        workattachment.preInsert();
+                        workattachmentDao.insert(workattachment);
+                    } else {
+                        workattachment.preUpdate();
+                        workattachmentDao.update(workattachment);
+                    }
+                } else {
+                    workattachmentDao.delete(workattachment);
+                }
+            }
+        }
+
+    }
+
+
+    @Transactional(readOnly = false)
     public void insert(ProjectReportRecord projectReportRecord) {
         dao.insertProjectReportRecord(projectReportRecord);
     }
+    @Transactional(readOnly = false)
+    public void insertProjectMaterialDefectRecord(ProjectMaterialDefectRecord materialDefectRecord) {
+        dao.insertProjectMaterialDefectRecord(materialDefectRecord);
+    }
 
     @Transactional(readOnly = false)
     public void save(ProjectReportRecord projectReportRecord) {
@@ -1463,7 +1495,23 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
         saveWorkattachments(projectReportRecord);
     }
-
+    @Transactional(readOnly = false)
+    public void saveProjectMaterialDefectRecord(ProjectMaterialDefectRecord materialDefectRecord) {
+//        ProjectReportData projectReportData =materialDefectRecord.getReport();
+//        projectReportData.setFileStatus("2");
+//        //修改归档状态
+//        projectReportDataService.updateFileStatus(projectReportData);
+        if (materialDefectRecord.getIsNewRecord()){
+            materialDefectRecord.preInsert();
+            materialDefectRecord.setCreateDate(new Date());
+            dao.insertProjectMaterialDefectRecord(materialDefectRecord);
+        }else{
+            materialDefectRecord.preUpdate();
+            //修改归档信息
+            dao.updateProjectMaterialDefectRecord(materialDefectRecord);
+        }
+        saveDefectRecordWorkattachments(materialDefectRecord);
+    }
 
 
     /**
@@ -2502,6 +2550,163 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
         return "true";
     }
+    /**
+     * 提交归档资料缺失说明存储
+     * @param materialDefectRecord
+     * @param variables
+     */
+    @Transactional(readOnly = false)
+    public String saveProjectReportRecord(ProjectMaterialDefectRecord materialDefectRecord, Map<String, Object> variables, String processInstanceId) {
+
+        User user = UserUtils.getUser();
+        Boolean insert = false;
+        if (com.jeeplus.common.utils.StringUtils.isBlank(materialDefectRecord.getId())){
+            materialDefectRecord.setCompanyId(user.getComId());
+            materialDefectRecord.setOfficeId(user.getOffice().getId());
+            materialDefectRecord.preInsert();
+            insert = true;
+        }
+        //将附件插入数据库
+        saveDefectRecordWorkattachments(materialDefectRecord);
+        //对数据进行插入数据库
+        if (insert) { //新增操作
+            this.insertProjectMaterialDefectRecord(materialDefectRecord);
+        }else {//修改操作
+            this.saveProjectMaterialDefectRecord(materialDefectRecord);
+        }
+        //判断如果是暂存,则跳过流程操作
+        if("1".equals(materialDefectRecord.getFlag())){
+            return "true";
+        }
+        //获取项目信息
+        RuralProjectRecords record = ruralProjectRecordsService.get(materialDefectRecord.getReport().getProject().getId());
+        //查询项目新增报告信息
+        ProjectReportData reportData = projectReportDataService.get(record.getPrdId());
+        //启动流程操作
+        String title = "项目【"+ record.getProjectName()+"】资料缺失申请待审批";
+        String str = "项目【"+ record.getProjectName()+"】资料缺失申请待审批";
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        identityService.setAuthenticatedUserId(user.getId());
+        // 启动流程
+        String businessKey = materialDefectRecord.getId().toString();
+        Office office = UserUtils.getSelectOffice();
+        WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("5864872f45b84acd893010e66a3db2c8", office);
+
+        String processType = workActivityMenu.getProcessType();
+        StringBuffer buffer = new StringBuffer();
+        Activity activity = new Activity();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(materialDefectRecord.getId(),
+                        null,
+                        materialDefectRecord.getCompanyId(),
+                        title,
+                        str,
+                        "99",
+                        "0",
+                        "待审批",
+                        ""
+                );
+        List<User> users = new ArrayList<>();
+
+        //查询总审人员信息(新增报告选择得总审人员)
+        List<User> bzshbs = new ArrayList<>();
+        User bzshbsUser = UserUtils.get(reportData.getBzshbUserId());
+        if(null != bzshbsUser){
+            bzshbs.add(bzshbsUser);
+        }else if(null == bzshbsUser){
+            return "流程审批总审人员下无用户,请联系管理员!";
+        }
+        if (com.jeeplus.common.utils.StringUtils.isNotBlank(workActivityMenu.getId())) {
+            workProjectNotify.setNotifyRole("");
+            workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
+            List<Activity> activities = workActivityMenu.getActivities();
+            for (Activity a : activities) {
+                String encount = a.getEncount();
+                String enlist = a.getEnlist();
+                if (a.getRole()!=null && com.jeeplus.common.utils.StringUtils.isNotBlank(a.getRole().getEnname())){
+                    List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"10",materialDefectRecord.getCreateBy());
+                    if (enusers.size()==0){
+                        materialDefectRecord.setStatus("1");
+                        return "报告归档流程审批人不能为空,角色"+a.getRole().getName()+"下无用户,请联系管理员!";
+                    }
+                    variables.put(enlist, enusers);
+                    variables.put(encount, enusers.size());
+                }
+                if (a.getDelFlag().equals("0") && a.getCount() == 1) {
+                    activity = a;
+                }
+            }
+            buffer.append(activity.getRole().getEnname());
+            if (activity != null && com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getId())) {
+                //角色审批
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getRole().getEnname())) {
+                    users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"10",materialDefectRecord.getCreateBy());
+                }
+                //人员审批
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            variables.put("bzshbList", bzshbs);
+            if (bzshbs.size()==0){
+                materialDefectRecord.setStatus("1");
+                this.saveProjectMaterialDefectRecord(materialDefectRecord);
+                return "流程审批人不能为空,报告归档总审下无用户,请联系管理员!";
+            }
+            variables.put("bzshbcount",bzshbs.size());
+            processType = "materialDefectRecord";
+            users.addAll(bzshbs);
+        }
+        for (User u : users){
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("总审审批");
+            workProjectNotifyService
+                    .save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7001");
+            extras.put("id",workProjectNotify.getId());
+            extras.put("procDefKey","101");
+            UserUtils.pushInfoToApp(title,str,extras,u.getId());
+            UserUtils.pushIm(u.getId(),str);
+        }
+        variables.put("type", processType);
+        variables.put("busId", businessKey);
+        variables.put("title", "报告归档资料缺失申请,报告号为" +reportData.getNumber());//设置标题;
+
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+
+        materialDefectRecord.setProcessInstance(processInstance);
+        if (com.jeeplus.common.utils.StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        ProjectReportData projectReportData =materialDefectRecord.getReport();
+        projectReportData.setFileStatus("2");
+        projectReportDataService.updateFileStatus(projectReportData);
+        // 修改更新流程实例ID
+        materialDefectRecord.setProcessInstanceId(processInstance.getId());
+        dao.updateDefectRecordProcessInstanceId(materialDefectRecord);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+        List<Activity> list = workActivityMenu.getActivities();
+        if (list != null && list.size() != 0) {
+            workActivityProcessService.saveList(list, processInstance.getId());
+        } else {
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessKey(processType);
+            workActivityProcess.setCount(1);
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcess.setIsApproval("0");
+            workActivityProcessService.insert(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(bzshbs,processInstance.getId(),1,1);
+        }
+        return "true";
+    }
 
     /**
      * 保存上报数据

+ 123 - 5
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -27,10 +27,7 @@ import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportDataTwo;
-import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
-import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
@@ -331,6 +328,10 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         workProjectNotify.setType("97");
         //查询所有需要当前登录人进行处理的项目信息
         List<WorkProjectNotify> newReportNotifyListTwo = workProjectNotifyService.findList(workProjectNotify);
+        //查询新的新增报告流程信息代办
+        workProjectNotify.setType("99");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> materialDefectRecord = workProjectNotifyService.findList(workProjectNotify);
         //查询新的归档流程信息代办
         workProjectNotify.setType("101");
         //查询所有需要当前登录人进行处理的项目信息
@@ -412,6 +413,19 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     break;
                 }
             }
+            //报告归档资料缺失说明修改权限处理
+            for (WorkProjectNotify notify: materialDefectRecord) {
+                if(notify.getNotifyId().equals(records1.getPrdtId())){
+                    records1.setReportNotifyId(notify.getId());
+                    if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setNewReportNotifyFlag(1);
+                    }
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setNewReportAuditNotifyFlag(1);
+                    }
+                    break;
+                }
+            }
             //新代办修改权限处理
             for (WorkProjectNotify notify: newRecordNotifyList) {
                 if(notify.getNotifyId().equals(records1.getPrrId())){
@@ -526,6 +540,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
 
         //线上归档状态
         projectRecordTreeData.setProjectReportRecordStatus(info.getProjectReportRecordStatus());
+        //归档资料缺失说明状态
+        projectRecordTreeData.setDefectRecordStatus(info.getDefectRecordStatus());
+        //归档资料缺失说明流程id
+        projectRecordTreeData.setPmdrProcessInstanceId(info.getPmdrProcessInstanceId());
+        //归档资料缺失说明id
+        projectRecordTreeData.setPmdrId(info.getPmdrId());
         //线下归档状态
         projectRecordTreeData.setDownProjectReportRecordStatus(info.getDownProjectReportRecordStatus());
         //上报状态
@@ -1702,7 +1722,49 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         }
         saveWorkattachments(projectReportRecord);
     }
+    @Transactional(readOnly = false)
+    public void saveProjectMaterialDefectRecord(ProjectMaterialDefectRecord materialDefectRecord) {
+//        ProjectReportData projectReportData =materialDefectRecord.getReport();
+//        projectReportData.setFileStatus("2");
+//        //修改归档状态
+//        projectReportDataService.updateFileStatus(projectReportData);
+        if (materialDefectRecord.getIsNewRecord()){
+            materialDefectRecord.preInsert();
+            materialDefectRecord.setCreateDate(new Date());
+            dao.insertProjectMaterialDefectRecord(materialDefectRecord);
+        }else{
+            materialDefectRecord.preUpdate();
+            //修改归档信息
+            dao.updateProjectMaterialDefectRecord(materialDefectRecord);
+        }
+        saveDefectRecordWorkattachments(materialDefectRecord);
+    }
+    @Transactional(readOnly = false)
+    public void saveDefectRecordWorkattachments(ProjectMaterialDefectRecord materialDefectRecord) {
+        List<Workattachment> workattachments = materialDefectRecord.getWorkAttachments();
+        if (workattachments!=null && workattachments.size()!=0){
+            for (Workattachment workattachment:workattachments){
+                if (workattachment.getId() == null) {
+                    continue;
+                }
+                if (workattachment.DEL_FLAG_NORMAL.equals(workattachment.getDelFlag())) {
+                    workattachment.setAttachmentId(materialDefectRecord.getId());
+                    workattachment.setAttachmentFlag("99");
+                    workattachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (com.jeeplus.common.utils.StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
+                        workattachment.preInsert();
+                        workattachmentDao.insert(workattachment);
+                    } else {
+                        workattachment.preUpdate();
+                        workattachmentDao.update(workattachment);
+                    }
+                } else {
+                    workattachmentDao.delete(workattachment);
+                }
+            }
+        }
 
+    }
 
 
     /**
@@ -1710,7 +1772,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
      * @param projectReportRecord
      */
     @Transactional(readOnly = false)
-    public void 	cancelInvalidate(ProjectReportRecord projectReportRecord){
+    public void cancelInvalidate(ProjectReportRecord projectReportRecord){
         String invalidateProcessInstanceId = projectReportRecord.getProcessInstanceId();
         //将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
         WorkActivityProcess process = new WorkActivityProcess();
@@ -1761,6 +1823,62 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         save(projectReportRecord);
 
     }
+    /**
+     * 归档资料缺失说明:强制撤销
+     * @param materialDefectRecord
+     */
+    @Transactional(readOnly = false)
+    public void cancelDescription(ProjectMaterialDefectRecord materialDefectRecord){
+        String invalidateProcessInstanceId = materialDefectRecord.getProcessInstanceId();
+        //将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
+        WorkActivityProcess process = new WorkActivityProcess();
+        process.setProcessInstanceId(materialDefectRecord.getProcessInstanceId());
+        process.setIsApproval("0");
+        WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+        workActivityProcess.setProcessInstanceId(materialDefectRecord.getProcessInstanceId());
+        List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
+        WorkProjectNotify notify = new WorkProjectNotify();
+        notify.setNotifyId(materialDefectRecord.getId());
+        List<User> userList = workProjectNotifyService.readByNotifyId(notify);
+        if (userList!=null && userList.size()!=0) {
+            for (User u : userList) {
+                User user = UserUtils.get(u.getId());
+                UserUtils.pushMeIm(user.getId());
+            }
+        }
+        if(processList!=null && processList.size()>0){
+            for (int i =0;i<processList.size();i++) {
+                WorkActivityProcess p = processList.get(i);
+                if(com.jeeplus.common.utils.StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())){
+                    p.setIsApproval("-1");
+                    p.setDelFlag("1");
+                    workActivityProcessDao.updateDelFlagAndIsApproval(p);
+                }
+            }
+            WorkActivityProcess pro = new WorkActivityProcess();
+            pro.setId("");
+            pro.preInsert();
+            pro.setDelFlag("0");
+            pro.setRemarks("[强制撤销]");
+            pro.setProcessKey(processList.get(0).getProcessKey());
+            pro.setIsApproval("1");
+            pro.setProcessInstanceId(processList.get(0).getProcessInstanceId());
+            pro.setCount(0);
+            workActivityProcessDao.insert(pro);
+        }
+
+        //结束该流程,设为"撤销"状态
+        try {
+            actTaskService.endProcessInstance(invalidateProcessInstanceId,"报告归档-强制撤销");
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+        materialDefectRecord.setStatus("3");
+        materialDefectRecord.preUpdate();
+        saveProjectMaterialDefectRecord(materialDefectRecord);
+
+    }
 
     public ProjectRecords getMasters(String id) {
         ProjectRecords projectRecords = dao.getRuralProjectRecords(id);

+ 32 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -18,6 +18,7 @@ import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
 import com.jeeplus.modules.projectEngineering.entity.EngineeringTree;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
@@ -1726,6 +1727,37 @@ public class RuralCostProjectMessageController extends BaseController {
         return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
     }
 
+    /**
+     * 报告归档:资料缺失说明-强制撤回
+     */
+    @RequestMapping("cancelDescription")
+    public String cancelDescription(ProjectMaterialDefectRecord materialDefectRecord, RedirectAttributes redirectAttributes){
+        ProjectMaterialDefectRecord defectRecord = projectReportRecordService.getMaterialDefectRecord(materialDefectRecord.getId());
+        try {
+            MyBeanUtils.copyBeanNotNull2Bean(materialDefectRecord, defectRecord);
+            if(defectRecord.getStatus().equals("5")){
+                addMessage(redirectAttributes, "报告归档资料缺失说明已审批通过,无法撤回");
+            }else{
+                if(defectRecord.getStatus().equals("2")){
+                    ruralProjectMessageService.cancelDescription(defectRecord);
+                    addMessage(redirectAttributes, "强制撤回归档资料缺失说明成功");
+                }else{
+                    addMessage(redirectAttributes, "报告归档资料缺失说明不是送审状态,无法撤回");
+                    if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("zixun")){
+                        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+                    }
+                    return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+                }
+            }
+        }catch (Exception e){
+            addMessage(redirectAttributes, "强制撤回报告归档资料缺失说明失败");
+            logger.error("强制撤回归档资料缺失说明失败",e);
+        }
+        if (StringUtils.isNotBlank(defectRecord.getView()) && defectRecord.getView().equals("zixun")){
+            return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
 
     /**
      * 项目上报

+ 3 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -13,6 +13,7 @@ import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
@@ -1750,4 +1751,6 @@ public class RuralCostProjectMessageNewController extends BaseController {
             return "modules/ruralprojectrecords/cost/projectcontentinfo/reportView";
         }
     }
+
+
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewTwoController.java

@@ -158,6 +158,7 @@ public class RuralProjectMessageNewTwoController  extends BaseController {
         List<WorkReviewAudit> workReviewAudits = projectContentDataService.findListIssue(reviewId,"自检");
         if (null!=workReviewAudits){
             projectReportData.setProjectReviewList(workReviewAudits);
+            model.addAttribute("workReviews",workReviewAudits);
         }
         projectcontentinfo.setProjectReportDataTwo(projectReportData);
 

+ 200 - 10
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -2880,7 +2880,7 @@ public class WorkProjectNotifyController extends BaseController {
 
 					ProjectReportDataTwo projectReportDataTwo = projectReportDataTwoService.getOnRural(workProjectNotify.getNotifyId());
 					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.getQueryProjectUsers(projectReportDataTwo.getProject().getId());
-					ProjectReportData data=projectReportDataService.getReportDataByProjectId(projectReportDataTwo.getProject().getId());
+					ProjectReportData data = projectReportDataService.getReportDataByProjectId(projectReportDataTwo.getProject().getId());
 					if (StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())) {
 						ruralProjectRecords.setProjectMasterId(projectReportDataTwo.getPrincipal().getId());
 						ruralProjectRecords.setProjectMasterName(projectReportDataTwo.getPrincipal().getName());
@@ -2890,19 +2890,19 @@ public class WorkProjectNotifyController extends BaseController {
 					Projectcontentinfo projectcontentinfo = new Projectcontentinfo();
 					projectcontentinfo.setProjectReportData(data);
 					//获取自检的质量复核标准
-					String reviewId="";
-					if ("2".equals(ruralProjectRecords.getSubmitMoney())){
-						reviewId="1";
-					}else{
-						reviewId="";
+					String reviewId = "";
+					if ("2".equals(ruralProjectRecords.getSubmitMoney())) {
+						reviewId = "1";
+					} else {
+						reviewId = "";
 					}
-					List<WorkReviewAudit> workReview = projectContentDataService.findListIssue(reviewId,"自检");
-					if (null!=workReview){
+					List<WorkReviewAudit> workReview = projectContentDataService.findListIssue(reviewId, "自检");
+					if (null != workReview) {
 						projectReportDataTwo.setProjectReviewList(workReview);
 					}
 
 					projectcontentinfo.setProjectReportDataTwo(projectReportDataTwo);
-					model.addAttribute("workReviews",workReview);
+					model.addAttribute("workReviews", workReview);
 					//添加当前文件服务器类型
 					projectcontentinfo.setUploadMode(uploadMode);
 					List<MainDictDetail> achievementTypes = DictUtils.getMainDictList("achievement_type");
@@ -2977,7 +2977,7 @@ public class WorkProjectNotifyController extends BaseController {
 												info.setAttachTypes(info.getAttachTypes() + ",zip");
 											}
 											if (!info.getAttachTypes().contains("rar")) {
-													info.setAttachTypes(info.getAttachTypes() + ",rar");
+												info.setAttachTypes(info.getAttachTypes() + ",rar");
 											}
 										}
 									}
@@ -3052,6 +3052,196 @@ public class WorkProjectNotifyController extends BaseController {
 						projectcontentinfo.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageTwoView";
 					}
+				}else if (workProjectNotify.getType().equals("99")) {    //资料缺失说明
+						//查询“配农网”工程类型id
+						String engineeringId = engineeringService.getEngineeringId("202");
+						ProjectMaterialDefectRecord materialDefectRecord = projectReportRecordService.getMaterialDefectRecord(workProjectNotify.getNotifyId());
+						//获取项目信息
+						RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(materialDefectRecord.getReportId());
+						//判断是否未全过程归档项目信息
+						if("3".equals(ruralProjectRecords.getProjectType())){
+							Act act = getByAct(materialDefectRecord.getProcessInstanceId());
+							materialDefectRecord.setAct(act);
+							materialDefectRecord.setHome("home");
+							model.addAttribute("materialDefectRecord", materialDefectRecord);
+							if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+								return "modules/processProjectReportRecord/projectReportRecordView";
+							}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+								return "modules/processProjectReportRecord/projectReportRecordAudit";
+							} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+								return "modules/processProjectReportRecord/projectReportRecordModifyApply";
+							} else {
+								return "modules/processProjectReportRecord/projectReportRecordView";
+							}
+						}
+						ProjectReportData projectReportData = projectReportDataService.getOnRural(materialDefectRecord.getReport().getId());
+						materialDefectRecord.setProjectReportData(projectReportData);
+						Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+						projectcontentinfo.setProjectReportData(projectReportData);
+						//获取子项目列表信息
+						List<SubProjectInfo> subProjectInfos=this.queryReportDetails(ruralProjectRecords.getId());
+						//获取合同信息
+						WorkContractInfo workContractInfo=this.queryWorkContract(ruralProjectRecords.getId());
+						if(null != workContractInfo){
+							WorkClientInfo clientInfo = workClientInfoService.get(workContractInfo.getClient().getId());
+							model.addAttribute("workClientInfo", clientInfo);
+							if(StringUtils.isNotBlank(workContractInfo.getChargeCriterion())){
+								//收费标准
+								String [] biao=workContractInfo.getChargeCriterion().split(",");
+								List<String> chargeCriterionList=new ArrayList<>();
+								for (int i=0;i<biao.length;i++){
+									chargeCriterionList.add(biao[i]);
+								}
+								materialDefectRecord.setChargeCriterionList(chargeCriterionList);
+							}
+						}
+
+						Act act = getByAct(materialDefectRecord.getProcessInstanceId());
+						materialDefectRecord.setAct(act);
+
+						if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+							materialDefectRecord.setHome(workProjectNotify.getHome());
+						}else{
+							materialDefectRecord.setHome("home");
+						}
+
+
+						WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+						ruralProjectRecords.setWorkContractInfo(projectContractInfo);
+						materialDefectRecord.getReport().setProject(new ProjectRecords());
+						MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords,materialDefectRecord.getReport().getProject());//将编辑表单中的非NULL值覆盖数据库记录中的值
+						if(null != projectContractInfo){
+							if(projectContractInfo.getWorkClientInfoList().size()>0){
+								model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+							}
+						}
+
+						ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+						//添加项目类型
+						relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+						relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+						//判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+						String money=ruralProjectRecords.getSubmitMoney();
+						Integer approvalMoney=null;
+						if(StringUtils.isBlank(money)){
+							approvalMoney=1;
+						}else{
+							approvalMoney=Integer.parseInt(money);
+						}
+						switch (approvalMoney){
+							case 0:
+								//金额为0
+								relateInfo.setAttachmentProjectApprovalMoney(null);
+								break;
+							case 1:
+								//500w以下金额状态
+								relateInfo.setAttachmentProjectApprovalMoney("1");
+								break;
+							case 2:
+								//500w以上金额状态
+								relateInfo.setAttachmentProjectApprovalMoney("2");
+								break;
+						}
+
+						//添加报告类型
+						//relateInfo.setRequiredStage(2);
+						List<Integer> requiredStageList = Lists.newArrayList();
+						requiredStageList.add(1);
+						requiredStageList.add(2);
+						relateInfo.setRequiredStageList(requiredStageList);
+						relateInfo.setId(ruralProjectRecords.getId());
+						//查询报告文件、依据性文件、其他文件必填列表以及数据
+						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+						for (MainDictDetail mainDict : mainDictDetails) {
+							relateInfo.setAttachType(mainDict.getValue());
+							switch (mainDict.getValue()) {
+								case "11":
+									List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+									for (ProjectTemplateInfo info: fileAttachmentList) {
+										info.setAttachTypes(info.getAttachTypes().toLowerCase());
+										if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+											if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+												if(!info.getAttachTypes().contains("zip")){
+													info.setAttachTypes(info.getAttachTypes()+",zip");
+												}
+												if(!info.getAttachTypes().contains("rar")){
+													info.setAttachTypes(info.getAttachTypes()+",rar");
+												}
+											}
+										}
+										if (1==info.getMustFlag()){
+											info.setMustFlag(0);
+										}
+									}
+									materialDefectRecord.setFileAttachmentList(fileAttachmentList);
+									break;
+								case "12":
+									List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+									for (ProjectTemplateInfo info: projectTemplateList) {
+										info.setAttachTypes(info.getAttachTypes().toLowerCase());
+										if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+											if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+												if(!info.getAttachTypes().contains("zip")){
+													info.setAttachTypes(info.getAttachTypes()+",zip");
+												}
+												if(!info.getAttachTypes().contains("rar")){
+													info.setAttachTypes(info.getAttachTypes()+",rar");
+												}
+											}
+										}
+										if (1==info.getMustFlag()){
+											info.setMustFlag(0);
+										}
+									}
+									materialDefectRecord.setFileGistdataList(projectTemplateList);
+									break;
+								case "13":
+									List<ProjectTemplateInfo> projectOtherList = projectTemplateService.getProjectTemplateList(relateInfo);
+									for (ProjectTemplateInfo info: projectOtherList) {
+										if ("其他资料".equals(info.getAttachName())){
+											info.setMustFlag(1);
+											//判定必填项的下的是否有附件信息
+											if (info.getWorkAttachments().size()!=0){
+												info.setFileFlag(1);
+											}
+										}else{
+											if (1==info.getMustFlag()){
+												info.setMustFlag(0);
+											}
+										}
+									}
+									materialDefectRecord.setFileOtherList(projectOtherList);
+									break;
+							}
+						}
+
+						materialDefectRecord.setUploadMode(uploadMode);
+						model.addAttribute("projectcontentinfo", projectcontentinfo);
+						model.addAttribute("projectRecords", ruralProjectRecords);
+						model.addAttribute("projectReportData", projectReportData);
+						model.addAttribute("workContractInfo", workContractInfo);
+						model.addAttribute("materialDefectRecord", materialDefectRecord);
+						model.addAttribute("project", materialDefectRecord.getReport().getProject());
+						if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							return "modules/ruralprojectrecords/record/projectRepordDescriptionView";
+						}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							model.addAttribute("identification","projectRepordDescription");
+							model.addAttribute("identificationName","资料缺失说明审核意见");
+							return "modules/ruralprojectrecords/record/projectRepordDescriptionAudit";
+						} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+							return "modules/ruralprojectrecords/record/projectRepordDescriptionModify";
+						} else {
+							materialDefectRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileAttachmentList()));
+							materialDefectRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileGistdataList()));
+							materialDefectRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(materialDefectRecord.getFileOtherList()));
+							return "modules/ruralprojectrecords/record/projectRepordDescriptionView";
+						}
 				}else if (workProjectNotify.getType().equals("46")) {    //工作内容报告变更
 					ProjectReportData projectReportData = projectReportChangeService.get(workProjectNotify.getNotifyId());
 					Act act = getByAct(projectReportData.getProcessInstanceId());

+ 37 - 2
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportRecordDao.xml

@@ -28,7 +28,24 @@
 		d.name AS "report.name",
 		d.number AS "report.number"
 	</sql>
-	
+	<sql id="projectMaterialDefectRecordColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.report_id AS "report.id",
+		a.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.date AS "date",
+		a.status AS "status",
+		a.process_instance_id AS "processInstanceId",
+		u.name AS "createBy.name",
+		d.name AS "report.name",
+		d.number AS "report.number"
+	</sql>
 	<sql id="projectReportRecordJoins">
 		JOIN project_report_data d ON d.id = a.report_id
 		JOIN sys_user u ON u.id = a.create_by
@@ -93,7 +110,24 @@
 		WHERE a.id = #{id}
 	</select>
 
-
+	<select id="getProjectMaterialDefectRecord"
+			resultType="com.jeeplus.modules.projectcontentinfo.entity.ProjectMaterialDefectRecord">
+		SELECT
+		<include refid="projectMaterialDefectRecordColumns"/>,
+		wci.contract_num AS "contractNum",
+		wci.name AS "contractName",
+		wct.name AS "clientName",
+		d.report_date AS "report.reportDate",
+		r.project_name AS "projectName",
+		r.project_id AS "projectNum",
+		r.id AS "reportId"
+		FROM project_material_defect_record a
+		<include refid="projectReportRecordJoins"/>
+		LEFT JOIN rural_project_records r ON r.id = d.project_id
+		LEFT JOIN work_contract_info wci on r.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		WHERE a.id = #{mid}
+	</select>
 
 
 	<select id="getNumber" resultType="String" >
@@ -342,6 +376,7 @@
 		WHERE a.report_id = #{reportId}
 	</select>
 
+
 	<update id="adminModifyRecord">
 		update
 		  rural_project_report_record

+ 55 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -349,6 +349,9 @@
 		,ifnull(prdt.status,0) as "projectReportStatusTwo"
 		,prdt.id as prdtId
 		,prdt.process_instance_id as prdtProcessinstanceId
+		,ifnull(pmdr.status,0) as "defectRecordStatus"
+		,pmdr.process_instance_id as "pmdrProcessInstanceId"
+		,pmdr.id as pmdrId
 		FROM rural_project_records a
 		LEFT JOIN sys_area area ON area.id = a.area_id
 		left join rural_project_records_reported rprr on rprr.id = a.id
@@ -365,6 +368,7 @@
 		left join project_report_data prd on prd.project_id = a.id
 		left join project_report_data_two prdt on prdt.project_id = a.id
 		left join rural_project_report_record prr on prr.report_id = prd.id
+		LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
 		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
 		<where>
 			a.status = 5
@@ -531,6 +535,7 @@
 		left join project_report_data prd on prd.project_id = a.id
 		left join project_report_data_two prdt on prdt.project_id = a.id
 		left join rural_project_report_record prr on prr.report_id = prd.id
+		LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
 		left join rural_project_report_record_down prrd on prrd.report_id = prd.id
 		LEFT JOIN project_flingbatch_relation pfp on pfp.project_id= a.id
 		LEFT JOIN sys_user sua on a.create_by = sua.id
@@ -1125,6 +1130,37 @@
 		#{processInstanceId}
 		)
 	</insert>
+	<insert id="insertProjectMaterialDefectRecord">
+		INSERT INTO project_material_defect_record(
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		report_id,
+		company_id,
+		office_id,
+		date,
+		status,
+		process_instance_id
+		) VALUES (
+		#{id},
+		#{createBy.id},
+		#{createDate},
+		#{updateBy.id},
+		#{updateDate},
+		#{remarks},
+		#{delFlag},
+		#{report.id},
+		#{companyId},
+		#{officeId},
+		#{date},
+		#{status},
+		#{processInstanceId}
+		)
+	</insert>
 
 	<update id="updateProjectReportRecord">
 		UPDATE rural_project_report_record SET
@@ -1146,6 +1182,19 @@
 		process_instance_id = #{processInstanceId}
 		WHERE id = #{id}
 	</update>
+	<update id="updateProjectMaterialDefectRecord">
+		UPDATE project_material_defect_record SET
+		update_by = #{updateBy.id},
+		update_date = #{updateDate},
+		remarks = #{remarks},
+		report_id = #{report.id},
+		company_id = #{companyId},
+		office_id = #{officeId},
+		date = #{date},
+		status = #{status},
+		process_instance_id = #{processInstanceId}
+		WHERE id = #{id}
+	</update>
 
 	<update id="updateProcessInstanceId">
 		UPDATE rural_project_report_record SET
@@ -1153,6 +1202,12 @@
 		WHERE id = #{id}
 	</update>
 
+	<update id="updateDefectRecordProcessInstanceId">
+		UPDATE project_material_defect_record SET
+		process_instance_id = #{processInstanceId}
+		WHERE id = #{id}
+	</update>
+
 	<select id="getProjectReportRecord" resultType="ProjectReportRecord" >
 		SELECT
 		<include refid="projectReportRecordColumns"/>,

+ 19 - 0
src/main/webapp/static/common/jeeplus.js

@@ -474,6 +474,25 @@ function getRuralProjectArchiveState(id)
     }
     return result;
 }
+function getdefectRecordState(id)
+{
+    var result ={};
+    result.action = true;
+    switch(id)
+    {
+        case "0":result.label = "tempstore";result.status="未发起";result.action = false;break;
+        case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
+        case "2":result.label = "auditing";result.status="审核中";break;
+        case "3":result.label = "cancel";result.status="撤回";break;
+        case "4":result.label = "reject";result.status="驳回";break;
+        case "5":result.label = "signed";result.status="已通过";break;
+        case "8":result.label = "changing";result.status="变更中";break;
+        case "10":result.label = "unknown";result.status="待发起";result.action = false;break;
+        default:
+            result.label = "unknown";result.status="未知";break;
+    }
+    return result;
+}
 
 function getReportedState(id)
 {

+ 52 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp

@@ -921,6 +921,17 @@
 							}else{
 								return '';
 							}
+						}},{align:'center', title: '资料缺失',  width:90,templet:function(d){
+							var st = getdefectRecordState(""+d.defectRecordStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.pmdrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
 						}},
 					{align:'center', title: '批量',  width:90,templet:function(d){
 						var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
@@ -1096,7 +1107,46 @@
 							}
 						}
 					}
-
+					//归档资料缺失说明
+					if(d.projectReportStatusTwo == 0){
+						if(d.projectReportStatus == 5){
+							if(d.submitMoney != 2){
+								if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5){
+									if (d.defectRecordStatus==0) {
+										xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription?reportId=" + d.id +"','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 资料缺失说明</a>";
+									}
+									if (d.defectRecordStatus==2){
+										xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelDescription?id=" + d.pmdrId + "&processInstanceId=" + d.pmdrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告线上归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" > 撤回说明</a>";
+									}
+									if (d.defectRecordStatus==3){
+										xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId + "&reportId=" + d.id+" ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+									}
+									if(d.defectRecordStatus == 4){
+										//驳回操作
+										xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId+ "&reportId=" + d.id+"&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+									}
+								}
+							}
+						}
+					}else{
+						if(d.projectReportStatusTwo == 5){
+							if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5){
+								if (d.defectRecordStatus==0) {
+									xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription?reportId=" + d.id +"','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 资料缺失说明</a>";
+								}
+								if (d.defectRecordStatus==2){
+									xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelDescription?id=" + d.pmdrId + "&processInstanceId=" + d.pmdrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告线上归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" > 撤回说明</a>";
+								}
+								if (d.defectRecordStatus==3){
+									xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId + "&reportId=" + d.id+" ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+								}
+								if(d.defectRecordStatus == 4){
+									//驳回操作
+									xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId+ "&reportId=" + d.id+"&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+								}
+							}
+						}
+					}
 
 					//线下归档操作
 					/*if(d.projectReportStatus == 5){
@@ -1202,7 +1252,7 @@
 					}
 					if(d.projectReportStatus == 5){
 						if (d.projectReportStatusTwo != 5 && d.projectReportStatusTwo != 2){
-							xml+="<a href=\"#\" onclick=\"openDialogre('修改报告信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/reviewForm?projectId=" + d.id +"&view=reloadReport&edit=reviewAgain','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 重新复核11</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改报告信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/reviewForm?projectId=" + d.id +"&view=reloadReport&edit=reviewAgain','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 重新复核</a>";
 						}
 					}
 				</shiro:hasPermission>

Datei-Diff unterdrückt, da er zu groß ist
+ 1058 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionForm.jsp


Datei-Diff unterdrückt, da er zu groß ist
+ 1119 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionModify.jsp


Datei-Diff unterdrückt, da er zu groß ist
+ 1709 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionAudit.jsp


+ 855 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionModify.jsp

@@ -0,0 +1,855 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+
+	<script type="text/javascript">
+		function listTr(obj){
+			var name=$(obj).attr("id");
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(2);
+			// var ss=$(span).val().split(" ")[4];
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").eq(0).attr("class","default_shut")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").eq(0).attr("class","default_open")
+			});
+		}
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var projectId = '${project.id}';
+				var leng = $("#file_attachment tr").length;
+				var boolFlag = true;
+				for(var i=0; i<leng; i++) {
+					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+					var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+					if(second == 1){
+						if(numberStr != undefined && numberStr !=null && numberStr !=''){
+							if (fileFlag==1){
+
+							}else{
+								top.layer.msg("请上传成果文件!", {icon: 0});
+								return false;
+							}
+						}
+					}
+				}
+				if(boolFlag){
+					var gistdata = $("#file_gistdata tr").length;
+					for(var i=0; i<gistdata; i++) {
+						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+						if(second == 1){
+							if(numberStr != undefined && numberStr !=null && numberStr !=''){
+								if (fileFlag==1){
+
+								}else{
+									top.layer.msg("请上传依据性文件!", {icon: 0});
+									return false;
+								}
+							}
+						}
+					}
+				}
+				if(boolFlag){
+					var other = $("#file_other tr").length;
+					for(var i=0; i<other; i++) {
+						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
+						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+						var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+						if(second == 1){
+							if(numberStr != undefined && numberStr !=null && numberStr !=''){
+								if (fileFlag==1){
+
+								}else{
+									top.layer.msg("请上传其它文件!", {icon: 0});
+									return false;
+								}
+							}
+						}
+					}
+				}
+				if(boolFlag) {
+					$("#inputForm").submit();
+					return true;
+				}
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+			$(".tabMove").mouseover(function(){
+				//tips层-下
+				var td=$(this)
+				var tdval=$(this).find("input").val();
+				layer.tips(tdval, td, {
+					tips: 3
+				});
+			})
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+        });
+        function insertTitle(tValue){
+            var list = "${materialDefectRecord.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "99";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "projectRecords";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+        function setValuee(obj){
+            $("#reportId").val(obj.id);
+            $("#type").val(obj.type);
+            $("#reportnumber").val(obj.number);
+            $("#reportName").val(obj.name);
+            $("#reportDate").val(obj.reportDate);
+            $("#contractNum").val(obj.contractNum);
+            $("#contractName").val(obj.contractName);
+            $("#clientName").val(obj.clientName);
+            $("#projectName").val(obj.projectName);
+            $("#projectNum").val(obj.projectNum);
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontentinfo/projectReportRecord/getNumber',
+                data:{
+                    "reportId":obj.number
+                },
+                success:function(data){
+                    var numberCount = data.numberCount;
+                    $("#recordNum").val(obj.number+"-"+numberCount);
+                    $("#numberCount").val(numberCount);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="materialDefectRecord" action="${ctx}/projectReportDefectRecord/projectReportDefectRecord/descriptionAuditSave" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="type"/>
+			<form:hidden path="home"/>
+			<form:hidden path="view"/>
+			<form:hidden path="numberCount"/>
+			<form:hidden id="reportId" path="report.id"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<form:hidden path="report.name"/>
+
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">报告号:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectreportrecord url="${ctx}/projectcontentinfo/projectReportData/selectreportData" id="report" name="report.id"  value="${materialDefectRecord.report.id}"  title="选择报告" labelName="report.number"
+													labelValue="${materialDefectRecord.report.number}" cssClass="form-control layui-input" fieldLabels="报告" fieldKeys="name" searchLabel="报告名称" searchKey="name" ></sys:gridselectreportrecord>
+
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
+					<div class="layui-input-block">
+						<input id="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${materialDefectRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">委托方:</label>
+					<div class="layui-input-block">
+						<form:input id="clientName" path="clientName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+						<form:input id="projectNum" path="projectNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block">
+						<form:input id="projectName" path="projectName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>归档申请人:</label>
+					<div class="layui-input-block">
+						<form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${materialDefectRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>资料缺失说明:</label>
+					<div class="layui-input-block">
+						<form:textarea placeholder="请输入资料缺失说明:" path="remarks" htmlEscape="false" rows="8" maxlength="255" class="form-control required"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>成果文件</h2></div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<span id="_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">文件类型</th>
+							<th width="">文件描述/文件</th>
+							<th width="100px">文件大小(M)</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${materialDefectRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
+								<td>
+<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
+									<div><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}</div>
+								</td>
+								<td></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${materialDefectRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${materialDefectRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+									<td class="op-td" style="text-align:center;">
+											${workClientAttachment.fileSize}
+									</td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${materialDefectRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性文件</h2></div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">文件类型</th>
+							<th width="">文件描述/文件</th>
+							<th width="100px">文件大小(M)</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${materialDefectRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
+<%--								<td></td>--%>
+								<td>
+<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
+									<div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}</div>
+								</td>
+								<td></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${materialDefectRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${materialDefectRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+
+									<td class="op-td" style="text-align:center;">
+											${workClientAttachment.fileSize}
+									</td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${materialDefectRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">文件类型</th>
+							<th width="">文件描述/文件</th>
+							<th width="100px">文件大小(M)</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${materialDefectRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
+								<td>
+<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
+									<div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;  ${fileOther.attachTypes}</div>
+								</td>
+								<td></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${materialDefectRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${materialDefectRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+
+									<td class="op-td" style="text-align:center;">
+											${workClientAttachment.fileSize}
+									</td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${materialDefectRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批流程</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<act:flowChart procInsId="${materialDefectRecord.act.procInsId}"/>
+					<act:histoicFlow procInsId="${materialDefectRecord.act.procInsId}"/>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+<script>
+	function openBill2(title,url,width,height,target,formId,tableId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			var action = $document.getElementById(inputForm).action;
+			var handleInfo = $($document.getElementById(inputForm)).serialize();
+			$.ajax({
+				type : "POST",
+				url : action,
+				data : handleInfo,
+				//请求成功
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+	function formAttachment(title,url,width,height,target,formId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var item = iframeWin.getSelectedItem();
+				setValuee(item);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function setValuee(obj){
+		for(var i=0;i<obj.length;i++){
+			var idArr = $("#file_attachment tr:visible .clientId");
+			if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+				addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+				$("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
+				workBaseDataRowIdx=workBaseDataRowIdx+1;
+			}
+		}
+	}
+</script>
+</body>
+</html>

Datei-Diff unterdrückt, da er zu groß ist
+ 1677 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionView.jsp


+ 52 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

@@ -922,6 +922,18 @@
 								return '';
 							}
 						}},
+					{align:'center', title: '资料缺失',  width:90,templet:function(d){
+							var st = getdefectRecordState(""+d.defectRecordStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.pmdrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},
 					{align:'center', title: '批量',  width:90,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
 							if(d.pid ==0){
@@ -1096,7 +1108,46 @@
 							}
 						}
 					}
-
+					//归档资料缺失说明
+					if(d.projectReportStatusTwo == 0){
+						if(d.projectReportStatus == 5){
+							if(d.submitMoney != 2){
+								if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5){
+									if (d.defectRecordStatus==0) {
+										xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription?reportId=" + d.id +"&view=zixun','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 资料缺失说明</a>";
+									}
+									if (d.defectRecordStatus==2){
+										xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelDescription?id=" + d.pmdrId + "&processInstanceId=" + d.pmdrProcessInstanceId + "&view=zixun\" onclick=\"return confirmx('确认要撤回该报告线上归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" > 撤回说明</a>";
+									}
+									if (d.defectRecordStatus==3){
+										xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId + "&reportId=" + d.id+"&view=zixun ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+									}
+									if(d.defectRecordStatus == 4){
+										//驳回操作
+										xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId+ "&reportId=" + d.id+"&view=zixunModify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+									}
+								}
+							}
+						}
+					}else{
+						if(d.projectReportStatusTwo == 5){
+							if(d.projectReportRecordStatus != 1 && d.projectReportRecordStatus != 2  && d.projectReportRecordStatus != 5){
+								if (d.defectRecordStatus==0) {
+									xml+="<a href=\"#\" onclick=\"openDialogre('新增缺失说明信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription?reportId=" + d.id +"&view=zixun','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 资料缺失说明</a>";
+								}
+								if (d.defectRecordStatus==2){
+									xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelDescription?id=" + d.pmdrId + "&processInstanceId=" + d.pmdrProcessInstanceId + "&view=zixun\" onclick=\"return confirmx('确认要撤回该报告线上归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" > 撤回说明</a>";
+								}
+								if (d.defectRecordStatus==3){
+									xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId + "&reportId=" + d.id+"&view=zixun ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明</a>";
+								}
+								if(d.defectRecordStatus == 4){
+									//驳回操作
+									xml+="<a href=\"#\" onclick=\"openDialogre('撤回修改资料缺失信息', '${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescriptionModify?id=" + d.pmdrId+ "&reportId=" + d.id+"&view=zixunModify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改资料说明1</a>";
+								}
+							}
+						}
+					}
 					//线下归档操作
 					/*if(d.projectReportStatus == 5){
 						if(d.downProjectReportRecordStatus == 0){