فهرست منبع

全过程项目上报功能开发和发票页面展示功能更改

user5 3 سال پیش
والد
کامیت
e984ec5b49
17فایلهای تغییر یافته به همراه6839 افزوده شده و 372 حذف شده
  1. 9 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecords.java
  2. 4 2
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java
  3. 342 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectRecordsController.java
  4. 710 9
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  5. 54 42
      src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/ApprovalThread.java
  6. 46 34
      src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/JudgementThread.java
  7. 57 43
      src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/SignatureThread.java
  8. 1 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureCallBackController.java
  9. 299 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  10. 3 0
      src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml
  11. 104 4
      src/main/webapp/webpage/modules/projectrecord/projectRecordsList.jsp
  12. 1700 0
      src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedAudit.jsp
  13. 1659 0
      src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedForm.jsp
  14. 1640 0
      src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedModify.jsp
  15. 4 4
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp
  16. 108 115
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp
  17. 99 119
      src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp

+ 9 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecords.java

@@ -142,6 +142,7 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 	private String overallProjectTypeId;   //全过程项目类型
 	private List<String> idList;
 	private String belongingDepartment;	//归属部门
+	private String reportedProcessInstanceId;  //上报流程id
 
 	public ProjectRecords() {
 		super();
@@ -840,4 +841,12 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 	public void setBelongingDepartment(String belongingDepartment) {
 		this.belongingDepartment = belongingDepartment;
 	}
+
+	public String getReportedProcessInstanceId() {
+		return reportedProcessInstanceId;
+	}
+
+	public void setReportedProcessInstanceId(String reportedProcessInstanceId) {
+		this.reportedProcessInstanceId = reportedProcessInstanceId;
+	}
 }

+ 4 - 2
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -162,8 +162,10 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 	 */
 	public ProjectRecords getRuralMasters(String id) {
 		ProjectRecords projectRecords = dao.getRuralProjectRecodes(id);
-		List<User> users = workProjectUserDao.queryProjectUsers(projectRecords.getId(), "1");
-		projectRecords.setProjectLeaders(users);
+		if(null != projectRecords){
+			List<User> users = workProjectUserDao.queryProjectUsers(projectRecords.getId(), "1");
+			projectRecords.setProjectLeaders(users);
+		}
 		return projectRecords;
 	}
 	public Boolean getByUsers(ProjectRecords projectRecords) {

+ 342 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectRecordsController.java

@@ -16,6 +16,10 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
+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.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportTreeData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
@@ -24,6 +28,14 @@ import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageNewService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.dao.UserDao;
+import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Role;
 import com.jeeplus.modules.sys.entity.User;
@@ -82,6 +94,18 @@ public class ProjectRecordsController extends BaseController {
 	private ProjectReportDataService projectReportDataService;
 	@Autowired
 	private ProjectcontentinfoService projectcontentinfoService;
+	@Autowired
+	private RuralProjectMessageService ruralProjectMessageS;
+	@Autowired
+	private RuralProjectMessageNewService ruralProjectMessageService;
+	@Autowired
+	private RuralProjectRecordsService ruralProjectRecordsService;
+	@Autowired
+	private ProjectEngineeringService engineeringService;
+	@Autowired
+	private ProjectReportDataDao projectReportDataDao;
+	@Autowired
+	private UserDao userDao;
 
 	private static String template_path = Global.getProjectTemplatePath()+"咨询工作方案.xlsx";
 	private static String template_name = "咨询工作方案.xlsx";
@@ -766,4 +790,322 @@ public class ProjectRecordsController extends BaseController {
 		return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
 	}
 
+
+	/**
+	 * 项目上报
+	 * @param projectRecords
+	 * @return
+	 */
+	@RequestMapping(value = "updateReported")
+	public String updateReported(RuralProjectRecords projectRecords, Model model) {
+		//查询上报信息表中是否含有数据,没有则进行获取基础数据
+		RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(projectRecords.getId());
+		if(reported == null){
+			RuralProjectRecords records = ruralProjectRecordsService.getQueryProjectUsers(projectRecords.getId());
+			ruralProjectRecordsService.queryProjectDetail(records);
+			Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectRecords.getId());
+			ProjectReportData projectReportData = projectReportDataService.getOnRural(projectcontentinfo1.getInfoId());
+			records.setReportData(projectReportData);
+			reported = ruralProjectMessageService.disposeData(records);
+
+			//合同价送审价审定价处理
+			if(StringUtils.isNotBlank(reported.getHeTongJia())){
+				Double heTongJia = Double.valueOf(reported.getHeTongJia())/10000;
+				reported.setHeTongJia(String.format("%.2f", heTongJia));
+			}
+			if(StringUtils.isNotBlank(reported.getSongShenJia())){
+				Double songShenJia = Double.valueOf(reported.getSongShenJia())/10000;
+				reported.setSongShenJia(String.format("%.2f", songShenJia));
+			}
+			if(StringUtils.isNotBlank(reported.getShenDingJia())){
+				Double shenDingJia = Double.valueOf(reported.getShenDingJia())/10000;
+				reported.setShenDingJia(String.format("%.2f", shenDingJia));
+			}
+			if(StringUtils.isNotBlank(reported.getSongShenJia()) && StringUtils.isNotBlank(reported.getShenDingJia())){
+				Double jingHeJianE = Double.valueOf(reported.getShenDingJia())-Double.valueOf(reported.getSongShenJia());
+				reported.setJingHeJianE(String.format("%.2f", jingHeJianE));
+				Double jingHeJianLv = jingHeJianE/Double.valueOf(reported.getSongShenJia()) * 100;
+				if(jingHeJianLv.isNaN()){
+					jingHeJianLv = 0D;
+				}
+				reported.setJingHeJianLv(String.format("%.2f", jingHeJianLv));
+			}
+
+			ruralProjectMessageS.disposeProjectRecords(records,reported);
+			//将质量复核的咨询收入添加到上报中
+			if(null != projectReportData){
+				reported.setZiXunShouRu(projectReportData.getZiXunShouRu());
+			}
+		}
+		//根据上报id查询上报咨询员的信息
+		List<RuralReportConsultant> reportedConsultants=ruralProjectMessageS.getReportedConsultantsList(reported.getId());
+		//查询报告咨询员的信息
+		List<RuralReportConsultant> consultants=ruralProjectMessageService.getConsultantsList(projectRecords.getId());
+		List<RuralReportConsultant> consultantList = Lists.newArrayList();
+		if(reportedConsultants.size() == 0){
+			//如果上报的咨询员信息为空 则处理报告咨询员信息
+			consultantList = ruralProjectMessageS.disposeConsultant(consultants, projectRecords);
+		}else{
+			//对上报的咨询员进行处理
+			consultantList = ruralProjectMessageS.disposereportedConsultant(reportedConsultants);
+		}
+		RuralProjectRecords records = ruralProjectRecordsService.getQueryProjectUsers(reported.getProjectId());
+
+		if(StringUtils.isNotBlank(reported.getXmFZR())){
+			User user = UserUtils.get(reported.getXmFZR());
+			records.setProjectMasterName(user.getName());
+			records.setProjectMasterId(user.getId());
+		}
+
+		model.addAttribute("ruralProjectRecordsReported", reported);
+		//查询项目信息
+		model.addAttribute("ruralProjectRecords", records);
+		model.addAttribute("consultantInfo", consultantList);
+		//获取工程类型
+		ProjectEngineeringInfo engineeringInfos=engineeringService.getProjectReportedType(reported.getPorjectUse());
+		model.addAttribute("engineeringInfo", engineeringInfos);
+		List<Area> areaList = ruralProjectMessageS.getProjectReportedAreaByParentId(reported.getS1());
+		model.addAttribute("cityList", areaList);
+		return "modules/ruralprojectrecords/reported/reportedForm";
+	}
+
+
+
+	/**
+	 * 保存报告并提交审核
+	 * @param reported
+	 * @param redirectAttributes
+	 * @return
+	 */
+	@RequestMapping(value = "saveReported")
+	public String saveReported(RuralProjectRecordsReported reported,  RedirectAttributes redirectAttributes) throws Exception {
+		RuralProjectRecords ruralProjectRecords = ruralProjectMessageService.get(reported.getProjectId());
+		if(!BaseController.REPORTSWITCH){
+			addMessage(redirectAttributes, "项目上报失败:上报管理员已关闭上报模块");
+			return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+		}
+		String str = "";
+		if(!reported.getIsNewRecord()){//编辑表单保存
+			ruralProjectMessageService.disposeList(reported);
+			RuralProjectRecordsReported t = ruralProjectMessageService.getRuralProjectRecordsReportedById(reported.getId());;//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(reported, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			str = ruralProjectMessageService.saveOverallReportedInfo(t, ProjectStatusEnum.IN_APRL);
+		}else{//新增表单保存
+			str = ruralProjectMessageService.saveOverallReportedInfo(reported,ProjectStatusEnum.IN_APRL);
+		}
+
+
+		if (StringUtils.isNotBlank(str)){
+			addMessage(redirectAttributes, "项目上报失败:"+str);
+		}else {
+			addMessage(redirectAttributes, "项目上报成功");
+		}
+		if("3".equals(ruralProjectRecords.getProjectType())){
+			return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+		}
+		return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+	}
+
+
+
+	/**
+	 * 工单执行(完成任务)
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "auditSaveReported")
+	public String auditSaveReported(RuralProjectRecordsReported reported, Model model,
+									RedirectAttributes redirectAttributes) {
+		try {
+			if (!BaseController.REPORTSWITCH){
+				addMessage(redirectAttributes, "重新申请失败:上报管理员已关闭上报功能");
+				if (StringUtils.isNotBlank(reported.getHome()) && "home".equals(reported.getHome())){
+					return "redirect:" + Global.getAdminPath() + "/home/?repage";
+				}else {
+					return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+				}
+			}
+			ruralProjectMessageService.disposeList(reported);
+			RuralProjectRecordsReported t = ruralProjectMessageService.getRuralProjectRecordsReportedById(reported.getId());;//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(reported, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+
+			String taskDefKey =  t.getAct().getTaskDefKey();
+			List<User> users = null;
+			if ("bmzr".equals(taskDefKey)){
+				users = UserUtils.getByProssType(t.getProcessInstanceId(),2);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("sbglyyjla",3,t.getOffice().getId(),"4",t.getCreateBy());
+			}else if ("modifyApply".equals(taskDefKey)){
+				users = UserUtils.getByRoleActivityEnname("sbglyyjla",3,t.getOffice().getId(),"4",t.getCreateBy());
+			}
+
+			String flag = reported.getAct().getFlag();
+			if ("yes".equals(flag) && (users==null || users.size()==0)){
+				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+			}else {
+				String str = ruralProjectMessageService.auditOverallSaveReported(t, users);
+
+				addMessage(redirectAttributes, str);
+			}
+		}catch (Exception e){
+			addMessage(redirectAttributes, "上报流程审批失败");
+			logger.error("上报流程审批失败:",e);
+		}
+		RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(reported.getProjectId());
+		if (StringUtils.isNotBlank(reported.getHome()) && "home".equals(reported.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(reported.getHome()) && "notifyList".equals(reported.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}else {
+			if("1".equals(ruralProjectRecords.getProjectType())){
+				return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+			}else if("2".equals(ruralProjectRecords.getProjectType())){
+				return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+			}
+			return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+		}
+	}
+
+
+	/**
+	 * 工单执行(完成任务)
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "auditOverallSaveReported")
+	public String auditOverallSaveReported(RuralProjectRecordsReported reported, Model model, RedirectAttributes redirectAttributes) {
+		try {
+			//判断是否关闭上报功能
+			if (!BaseController.REPORTSWITCH){
+				addMessage(redirectAttributes, "重新申请失败:上报管理员已关闭上报功能");
+				if (StringUtils.isNotBlank(reported.getHome()) && "home".equals(reported.getHome())){
+					return "redirect:" + Global.getAdminPath() + "/home/?repage";
+				}else if (StringUtils.isNotBlank(reported.getHome()) && "notifyList".equals(reported.getHome())){
+					return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+				}else {
+					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(reported.getProjectId());
+					if(null != ruralProjectRecords){
+						if("1".equals(ruralProjectRecords.getProjectType())){
+							return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+						}else if("2".equals(ruralProjectRecords.getProjectType())){
+							return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+						}
+					}
+					return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+				}
+			}
+			ruralProjectMessageService.disposeList(reported);
+			RuralProjectRecordsReported t = ruralProjectMessageService.getRuralProjectRecordsReportedById(reported.getId());;//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(reported, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+
+			String taskDefKey =  t.getAct().getTaskDefKey();
+			List<User> users = null;
+			if ("bmzr".equals(taskDefKey)){
+				users = UserUtils.getByProssType(t.getProcessInstanceId(),2);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("sbglyyjla",3,t.getOffice().getId(),"4",t.getCreateBy());
+			}else if ("modifyApply".equals(taskDefKey)){
+				users = UserUtils.getByRoleActivityEnname("sbglyyjla",3,t.getOffice().getId(),"4",t.getCreateBy());
+			}
+
+			String flag = reported.getAct().getFlag();
+			if ("yes".equals(flag) && (users==null || users.size()==0)){
+				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+			}else {
+				String str = ruralProjectMessageService.auditOverallSaveReported(t, users);
+				addMessage(redirectAttributes, str);
+			}
+		}catch (Exception e){
+			addMessage(redirectAttributes, "上报流程审批失败");
+			logger.error("Exception e:"+e);
+		}
+		RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(reported.getProjectId());
+		if (StringUtils.isNotBlank(reported.getHome()) && "home".equals(reported.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(reported.getHome()) && "notifyList".equals(reported.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}else {
+			if(null != ruralProjectRecords){
+				if("1".equals(ruralProjectRecords.getProjectType())){
+					return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+				}else if("2".equals(ruralProjectRecords.getProjectType())){
+					return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+				}
+			}
+			return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+		}
+	}
+
+	/**
+	 * 报告归档:强制撤回
+	 */
+	@RequestMapping("cancelInvalidateByReported")
+	public String cancelInvalidateByReported(RuralProjectRecordsReported reported,RedirectAttributes redirectAttributes){
+		reported = ruralProjectMessageService.getRuralProjectRecordsReportedById(reported.getId());
+		try {
+			if(reported.getReportStatus().equals("5")){
+				addMessage(redirectAttributes, "项目上报已审批通过,无法撤回");
+			}else{
+				if(reported.getReportStatus().equals("2")){
+					ruralProjectMessageService.cancelInvalidateByReported(reported);
+					addMessage(redirectAttributes, "强制撤回项目上报成功");
+				}else{
+					addMessage(redirectAttributes, "项目上报不是送审状态,无法撤回");
+					return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+				}
+			}
+		}catch (Exception e){
+			addMessage(redirectAttributes, "强制撤回项目上报失败");
+			logger.error("强制撤回项目上报信息失败",e);
+		}
+		return "redirect:"+Global.getAdminPath()+"/project/projectRecords/?repage";
+	}
+
+	/**
+	 * 项目上报
+	 * @param projectRecords
+	 * @return
+	 */
+	@RequestMapping(value = "reportedModify")
+	public String reportedModify(RuralProjectRecords projectRecords, Model model) {
+		//查询上报信息表中是否含有数据,没有则进行获取基础数据
+		RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(projectRecords.getId());
+		ProcessInstance processInstance = actTaskService.getProcIns(reported.getProcessInstanceId());
+		if (processInstance!=null) {
+			Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+			Act act = new Act();
+			act.setTaskId(taskInfok.getId());
+			act.setTaskName(taskInfok.getName());
+			act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+			act.setProcDefId(taskInfok.getProcessDefinitionId());
+			act.setProcInsId(taskInfok.getProcessInstanceId());
+			act.setTask(taskInfok);
+			reported.setAct(act);
+		}
+		RuralProjectRecords records = ruralProjectRecordsService.getQueryProjectUsers(reported.getProjectId());
+
+
+		if(StringUtils.isNotBlank(reported.getXmFZR())){
+			User user = UserUtils.get(reported.getXmFZR());
+			records.setProjectMasterName(user.getName());
+			records.setProjectMasterId(user.getId());
+		}
+
+		//根据上报id查询上报咨询员的信息
+		List<RuralReportConsultant> reportedConsultants=ruralProjectMessageService.getReportedConsultantsList(reported.getId());
+		//对上报的咨询员进行处理
+		List<RuralReportConsultant> consultantList = ruralProjectMessageService.disposereportedConsultant(reportedConsultants);
+
+		//获取工程类型
+		ProjectEngineeringInfo engineeringInfos=engineeringService.getProjectReportedType(reported.getPorjectUse());
+		model.addAttribute("engineeringInfo", engineeringInfos);
+		List<Area> areaList = ruralProjectMessageService.getProjectReportedAreaByParentId(reported.getS1());
+		model.addAttribute("cityList", areaList);
+		//查询项目信息
+		model.addAttribute("ruralProjectRecords", records);
+		model.addAttribute("consultantInfo", consultantList);
+		model.addAttribute("ruralProjectRecordsReported", reported);
+		return "modules/ruralprojectrecords/reported/reportedModify";
+	}
+
 }

+ 710 - 9
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -2773,15 +2773,17 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                 reported.setLianXiDH(records.getWorkContractInfo().getClient().getTelephone());
             }
         }
-        reported.setDangABH(records.getReportData().getNumber());
-
-        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-        reported.setBaoGaoShuQianFaDate(formatter.format(records.getReportData().getReportDate()));
-        reported.setHeTongJia(records.getReportData().getContractFee());
-        reported.setSongShenJia(records.getReportData().getReviewFee());
-        reported.setShenDingJia(records.getReportData().getApprovalFee());
-        reported.setJingHeJianE(records.getReportData().getVerifyFee());
-        reported.setJingHeJianLv(records.getReportData().getVerifyRate());
+        if(null != records.getReportData()){
+            reported.setDangABH(records.getReportData().getNumber());
+
+            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+            reported.setBaoGaoShuQianFaDate(formatter.format(records.getReportData().getReportDate()));
+            reported.setHeTongJia(records.getReportData().getContractFee());
+            reported.setSongShenJia(records.getReportData().getReviewFee());
+            reported.setShenDingJia(records.getReportData().getApprovalFee());
+            reported.setJingHeJianE(records.getReportData().getVerifyFee());
+            reported.setJingHeJianLv(records.getReportData().getVerifyRate());
+        }
         reported.setPorjectStruct("11");
         reported.setGCGMUnit("7");
         reported.setPorjectUse("17");
@@ -4334,4 +4336,703 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
             return "保存审核意见失败!!";
         }
     }
+
+
+
+
+
+    /**
+     * 保存上报数据
+     * @param reported
+     */
+    @Transactional(readOnly = false)
+    public String saveOverallReportedInfo(RuralProjectRecordsReported reported, ProjectStatusEnum projectStatus) {
+        this.disposeList(reported);
+        String[] split = reported.getS3().split(",");
+        if(split.length==2){
+            reported.setS3(split[1]);
+        }else{
+            reported.setS3(reported.getS3().replaceAll(",",""));
+        }
+        Integer oldStatus = null;
+        if(StringUtils.isNotBlank(reported.getReportStatus())){
+            oldStatus = Integer.parseInt(reported.getReportStatus());
+        }
+        reported.setReportStatus(String.valueOf(projectStatus.getValue()));
+        //查询是否已经上报项目信息
+        if (StringUtils.isBlank(reported.getId())){
+            reported.setCompany(UserUtils.getSelectCompany());
+            reported.setOffice(UserUtils.getSelectOffice());
+            reported.preInsert();
+            //将项目id设置为id
+            reported.setId(reported.getProjectId());
+            ruralProjectRecordsReportedDao.insert(reported);
+        }else{
+            reported.preUpdate();
+            ruralProjectRecordsReportedDao.update(reported);
+        }
+        //删除上报咨询员信息
+        ruralProjectRecordsReportedDao.deleteConsultant(reported);
+        //保存咨询员信息
+        for (ReportedConsultant info : reported.getReportedConsultantList()){
+            if (info.getZixunyuan() == null){
+                continue;
+            }
+            //添加项目上报id
+            info.setReportedId(reported.getId());
+            info.preInsert();
+            ruralProjectRecordsReportedDao.insertConsultant(info);
+        }
+
+        //保存附件信息
+        if(reported.getWorkAttachments().size()>0){
+            List<WorkClientAttachment> workAttachments = reported.getWorkAttachments();
+            for (WorkClientAttachment workClientAttachment: workAttachments) {
+                if (workClientAttachment.getId() == null){
+                    continue;
+                }
+                if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())){
+                    workClientAttachment.setAttachmentId(reported.getId());
+                    workClientAttachment.setAttachmentFlag("95");
+                    workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (com.jeeplus.common.utils.StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())){
+                        workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
+                    }else{
+                        workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
+                    }
+                }else{
+                    workClientAttachmentDao.delete(workClientAttachment);
+                }
+            }
+        }
+
+        //启动审核
+        if (Integer.parseInt(reported.getReportStatus())== ProjectStatusEnum.IN_APRL.getValue() &&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
+            this.startOverallAudit(reported, reported.getProcessInstanceId());
+        }
+
+        //修改项目信息中的上报状态
+        RuralProjectRecords records = new RuralProjectRecords();
+        records.setId(reported.getId());
+        records.setReportedState(String.valueOf(projectStatus.getValue()));
+        dao.updateReported(records);
+
+        return null;
+    }
+
+
+    /**
+     * 启动审核
+     * @param reported
+     * @param processInstanceId
+     * @return
+     */
+    private String startOverallAudit(RuralProjectRecordsReported reported, String processInstanceId) {
+        Map<String, Object> variables = new HashMap<String, Object>();
+        identityService.setAuthenticatedUserId(reported.getCurrentUser().getId());
+        //获取项目信息
+        ProjectRecords projectRecords = projectRecordsService.getRuralMasters(reported.getProjectId());
+        String titleStr = "全过程项目【"+projectRecords.getProjectName()+"】上报待审批";
+        String contentStr = "全过程项目【"+projectRecords.getProjectName()+"】上报待审批,项目" + (0 == projectRecords.getOverDueStatus()?"未超期":"超期");
+
+        String businessKey = reported.getId();
+        Office office = UserUtils.getSelectOffice();
+        WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("gg3125f1f194582bdda9abcew750904", office);
+        // 启动流程
+        String processType = workActivityMenu.getProcessType();
+        StringBuffer buffer = new StringBuffer();
+        Activity activity = new Activity();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(reported.getId(),
+                        null,
+                        reported.getCompany().getId(),
+                        titleStr,
+                        contentStr,
+                        "218",
+                        "0",
+                        "待审批",
+                        ""
+                );
+
+        List<User> users = new ArrayList<>();
+        List<User> bmzrList = UserUtils.getByRoleActivityEnname("sbglyyjla",3,reported.getOffice().getId(),"4",reported.getCreateBy());
+        //判断审核增减率
+
+        variables.put("bmzrCount",bmzrList.size());
+        variables.put("bmzrList", bmzrList);
+        variables.put("pass",true);
+
+
+        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(),"11",reported.getCreateBy());
+                    if (enusers.size()==0){
+                        reported.setReportStatus(String.valueOf(ProjectStatusEnum.TSTORE.getValue()));
+                        ruralProjectRecordsReportedDao.updateStatusById(reported);
+                        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(),"11",reported.getCreateBy());
+                }
+                //人员审批
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            if (bmzrList.size()==0 ){
+                reported.setReportStatus(String.valueOf(ProjectStatusEnum.TSTORE.getValue()));
+                ruralProjectRecordsReportedDao.updateStatusById(reported);
+            }
+            if (bmzrList.size()==0){
+                return "流程审批人不能为空,报告管理员下无用户,请联系管理员!";
+            }
+            processType = "overallReported";
+            users.addAll(bmzrList);
+        }
+        List<String> userIds = new ArrayList<>(users.size());
+        for (User u : users){
+            userIds.add(u.getId());
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("报告管理员审批");
+            workProjectNotifyService.save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7002");
+            extras.put("procDefKey","218");
+            extras.put("id",workProjectNotify.getId());
+            UserUtils.pushInfoToApp(titleStr, contentStr,extras,u.getId());
+        }
+        UserUtils.pushIm(userIds,contentStr);
+
+        variables.put("busId", businessKey);
+        variables.put("type", processType);
+        variables.put("title", "审批单:" + reported.getDangABH());//设置标题;
+
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+        //        workReceiptsSettle.setProcessInstance(processInstance);
+        if (StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        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.setIsApproval("0");
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(bmzrList,processInstance.getId(),1,1);
+        }
+        reported.setProcessInstanceId(processInstance.getId());
+        reported.setReportStatus(String.valueOf(ProjectStatusEnum.IN_APRL.getValue()));
+        ruralProjectRecordsReportedDao.updateProcessIdAndStatus(reported);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+
+        return "";
+    }
+
+    /**
+     * 上报审核
+     * @param reported
+     * @param auditUsers
+     * @return
+     */
+    @Transactional(readOnly = false)
+    public String auditOverallSaveReported(RuralProjectRecordsReported reported,List<User> auditUsers) {
+        try {
+            String str = "全过程项目报告号:"+reported.getDangABH()+",上报日期:"+ DateUtils.formatDate(reported.getCreateDate());
+            String title = "全过程项目报告号:"+ reported.getDangABH();
+            // 对不同环节的业务逻辑进行操作
+            String taskDefKey = reported.getAct().getTaskDefKey();
+            if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit")) {
+                actTaskService.claim(reported.getAct().getTaskId(), UserUtils.getUser().getId());
+            }else {
+                reported.getAct().setFlag("yes");
+                ruralProjectRecordsReportedDao.update(reported);
+                //删除上报咨询员信息
+                ruralProjectRecordsReportedDao.deleteConsultant(reported);
+                //保存咨询员信息
+                for (ReportedConsultant info : reported.getReportedConsultantList()){
+                    if (info.getZixunyuan() == null){
+                        continue;
+                    }
+                    //添加项目上报id
+                    info.setReportedId(reported.getId());
+                    info.preInsert();
+                    ruralProjectRecordsReportedDao.insertConsultant(info);
+                }
+            }
+            String comment = "";
+            if (String.valueOf(ProjectStatusEnum.REJECTED.getValue()).equals(reported.getReportStatus()) ){
+                comment = ("yes".equals(reported.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
+            }else {
+                comment = ("yes".equals(reported.getAct().getFlag())?"[同意] ":"[驳回] ");
+                if(StringUtils.isNotBlank(reported.getAct().getComment())){
+                    comment += reported.getAct().getComment();
+                }
+            }
+            //yes 的时候状态为审核通过 否则为未通过
+            //1 审核中 2 未通过
+            reported.setReportStatus(String.valueOf(("yes".equals(reported.getAct().getFlag()) ? ProjectStatusEnum.IN_APRL.getValue() : ProjectStatusEnum.REJECTED.getValue())));
+
+
+            //修改项目信息中的上报状态
+            RuralProjectRecords records = new RuralProjectRecords();
+            records.setId(reported.getId());
+            records.setReportedState(String.valueOf(("yes".equals(reported.getAct().getFlag()) ? ProjectStatusEnum.IN_APRL.getValue() : ProjectStatusEnum.REJECTED.getValue())));
+
+
+            Map<String, Object> vars = Maps.newHashMap();
+            //业务逻辑对应的条件表达式
+            String exp = "";
+            String taskCount = "";
+            String notifyRole = "";
+            int key = 0;
+            String enname = "";
+            List<Activity> activitieList = activityService.getByProcessInstanceId(reported.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(reported.getProcessInstanceId());
+            List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+            List<Activity> activities = workActivityMenu.getActivities();
+            if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("overallReported")) {
+                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(reported.getAct().getFlag())) {
+                            notifyRole = "调整上报信息";
+                            reported.setReportStatus(String.valueOf(ProjectStatusEnum.REJECTED.getValue()));
+                            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";
+                        exp = "pass";
+                        workActivityProcess.setId("");
+                        workActivityProcess.setCount(0);
+                        if (!"yes".equals(reported.getAct().getFlag())) {
+                            reported.setReportStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+                            workActivityProcess.setIsApproval("2");
+                        } else {
+                            workActivityProcess.setIsApproval("1");
+                        }
+                        break;
+                    }
+                }
+            } else {
+                //获取项目信息
+                RuralProjectRecords record = ruralProjectRecordsService.get(records);
+                workActivityMenu.setProcessType("overallReported");
+                for (int i = 0; i < workActivityProcesses.size(); i++) {
+                    WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+                    String count = activityProcess.getCount() + "";
+                    workActivityProcess = activityProcess;
+                    if (!workActivityProcess.getIsApproval().equals("0")) {
+                        workActivityProcess.setId("");
+                    }
+                    // 审核环节
+                    if ("bmzr".equals(taskDefKey) && count.contains("1")) {
+                        taskCount = "1";
+                        exp = "pass";
+                        if ("yes".equals(reported.getAct().getFlag())) {
+                            notifyRole = "审批通过";
+                            workActivityProcess.setIsApproval("1");
+                            //处理上报数据
+                            //Map<String,String> map  = RuralProjectReportedUtil.reportedDataManage(reported);
+                            //String mapStr = MapToXmlUtil.getMapToXML(map);
+                            //进行上报
+                            /*String client = RuralProjectReportedUtil.client(mapStr);
+                            if(!"Success".equals(client)){
+                                return "上报失败!";
+                            }*/
+
+                            //信用代码id
+                            String jsonUscCode = "{\"uscCode\": \"91320000746823994F\"";
+                            Map map = RuralProjectReportedInfoUtil.reportedDataManage(reported);
+                            String jsonUscData = JSONObject.toJSONString(map);
+                            byte[] privateKey = org.apache.commons.codec.binary.Base64.decodeBase64(PRIVATE_KEY);
+                            //客户拿到密钥将自己的数据 jsonUscData 进行非对称加密。
+                            byte[] encryptByPrivateKey = new byte[0];
+                            try {
+                                encryptByPrivateKey = Rsatool.encryptByPrivateKey(jsonUscData.getBytes(), privateKey);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                            //将唯一标志和非对称加密后数据采用对称加密,方便传到服务段解析,并获得非对称的公钥来解密客户用密钥加密的数据
+                            String encryString = jsonUscCode + ",\"data\":\"" + Base64.encodeBase64String(encryptByPrivateKey) + "\"}";
+                            String encryptByAes = null;
+                            try {
+                                encryptByAes = Aestool.Encrypt(encryString, AES_KEY);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                            //测试接口
+                            //String url = "http://comp.jszj.com.cn:8031/api/testAddProject";
+                            //正式接口
+                            String url = "http://comp.jszj.com.cn:8031/api/addProject";
+                            //发送请求
+                            String returnResult = HttpPostTool.doPost(url, encryptByAes);
+                            HashMap hashMap = JSON.parseObject(returnResult, HashMap.class);
+                            if(!"1".equals(hashMap.get("code"))){
+                                return "上报失败:" + hashMap.get("msg").toString();
+                            }
+                            //修改项目上报表中状态
+                            reported.setReportStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
+
+                            //修改项目表中上报状态
+                            //判断项目是否超期,如果超期则将上报标志改为超期上报(7) 否则变更为正常上报数据
+                            if(1 == record.getOverDueStatus()){
+                                records.setReportedState("7");
+                            }else{
+                                records.setReportedState(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
+                            }
+
+                        } else {
+                            notifyRole = "调整上报信息";
+                            workActivityProcess.setIsApproval("2");
+                        }
+                        break;
+                    } else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+                        notifyRole = "上报管理员审批";
+                        taskCount = "0";
+                        exp = "pass";
+                        vars.put("bmzrList", auditUsers);
+                        vars.put("bmzrCount",auditUsers.size());
+                        workActivityProcess.setCount(0);
+                        enname = "sbglyyjla";
+                        if (!"yes".equals(reported.getAct().getFlag())) {
+                            reported.setReportStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+                        }
+                        workActivityProcessService.deleteProcessUser(reported.getAct().getProcInsId());
+                        workActivityProcessService.insertAuditsByType(auditUsers,reported.getAct().getProcInsId(),1,1);
+                        break;
+                    } else if ("apply_end".equals(taskDefKey)) {
+                    }
+
+                }
+            }
+            // 设置意见
+            reported.getAct().setComment(("yes".equals(reported.getAct().getFlag()) ? "[同意] " : "[驳回] ") + reported.getAct().getComment());
+            reported.preUpdate();
+            // 提交流程任务
+            vars.put(exp, "yes".equals(reported.getAct().getFlag()) ? true : false);
+            vars.put("passLv",true);
+            vars.put("passs",true);
+            workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount, reported.getProcessInstanceId(),taskDefKey,"modifyApply", reported.getAct().getFlag(),comment, activities);
+            // 提交流程任务
+            actTaskService.complete(reported.getAct().getTaskId(), reported.getAct().getProcInsId(), reported.getAct().getComment(), vars);
+            boolean state = actTaskService.isProcessEnd(reported.getAct().getProcInsId());
+            List<User> users = new ArrayList<>();
+            List<User> userList = new ArrayList<>();
+            ProjectRecords projectRecords = projectRecordsService.getRuralMasters(reported.getProjectId());
+            if (!state) {
+                users.add(reported.getCreateBy());
+                if ("yes".equals(reported.getAct().getFlag())) {
+
+                    String titleStr = "全过程项目【"+projectRecords.getProjectName()+"】上报完成";
+                    String content = "全过程项目【"+projectRecords.getProjectName()+"】上报完成,项目" + (0 == projectRecords.getOverDueStatus()?"未超期":"超期");
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(reported.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(reported.getId(),
+                                            reported.getCreateBy(),
+                                            reported.getCompany().getId(),
+                                            titleStr,
+                                            content,
+                                            "218",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+
+                } else {
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(reported.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    if (!String.valueOf(ProjectStatusEnum.RECALL.getValue()).equals(reported.getReportStatus())){
+                        reported.setReportStatus(String.valueOf(ProjectStatusEnum.REJECTED.getValue()));
+                        workProjectNotifyService
+                                .save(UtilNotify
+                                        .saveNotify(reported.getId(),
+                                                reported.getCreateBy(),
+                                                reported.getCompany().getId(),
+                                                title,
+                                                str,
+                                                "218",
+                                                "0",
+                                                "待通知",
+                                                notifyRole));
+                    }
+                }
+                workActivityProcessService.deleteProcessIdAuditUsers(reported.getProcessInstanceId());
+            } else {
+                if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("overallReported")) {
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(reported.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    //users.addAll(userList);
+                    WorkProjectNotify workProjectNotify = UtilNotify
+                            .saveNotify(reported.getId(),
+                                    new User(),
+                                    reported.getCompany().getId(),
+                                    title,
+                                    str,
+                                    "218",
+                                    "0",
+                                    "待审批",
+                                    notifyRole);
+                    List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+                            activities,
+                            workProjectNotify,
+                            taskDefKey,
+                            reported.getAct().getFlag(),
+                            taskCount,
+                            reported.getCreateBy(),
+                            reported.getOffice().getId(),
+                            "218");
+                    for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+                        users.add(workProjectNotify1.getUser());
+                        workProjectNotify1.setId("");
+                        workProjectNotify1.setIsNewRecord(false);
+                        workProjectNotifyService
+                                .save(workProjectNotify1);
+                    }
+
+                } else {
+                    if (!"yes".equals(reported.getAct().getFlag())) {//驳回待办提示
+                        title = "全过程项目【"+projectRecords.getProjectName()+"】上报被驳回";
+                        str = "全过程项目【"+projectRecords.getProjectName()+"】上报需重新修改定义,项目" + (0 == projectRecords.getOverDueStatus()?"未超期":"超期");
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(reported.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        //users.addAll(userList);
+                        workProjectNotifyService
+                                .save(UtilNotify
+                                        .saveNotify(reported.getId(),
+                                                reported.getCreateBy(),
+                                                reported.getCompany().getId(),
+                                                title,
+                                                str,
+                                                "218",
+                                                "0",
+                                                "重新申请",
+                                                notifyRole));
+                        users.add( reported.getCreateBy());
+                    } else {
+                        if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办
+                            title = "全过程项目【"+projectRecords.getProjectName()+"】上报重新申请,待审批";
+                            str = "全过程项目【"+projectRecords.getProjectName()+"】上报重新申请,待审批,项目" + (0 == projectRecords.getOverDueStatus()?"未超期":"超期");
+                            WorkProjectNotify notify = new WorkProjectNotify();
+                            notify.setNotifyId(reported.getId());
+                            userList = workProjectNotifyService.readByNotifyId(notify);
+                            //users.addAll(userList1);
+                            WorkProjectNotify workProjectNotify = UtilNotify
+                                    .saveNotify(reported.getId(),
+                                            new User(),
+                                            reported.getCompany().getId(),
+                                            title,
+                                            str,
+                                            "218",
+                                            "0",
+                                            "待审批",
+                                            notifyRole);
+                            users.addAll(auditUsers);
+                            for (User user1:auditUsers){
+                                workProjectNotify.setUser(user1);
+                                workProjectNotify.setId("");
+                                workProjectNotify.setIsNewRecord(false);
+                                workProjectNotifyService.save(workProjectNotify);
+                                Map<String,Object> extras = new HashMap<>();
+                                extras.put("type","7002");
+                                extras.put("procDefKey","218");
+                                extras.put("id",workProjectNotify.getId());
+                                UserUtils.pushInfoToApp(title, str,extras,user1.getId());
+                            }
+                        }else {
+                            WorkProjectNotify notify = new WorkProjectNotify();
+                            notify.setNotifyId(reported.getId());
+                            userList = workProjectNotifyService.readByNotifyId(notify);
+                            users.add(reported.getCreateBy());
+                            workProjectNotifyService
+                                    .save(UtilNotify
+                                            .saveNotify(reported.getId(),
+                                                    reported.getCreateBy(),
+                                                    reported.getCompany().getId(),
+                                                    title,
+                                                    str,
+                                                    "218",
+                                                    "0",
+                                                    "重新申请",
+                                                    notifyRole));
+                        }
+                    }
+                }
+            }
+            if (StringUtils.isNotBlank(title) && users!=null && users.size()!=0) {
+                for (User u : users) {
+                    UserUtils.pushIm(u.getId(),title);
+                }
+            }
+            if (StringUtils.isNotBlank(title) && userList!=null && userList.size()!=0) {
+                for (User u : userList) {
+                    UserUtils.pushMeIm(u.getId());
+                }
+            }
+            ruralProjectRecordsReportedDao.update(reported);
+            //修改项目表中字段信息
+            dao.updateReported(records);
+
+            return "保存审核意见成功!";
+        }catch (ActivitiObjectNotFoundException e){
+            logger.error("ActivitiObjectNotFoundException e:",e);
+            return "流程已审批,不能重新审批!";
+        }catch (Exception e){
+            logger.error("Exception e:",e);
+            return "保存审核意见失败!!";
+        }
+    }
+
+
+    /**
+     * 上报:强制撤销
+     * @param reported
+     */
+    @Transactional(readOnly = false)
+    public void cancelInvalidateByReported(RuralProjectRecordsReported reported) {
+        try {
+            String invalidateProcessInstanceId = reported.getProcessInstanceId();
+            //将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
+            WorkActivityProcess process = new WorkActivityProcess();
+            process.setProcessInstanceId(reported.getProcessInstanceId());
+            process.setIsApproval("0");
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessInstanceId(reported.getProcessInstanceId());
+            List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
+            WorkProjectNotify notify = new WorkProjectNotify();
+            notify.setNotifyId(reported.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.setDelFlag("1");
+                        p.setIsApproval("-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);
+            }
+
+            //结束该流程,设为"撤销"状态
+            actTaskService.endProcessInstance(invalidateProcessInstanceId,"上报-强制撤销");
+            reported.setReportStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+            ruralProjectRecordsReportedDao.updateProcessIdAndStatus(reported);
+
+
+            //修改项目信息中的上报状态
+            RuralProjectRecords records = new RuralProjectRecords();
+            records.setId(reported.getId());
+            records.setReportedState(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+            dao.updateReported(records);
+
+        }catch (ActivitiObjectNotFoundException e){
+            System.err.println("上报撤销异常,因为这个流程已不存在!");
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+
+    }
+
+
+    /**
+     * 根据项目id 查询上报咨询员列表
+     * @param reportedId   上报id
+     * @return
+     */
+    public List<RuralReportConsultant> getReportedConsultantsList(String reportedId){
+        List<RuralReportConsultant> list=projectcontentinfoDao.getReportedConsultantsList(reportedId);
+        return list;
+    }
+
+
+    /**
+     * 根据父id查询上报地址信息
+     * @param parentId
+     * @return
+     */
+    public List<Area> getProjectReportedAreaByParentId(String parentId){
+        return dao.getProjectReportedAreaByParentId(parentId);
+    }
+
+
 }

+ 54 - 42
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/ApprovalThread.java

@@ -70,14 +70,17 @@ public class ApprovalThread extends Thread {
             if(null == projectReportData){
                 disposeResult = "查询不到该项目的质量复核信息";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
             if(null!= projectReportData.getSignatureFlag() && 1 == projectReportData.getSignatureFlag()){
                 disposeResult = "该质量复核已经审定单盖章完成";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
             if(StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())){
                 disposeResult = "项目负责人为空,无法进行签章";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
 
             //根据项目id和附件类型的
@@ -90,6 +93,7 @@ public class ApprovalThread extends Thread {
                 if(StringUtils.isBlank(workattachment.getUrl())){
                     disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
                     bool = false;
+                    notification(bool,disposeResult,"","","");
                 }
                 //下载审定单文件
                 String path = null;
@@ -125,6 +129,7 @@ public class ApprovalThread extends Thread {
                 if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
                     disposeResult = "请上传doc、docx或者pdf的文件进行签章操作";
                     bool = false;
+                    notification(bool,disposeResult,"","","");
                 }
                 //获取真签单的documentId
                 HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
@@ -137,55 +142,62 @@ public class ApprovalThread extends Thread {
                     if("".equals(documentId)){
                         bool = false;
                         disposeResult = "签章文件创建失败";
-                    }
-                }else{
-                    String message = hashMap.get("message").toString();
-                    bool = false;
-                    disposeResult = message;
-                }
-                //获取竖版假(空白)签单的documentId
-                String verticalInvalidDocumentId = SignaturePostUtil.getVerticalInvalidDocument(verticalInvalidFile.getName(),verticalInvalidFile);
-                if("".equals(verticalInvalidDocumentId)){
-                    bool = false;
-                    disposeResult = "竖版模板文件创建失败";
-                }
+                        notification(bool,disposeResult,"","","");
+                    }else{
+                        //获取竖版假(空白)签单的documentId
+                        String verticalInvalidDocumentId = SignaturePostUtil.getVerticalInvalidDocument(verticalInvalidFile.getName(),verticalInvalidFile);
+                        if("".equals(verticalInvalidDocumentId)){
+                            bool = false;
+                            disposeResult = "竖版模板文件创建失败";
+                            notification(bool,disposeResult,"","","");
+                        }else{
+                            //签章完成则进行数据的保存
+                            projectReportData.setSignatureFlag(0);
+                            projectReportData.setSignatureDocumentId(documentId);
+                            projectReportData.setSignatureInvalidDocumentId(verticalInvalidDocumentId);
+                            projectReportData.setSignatureContractId("");
+                            projectReportData.setSignatureFileName(srcFileName);
+                            projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
+                            projectReportData.setSignatureUploadDate(new Date());
+                            //修改签章对应信息文件
+                            projectReportDataService.updateSignatureInfo(projectReportData);
 
 
-                //签章完成则进行数据的保存
-                projectReportData.setSignatureFlag(0);
-                projectReportData.setSignatureDocumentId(documentId);
-                projectReportData.setSignatureInvalidDocumentId(verticalInvalidDocumentId);
-                projectReportData.setSignatureContractId("");
-                projectReportData.setSignatureFileName(srcFileName);
-                projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
-                projectReportData.setSignatureUploadDate(new Date());
-                //修改签章对应信息文件
-                projectReportDataService.updateSignatureInfo(projectReportData);
+                            List<String> documentList = Lists.newArrayList();
+                            List<String> invalidDocumentList = Lists.newArrayList();
+                            documentList.add(documentId);
+                            documentList.add(verticalInvalidDocumentId);
+                            //documentList.add(acrossInvalidDocumentId);
+                            invalidDocumentList.add(verticalInvalidDocumentId);
+                            //invalidDocumentList.add(acrossInvalidDocumentId);
+                            //将空白单的documentId存入数据库种
+                            projectReportData.setSignatureInvalidDocumentId(String.join(",", invalidDocumentList));
+                            //根据项目id 和 documentId生成合同id
+                            HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                            String contractIdCode = contractIdHashMap.get("code").toString();
+                            String contractId = "";
+                            if("0".equals(contractIdCode)){
+                                contractId = contractIdHashMap.get("contractId").toString();
+                                if("".equals(contractId)){
+                                    disposeResult = "签章文件创建失败";
+                                    bool = false;
+                                    notification(bool,disposeResult,"","","");
+                                }
+                            }else{
+                                bool = false;
+                                disposeResult = contractIdHashMap.get("message").toString();
+                                notification(bool,disposeResult,"","","");
+                            }
+                        }
 
-
-                List<String> documentList = Lists.newArrayList();
-                List<String> invalidDocumentList = Lists.newArrayList();
-                documentList.add(documentId);
-                documentList.add(verticalInvalidDocumentId);
-                //documentList.add(acrossInvalidDocumentId);
-                invalidDocumentList.add(verticalInvalidDocumentId);
-                //invalidDocumentList.add(acrossInvalidDocumentId);
-                //将空白单的documentId存入数据库种
-                projectReportData.setSignatureInvalidDocumentId(String.join(",", invalidDocumentList));
-                //根据项目id 和 documentId生成合同id
-                HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
-                String contractIdCode = contractIdHashMap.get("code").toString();
-                String contractId = "";
-                if("0".equals(contractIdCode)){
-                    contractId = contractIdHashMap.get("contractId").toString();
-                    if("".equals(contractId)){
-                        disposeResult = "签章文件创建失败";
-                        bool = false;
                     }
                 }else{
+                    String message = hashMap.get("message").toString();
                     bool = false;
-                    disposeResult = contractIdHashMap.get("message").toString();
+                    disposeResult = message;
+                    notification(bool,disposeResult,"","","");
                 }
+
                 //进行静默签署
                                 /*HashMap signbyCompanyHashMap = ruralProjectMessageService.signbyCompany(contractId, documentList);
                                 if(null != signbyCompanyHashMap){

+ 46 - 34
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/JudgementThread.java

@@ -65,14 +65,17 @@ public class JudgementThread extends Thread {
             if(null == projectReportData){
                 disposeResult = "查询不到该项目的质量复核信息";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
             if(null!= projectReportData.getSignatureFlag() && 1 == projectReportData.getSignatureFlag()){
                 disposeResult = "该质量复核已经盖章完成";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
             if(StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())){
                 disposeResult = "项目负责人为空,无法进行签章";
                 bool = false;
+                notification(bool,disposeResult,"","","");
             }
 
             //根据项目id和附件类型的
@@ -87,6 +90,8 @@ public class JudgementThread extends Thread {
                 if(StringUtils.isBlank(workattachment.getUrl())){
                     disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
                     bool = false;
+                    notification(bool,disposeResult,"","","");
+
                 }
                 //下载审定单文件
                 String path = null;
@@ -122,6 +127,7 @@ public class JudgementThread extends Thread {
                 if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase()) && !"xls".equals(substring.toLowerCase()) && !"xlsx".equals(substring.toLowerCase())){
                     disposeResult = "请上传doc、docx、xls、xlsx或者pdf文件进行签章操作";
                     bool = false;
+                    notification(bool,disposeResult,"","","");
                 }
                 //获取真签单的documentId
                 HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
@@ -134,49 +140,55 @@ public class JudgementThread extends Thread {
                     if("".equals(documentId)){
                         disposeResult =  "签章文件创建失败";
                         bool = false;
+                        notification(bool,disposeResult,"","","");
+                    }else{
+                        //签章完成则进行数据的保存
+                        ruralProjectRecords.setQualitySignatureFlag(0);
+                        ruralProjectRecords.setQualitySignatureDocumentId(documentId);
+                        ruralProjectRecords.setQualitySignatureContractId("");
+                        ruralProjectRecords.setQualitySignatureFileName(srcFileName);
+                        ruralProjectRecords.setQualitySignatureUploadFileUser(UserUtils.getUser());
+                        ruralProjectRecords.setQualitySignatureUploadDate(new Date());
+                        //修改签章对应信息文件
+                        projectReportDataService.updateJudgementSignatureInfo(ruralProjectRecords);
+
+
+                        List<String> documentList = Lists.newArrayList();
+                        documentList.add(documentId);
+                        //根据项目id 和 documentId生成合同id
+                        long s1 = System.currentTimeMillis();
+                        HashMap contractIdHashMap = new HashMap();
+                        if("doc".equals(substring.toLowerCase()) || "docx".equals(substring.toLowerCase()) || "pdf".equals(substring.toLowerCase()) ){
+                            contractIdHashMap = ruralProjectMessageService.getJudgementSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                        }else if("xls".equals(substring.toLowerCase()) || "xlsx".equals(substring.toLowerCase())){
+                            contractIdHashMap = ruralProjectMessageService.getSignatureExcelContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                        }
+                        String contractIdCode = contractIdHashMap.get("code").toString();
+                        String contractId = "";
+                        if("0".equals(contractIdCode)){
+                            contractId = contractIdHashMap.get("contractId").toString();
+                            if("".equals(contractId)){
+                                disposeResult =  "签章文件创建失败";
+                                bool = false;
+                                notification(bool,disposeResult,"","","");
+                            }
+                        }else{
+                            disposeResult =  contractIdHashMap.get("message").toString();
+                            bool = false;
+                            notification(bool,disposeResult,"","","");
+                        }
+                        long s2 = System.currentTimeMillis();
+                        System.out.println("创建签章合同用时:" + (s2-s1));
                     }
                 }else{
                     String message = hashMap.get("message").toString();
                     disposeResult =  message;
                     bool = false;
+                    notification(bool,disposeResult,"","","");
                 }
 
 
-                //签章完成则进行数据的保存
-                ruralProjectRecords.setQualitySignatureFlag(0);
-                ruralProjectRecords.setQualitySignatureDocumentId(documentId);
-                ruralProjectRecords.setQualitySignatureContractId("");
-                ruralProjectRecords.setQualitySignatureFileName(srcFileName);
-                ruralProjectRecords.setQualitySignatureUploadFileUser(UserUtils.getUser());
-                ruralProjectRecords.setQualitySignatureUploadDate(new Date());
-                //修改签章对应信息文件
-                projectReportDataService.updateJudgementSignatureInfo(ruralProjectRecords);
-
 
-                List<String> documentList = Lists.newArrayList();
-                documentList.add(documentId);
-                //根据项目id 和 documentId生成合同id
-                long s1 = System.currentTimeMillis();
-                HashMap contractIdHashMap = new HashMap();
-                if("doc".equals(substring.toLowerCase()) || "docx".equals(substring.toLowerCase()) || "pdf".equals(substring.toLowerCase()) ){
-                    contractIdHashMap = ruralProjectMessageService.getJudgementSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
-                }else if("xls".equals(substring.toLowerCase()) || "xlsx".equals(substring.toLowerCase())){
-                    contractIdHashMap = ruralProjectMessageService.getSignatureExcelContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
-                }
-                String contractIdCode = contractIdHashMap.get("code").toString();
-                String contractId = "";
-                if("0".equals(contractIdCode)){
-                    contractId = contractIdHashMap.get("contractId").toString();
-                    if("".equals(contractId)){
-                        disposeResult =  "签章文件创建失败";
-                        bool = false;
-                    }
-                }else{
-                    disposeResult =  contractIdHashMap.get("message").toString();
-                    bool = false;
-                }
-                long s2 = System.currentTimeMillis();
-                System.out.println("创建签章合同用时:" + (s2-s1));
                 //进行静默签署
                                 /*HashMap signbyCompanyHashMap = ruralProjectMessageService.signbyCompany(contractId, documentList);
                                 if(null != signbyCompanyHashMap){

+ 57 - 43
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/SignatureThread.java

@@ -69,14 +69,17 @@ public class SignatureThread extends Thread {
             if(null == ruralProjectRecords){
                 bool = false;
                 disposeResult =  "查询不到该项目信息";
+                notification(bool,disposeResult,"","","");
             }
             if(null!= ruralProjectRecords.getReportSignatureFlag() && 1 == ruralProjectRecords.getReportSignatureFlag()){
                 bool = false;
                 disposeResult =  "该项目已经报告盖章完成";
+                notification(bool,disposeResult,"","","");
             }
             if(StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())){
                 bool = false;
                 disposeResult =  "项目负责人为空,无法进行签章";
+                notification(bool,disposeResult,"","","");
             }
 
             //根据项目id和附件类型的
@@ -89,6 +92,7 @@ public class SignatureThread extends Thread {
                 if(StringUtils.isBlank(workattachment.getUrl())){
                     bool = false;
                     disposeResult =  "报告签章文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
+                    notification(bool,disposeResult,"","","");
                 }
                 //下载审定单文件
                 String path = null;
@@ -123,57 +127,67 @@ public class SignatureThread extends Thread {
                 if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
                     disposeResult =  "请上传doc、docx或者pdf的文件进行签章操作";
                     bool = false;
-                }
-                //获取真签单的documentId
-                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
-                String code = hashMap.get("code").toString();
-
-                if("0".equals(code)){
-                    String result = hashMap.get("result").toString();
-                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
-                    documentId =  documentIdMap.get("documentId").toString();
-                    if("".equals(documentId)){
-                        disposeResult =  "签章文件创建失败";
-                        bool = false;
-                    }
+                    notification(bool,disposeResult,"","","");
                 }else{
-                    String message = hashMap.get("message").toString();
-                    disposeResult =  message;
-                    bool = false;
-                }
 
-                //先将数据进行保存
-                //签章完成则进行数据的保存
-                ruralProjectRecords.setReportSignatureFlag(0);
-                ruralProjectRecords.setReportSignatureDocumentId(documentId);
-                ruralProjectRecords.setReportSignatureContractId("");
-                ruralProjectRecords.setReportSignatureFileName(srcFileName);
-                ruralProjectRecords.setReportSignatureUploadFileUser(UserUtils.getUser());
-                ruralProjectRecords.setReportSignatureUploadDate(new Date());
-                //修改签章对应信息文件
-                projectReportDataService.updateReportSignatureInfo(ruralProjectRecords);
+                    //获取真签单的documentId
+                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                    String code = hashMap.get("code").toString();
+
+                    if("0".equals(code)){
+                        String result = hashMap.get("result").toString();
+                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                        documentId =  documentIdMap.get("documentId").toString();
+                        if("".equals(documentId)){
+                            disposeResult =  "签章文件创建失败";
+                            bool = false;
+                            notification(bool,disposeResult,"","","");
+                        }else{
+                            //先将数据进行保存
+                            //签章完成则进行数据的保存
+                            ruralProjectRecords.setReportSignatureFlag(0);
+                            ruralProjectRecords.setReportSignatureDocumentId(documentId);
+                            ruralProjectRecords.setReportSignatureContractId("");
+                            ruralProjectRecords.setReportSignatureFileName(srcFileName);
+                            ruralProjectRecords.setReportSignatureUploadFileUser(UserUtils.getUser());
+                            ruralProjectRecords.setReportSignatureUploadDate(new Date());
+                            //修改签章对应信息文件
+                            projectReportDataService.updateReportSignatureInfo(ruralProjectRecords);
 
 
 
-                List<String> documentList = Lists.newArrayList();
-                documentList.add(documentId);
-                //根据项目id 和 documentId生成合同id
-                long s1 = System.currentTimeMillis();
-                HashMap contractIdHashMap = ruralProjectMessageService.getReportSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
-                String contractIdCode = contractIdHashMap.get("code").toString();
-                String contractId = "";
-                if("0".equals(contractIdCode)){
-                    contractId = contractIdHashMap.get("contractId").toString();
-                    if("".equals(contractId)){
-                        disposeResult =  "签章文件创建失败";
+                            List<String> documentList = Lists.newArrayList();
+                            documentList.add(documentId);
+                            //根据项目id 和 documentId生成合同id
+                            long s1 = System.currentTimeMillis();
+                            HashMap contractIdHashMap = ruralProjectMessageService.getReportSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                            String contractIdCode = contractIdHashMap.get("code").toString();
+                            String contractId = "";
+                            if("0".equals(contractIdCode)){
+                                contractId = contractIdHashMap.get("contractId").toString();
+                                if("".equals(contractId)){
+                                    disposeResult =  "签章文件创建失败";
+                                    bool = false;
+                                    notification(bool,disposeResult,"","","");
+                                }
+                            }else{
+                                disposeResult =  contractIdHashMap.get("message").toString();
+                                bool = false;
+                                notification(bool,disposeResult,"","","");
+                            }
+                            long s2 = System.currentTimeMillis();
+                            System.out.println("创建签章合同用时:" + (s2-s1));
+                        }
+                    }else{
+                        String message = hashMap.get("message").toString();
+                        disposeResult =  message;
                         bool = false;
+                        notification(bool,disposeResult,"","","");
                     }
-                }else{
-                    disposeResult =  contractIdHashMap.get("message").toString();
-                    bool = false;
                 }
-                long s2 = System.currentTimeMillis();
-                System.out.println("创建签章合同用时:" + (s2-s1));
+
+
+
 
                 //进行静默签署
                 /*long s3 = System.currentTimeMillis();

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

@@ -232,6 +232,7 @@ public class RuralProjectSignatureCallBackController extends BaseController {
 
         //签章完成则进行数据的保存
         records.setReportSignatureFlag(1);
+        records.setReportSignatureDocumentId(presignCallBack.getDocumentId());
         records.setReportSignatureContractId(presignCallBack.getContractId());
         records.setReportSignatureUploadDate(new Date());
         //修改签章对应信息文件

+ 299 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -2546,6 +2546,305 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("reportedId",reported.getId());
 						return "modules/ruralprojectrecords/ruralporjectmessage/reportedView";
 					}
+				}else if ("218".equals(workProjectNotify.getType())) {    //全过程项目上报管理
+					RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(workProjectNotify.getNotifyId());
+
+					//查询报告信息
+					/*ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(reported.getId());
+					//查询“配农网”工程类型id
+					String engineeringId = engineeringService.getEngineeringId("202");
+					ProjectReportRecord projectReportRecord = projectReportRecordService.getprojectReportRecord(projectReportData.getId());
+					if(null != projectReportRecord){
+						projectReportRecord.setProjectReportData(projectReportData);
+						projectReportRecord.setReport(projectReportData);
+					}else{
+						projectReportRecord = new ProjectReportRecord();
+					}
+					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+					projectcontentinfo.setProjectReportData(projectReportData);*/
+
+					//获取项目信息
+					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.getQueryProjectUsers(reported.getProjectId());
+					//获取复核标准
+					String reviewId="";
+					if ("2".equals(ruralProjectRecords.getSubmitMoney())){
+						reviewId="1";
+					}else{
+						if(StringUtils.isBlank(ruralProjectRecords.getEmergencyProject()) ||"0".equals(ruralProjectRecords.getEmergencyProject())){
+							reviewId="2";
+						}else if ("1".equals(ruralProjectRecords.getEmergencyProject())){
+							reviewId="3";
+						}
+					}
+					List<WorkReviewAudit> workReviewAudits = projectContentDataService.findListReview(reviewId,"紧急项目");
+					model.addAttribute("list", workReviewAudits);
+
+					//获取子项目列表信息
+					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]);
+							}
+							/*if(null != projectReportRecord){
+								projectReportRecord.setChargeCriterionList(chargeCriterionList);
+							}*/
+
+						}
+						reported.setChargeCriterionList(workContractInfo.getChargeCriterionList());
+					}
+
+
+					WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					ruralProjectRecords.setWorkContractInfo(projectContractInfo);
+					//MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords,projectReportData.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.getProjectTemplateListByArchive(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(null != projectReportRecord){
+									projectReportRecord.setFileAttachmentList(fileAttachmentList);
+								}
+								break;
+							case "12":
+								List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateListByArchive(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(null != projectReportRecord){
+									projectReportRecord.setFileGistdataList(projectTemplateList);
+								}
+
+								break;
+							case "13":
+								if(null != projectReportRecord){
+									projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateListByArchive(relateInfo));
+								}
+
+								break;
+						}
+
+					}
+					if(null != projectReportRecord){
+						projectReportRecord.setUploadMode(uploadMode);
+					}*/
+
+					//获取项目基础信息
+					ruralProjectRecordsService.queryProjectDetail(ruralProjectRecords);
+					//工程咨询
+					List<MainDictDetail> mainDictList = Lists.newArrayList();
+					if("1".equals(ruralProjectRecords.getProjectType())){
+						mainDictList = DictUtils.getMainDictList("attachment_project_sort");
+						//造价审核
+					} else if("2".equals(ruralProjectRecords.getProjectType())){
+						mainDictList = DictUtils.getMainDictList("attachment_project_sort_cost");
+					}
+					if(StringUtils.isNotBlank(ruralProjectRecords.getAttachmentProjectSort())){
+						//处理项目类别
+						for (MainDictDetail info: mainDictList) {
+							if(ruralProjectRecords.getAttachmentProjectSort().equals(info.getValue())){
+								ruralProjectRecords.setAttachmentProjectSort(info.getLabel());
+								break;
+							}
+						}
+					}
+					//model.addAttribute("projectcontentinfo", projectcontentinfo);
+					model.addAttribute("projectRecords", ruralProjectRecords);
+					//model.addAttribute("projectReportData", projectReportData);
+					//model.addAttribute("ziXunShouRu", projectReportData.getZiXunShouRu());
+					model.addAttribute("workContractInfo", workContractInfo);
+					//model.addAttribute("projectReportRecord", projectReportRecord);
+					//model.addAttribute("project", projectReportData.getProject());
+					//tap页
+					//查询所有的工程类型
+					List<ProjectEngineeringInfo> projectEngineeringInfo=engineeringService.findList(new ProjectEngineeringInfo());
+					model.addAttribute("projectEngineeringInfo",projectEngineeringInfo);
+					//项目计划
+					RuralProjectRecords projectRecordPlans = this.planView(ruralProjectRecords.getId());
+					model.addAttribute("projectRecordPlans", projectRecordPlans);
+					//获取质量复核项目组成员
+					//List<RuralReportConsultant> consultantinfo =this.qualityView(ruralProjectRecords,projectReportData);
+					//model.addAttribute("consultantinfo", consultantinfo);
+					//获取总审人员
+					//User user=UserUtils.get(projectReportData.getBzshbUserId());
+					//model.addAttribute("bzshbUserName",user.getName());
+					//质量复核标准展示
+					String review="";
+					if ("2".equals(ruralProjectRecords.getSubmitMoney())){
+						review="1";
+					};
+					List<WorkReviewAudit> workReviewAuditList = projectContentDataService.findListReview(review,"质量复核");
+					WorkReviewAudit revAudit = new WorkReviewAudit();
+					String type = "4";
+					revAudit.setCompanyId(UserUtils.getSelectCompany().getId());
+					revAudit.setType(type);
+					//revAudit.setReportId(projectReportData.getId());
+					List<WorkReviewAudit> reaudits = workReviewStandardService.findAuditList(revAudit);
+					for(WorkReviewAudit reAudit:workReviewAuditList){
+						for (WorkReviewAudit audit:reaudits){
+							if (reAudit.getId().equals(audit.getStandardId())){
+								reAudit.setDeductOption(audit.getDeductOption());
+								break;
+							}
+						}
+					}
+					model.addAttribute("datalist", workReviewAuditList);
+
+					//拆线呢报告签发评分展示项
+					List<WorkReviewAudit> reviewAuditList = projectContentDataService.findListIssue(reviewId,"报告签发");
+					//查询报告签发评分评论数据
+					WorkReviewAudit workReviewAuditTwo = new WorkReviewAudit();
+					type = "4";
+					workReviewAuditTwo.setCompanyId(UserUtils.getSelectCompany().getId());
+					workReviewAuditTwo.setType(type);
+					//workReviewAuditTwo.setReportId(projectReportData.getId());
+					List<WorkReviewAudit> rreviewAuditList = workReviewStandardService.findAuditList(workReviewAuditTwo);
+					for(WorkReviewAudit reAudit:reviewAuditList){
+						for (WorkReviewAudit audit:rreviewAuditList){
+							if (reAudit.getId().equals(audit.getStandardId())){
+								reAudit.setDeductOption(audit.getDeductOption());
+								break;
+							}
+						}
+					}
+					model.addAttribute("datalistTwo", reviewAuditList);
+
+
+
+
+
+					model.addAttribute("projectTypeId",reported.getProjectType());
+					/*user = UserUtils.get(reported.getXmFZR());
+					if(null != user){
+						model.addAttribute("xmFZRName",user.getName());
+					}*/
+
+					Act act = getByAct(reported.getProcessInstanceId());
+					reported.setAct(act);
+					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+						reported.setHome(workProjectNotify.getHome());
+					}else{
+						reported.setHome("home");
+					}
+					RuralProjectRecords records = ruralProjectRecordsService.getQueryProjectUsers(reported.getProjectId());
+
+					if(StringUtils.isNotBlank(reported.getXmFZR())){
+						User user = UserUtils.get(reported.getXmFZR());
+						records.setProjectMasterName(user.getName());
+						records.setProjectMasterId(user.getId());
+					}
+
+					//根据上报id查询上报咨询员的信息
+					List<RuralReportConsultant> reportedConsultants=ruralProjectMessageService.getReportedConsultantsList(reported.getId());
+					//对上报的咨询员进行处理
+					List<RuralReportConsultant> consultantList = ruralProjectMessageService.disposereportedConsultant(reportedConsultants);
+
+					//获取工程类型
+					ProjectEngineeringInfo engineeringInfos=engineeringService.getProjectReportedType(reported.getPorjectUse());
+					model.addAttribute("engineeringInfo", engineeringInfos);
+					List<Area> areaList = ruralProjectMessageService.getProjectReportedAreaByParentId(reported.getS1());
+					model.addAttribute("cityList", areaList);
+					//查询项目信息
+					model.addAttribute("ruralProjectRecords", records);
+					model.addAttribute("ruralProjectRecordsReported", reported);
+					model.addAttribute("consultantInfo", consultantList);
+					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+						ruralProjectMessageService.getInfoByView(reported);
+						model.addAttribute("reportedId",reported.getId());
+						return "modules/ruralprojectrecords/ruralporjectmessage/reportedView";
+					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "projectReported");
+						model.addAttribute("identificationName","项目上报审核意见");
+						if(StringUtils.isNotBlank(reported.getJingHeJianLv())){
+							/*if(Double.valueOf(reported.getJingHeJianLv())>30 || Double.valueOf(reported.getJingHeJianLv())< -30 ){
+								projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+								projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+								projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+
+								return "modules/ruralprojectrecords/cost/newReported/bzshbReportedAudit";
+							}*/
+						}
+						return "modules/ruralprojectrecords/reported/reportedAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/ruralprojectrecords/reported/reportedModify";
+					} else {
+						ruralProjectMessageService.getInfoByView(reported);
+						model.addAttribute("reportedId",reported.getId());
+						return "modules/ruralprojectrecords/ruralporjectmessage/reportedView";
+					}
 				} else if (workProjectNotify.getType().equals("131")) {    //项目计划通知
 					boolean flag = false;
 					//通过通知信息id获取项目登记对象

+ 3 - 0
src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml

@@ -94,6 +94,8 @@
 		wct.name AS "workContractInfo.client.name",
 		o.top_company AS "office.name",
 		dsu.name as "projectRegistrant"
+		,ifnull(rprr.report_status,0) as "reportedState"
+		,rprr.process_instance_id as "reportedProcessInstanceId"
 		FROM rural_project_records a
 		<include refid="projectRecordsJoins"/>
 
@@ -105,6 +107,7 @@
 		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
 		LEFT JOIN work_client_info wct on wci.client_id = wct.id
         LEFT JOIN sys_office o ON o.id = a.office_id
+		left join rural_project_records_reported rprr on rprr.id = a.id
 		<where>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')

+ 104 - 4
src/main/webapp/webpage/modules/projectrecord/projectRecordsList.jsp

@@ -183,6 +183,72 @@
                 }
             });
         }
+
+		function openDialogreReportSwitch(title,url,width,height,target,buttons) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			var split = buttons.split(",");
+			$.ajax({
+				url: "${ctx}/ruralProject/ruralCostProjectMessage/getReportSwitch",
+				success: function (data) {
+					if (data){
+						top.layer.open({
+							type: 2,
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							skin: 'three-btns',
+							content: url,
+							btn: split,
+							btn1: 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中展示
+								if(iframeWin.contentWindow.doSubmit(1) ){
+									// top.layer.close(index);//关闭对话框。
+									setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+								}
+							},
+							btn2:function(index,layero){
+								if(split.length==2){return}
+								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中展示
+								if(iframeWin.contentWindow.doSubmit(2) ){
+									// top.layer.close(index);//关闭对话框。
+									setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+								}else {
+									return false;
+								}
+							},
+							btn3: function (index) {
+							}
+						});
+					}else{
+						top.layer.msg("上报功能已关闭", {icon: 0});
+					}
+				}
+			});
+		}
 	</script>
 	<style>
 		body{
@@ -199,12 +265,12 @@
 	<sys:message content="${message}"/>
 	<div class="layui-row">
 		<div class="full-width fl">
-			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+			<%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
 				<ul class="list-tabs" >
 					<li class="active"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>
 					<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>
 				</ul>
-			</div>
+			</div>--%>
 
 			<%--<div class="layui-row" id="tabDiv">--%>
 			<%--<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">--%>
@@ -373,7 +439,7 @@
                     }}
                 ,{field:'createName',align:'center', title: '创建人',  width:80}
                 ,{field:'createDate',align:'center', title: '创建日期',  width:80}
-                ,{align:'center', title: '状态',  width:70,templet:function(d){
+                ,{align:'center', title: '状态',  width:90,templet:function(d){
                         <%--var st = getAuditState(d.projectStatus)--%>
                         <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
                         <%--return xml;--%>
@@ -384,6 +450,14 @@
                             var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         return xml;
                     }}
+                    ,{align:'center', title: '上报',  width:100,templet:function(d){
+						var st = getReportedState(""+d.reportedState);
+						if(st.action)
+							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralProjectMessage/getReportedProcess?processInstanceId=" + d.reportedProcessInstanceId + "','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;
+					}}
                 ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
                         ////对操作进行初始化
                         var xml="<div class=\"layui-btn-group\">";
@@ -409,7 +483,31 @@
                         }
                         if(d.canedit3 != undefined && d.canedit3 =="1")
                         {
-                            xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-orange\" > 变更</a>";
+                        	if(d.reportedState !=undefined && d.reportedState != null && d.reportedState !='' && d.reportedState !='0'){
+								if(d.reportedState == 1){
+									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectRecords/updateReported?id=" +  d.id + " ','95%', '95%','','上报,暂存,关闭')\"  class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 修改上报</a>";
+								}
+								if(d.reportedState == 2){
+									xml+="<a href=\"${ctx}/project/projectRecords/cancelInvalidateByReported?id=" + d.id + "&processInstanceId=" + d.reportedProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该上报审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 撤回上报</a>";
+								}
+								/*撤回修改*/
+								if(d.reportedState == 3){
+									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectRecords/updateReported?id=" +  d.id + " ','95%', '95%','','上报,关闭')\"  class=\"layui-btn layui-btn-xs  layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 修改上报</a>";
+								}
+								/*驳回修改*/
+								if(d.reportedState == 4){
+									//驳回操作
+									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectRecords/reportedModify?id=" +  d.id + " ','95%', '95%','','上报,关闭')\"  class=\"layui-btn layui-btn-xs layui-bg-green\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 修改上报</a>";
+								}
+							}else{
+								if(d.projectStatus == 5){
+									//xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-orange\" > 变更</a>";
+									xml+="<a href=\"#\" onclick=\"openDialogreReportSwitch('上报管理', '${ctx}/project/projectRecords/updateReported?id=" +  d.id + " ','95%', '95%','','上报,暂存,关闭')\"  class=\"layui-btn layui-btn-xs  layui-bg-blue\" > 上报</a>";
+								}
+
+
+							}
+
                         }
                         xml+="</div>"
                         return xml;
@@ -432,6 +530,8 @@
                     ,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
                     ,"projectStatus":"${projectRecords.projectStatus}"
                     ,"procId":"${projectRecords.processInstanceId}"
+                    ,"reportedProcessInstanceId":"${projectRecords.reportedProcessInstanceId}"
+					,"reportedState":"${projectRecords.reportedState}"
                     <c:choose><c:when test="${flag == '1' or fns:getUser().id == projectRecords.createBy.id}">
                     <shiro:hasPermission name="project:projectRecords:del">,"candel":	<c:choose><c:when test="${projectRecords.projectStatus == 1 or projectRecords.projectStatus == 3 or projectRecords.projectStatus == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
                     <shiro:hasPermission name="project:projectRecords:edit">,"canedit1":	<c:choose><c:when test="${projectRecords.projectStatus == 1 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1700 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedAudit.jsp


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1659 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedForm.jsp


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1640 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/reported/reportedModify.jsp


+ 4 - 4
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp

@@ -431,7 +431,7 @@
 							</div>
 						</div>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">开票金额:</label>
+							<label class="layui-form-label">开票金额:</label>
 							<div class="layui-input-block with-icon">
 								<form:input path="money" htmlEscape="false"  class=" form-control layui-input"/>
 							</div>
@@ -649,7 +649,7 @@
 				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
-				,{field:'money',align:'center', title: '开票金额(元)',  width:110,templet:function(d){
+				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){
 						return "<span title='"+ d.money +"'>" + d.money + "</span>";
 					}}
 				,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
@@ -665,8 +665,8 @@
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
-				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:80}
-				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:80}
+				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:90}
+				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
 				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
                 ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){

+ 108 - 115
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp

@@ -497,20 +497,14 @@
 				<%--<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->--%>
 
 					<div class="commonQuery lw9">
-<%--						<div class="layui-item query athird">--%>
-<%--							<label class="layui-form-label">发票号:</label>--%>
-<%--							<div class="layui-input-block with-icon">--%>
-<%--								<form:input path="widNumber" htmlEscape="false"  class=" form-control layui-input"/>--%>
-<%--							</div>--%>
-<%--						</div>--%>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">发票申请编号:</label>
-							<div class="layui-input-block">
-								<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							<label class="layui-form-label">发票号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="widNumber" htmlEscape="false"  class=" form-control layui-input"/>
 							</div>
 						</div>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">开票金额:</label>
+							<label class="layui-form-label">开票金额:</label>
 							<div class="layui-input-block with-icon">
 								<form:input path="money" htmlEscape="false"  class=" form-control layui-input"/>
 							</div>
@@ -560,7 +554,12 @@
 															cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false" isAll="true"/>
 									</div>
 								</div>
-
+								<div class="layui-item query athird">
+									<label class="layui-form-label">发票申请编号:</label>
+									<div class="layui-input-block">
+										<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+									</div>
+								</div>
 								<div class="layui-item query athird">
 									<label class="layui-form-label">开票日期:</label>
 									<div class="layui-input-block">
@@ -573,78 +572,86 @@
 										</input>
 									</div>
 								</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">经办人部门:</label>
-							<div class="layui-input-block with-icon">
-								<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
-												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">经办人:</label>
-							<div class="layui-input-block with-icon">
-								<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}" cssStyle="background-color: #fff"
-																	 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">开票单位:</label>
-							<div class="layui-input-block with-icon">
-								<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">是否收款:</label>
-							<div class="layui-input-block with-icon">
-								<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
-									<option value=""></option>
-									<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
-									<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
-								</select>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">发票类型:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="invoiceType" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">状态:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="invoiceState" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">收款类型:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="chargeType" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">开票内容:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="billingContent" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">项目名称:</label>
-							<div class="layui-input-block with-icon">
-								<form:input path="projectName" htmlEscape="false"  class=" form-control layui-input"/>
-							</div>
-						</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">经办人部门:</label>
+									<div class="layui-input-block with-icon">
+										<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
+														title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">经办人:</label>
+									<div class="layui-input-block with-icon">
+										<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}" cssStyle="background-color: #fff"
+																			 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+									</div>
+								</div>
+
+								<div class="layui-item query athird">
+									<label class="layui-form-label">收款日期:</label>
+									<div class="layui-input-block">
+										<input id="receiptBeginDate" name="receiptBeginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+											   value="<fmt:formatDate value="${workInvoice.receiptBeginDate}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+										<span class="group-sep">-</span>
+										<input id="receiptEndDate" name="receiptEndDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+											   value="<fmt:formatDate value="${workInvoice.receiptEndDate}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</div>
+								</div>
+
+								<div class="layui-item query athird">
+									<label class="layui-form-label">开票单位:</label>
+									<div class="layui-input-block with-icon">
+										<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">是否收款:</label>
+									<div class="layui-input-block with-icon">
+										<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
+											<option value=""></option>
+											<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
+											<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
+										</select>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">发票类型:</label>
+									<div class="layui-input-block with-icon">
+										<form:select path="invoiceType" class="form-control simple-select">
+											<form:option value="" label=""/>
+											<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">状态:</label>
+									<div class="layui-input-block with-icon">
+										<form:select path="invoiceState" class="form-control simple-select">
+											<form:option value="" label=""/>
+											<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">收款类型:</label>
+									<div class="layui-input-block with-icon">
+										<form:select path="chargeType" class="form-control simple-select">
+											<form:option value="" label=""/>
+											<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</div>
+								</div>
+								<div class="layui-item query athird">
+									<label class="layui-form-label">开票内容:</label>
+									<div class="layui-input-block with-icon">
+										<form:select path="billingContent" class="form-control simple-select">
+											<form:option value="" label=""/>
+											<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</div>
+								</div>
 					</div>
 				</form:form>
 			</div>
@@ -687,62 +694,48 @@
             ,elem: '#contentTable'
             ,page: false
             ,cols: [[
-				//{checkbox: true, fixed: true},
-                {field:'index',align:'center', title: '序号',width:40}
-				,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
-						return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceAllTwo/workinvoiceAllTwo/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
-					}}
+				{field:'index',align:'center', title: '序号',width:40}
 				,{field:'projName',align:'center', title: '项目名称', minWidth:160,templet:function(d){
 						if(1 == d.showView && d.showView != undefined){
-							return "<a class=\"attention-info\" onmouseover=\"readProjectInfo(this,'"+d.projName+"')\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/workinvoiceAll/workInvoiceAll/projectview?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+							return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/workinvoiceAll/workInvoiceAll/projectview?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
 						}else{
 							return "<span title='"+ d.projName +"'>" +d.projName+ "</span>";
 						}
+						<%--return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projName + "</a>";--%>
 					}}
-				,{field:'reportNumber',align:'center', sort:true,title: '报告号', minWidth:130,templet:function(d){
-						if (d.reportNumber!=''){
-							return "<span class=\"attention-info\" title=\""+ d.reportNumber +"\">" + d.reportNumber + "</span>";
-						}else{
-							return "<span class=\"attention-info\" title=\"\">无</span>";
-						}
+				,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
+					}}
+				,{field:'widNumber',align:'center', title: '发票号',  width:90,templet:function(d){
+						return "<span title='"+ d.widNumber +"'>" + d.widNumber + "</span>";
 					}}
-				// ,{field:'widNumber',align:'center', title: '发票号',  width:90,templet:function(d){
-				// 		return "<span title='"+ d.widNumber +"'>" + d.widNumber + "</span>";
-				// 	}}
 				,{field:'clientName', align:'center',title: '开票单位', minWidth:160,templet:function(d){
 						return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
 					}}
 				,{field:'responsibleName', align:'center',title: '经办人', minWidth:80,templet:function(d){
 						return "<span title='"+ d.responsibleName +"'>" + d.responsibleName + "</span>";
 					}}
-				,{field:'officeName', align:'center',title: '部门',width:80,templet:function(d){
+				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
-				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
-						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){
+						return "<span title='"+ d.money +"'>" + d.money + "</span>";
 					}}
-				,{field:'money',align:'center', title: '开票金额(元)',  width:110,templet:function(d){
-						var numbers = new Array();;
-						if (d.workAccountListStr.length>0){
-							for (var i=0;i<d.workAccountListStr.length;i++){
-								numbers[i]="发票号:"+d.workAccountListStr[i].number+" 发票金额:"+d.workAccountListStr[i].totalMoney;
-							}
-						}
-						var xml= "<span onmouseover=\"readDetailInfo(this,'"+numbers+"')\">" + d.money+"</span>" ;
-						return xml;
+				,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
+						return "<span title='"+ d.widTotalMoney +"'>" + d.widTotalMoney + "</span>";
 					}}
-				// ,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
-				// 		return "<span title='"+ d.widTotalMoney +"'>" + d.widTotalMoney + "</span>";
-				// 	}}
 				,{field:'billingContent',align:'center', title: '开票内容',  width:90,templet:function(d){
 						return "<span title='"+ d.billingContent +"'>" + d.billingContent + "</span>";
 					}}
+				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
+						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+					}}
 				,{field:'invoiceType',align:'center', title: '发票类型',  width:90,templet:function(d){
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
-				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:80}
-				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:80}
+				,{field:'invoiceDate',align:'center', title: '开票日期',  width:90}
+				,{field:'receiptMoneyDate',align:'center', title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
 				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
                 ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){

+ 99 - 119
src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp

@@ -513,13 +513,13 @@
 
 					<div class="commonQuery lw9">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">发票申请编号:</label>
-							<div class="layui-input-block">
-								<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							<label class="layui-form-label">发票号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="widNumber" htmlEscape="false"  class=" form-control layui-input"/>
 							</div>
 						</div>
 						<div class="layui-item query athird">
-							<label class="layui-form-label">开票金额:</label>
+							<label class="layui-form-label">开票金额:</label>
 							<div class="layui-input-block with-icon">
 								<form:input path="money" htmlEscape="false"  class=" form-control layui-input"/>
 							</div>
@@ -569,7 +569,12 @@
 														cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false" isAll="true"/>
 								</div>
 							</div>
-
+							<div class="layui-item query athird">
+								<label class="layui-form-label">发票申请编号:</label>
+								<div class="layui-input-block">
+									<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+								</div>
+							</div>
 							<div class="layui-item query athird">
 								<label class="layui-form-label">开票日期:</label>
 								<div class="layui-input-block">
@@ -582,90 +587,86 @@
 									</input>
 								</div>
 							</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">经办人部门:</label>
-							<div class="layui-input-block with-icon">
-								<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
-												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">经办人:</label>
-							<div class="layui-input-block with-icon">
-								<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}" cssStyle="background-color: #fff"
-												title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">经办人部门:</label>
+								<div class="layui-input-block with-icon">
+									<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
+													title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">收款日期:</label>
-							<div class="layui-input-block">
-								<input id="receiptBeginDate" name="receiptBeginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
-									   value="<fmt:formatDate value="${workInvoice.receiptBeginDate}" pattern="yyyy-MM-dd"/>"/>
-								</input>
-								<span class="group-sep">-</span>
-								<input id="receiptEndDate" name="receiptEndDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
-									   value="<fmt:formatDate value="${workInvoice.receiptEndDate}" pattern="yyyy-MM-dd"/>"/>
-								</input>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">经办人:</label>
+								<div class="layui-input-block with-icon">
+									<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}" cssStyle="background-color: #fff"
+																		 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">开票单位:</label>
-							<div class="layui-input-block with-icon">
-								<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
+
+							<div class="layui-item query athird">
+								<label class="layui-form-label">收款日期:</label>
+								<div class="layui-input-block">
+									<input id="receiptBeginDate" name="receiptBeginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.receiptBeginDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+									<span class="group-sep">-</span>
+									<input id="receiptEndDate" name="receiptEndDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group" style="background-color: #fff"
+										   value="<fmt:formatDate value="${workInvoice.receiptEndDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">是否收款:</label>
-							<div class="layui-input-block with-icon">
-								<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
-									<option value=""></option>
-									<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
-									<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
-								</select>
+
+							<div class="layui-item query athird">
+								<label class="layui-form-label">开票单位:</label>
+								<div class="layui-input-block with-icon">
+									<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">发票类型:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="invoiceType" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">是否收款:</label>
+								<div class="layui-input-block with-icon">
+									<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
+										<option value=""></option>
+										<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
+										<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
+									</select>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">状态:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="invoiceState" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">发票类型:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="invoiceType" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">收款类型:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="chargeType" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">状态:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="invoiceState" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">开票内容:</label>
-							<div class="layui-input-block with-icon">
-								<form:select path="billingContent" class="form-control simple-select">
-									<form:option value="" label=""/>
-									<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-								</form:select>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">收款类型:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="chargeType" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
 							</div>
-						</div>
-						<div class="layui-item query athird">
-							<label class="layui-form-label">项目名称:</label>
-							<div class="layui-input-block with-icon">
-								<form:input path="projectName" htmlEscape="false"  class=" form-control layui-input"/>
+							<div class="layui-item query athird">
+								<label class="layui-form-label">开票内容:</label>
+								<div class="layui-input-block with-icon">
+									<form:select path="billingContent" class="form-control simple-select">
+										<form:option value="" label=""/>
+										<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</div>
 							</div>
-						</div>
 					</div>
 				</form:form>
 			</div>
@@ -707,69 +708,48 @@
             ,elem: '#contentTable'
             ,page: false
             ,cols: [[
-				//{checkbox: true, fixed: true},
-                {field:'index',align:'center', title: '序号',width:40}
-				,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
-						return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceTwo/workinvoiceTwo/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
-					}}
+				{field:'index',align:'center', title: '序号',width:40}
 				,{field:'projName',align:'center', title: '项目名称', minWidth:160,templet:function(d){
 						if(1 == d.showView && d.showView != undefined){
-							return "<a class=\"attention-info\" onmouseover=\"readProjectInfo(this,'"+d.projName+"')\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/workinvoiceAll/workInvoiceAll/projectview?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+							return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/workinvoiceAll/workInvoiceAll/projectview?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
 						}else{
 							return "<span title='"+ d.projName +"'>" +d.projName+ "</span>";
 						}
+						<%--return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projName + "</a>";--%>
 					}}
-				,{field:'reportNumber',align:'center', sort:true,title: '报告号', minWidth:130,templet:function(d){
-						if (d.reportNumber!=''){
-							return "<span class=\"attention-info\" title=\""+ d.reportNumber +"\">" + d.reportNumber + "</span>";
-						}else{
-							return "<span class=\"attention-info\" title=\"\">无</span>";
-						}
+				,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
+					}}
+				,{field:'widNumber',align:'center', title: '发票号',  width:90,templet:function(d){
+						return "<span title='"+ d.widNumber +"'>" + d.widNumber + "</span>";
 					}}
-				// ,{field:'widNumber',align:'center', title: '发票号',  width:90,templet:function(d){
-				// 		return "<span title='"+ d.widNumber +"'>" + d.widNumber + "</span>";
-				// 	}}
 				,{field:'clientName', align:'center',title: '开票单位', minWidth:160,templet:function(d){
 						return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
 					}}
 				,{field:'responsibleName', align:'center',title: '经办人', minWidth:80,templet:function(d){
 						return "<span title='"+ d.responsibleName +"'>" + d.responsibleName + "</span>";
 					}}
-				,{field:'officeName', align:'center',title: '部门',width:80,templet:function(d){
+				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
-				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
-						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){
+						return "<span title='"+ d.money +"'>" + d.money + "</span>";
 					}}
-				,{field:'money',align:'center', title: '开票金额(元)',  width:110,templet:function(d){
-						var numbers = new Array();;
-						if (d.workAccountListStr.length>0){
-							for (var i=0;i<d.workAccountListStr.length;i++){
-								numbers[i]="发票号:"+d.workAccountListStr[i].number+" 发票金额:"+d.workAccountListStr[i].totalMoney;
-							}
-						}
-						var xml= "<span onmouseover=\"readDetailInfo(this,'"+numbers+"')\">" + d.money+"</span>" ;
-						return xml;
+				,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
+						return "<span title='"+ d.widTotalMoney +"'>" + d.widTotalMoney + "</span>";
 					}}
-				// ,{field:'widTotalMoney',align:'center', title: '发票金额(元)',  width:120,templet:function(d){
-				// 		return "<span title='"+ d.widTotalMoney +"'>" + d.widTotalMoney + "</span>";
-				// 	}}
 				,{field:'billingContent',align:'center', title: '开票内容',  width:90,templet:function(d){
 						return "<span title='"+ d.billingContent +"'>" + d.billingContent + "</span>";
 					}}
+				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
+						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+					}}
 				,{field:'invoiceType',align:'center', title: '发票类型',  width:90,templet:function(d){
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
-                <%--,{field:'reportNumber',align:'center', title: '报告号', minWidth:150,templet:function(d){--%>
-				<%--		&lt;%&ndash;return "<a class=\"attention-info\" title=\"" + d.reportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.projectId + "&view=view','95%', '95%')\">" + d.reportNumber + "</a>";&ndash;%&gt;--%>
-				<%--		return d.reportNumber;--%>
-                <%--    }}--%>
-                <%--,{field:'areaName',align:'center', title: '项目所在地', minWidth:80,templet:function(d){--%>
-                <%--        return "<span title='"+ d.areaName +"'>" + d.areaName + "</span>";--%>
-                <%--    }}--%>
-				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:80}
-				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:80}
+				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:90}
+				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
 				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
                 ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){