Bladeren bron

报销功能,开票功能,其他展示优化

user5 10 maanden geleden
bovenliggende
commit
c9ad467584
53 gewijzigde bestanden met toevoegingen van 4997 en 284 verwijderingen
  1. 3 0
      src/main/java/com/jeeplus/modules/act/web/ActTaskController.java
  2. 6 0
      src/main/java/com/jeeplus/modules/identification/dao/PersonOpinionDao.java
  3. 12 0
      src/main/java/com/jeeplus/modules/identification/entity/AuditTemplate.java
  4. 21 0
      src/main/java/com/jeeplus/modules/identification/service/PersonOpinionService.java
  5. 10 10
      src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java
  6. 4 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  7. 81 66
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  8. 1 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  9. 9 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java
  10. 58 48
      src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/service/DailyOfficeWorkService.java
  11. 2 2
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureCallBackController.java
  12. 84 51
      src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/service/ProjectReportSignatureWorkService.java
  13. 18 0
      src/main/java/com/jeeplus/modules/sys/entity/Office.java
  14. 18 0
      src/main/java/com/jeeplus/modules/sys/service/OfficeService.java
  15. 32 4
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  16. 74 2
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  17. 40 0
      src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementReplenishDao.java
  18. 36 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  19. 186 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursementReplenish.java
  20. 204 0
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java
  21. 756 0
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementReplenishService.java
  22. 264 0
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementReplenishController.java
  23. 4 0
      src/main/resources/mappings/modules/disputeMediation/ProjectNonPrelitigationMediationDao.xml
  24. 45 4
      src/main/resources/mappings/modules/identification/PersonOpinionDao.xml
  25. 2 2
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  26. 1 0
      src/main/resources/mappings/modules/signatureManagement/electronicSignature/DistrictDirectorApplicationDao.xml
  27. 24 8
      src/main/resources/mappings/modules/sys/OfficeDao.xml
  28. 1 1
      src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml
  29. 13 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  30. 94 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementReplenishDao.xml
  31. 1 0
      src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml
  32. 18 0
      src/main/webapp/static/common/jeeplus.js
  33. 1 1
      src/main/webapp/webpage/include/head.jsp
  34. 12 16
      src/main/webapp/webpage/modules/disputeMediation/projectNonPrelitigationMediation/projectNonPrelitigationMediationDetail.jsp
  35. 4 4
      src/main/webapp/webpage/modules/disputeMediation/projectNonPrelitigationMediation/projectNonPrelitigationMediationForm.jsp
  36. 12 16
      src/main/webapp/webpage/modules/disputeMediation/projectPrelitigationMediation/projectPrelitigationMediationDetail.jsp
  37. 4 4
      src/main/webapp/webpage/modules/disputeMediation/projectPrelitigationMediation/projectPrelitigationMediationForm.jsp
  38. 29 23
      src/main/webapp/webpage/modules/personOpinion/personOpinionList.jsp
  39. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp
  40. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp
  41. 1 1
      src/main/webapp/webpage/modules/signatureManagement/electronicSignature/districtDirectorApplicationList.jsp
  42. 1 1
      src/main/webapp/webpage/modules/sys/sysLogin.jsp
  43. 1 1
      src/main/webapp/webpage/modules/sys/sysLogin2.jsp
  44. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp
  45. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp
  46. 4 4
      src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp
  47. 1349 0
      src/main/webapp/webpage/modules/workreimbursement/replenish/workReimbursementReplenishAudit.jsp
  48. 1349 0
      src/main/webapp/webpage/modules/workreimbursement/replenish/workReimbursementReplenishCwAudit.jsp
  49. 96 3
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp
  50. 2 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  51. 1 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp
  52. 4 4
      src/main/webapp/webpage/modules/workstaff/qualificationList.jsp
  53. 1 1
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

+ 3 - 0
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java

@@ -231,6 +231,9 @@ public class ActTaskController extends BaseController {
 							}else if(r==null&&"sqr".equals(role.getEnname())){
 								a.setRoleName("申请人");
 								a.setAssigneeName(user.getName());
+							}else if(r==null&&"bxrbc".equals(role.getEnname())){
+								a.setRoleName("报销人补充");
+								a.setAssigneeName(user.getName());
 							}
 						}
 						a.setTaskName(activityProcess.getActivity().getName());

+ 6 - 0
src/main/java/com/jeeplus/modules/identification/dao/PersonOpinionDao.java

@@ -3,7 +3,13 @@ package com.jeeplus.modules.identification.dao;
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.identification.entity.AuditTemplate;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 @MyBatisDao
 public interface PersonOpinionDao extends CrudDao<AuditTemplate> {
+
+    List<String> getFirstIdentificationList(@Param("firstIdentification") String firstIdentification);
+    List<String> getSecondIdentificationList(@Param("secondIdentification") String secondIdentification);
 }

+ 12 - 0
src/main/java/com/jeeplus/modules/identification/entity/AuditTemplate.java

@@ -1,11 +1,15 @@
 package com.jeeplus.modules.identification.entity;
 
 import com.jeeplus.common.persistence.DataEntity;
+
+import java.util.List;
+
 /**
  * 自定义审核模板
  */
 public class AuditTemplate extends DataEntity<AuditTemplate> {
     private String identification;  //模板标识
+    private List<String> identificationList;  //模板标识集合
     private String content; //模板内容
     private String name; //模板标识名称
     private String officeId; //部门id
@@ -68,4 +72,12 @@ public class AuditTemplate extends DataEntity<AuditTemplate> {
     public void setOfficeId(String officeId) {
         this.officeId = officeId;
     }
+
+    public List<String> getIdentificationList() {
+        return identificationList;
+    }
+
+    public void setIdentificationList(List<String> identificationList) {
+        this.identificationList = identificationList;
+    }
 }

+ 21 - 0
src/main/java/com/jeeplus/modules/identification/service/PersonOpinionService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.identification.service;
 
+import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.MenuStatusEnum;
@@ -44,6 +45,26 @@ public class PersonOpinionService extends CrudService<PersonOpinionDao, AuditTem
 //            auditTemplate.getSqlMap().put("dsf", dataScopeFilter(auditTemplate.getCurrentUser(), "o", "u", "s", MenuStatusEnum.PERSON_OPINION.getValue()));
             auditTemplate.setCreateBy(UserUtils.getUser());
         }
+        List<String> identificationList = Lists.newArrayList();
+        //查询一级节点是否存在值,如果一级节点存在值,且二三级节点没有存在值,则默认查询一级节点下所有数据信息
+        if(StringUtils.isNotBlank(auditTemplate.getIdentificationFirst()) && StringUtils.isBlank(auditTemplate.getIdentificationSecond())){
+            //查询一级节点下的所有类型
+            identificationList = dao.getFirstIdentificationList(auditTemplate.getIdentificationFirst());
+            auditTemplate.setIdentificationList(identificationList);
+        }
+        if(StringUtils.isNotBlank(auditTemplate.getIdentificationFirst()) && StringUtils.isNotBlank(auditTemplate.getIdentificationSecond()) && StringUtils.isBlank(auditTemplate.getIdentificationThird())){
+            //查询二级节点下的所有类型
+            identificationList = dao.getSecondIdentificationList(auditTemplate.getIdentificationSecond());
+            auditTemplate.setIdentificationList(identificationList);
+        }
+        if(StringUtils.isNotBlank(auditTemplate.getIdentificationFirst()) && StringUtils.isNotBlank(auditTemplate.getIdentificationSecond()) && StringUtils.isNotBlank(auditTemplate.getIdentificationThird())){
+            //添加第三级节点信息
+            identificationList.add(auditTemplate.getIdentificationThird());
+            auditTemplate.setIdentificationList(identificationList);
+        }
+
+
+        //查询二级节点是否存在值,如果二级节点存在值、三级节点没有值,则默认查询二级节点下的所有数据
         //查询模板类型 从前端传过来的模板类型查询进行重新赋值
         if (StringUtils.isNotBlank(auditTemplate.getIdentificationSecond())){
             auditTemplate.setIdentification(auditTemplate.getIdentificationSecond());

+ 10 - 10
src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java

@@ -548,8 +548,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             identityService.setAuthenticatedUserId(projectFilingBatch.getCurrentUser().getId());
             Office office = projectFilingBatch.getOffice();
             office = officeService.get(office.getId());
-            String contentStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批,归档批次编号:"+projectFilingBatch.getId();
-            String titleStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批";
+            String contentStr = "。归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批,归档批次编号:"+projectFilingBatch.getId() + "。报告号"+projectFilingBatch.getReportNumber();
+            String titleStr = "归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批" + "报告号"+projectFilingBatch.getReportNumber();
             String businessKey = projectFilingBatch.getId();
             Activity activity = new Activity();
             WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("7854872f45b84acd893010e66a3db2c8", office);
@@ -815,9 +815,9 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         Office office = projectFilingBatch.getCreateBy().getOffice();
         office = officeService.get(office.getId());
         projectFilingBatch.setOffice(office);
-        String notifyStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号:"+projectFilingBatch.getFilingBatch();
+        String notifyStr = "归档批次号:"+projectFilingBatch.getFilingBatch() + "。报告号"+projectFilingBatch.getReportNumber()+"。";
         String str = notifyStr+",创建人:"+projectFilingBatch.getCreateBy().getName()+",所属部门:"+projectFilingBatch.getOffice().getName();
-        String titleStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次名称:"+ projectFilingBatch.getFilingBatch();
+        String titleStr = "归档批次名称:"+ projectFilingBatch.getFilingBatch() + "。报告号"+projectFilingBatch.getReportNumber()+"。";
         int key = 0;
         if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("projectFilingBatch")) {
             key = 1;
@@ -959,8 +959,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                 }
             }
             //审核完成提示框
-            String title = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+projectFilingBatch.getFilingBatch()+"】归档成功";
-            String content = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+projectFilingBatch.getFilingBatch()+"】归档成功,归档批次编号:"+projectFilingBatch.getId();
+            String title = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】"+ "。报告号"+projectFilingBatch.getReportNumber()+"。归档成功";
+            String content = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】" + "。报告号"+projectFilingBatch.getReportNumber()+"。归档成功,归档批次编号:"+projectFilingBatch.getId();
             if ("yes".equals(projectFilingBatch.getAct().getFlag())) {
                 projectFilingBatch.setFilingStatus(ProjectStatusEnum.SIGNED.getValue());
                 WorkProjectNotify notify = new WorkProjectNotify();
@@ -1035,8 +1035,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                 }
             }else {
                 if (!"yes".equals(projectFilingBatch.getAct().getFlag())) {//驳回待办提醒
-                    str = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+ projectFilingBatch.getFilingBatch()+"】归档申请被驳回,请选择重新申请或作废";
-                    titleStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+ projectFilingBatch.getFilingBatch()+"】归档申请被驳回";
+                    str = "归档批次号【"+ projectFilingBatch.getFilingBatch()+"】" +"。报告号"+projectFilingBatch.getReportNumber()+"。归档申请被驳回,请选择重新申请或作废";
+                    titleStr = "归档批次号【"+ projectFilingBatch.getFilingBatch()+"】" +"。报告号"+projectFilingBatch.getReportNumber()+"。归档申请被驳回";
                     WorkProjectNotify notify = new WorkProjectNotify();
                     notify.setNotifyId(projectFilingBatch.getId());
                     userList = workProjectNotifyService.readByNotifyId(notify);
@@ -1055,8 +1055,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                     workProjectNotifyService.save(workProjectNotify);
                 } else {
                     if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办信息
-                        str = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+ projectFilingBatch.getFilingBatch()+"】重新归档,待审批,项目编号:"+projectFilingBatch.getId();
-                        titleStr = "报告号"+projectFilingBatch.getReportNumber()+"。归档批次号【"+ projectFilingBatch.getFilingBatch()+"】重新归档,待审批";
+                        str = "归档批次号【"+ projectFilingBatch.getFilingBatch()+"】" + "。报告号"+projectFilingBatch.getReportNumber()+"。重新归档,待审批,项目编号:"+projectFilingBatch.getId();
+                        titleStr = "归档批次号【"+ projectFilingBatch.getFilingBatch()+"】" + "。报告号"+projectFilingBatch.getReportNumber()+"。重新归档,待审批";
                         WorkProjectNotify notify = new WorkProjectNotify();
                         notify.setNotifyId(projectFilingBatch.getId());
                         userList = workProjectNotifyService.readByNotifyId(notify);

+ 4 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -3927,6 +3927,9 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                 String jsonUscCode = "{\"uscCode\": \"91320000746823994F\"";
                                 Map map = new HashMap();
                                 //判定项目是否为加密项目,若为加密项目,则数据处理进行调整
+                                if(StringUtils.isBlank(reported.getSecrecy())){
+                                    reported.setSecrecy("0");
+                                }
                                 switch (reported.getSecrecy()){
                                     case "0":
                                         map = RuralProjectReportedInfoUtil.reportedDataManage(reported);
@@ -4237,6 +4240,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
             return "流程已审批,不能重新审批!";
         }catch (Exception e){
             logger.error("Exception e:",e);
+            System.out.println("保存上报审核意见失败:" + e);
             return "保存审核意见失败!!";
         }
     }

+ 81 - 66
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -2303,81 +2303,96 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		if (!dir.exists()) {
 			dir.mkdirs();
 		}
-		//遍历项目id并查询对应数据信息
-		for (String projectId: idList) {
-			//获取项目信息
-			RuralProjectRecords records = this.getQueryProjectUsers(projectId);
-			//根据项目id查询项目报告信息
-			//ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(records.getId());
-			//projectReportData = projectReportDataService.get(projectReportData.getId());
-			ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
-
-			//添加项目类型
-			relateInfo.setAttachmentProjectType(records.getProjectType());
-			relateInfo.setAttachmentProjectSort(records.getAttachmentProjectSort());
 
-			//查看送审金额是否为500w以上金额
-			//Integer approvalMoney = projectAccessoryRelationService.decideAttachmentProjectApprovalMoney(projectReportData.getReviewFee());
-			//Integer approvalMoney = 2;
-			String money=records.getSubmitMoney();
-			Integer approvalMoney=null;
-			if(com.jeeplus.common.utils.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(1);
-			relateInfo.setId(records.getId());
-			//查询报告文件、依据性文件、其他文件必填列表以及数据
-			List<MainDictDetail> mainDictDetails = this.attachmentTemplateList();
-			List<ProjectTemplateInfo> projectTemplateList = null;
-			String downloadPath = path + "/" + records.getProjectName();
-			for (MainDictDetail mainDict : mainDictDetails) {
-				relateInfo.setAttachType(mainDict.getValue());
-				File dirFile = null;
-				switch (mainDict.getValue()) {
-					case "11":
-						dirFile=new File(downloadPath+"/成果文件");
-						projectTemplateList = Lists.newArrayList();
-						projectTemplateList = this.getProjectTemplateList(relateInfo);
-						this.disposeFileList(projectTemplateList,dirFile.getPath());
+		File resultFile = null;
+		File file = null;
+		try {
+			//遍历项目id并查询对应数据信息
+			for (String projectId: idList) {
+				//获取项目信息
+				RuralProjectRecords records = this.getQueryProjectUsers(projectId);
+				//根据项目id查询项目报告信息
+				//ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(records.getId());
+				//projectReportData = projectReportDataService.get(projectReportData.getId());
+				ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+
+				//添加项目类型
+				relateInfo.setAttachmentProjectType(records.getProjectType());
+				relateInfo.setAttachmentProjectSort(records.getAttachmentProjectSort());
+
+				//查看送审金额是否为500w以上金额
+				//Integer approvalMoney = projectAccessoryRelationService.decideAttachmentProjectApprovalMoney(projectReportData.getReviewFee());
+				//Integer approvalMoney = 2;
+				String money=records.getSubmitMoney();
+				Integer approvalMoney=null;
+				if(com.jeeplus.common.utils.StringUtils.isBlank(money)){
+					approvalMoney=1;
+				}else{
+					approvalMoney=Integer.parseInt(money);
+				}
+				switch (approvalMoney){
+					case 0:
+						//金额为0
+						relateInfo.setAttachmentProjectApprovalMoney(null);
 						break;
-					case "12":
-						dirFile=new File(downloadPath+"/依据性资料");
-						projectTemplateList = Lists.newArrayList();
-						projectTemplateList = this.getProjectTemplateList(relateInfo);
-						this.disposeFileList(projectTemplateList,dirFile.getPath());
+					case 1:
+						//500w以下金额状态
+						relateInfo.setAttachmentProjectApprovalMoney("1");
 						break;
-					case "13":
-						dirFile=new File(downloadPath+"/其他文件");
-						projectTemplateList = Lists.newArrayList();
-						projectTemplateList = this.getProjectTemplateList(relateInfo);
-						this.disposeFileList(projectTemplateList,dirFile.getPath());
+					case 2:
+						//500w以上金额状态
+						relateInfo.setAttachmentProjectApprovalMoney("2");
 						break;
 				}
+				//添加报告类型
+				relateInfo.setRequiredStage(1);
+				relateInfo.setId(records.getId());
+				//查询报告文件、依据性文件、其他文件必填列表以及数据
+				List<MainDictDetail> mainDictDetails = this.attachmentTemplateList();
+				List<ProjectTemplateInfo> projectTemplateList = null;
+				String downloadPath = path + "/" + records.getProjectName();
+				for (MainDictDetail mainDict : mainDictDetails) {
+					relateInfo.setAttachType(mainDict.getValue());
+					File dirFile = null;
+					switch (mainDict.getValue()) {
+						case "11":
+							dirFile=new File(downloadPath+"/成果文件");
+							projectTemplateList = Lists.newArrayList();
+							projectTemplateList = this.getProjectTemplateList(relateInfo);
+							this.disposeFileList(projectTemplateList,dirFile.getPath());
+							break;
+						case "12":
+							dirFile=new File(downloadPath+"/依据性资料");
+							projectTemplateList = Lists.newArrayList();
+							projectTemplateList = this.getProjectTemplateList(relateInfo);
+							this.disposeFileList(projectTemplateList,dirFile.getPath());
+							break;
+						case "13":
+							dirFile=new File(downloadPath+"/其他文件");
+							projectTemplateList = Lists.newArrayList();
+							projectTemplateList = this.getProjectTemplateList(relateInfo);
+							this.disposeFileList(projectTemplateList,dirFile.getPath());
+							break;
+					}
+
+				}
 
 			}
+			//处理完之后进行打包压缩并删除之前的文件
+			ZipCompressUtil zipUtil = new ZipCompressUtil();
+			resultFile = new File(path);
+			file = zipUtil.zipCompress(resultFile, true);
 
+		}catch (IOException e) {
+			logger.error("Exception e:"+e);
+		}
+		finally {
+			//路径是个文件且不为空时删除文件
+			if(resultFile.isFile()&&resultFile.exists()){
+				resultFile.delete();
+			}
 		}
-		//处理完之后进行打包压缩并删除之前的文件
-		ZipCompressUtil zipUtil = new ZipCompressUtil();
-		File resultFile = new File(path);
-		File file = zipUtil.zipCompress(resultFile, true);
+
 		return file.getPath();
 	}
 

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

@@ -2017,6 +2017,7 @@ public class RuralCostProjectMessageNewController extends BaseController {
         }catch (Exception e){
             addMessage(redirectAttributes, "上报流程审批失败");
             logger.error("上报流程审批失败:",e);
+            System.out.println("上报流程审批失败,失败原因:" + e);
         }
         RuralProjectRecords ruralProjectRecords = projectRecordsService.get(reported.getProjectId());
         if (StringUtils.isNotBlank(reported.getHome()) && "home".equals(reported.getHome())){

+ 9 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java

@@ -62,6 +62,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.File;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.text.SimpleDateFormat;
@@ -568,13 +569,20 @@ public class RuralProjectRecordsController extends BaseController {
 	public String exportAll(HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
 		String listIds = request.getParameter("listId");
 		List<String> idList = Arrays.asList(listIds.split(","));
+		String filePath = null;
 		try {
-			String filePath = projectRecordsService.exportAll(idList);
+			filePath = projectRecordsService.exportAll(idList);
 			projectRecordsService.downloadZipFile(filePath,response);
 			return null;
 		} catch (Exception e) {
 			addMessage(redirectAttributes, "批量下载项目文件失败!");
 			logger.error("Exception e:"+e);
+		}finally {
+			File file = new File(filePath);
+			//路径是个文件且不为空时删除文件
+			if(file.isFile()&&file.exists()){
+				file.delete();
+			}
 		}
 		return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectRecords/?repage";
 	}

+ 58 - 48
src/main/java/com/jeeplus/modules/signature/dailyOfficeWork/service/DailyOfficeWorkService.java

@@ -442,56 +442,66 @@ public class DailyOfficeWorkService extends CrudService<DailyOfficeWorkDao, Dail
                         } else {
                             //下载签章申请文件
                             String path = null;
-                            if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                path = "D:/attachment-file/";
-                            } else {
-                                path = "/attachment-file/";
-                            }
-                            String file = workattachment.getUrl();
-                            file = file.replace("amp;", "");
-                            String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
-                            String aliyunUrl = Global.getAliyunUrl();
-                            String aliDownloadUrl = Global.getAliDownloadUrl();
-                            String cons = "";
-                            if (file.contains(aliyunUrl)) {
-                                cons = aliyunUrl;
-                            } else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
-                                cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
-                            } else {
-                                cons = aliDownloadUrl;
-                            }
-                            String ossKey = file.split(cons + "/")[1];
-                            new OSSClientUtil().downByStreamSaveLocal(ossKey, fileName, path + fileName);
-                            //将下载下来的文件转换为file文件
-                            File srcFile = new File(path + fileName);
-                            deleteFile = path + fileName;
-
-                            //截取文件后缀名
-                            String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".") + 1, srcFile.getName().length());
-                            if (!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())) {
-                                map.put("str", "请上传doc、docx或者pdf的文件进行签章操作");
-                                map.put("success", false);
-                            } else {
-
-                                //获取真签单的documentId
-                                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
-                                String code = hashMap.get("code").toString();
-
-                                if ("0".equals(code)) {
-                                    String documentId = "";
-                                    String result = hashMap.get("result").toString();
-                                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
-                                    documentId = documentIdMap.get("documentId").toString();
-                                    if ("".equals(documentId)) {
-                                        map.put("str", "签章文件创建失败,签章文件存在问题");
-                                        map.put("success", false);
-                                    } else {
-                                        documentList.add(documentId);
-                                    }
+                            File srcFile = null;
+                            try {
+                                if (System.getProperty("os.name").toLowerCase().contains("win")) {
+                                    path = "D:/attachment-file/";
+                                } else {
+                                    path = "/attachment-file/";
+                                }
+                                String file = workattachment.getUrl();
+                                file = file.replace("amp;", "");
+                                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                                String aliyunUrl = Global.getAliyunUrl();
+                                String aliDownloadUrl = Global.getAliDownloadUrl();
+                                String cons = "";
+                                if (file.contains(aliyunUrl)) {
+                                    cons = aliyunUrl;
+                                } else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
+                                    cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
                                 } else {
-                                    String message = hashMap.get("message").toString();
-                                    map.put("str", message);
+                                    cons = aliDownloadUrl;
+                                }
+                                String ossKey = file.split(cons + "/")[1];
+                                new OSSClientUtil().downByStreamSaveLocal(ossKey, fileName, path + fileName);
+                                //将下载下来的文件转换为file文件
+                                srcFile = new File(path + fileName);
+                                deleteFile = path + fileName;
+
+                                //截取文件后缀名
+                                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".") + 1, srcFile.getName().length());
+                                if (!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())) {
+                                    map.put("str", "请上传doc、docx或者pdf的文件进行签章操作");
                                     map.put("success", false);
+                                } else {
+
+                                    //获取真签单的documentId
+                                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                                    String code = hashMap.get("code").toString();
+
+                                    if ("0".equals(code)) {
+                                        String documentId = "";
+                                        String result = hashMap.get("result").toString();
+                                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                                        documentId = documentIdMap.get("documentId").toString();
+                                        if ("".equals(documentId)) {
+                                            map.put("str", "签章文件创建失败,签章文件存在问题");
+                                            map.put("success", false);
+                                        } else {
+                                            documentList.add(documentId);
+                                        }
+                                    } else {
+                                        String message = hashMap.get("message").toString();
+                                        map.put("str", message);
+                                        map.put("success", false);
+                                    }
+                                }
+                            }catch (Exception e){
+                                logger.error("Exception e:"+e);
+                            }finally {
+                                //路径是个文件且不为空时删除文件
+                                if(srcFile.isFile()&&srcFile.exists()){
+                                    srcFile.delete();
                                 }
                             }
                         }

+ 2 - 2
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/controller/ProjectReportSignatureCallBackController.java

@@ -66,7 +66,7 @@ public class ProjectReportSignatureCallBackController extends BaseController {
         //根据contractId查询对应的报告信息
         ReportSignature projectReportSignatureWork = projectReportSignatureService.getByDocumentApprovalId(documentIds[0]);
 
-        if(5 == projectReportSignatureWork.getStatus()){
+        if(5 == projectReportSignatureWork.getStatus() || 4 == projectReportSignatureWork.getStatus()){
             return null;
         }
 
@@ -153,7 +153,7 @@ public class ProjectReportSignatureCallBackController extends BaseController {
         //根据contractId查询对应的报告信息
         ReportSignature projectReportSignatureWork = projectReportSignatureService.getByDocumentReportId(documentIds[0]);
 
-        if(5 == projectReportSignatureWork.getStatus()){
+        if(5 == projectReportSignatureWork.getStatus() || 4 == projectReportSignatureWork.getStatus()){
             return null;
         }
 

+ 84 - 51
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/service/ProjectReportSignatureWorkService.java

@@ -1059,59 +1059,70 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
                         } else {
                             //下载签章申请文件
                             String path = null;
-                            if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                path = "D:/attachment-file/";
-                            } else {
-                                path = "/attachment-file/";
-                            }
-                            String file = workattachment.getUrl();
-                            file = file.replace("amp;", "");
-                            String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
-                            String aliyunUrl = Global.getAliyunUrl();
-                            String aliDownloadUrl = Global.getAliDownloadUrl();
-                            String cons = "";
-                            if (file.contains(aliyunUrl)) {
-                                cons = aliyunUrl;
-                            } else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
-                                cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
-                            } else {
-                                cons = aliDownloadUrl;
-                            }
-                            String ossKey = file.split(cons + "/")[1];
-                            new OSSClientUtil().downByStreamSaveLocal(ossKey, fileName, path + fileName);
-                            //将下载下来的文件转换为file文件
-                            File srcFile = new File(path + fileName);
-                            deleteFile = path + fileName;
-
-                            //截取文件后缀名
-                            String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".") + 1, srcFile.getName().length());
-                            if (!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())) {
-                                map.put("str", "请上传doc、docx或者pdf的文件进行签章操作");
-                                map.put("success", false);
-                                return map;
-                            } else {
-
-                                //获取真签单的documentId
-                                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
-                                String code = hashMap.get("code").toString();
-
-                                if ("0".equals(code)) {
-                                    String documentId = "";
-                                    String result = hashMap.get("result").toString();
-                                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
-                                    documentId = documentIdMap.get("documentId").toString();
-                                    if ("".equals(documentId)) {
-                                        map.put("str", "签章文件创建失败,签章文件存在问题");
-                                        map.put("success", false);
-                                    } else {
-                                        documentList.add(documentId);
-                                    }
+                            File srcFile = null;
+                            try {
+                                if (System.getProperty("os.name").toLowerCase().contains("win")) {
+                                    path = "D:/attachment-file/";
+                                } else {
+                                    path = "/attachment-file/";
+                                }
+                                String file = workattachment.getUrl();
+                                file = file.replace("amp;", "");
+                                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                                String aliyunUrl = Global.getAliyunUrl();
+                                String aliDownloadUrl = Global.getAliDownloadUrl();
+                                String cons = "";
+                                if (file.contains(aliyunUrl)) {
+                                    cons = aliyunUrl;
+                                } else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")) {
+                                    cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
                                 } else {
-                                    String message = hashMap.get("message").toString();
-                                    map.put("str", message);
+                                    cons = aliDownloadUrl;
+                                }
+                                String ossKey = file.split(cons + "/")[1];
+                                new OSSClientUtil().downByStreamSaveLocal(ossKey, fileName, path + fileName);
+                                //将下载下来的文件转换为file文件
+                                srcFile = new File(path + fileName);
+                                deleteFile = path + fileName;
+
+                                //截取文件后缀名
+                                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".") + 1, srcFile.getName().length());
+                                if (!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())) {
+                                    map.put("str", "请上传doc、docx或者pdf的文件进行签章操作");
                                     map.put("success", false);
+                                    return map;
+                                } else {
+
+                                    //获取真签单的documentId
+                                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                                    String code = hashMap.get("code").toString();
+
+                                    if ("0".equals(code)) {
+                                        String documentId = "";
+                                        String result = hashMap.get("result").toString();
+                                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                                        documentId = documentIdMap.get("documentId").toString();
+                                        if ("".equals(documentId)) {
+                                            map.put("str", "签章文件创建失败,签章文件存在问题");
+                                            map.put("success", false);
+                                        } else {
+                                            documentList.add(documentId);
+                                        }
+                                    } else {
+                                        String message = hashMap.get("message").toString();
+                                        map.put("str", message);
+                                        map.put("success", false);
+                                    }
+                                }
+                            }catch (Exception e){
+                                logger.error("Exception e:"+e);
+                            }finally {
+                                //路径是个文件且不为空时删除文件
+                                if(srcFile.isFile()&&srcFile.exists()){
+                                    srcFile.delete();
                                 }
                             }
+
                         }
                     }
                 }
@@ -2528,8 +2539,9 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
         //总经理
         User technologyPrincipalUser = UserUtils.getByLoginName("陈红星");
         if(null != technologyPrincipalUser){
+
             //获取成员印章id信息
-            String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈红星个人签名章");
+            String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"",technologyPrincipalUser.getName() + "一级注册造价工程师章");
             if(StringUtils.isNotBlank(userSealId)){
                 for (String documentId: documentList) {
                     //添加盖章位置
@@ -2540,6 +2552,27 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
                     principalLocation.setPage("0");
                     principalLocation.setRectType("SEAL_CORPORATE");
                     principalLocation.setKeywordIndex(-1);
+                    principalLocation.setOffsetX("0.5376");
+                    principalLocation.setOffsetY("0.2771");
+                    locations.add(principalLocation);
+                }
+            }else{
+                hashMap.put("code","2");
+                hashMap.put("message","查询不到技术负责人 "+ technologyPrincipalUser.getName() + " 的印章信息!请联系管理员");
+                return hashMap;
+            }
+            //获取成员印章id信息
+            String userSignatureSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"",technologyPrincipalUser.getName() + "个人签名章");
+            if(StringUtils.isNotBlank(userSignatureSealId)){
+                for (String documentId: documentList) {
+                    //添加盖章位置
+                    Location principalLocation = new Location();
+                    serialIdSet.add(userSignatureSealId);
+                    principalLocation.setSealId(userSignatureSealId);
+                    principalLocation.setDocumentId(documentId);
+                    principalLocation.setPage("0");
+                    principalLocation.setRectType("SEAL_CORPORATE");
+                    principalLocation.setKeywordIndex(-1);
                     principalLocation.setOffsetX("0.6958");
                     principalLocation.setOffsetY("0.4009");
                     locations.add(principalLocation);
@@ -2547,7 +2580,7 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
 
             }else{
                 hashMap.put("code","2");
-                hashMap.put("message","查询不到技术负责人 陈红星 的印章信息!请联系管理员");
+                hashMap.put("message","查询不到技术负责人 "+ technologyPrincipalUser.getName() + " 的印章信息!请联系管理员");
                 return hashMap;
             }
         }else{

+ 18 - 0
src/main/java/com/jeeplus/modules/sys/entity/Office.java

@@ -54,6 +54,8 @@ public class Office extends TreeEntity<Office> {
 	private String projectId;   //项目id
 	//企业微信端
 	private String wxOfficeId;//微信部门id
+	private String level;//部门层级
+	private String showName;//部门展示名称(用于展示在页面信息上,如果为三级部门 则展示为xxx/xx的格式)
 
 	public String getWxOfficeId() {
 		return wxOfficeId;
@@ -366,4 +368,20 @@ public class Office extends TreeEntity<Office> {
 	public void setProjectId(String projectId) {
 		this.projectId = projectId;
 	}
+
+	public String getLevel() {
+		return level;
+	}
+
+	public void setLevel(String level) {
+		this.level = level;
+	}
+
+	public String getShowName() {
+		return showName;
+	}
+
+	public void setShowName(String showName) {
+		this.showName = showName;
+	}
 }

+ 18 - 0
src/main/java/com/jeeplus/modules/sys/service/OfficeService.java

@@ -207,6 +207,24 @@ public class OfficeService extends TreeService<OfficeDao, Office> {
 
 	@Transactional(readOnly = false)
 	public void save(Office office) {
+		//判定需要修改的office的层级,如果为3级,则需要获取对应上级节点的名称 并处理为xxx/xx的格式,并保存名称
+		Office parentOffice = null;
+		if(null != office.getParent() && StringUtils.isNotBlank(office.getParent().getId())){
+			parentOffice = this.get(office.getParent().getId());
+		}
+		if(null != parentOffice && "2".equals(parentOffice.getLevel())){
+			office.setLevel("3");
+			if(StringUtils.isNotBlank(parentOffice.getName())){
+				String showName = parentOffice.getName() + "/" + office.getName();
+				office.setShowName(showName);
+			}
+		}else if(null != parentOffice && "1".equals(parentOffice.getLevel())){
+			office.setLevel("2");
+			office.setShowName(office.getName());
+		}else{
+			office.setLevel("1");
+			office.setShowName(office.getName());
+		}
 		super.save(office);
 		if(office.getType().equals("3")){
 			office.setBranchOffice(office.getId());

+ 32 - 4
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -121,10 +121,16 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 
 	@Transactional(readOnly = false)
 	public void insert(Workattachment workattachment) {
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		dao.insert(workattachment);
 	}
 	@Transactional(readOnly = false)
 	public void update(Workattachment workattachment) {
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		dao.update(workattachment);
 	}
 
@@ -303,7 +309,9 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	@Transactional(readOnly = false)
 	public void insertOnWorkAttachment(Workattachment workattachment) {
-		//
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		switch (uploadMode){
 			case "1":
 				workattachment.setUrl(workattachment.getUrl().replace(bosUrl,""));
@@ -323,7 +331,9 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	@Transactional(readOnly = false)
 	public void insertOnWorkClientAttachment(WorkClientAttachment workattachment) {
-		//
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		switch (uploadMode){
 			case "1":
 				workattachment.setUrl(workattachment.getUrl().replace(bosUrl,""));
@@ -336,13 +346,29 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 		workClientAttachmentDao.insert(workattachment);
 	}
 
+	private String decodeHtmlEntities(String input) {
+		if (input == null) {
+			return null;
+		}
+
+		// Manually replace known HTML entities with their actual characters
+		return input.replace("&and;", "∧")
+				.replace("&lt;", "<")
+				.replace("&gt;", ">")
+				.replace("&amp;", "&")
+				.replace("&quot;", "\"")
+				.replace("&apos;", "'");
+	}
+
 	/**
 	 * 修改附件
 	 * @param workattachment
 	 */
 	@Transactional(readOnly = false)
 	public void updateOnWorkAttachment(Workattachment workattachment) {
-		//
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		switch (uploadMode){
 			case "1":
 				workattachment.setUrl(workattachment.getUrl().replace(bosUrl,""));
@@ -361,7 +387,9 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	@Transactional(readOnly = false)
 	public void updateOnWorkClientAttachment(WorkClientAttachment workattachment) {
-		//
+		//字符处理
+		workattachment.setUrl(decodeHtmlEntities(workattachment.getUrl()));
+		workattachment.setAttachmentName(decodeHtmlEntities(workattachment.getAttachmentName()));
 		if(StringUtils.isNotBlank(workattachment.getUrl())){
 			switch (uploadMode){
 				case "1":

+ 74 - 2
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -221,7 +221,9 @@ import com.jeeplus.modules.workreimbur.entity.WorkReimbur;
 import com.jeeplus.modules.workreimbur.service.WorkReimburService;
 import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementReplenish;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementReplenishService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
 import com.jeeplus.modules.workreimbursement.utils.HistoicFlowUtil;
@@ -344,6 +346,8 @@ public class WorkProjectNotifyController extends BaseController {
 	@Autowired
 	private WorkReimbursementService workReimbursementService;
 	@Autowired
+	private WorkReimbursementReplenishService workReimbursementReplenishService;
+	@Autowired
 	private OaNotifyService oaNotifyService;
 	@Autowired
 	private MailBoxService mailBoxService;
@@ -1411,6 +1415,10 @@ public class WorkProjectNotifyController extends BaseController {
 
 					return this.workReimbursementSpecificInvoiceAudit(workProjectNotify, model);
 
+				}  else if (workProjectNotify.getType().equals("111")) {    //报销附件补充文件
+
+					return this.workReimbursementReplenishAudit(workProjectNotify, model);
+
 				} else if (workProjectNotify.getType().equals("16")) {    //合同管理
 					WorkContractInfo workContractInfo = workContractInfoService.get(workProjectNotify.getNotifyId());
 					if (StringUtils.isNotBlank(workContractInfo.getChargeCriterion())) {
@@ -4656,12 +4664,12 @@ public class WorkProjectNotifyController extends BaseController {
 						//2为工程咨询
 						if ("2".equals(ruralProjectRecords.getProjectType())) {
 							model.addAttribute("identification", "projectReportData");
-							model.addAttribute("identifications", "ReportDataRatingComments");
+							model.addAttribute("identifications", "ReportjinjiComments");
 							model.addAttribute("identificationstwo", "projectReportDataLeader");
 						}
 						if ("1".equals(ruralProjectRecords.getProjectType())) {
 							model.addAttribute("identification", "consultProjectReportData");
-							model.addAttribute("identifications", " consultReportDataRatingComments");
+							model.addAttribute("identifications", " ReportjinjiComments");
 							model.addAttribute("identificationstwo", "consultProjectReportDataLeader");
 						}
 
@@ -10055,6 +10063,70 @@ public class WorkProjectNotifyController extends BaseController {
 		}
 	}
 
+	private String workReimbursementReplenishAudit(WorkProjectNotify workProjectNotify,Model model) {
+		WorkReimbursementReplenish workReimbursementReplenish = workReimbursementReplenishService.get(workProjectNotify.getNotifyId());
+		WorkReimbursement workReimbursement = workReimbursementService.get(workReimbursementReplenish.getReimbursementId());
+		workReimbursement.setReimbursementType("1");
+		//判断报销类型状态并添加报销类型信息数据
+		if(StringUtils.isNotBlank(workReimbursement.getType())){
+			WorkReimbursementTypeInfo workReimbursementTypeInfo = workReimbursementTypeService.get(workReimbursement.getType());
+			workReimbursement.setWorkReimbursementTypeInfo(workReimbursementTypeInfo);
+			if(StringUtils.isNotBlank(workReimbursementTypeInfo.getStandardDetail())){
+				workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
+			}
+		}
+		workReimbursementReplenish.setAct(getByAct(workReimbursementReplenish.getProcessInstanceId()));
+		if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+			workReimbursementReplenish.setHome(workProjectNotify.getHome());
+		}else{
+			workReimbursementReplenish.setHome("home");
+		}
+		model.addAttribute("workReimbursement", workReimbursement);
+		model.addAttribute("workReimbursementReplenish", workReimbursementReplenish);
+
+		switch (workReimbursement.getReimbursementType()){
+			case "0" :
+				workReimbursement.setReimbursementTypeStr("普通报销");
+				break;
+			case "1" :
+				workReimbursement.setReimbursementTypeStr("电子发票报销");
+				break;
+
+		}
+
+		if(null != workReimbursement.getReimbursementElectronicInvoiceVATTaxes() && workReimbursement.getReimbursementElectronicInvoiceVATTaxes().size()>0){
+			//获取专业类型
+			List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("invoiceReimbursementType");
+			for (ReimbursementVATTax vatTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
+				for (MainDictDetail dictDetail : certificateMajor) {
+					if(dictDetail.getValue().equals(vatTax.getInvoiceType())){
+						vatTax.setInvoiceTypeStr(dictDetail.getLabel());
+					}
+				}
+			}
+		}
+
+		if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+			return "modules/workreimbursement/workReimbursementFormDetail";
+		}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+			model.addAttribute("identification","workreimbursement");
+			model.addAttribute("identificationName","报销审核意见");
+
+			if ("bxrbc".equals(workReimbursementReplenish.getAct().getTaskDefKey())) {
+				return "modules/workreimbursement/replenish/workReimbursementReplenishAudit";
+			}else{
+				return "modules/workreimbursement/replenish/workReimbursementReplenishCwAudit";
+			}
+
+		} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+			User user=UserUtils.getUser();
+			model.addAttribute("user", user);
+			return "modules/workreimbursement/replenish/workReimbursementReplenishCwAudit";
+		} else {
+			return "modules/workreimbursement/workReimbursementFormDetail";
+		}
+	}
+
 	private String workReimbursementAudit(WorkProjectNotify workProjectNotify,Model model) {
 		WorkReimbursement workReimbursement = workReimbursementService.get(workProjectNotify.getNotifyId());
 		//判断报销类型状态并添加报销类型信息数据

+ 40 - 0
src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementReplenishDao.java

@@ -0,0 +1,40 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workreimbursement.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
+import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
+import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementReplenish;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementadminupdatehistory;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 财务报销DAO接口
+ * @author 孟祥越
+ * @version 2017-05-02
+ */
+@MyBatisDao
+public interface WorkReimbursementReplenishDao extends CrudDao<WorkReimbursementReplenish> {
+
+
+    /**
+     * 根据流程实例ID获取WorkReimbursement
+     * @param processInstanceId
+     * @return
+     */
+    public WorkReimbursementReplenish getByProcessInstanceId(String processInstanceId);
+    /**
+     * 更新流程实例ID
+     * @return
+     */
+    public int updateProcessInstanceId(WorkReimbursementReplenish workReimbursementReplenish);
+
+}

+ 36 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java

@@ -80,6 +80,10 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private String pageFlag; // 回调页面判定
 	private String paymentStatus; // 付款状态
 	private Date paymentDate; // 付款时间
+	private String replenishId; // 附件补充id
+	private String replenishUserId; // 附件补充创建者id
+	private String replenishStatus; // 附件补充状态
+	private Date replenishDate; // 附件补充时间
 
 	public String getComment() {
 		return comment;
@@ -702,4 +706,36 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setPaymentDate(Date paymentDate) {
 		this.paymentDate = paymentDate;
 	}
+
+	public String getReplenishId() {
+		return replenishId;
+	}
+
+	public void setReplenishId(String replenishId) {
+		this.replenishId = replenishId;
+	}
+
+	public String getReplenishUserId() {
+		return replenishUserId;
+	}
+
+	public void setReplenishUserId(String replenishUserId) {
+		this.replenishUserId = replenishUserId;
+	}
+
+	public String getReplenishStatus() {
+		return replenishStatus;
+	}
+
+	public void setReplenishStatus(String replenishStatus) {
+		this.replenishStatus = replenishStatus;
+	}
+
+	public Date getReplenishDate() {
+		return replenishDate;
+	}
+
+	public void setReplenishDate(Date replenishDate) {
+		this.replenishDate = replenishDate;
+	}
 }

+ 186 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursementReplenish.java

@@ -0,0 +1,186 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workreimbursement.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 财务报销Entity
+ * @author 孟祥越
+ * @version 2017-05-02
+ */
+public class WorkReimbursementReplenish extends ActEntity<WorkReimbursementReplenish> {
+
+	private static final long serialVersionUID = 1L;
+
+	private Task task;
+	private String processInstanceId; // 流程实例编号
+	private String reimbursementId; // 报销表id
+	private String officeId;		// 报销人的部门编号   项目登记人的信息
+	private String status;		// 报销状态
+	private String companyId; //提交人的公司编号
+	private String createOffice;// 创建人的部门编号
+	private String home;
+	private List<ReimbursementVATTax> reimbursementVATTaxes = Lists.newArrayList();		// 子表列表
+	private List<ReimbursementVATTax> reimbursementElectronicInvoiceVATTaxes = Lists.newArrayList();		// 子表列表
+	private List<WorkReimbursementBack> reimbursementBackList = Lists.newArrayList();		// 子表列表
+
+	// 运行中的流程实例
+	private ProcessInstance processInstance;
+	// 流程定义
+	private ProcessDefinition processDefinition;
+	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+	private List<WorkClientAttachment> workAttachmentInvoiceReimbursements = Lists.newArrayList();
+
+
+	public List<WorkReimbursementBack> getReimbursementBackList() {
+		return reimbursementBackList;
+	}
+
+	public void setReimbursementBackList(List<WorkReimbursementBack> reimbursementBackList) {
+		this.reimbursementBackList = reimbursementBackList;
+	}
+
+	public List<WorkClientAttachment> getWorkAttachmentInvoiceReimbursements() {
+		return workAttachmentInvoiceReimbursements;
+	}
+
+	public void setWorkAttachmentInvoiceReimbursements(List<WorkClientAttachment> workAttachmentInvoiceReimbursements) {
+		this.workAttachmentInvoiceReimbursements = workAttachmentInvoiceReimbursements;
+	}
+
+	public List<WorkClientAttachment> getWorkAttachments() {
+		return workAttachments;
+	}
+	// 流程任务
+
+
+//	private List<WorkClientAttachment> workClientAttachmentList = Lists.newArrayList();
+
+	public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	public WorkReimbursementReplenish() {
+		super();
+	}
+
+	public WorkReimbursementReplenish(String id){
+		super(id);
+	}
+
+
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+
+    public String getOfficeId() {
+        return officeId;
+    }
+
+    public void setOfficeId(String officeId) {
+        this.officeId = officeId;
+    }
+
+	public List<ReimbursementVATTax> getReimbursementVATTaxes() {
+		return reimbursementVATTaxes;
+	}
+
+	public void setReimbursementVATTaxes(List<ReimbursementVATTax> reimbursementVATTaxes) {
+		this.reimbursementVATTaxes = reimbursementVATTaxes;
+	}
+
+	public List<ReimbursementVATTax> getReimbursementElectronicInvoiceVATTaxes() {
+		return reimbursementElectronicInvoiceVATTaxes;
+	}
+
+	public void setReimbursementElectronicInvoiceVATTaxes(List<ReimbursementVATTax> reimbursementElectronicInvoiceVATTaxes) {
+		this.reimbursementElectronicInvoiceVATTaxes = reimbursementElectronicInvoiceVATTaxes;
+	}
+
+	public String getProcessInstanceId() {
+		return processInstanceId;
+	}
+
+	public void setProcessInstanceId(String processInstanceId) {
+		this.processInstanceId = processInstanceId;
+	}
+
+	public Task getTask() {
+		return task;
+	}
+
+	public void setTask(Task task) {
+		this.task = task;
+	}
+
+	public ProcessInstance getProcessInstance() {
+		return processInstance;
+	}
+
+	public void setProcessInstance(ProcessInstance processInstance) {
+		this.processInstance = processInstance;
+	}
+
+	public ProcessDefinition getProcessDefinition() {
+		return processDefinition;
+	}
+
+	public void setProcessDefinition(ProcessDefinition processDefinition) {
+		this.processDefinition = processDefinition;
+	}
+
+	public String getReimbursementId() {
+		return reimbursementId;
+	}
+
+	public void setReimbursementId(String reimbursementId) {
+		this.reimbursementId = reimbursementId;
+	}
+
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+
+	public String getCreateOffice() {
+		return createOffice;
+	}
+
+	public void setCreateOffice(String createOffice) {
+		this.createOffice = createOffice;
+	}
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+}

+ 204 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java

@@ -3402,4 +3402,208 @@ public class WorkReimbursementNewService extends CrudService<WorkReimbursementDa
         workReimbursementDao.update(workReimbursement);
         return "保存审核意见成功!";
     }
+
+
+
+
+    /**
+     * 数电发票报销文件补充流程(侯媛媛发起,流程发起人审核,再回到侯媛媛结束)
+     * @param workReimbursement
+     * @param variables
+     */
+    @Transactional(readOnly = false)
+    public String replenishInvoiceReimbursementSave(WorkReimbursement workReimbursement,Map<String, Object> variables,String processInstanceId) {
+        User user = UserUtils.getUser();
+
+        //流程数据保存到关联表中
+        super.save(workReimbursement);
+        String str = "";
+        Office office = officeService.get(workReimbursement.getOfficeId());
+
+        str = "报销【" + workReimbursement.getNumber() + "】补充文件待确认" + ",报销总金额:"+workReimbursement.getMoney();
+        String title = "报销【" + workReimbursement.getNumber() + "】补充文件待确认";
+        replenishWorkReimbursementAttachmentInfo(workReimbursement);
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        identityService.setAuthenticatedUserId(user.getId());
+        // 启动流程
+        String businessKey = workReimbursement.getId().toString();
+        WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("ggh3125f1f194c82bdea93555c750906", office);
+        // 启动流程
+        String processType = workActivityMenu.getProcessType();
+        StringBuffer buffer = new StringBuffer();
+        Activity activity = new Activity();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(workReimbursement.getId(),
+                        null,
+                        workReimbursement.getCompanyId(),
+                        title,
+                        str,
+                        "107",
+                        "0",
+                        "待审批",
+                        ""
+                );
+        List<User> users = new ArrayList<>();
+        //获取报销发起人信息
+        User createUser = UserUtils.get(workReimbursement.getCreateBy().getId());
+        if(null != createUser){
+            users.add(createUser);
+        }
+        List<User> bmzrs = UserUtils.getByRoleActivityEnname("bmzr",2,office.getId(),"8",workReimbursement.getCreateBy());
+        //财务员工
+        List<User> fpglys = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,office.getId(),"5",workReimbursement.getCreateBy());
+        if (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 && StringUtils.isNotBlank(a.getRole().getEnname())){
+                    List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"8",workReimbursement.getCreateBy());
+                    if (enusers.size()==0){
+                        workReimbursement.setStatus("1");
+                        super.save(workReimbursement);
+                        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 && StringUtils.isNotBlank(activity.getId())) {
+                //角色审批
+                if (StringUtils.isNotBlank(activity.getRole().getEnname())) {
+                    users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"8",workReimbursement.getCreateBy());
+                }
+                //人员审批
+                if (StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            if (bmzrs.size()==0 ){
+                workReimbursement.setStatus("1");
+                super.save(workReimbursement);
+            }
+            if (bmzrs.size()==0){
+                return "流程审批人不能为空,角色部门负责人下无用户,请联系管理员!";
+            }
+            variables.put("bmzrcount",bmzrs.size());
+            variables.put("bmzrList",bmzrs);
+            processType = "specificInvoiceReimbursement";
+            users.addAll(bmzrs);
+        }
+        for (User u : users){
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("部门负责人审批");
+            workProjectNotifyService.save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7002");
+            extras.put("id",workProjectNotify.getId());
+            extras.put("procDefKey","107");
+            UserUtils.pushInfoToApp(title,str,extras,u.getId());
+            UserUtils.pushIm(u.getId(),str);
+        }
+        variables.put("type", processType);
+        variables.put("busId", businessKey);
+        variables.put("title", "审批单:" + workReimbursement.getNumber());//设置标题;
+
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+        workReimbursement.setProcessInstance(processInstance);
+        if (StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        // 更新流程实例ID
+        workReimbursement.setProcessInstanceId(processInstance.getId());
+        workReimbursementDao.updateProcessInstanceId(workReimbursement);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+        List<Activity> list = workActivityMenu.getActivities();
+        if (list != null && list.size() != 0) {
+            workActivityProcessService.saveList(list, processInstance.getId());
+        } else {
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessKey("specificInvoiceReimbursement");
+            workActivityProcess.setCount(1);
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcess.setIsApproval("0");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcess.setCount(2);
+            workActivityProcess.setId("");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(bmzrs,processInstance.getId(),1,1);
+            workActivityProcessService.insertAuditsByType(fpglys,processInstance.getId(),2,0);
+        }
+        logger.debug("start process of {key={}, bkey={}, pid={}, variables={}}", new Object[]{
+                ActUtils.PD_REIMBURSEMENT[0], businessKey, processInstance.getId(), variables});
+        return "";
+    }
+
+    /**
+     * 补充附件
+     * @param workReimbursement
+     */
+    @Transactional(readOnly = false)
+    public void replenishWorkReimbursementAttachmentInfo(WorkReimbursement workReimbursement) {
+        for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementVATTaxes()) {
+            //普通报销 发票信息
+            reimbursementVATTax.setReimbursementType("0");
+            if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
+                reimbursementVATTax.setWorkReimbursement(workReimbursement);
+                if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceCode())) {
+                    reimbursementVATTax.preInsert();
+                    reimbursementVATTaxDao.insert(reimbursementVATTax);
+                } else {
+                    reimbursementVATTax.preUpdate();
+                    reimbursementVATTaxDao.update(reimbursementVATTax);
+                }
+            } else {
+                reimbursementVATTaxDao.delete(reimbursementVATTax);
+            }
+        }
+
+        for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
+            //电子发票报销 发票信息
+            reimbursementVATTax.setReimbursementType("1");
+            if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
+                reimbursementVATTax.setWorkReimbursement(workReimbursement);
+                if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceNumber())) {
+                    reimbursementVATTax.preInsert();
+                    reimbursementVATTaxDao.insert(reimbursementVATTax);
+                } else {
+                    reimbursementVATTax.preUpdate();
+                    reimbursementVATTaxDao.update(reimbursementVATTax);
+                }
+            } else {
+                reimbursementVATTaxDao.delete(reimbursementVATTax);
+            }
+        }
+        //附件信息
+        for (WorkClientAttachment workClientAttachment : workReimbursement.getWorkAttachments()) {
+            if (workClientAttachment.getId() == null) {
+                continue;
+            }
+            if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+                workClientAttachment.setAttachmentId(workReimbursement.getId());
+                workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
+                workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+                    workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
+                } else {
+                    workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
+                }
+            } else {
+                workClientAttachmentDao.delete(workClientAttachment);
+            }
+        }
+    }
 }

+ 756 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementReplenishService.java

@@ -0,0 +1,756 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workreimbursement.service;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workloan.dao.WorkLoanDao;
+import com.jeeplus.modules.workloan.entity.WorkLoan;
+import com.jeeplus.modules.workloan.service.WorkLoanService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import com.jeeplus.modules.workreimbursement.dao.ReimbursementVATTaxDao;
+import com.jeeplus.modules.workreimbursement.dao.WorkAccountDao;
+import com.jeeplus.modules.workreimbursement.dao.WorkReimbursementDao;
+import com.jeeplus.modules.workreimbursement.dao.WorkReimbursementReplenishDao;
+import com.jeeplus.modules.workreimbursement.entity.*;
+import com.jeeplus.modules.workreimbursement.utils.VarStr;
+import com.jeeplus.modules.workreimbursementback.dao.WorkReimbursementBackDao;
+import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
+import com.jeeplus.modules.workrepay.dao.WorkRepayDao;
+import com.jeeplus.modules.workrepay.entity.WorkRepay;
+import org.activiti.engine.*;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+/**
+ * 财务报销Service
+ * @author 孟祥越
+ * @version 2017-05-02
+ */
+@Service
+@Transactional(readOnly = true)
+public class WorkReimbursementReplenishService extends CrudService<WorkReimbursementReplenishDao, WorkReimbursementReplenish> {
+    @Autowired
+    private WorkReimbursementReplenishDao workReimbursementReplenishDao;
+    @Autowired
+    private WorkReimbursementDao workReimbursementDao;
+    @Autowired
+    private WorkActivityProcessDao workActivityProcessDao;
+    @Autowired
+    private WorkAccountDao workAccountDao;
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    protected TaskService taskService;
+    @Autowired
+    protected HistoryService historyService;
+    @Autowired
+    protected RepositoryService repositoryService;
+    @Autowired
+    private IdentityService identityService;
+    @Autowired
+    private WorkClientAttachmentDao workClientAttachmentDao;
+    @Autowired
+    private WorkattachmentService workattachmentService;
+    @Autowired
+    private WorkLoanService workLoanService;
+
+    @Autowired
+    private ActTaskService actTaskService;
+
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
+    @Autowired
+    private WorkActivityMenuService workActivityMenuService;
+    @Autowired
+    private WorkActivityProcessService workActivityProcessService;
+    @Autowired
+    private ActivityService activityService;
+    @Autowired
+    private ReimbursementVATTaxDao reimbursementVATTaxDao;
+    @Autowired
+    private WorkProjectUserDao workProjectUserDao;
+    @Autowired
+    private SerialNumTplService serialNumTplService;
+    @Autowired
+    private OfficeService officeService;
+    @Autowired
+    private WorkReimbursementBackDao workReimbursementBackDao;
+    @Autowired
+    private WorkLoanDao workLoanDao;
+
+    private static byte[] SYN_BYTE = new byte[0];
+
+    @SuppressWarnings("unchecked")
+    public WorkReimbursementReplenish get(String id) {
+        WorkReimbursementReplenish workReimbursement = super.get(id);
+        if(null != workReimbursement){
+            //添加当前文件服务器类型
+            workReimbursement.setUploadMode(uploadMode);
+            //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+            workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
+        }
+        return workReimbursement;
+    }
+
+    /**
+     * 数电发票报销文件补充流程(侯媛媛发起,流程发起人审核,再回到侯媛媛结束)
+     * @param workReimbursement
+     * @param variables
+     */
+    @Transactional(readOnly = false)
+    public String replenishInvoiceReimbursementSave(WorkReimbursementReplenish workReimbursementReplenish,WorkReimbursement workReimbursement,Map<String, Object> variables,String processInstanceId) {
+        User user = UserUtils.getUser();
+
+        //流程数据保存到关联表中
+        super.save(workReimbursementReplenish);
+        workReimbursement.setReimbursementType("1");
+        workReimbursementDao.update(workReimbursement);
+        String str = "";
+        Office office = officeService.get(workReimbursementReplenish.getOfficeId());
+
+        str = "报销【" + workReimbursement.getNumber() + "】补充文件待确认" + ",报销总金额:"+workReimbursement.getMoney();
+        String title = "报销【" + workReimbursement.getNumber() + "】补充文件待确认";
+        //replenishWorkReimbursementAttachmentInfo(workReimbursement);
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        identityService.setAuthenticatedUserId(user.getId());
+        // 启动流程
+        String businessKey = workReimbursementReplenish.getId().toString();
+        WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("ggh3125f1f194c82bdea93555c750906", office);
+        // 启动流程
+        String processType = workActivityMenu.getProcessType();
+        StringBuffer buffer = new StringBuffer();
+        Activity activity = new Activity();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(workReimbursementReplenish.getId(),
+                        null,
+                        workReimbursementReplenish.getCompanyId(),
+                        title,
+                        str,
+                        "111",
+                        "0",
+                        "待审批",
+                        ""
+                );
+        List<User> users = new ArrayList<>();
+        List<User> bxrbcs = new ArrayList<>();
+        //获取报销发起人信息
+        User createUser = UserUtils.get(workReimbursement.getCreateBy().getId());
+        if(null != createUser){
+            bxrbcs.add(createUser);
+        }
+        //财务员工
+        List<User> fpglys = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,office.getId(),"5",workReimbursementReplenish.getCreateBy());
+        if (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 && StringUtils.isNotBlank(a.getRole().getEnname())){
+                    List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"8",workReimbursementReplenish.getCreateBy());
+                    if (enusers.size()==0){
+                        workReimbursementReplenish.setStatus("1");
+                        super.save(workReimbursementReplenish);
+                        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 && StringUtils.isNotBlank(activity.getId())) {
+                //角色审批
+                if (StringUtils.isNotBlank(activity.getRole().getEnname())) {
+                    users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"8",workReimbursementReplenish.getCreateBy());
+                }
+                //人员审批
+                if (StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            if (bxrbcs.size()==0 ){
+                workReimbursementReplenish.setStatus("1");
+                super.save(workReimbursementReplenish);
+            }
+            if (bxrbcs.size()==0){
+                return "流程审批人不能为空,该报销未找到报销人,请联系管理员!";
+            }
+            variables.put("bxrbcCount",bxrbcs.size());
+            variables.put("bxrbcList",bxrbcs);
+            processType = "workReimbursementReplenish";
+            users.addAll(bxrbcs);
+        }
+        for (User u : users){
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("报销人补充");
+            workProjectNotifyService.save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7002");
+            extras.put("id",workProjectNotify.getId());
+            extras.put("procDefKey","111");
+            UserUtils.pushInfoToApp(title,str,extras,u.getId());
+            UserUtils.pushIm(u.getId(),str);
+        }
+        variables.put("type", processType);
+        variables.put("busId", businessKey);
+        variables.put("title", "审批单:" + workReimbursement.getNumber());//设置标题;
+
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+        workReimbursementReplenish.setProcessInstance(processInstance);
+        if (StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        // 更新流程实例ID
+        workReimbursementReplenish.setProcessInstanceId(processInstance.getId());
+        workReimbursementReplenishDao.updateProcessInstanceId(workReimbursementReplenish);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+        List<Activity> list = workActivityMenu.getActivities();
+        if (list != null && list.size() != 0) {
+            workActivityProcessService.saveList(list, processInstance.getId());
+        } else {
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessKey("workReimbursementReplenish");
+            workActivityProcess.setCount(1);
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcess.setIsApproval("0");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcess.setCount(2);
+            workActivityProcess.setId("");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(bxrbcs,processInstance.getId(),1,1);
+            workActivityProcessService.insertAuditsByType(fpglys,processInstance.getId(),2,0);
+        }
+        logger.debug("start process of {key={}, bkey={}, pid={}, variables={}}", new Object[]{
+                ActUtils.PD_REIMBURSEMENT[0], businessKey, processInstance.getId(), variables});
+        return "";
+    }
+
+    /**
+     * 补充附件
+     * @param workReimbursement
+     */
+    @Transactional(readOnly = false)
+    public void replenishWorkReimbursementAttachmentInfo(WorkReimbursement workReimbursement) {
+        for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementVATTaxes()) {
+            //普通报销 发票信息
+            reimbursementVATTax.setReimbursementType("0");
+            if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
+                reimbursementVATTax.setWorkReimbursement(workReimbursement);
+                if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceCode())) {
+                    reimbursementVATTax.preInsert();
+                    reimbursementVATTaxDao.insert(reimbursementVATTax);
+                } else {
+                    reimbursementVATTax.preUpdate();
+                    reimbursementVATTaxDao.update(reimbursementVATTax);
+                }
+            } else {
+                reimbursementVATTaxDao.delete(reimbursementVATTax);
+            }
+        }
+
+        for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
+            //电子发票报销 发票信息
+            reimbursementVATTax.setReimbursementType("1");
+            if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
+                reimbursementVATTax.setWorkReimbursement(workReimbursement);
+                if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceNumber())) {
+                    reimbursementVATTax.preInsert();
+                    reimbursementVATTaxDao.insert(reimbursementVATTax);
+                } else {
+                    reimbursementVATTax.preUpdate();
+                    reimbursementVATTaxDao.update(reimbursementVATTax);
+                }
+            } else {
+                reimbursementVATTaxDao.delete(reimbursementVATTax);
+            }
+        }
+        //附件信息
+        for (WorkClientAttachment workClientAttachment : workReimbursement.getWorkAttachments()) {
+            if (workClientAttachment.getId() == null) {
+                continue;
+            }
+            if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+                workClientAttachment.setAttachmentId(workReimbursement.getId());
+                workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
+                workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+                    workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
+                } else {
+                    workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
+                }
+            } else {
+                workClientAttachmentDao.delete(workClientAttachment);
+            }
+        }
+    }
+
+    /**
+     * 审核流程
+     * @param workReimbursement
+     */
+    @Transactional(readOnly = false)
+    public String auditReimbursementReplenishSave(WorkReimbursementReplenish workReimbursementReplenish,WorkReimbursement workReimbursement,List<User> auditUsers) {
+        String str = "";
+        String userName = UserUtils.get(workReimbursementReplenish.getCreateBy().getId()).getName();
+        Office office = officeService.get(workReimbursementReplenish.getOfficeId());
+        String title = "报销【" + workReimbursement.getNumber() + "】补充文件待审批";
+        if (workReimbursement.getProject()!= null && StringUtils.isNotBlank(workReimbursement.getProject().getId())){
+            str =  "报销申请编号:"+workReimbursement.getNumber()+",报销项目:"+workReimbursement.getProject().getProjectName()+",报销费用合计:"+workReimbursement.getMoney()+",报销人:"+userName+",所属部门:"+office.getName();
+        }else {
+            str =  "报销申请编号:"+workReimbursement.getNumber()+",非项目报销,报销费用合计:"+workReimbursement.getMoney()+",报销人:"+userName+",所属部门:"+office.getName();
+        }
+        // 对不同环节的业务逻辑进行操作
+        String taskDefKey = workReimbursementReplenish.getAct().getTaskDefKey();
+        if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
+            actTaskService.claim(workReimbursementReplenish.getAct().getTaskId(), UserUtils.getUser().getId());
+            replenishWorkReimbursementAttachmentInfo(workReimbursement);
+        }else{
+            workReimbursementReplenish.getAct().setFlag("yes");
+            if("modifyApply".equals(taskDefKey)) {
+                replenishWorkReimbursementAttachmentInfo(workReimbursement);
+            }
+        }
+        String comment = "";
+        if (workReimbursementReplenish.getStatus().equals("4")){
+            comment = ("yes".equals(workReimbursementReplenish.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
+        }else {
+            comment = ("yes".equals(workReimbursementReplenish.getAct().getFlag())?"[同意] ":"[驳回] ");
+            if(StringUtils.isNotBlank(workReimbursementReplenish.getAct().getComment())){
+                comment = comment + workReimbursementReplenish.getAct().getComment();
+            }
+        }
+        //yes 的时候状态为审核通过 否则为未通过
+        //1 审核中 2 未通过
+        workReimbursementReplenish.setStatus(("yes".equals(workReimbursementReplenish.getAct().getFlag()) ? "2" : "4"));
+        Map<String, Object> vars = Maps.newHashMap();
+        //业务逻辑对应的条件表达式
+        String exp = "";
+        String taskCount = "";
+        String notifyRole = "";
+        int key = 0;
+        String enname = "";
+        List<Activity> activitieList = activityService.getByProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
+        WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+        if (activitieList != null && activitieList.size() != 0) {
+            Iterator<Activity> iterator = activitieList.iterator();
+            while (iterator.hasNext()){
+                Activity activityInfo = iterator.next();
+                if (!"workReimbursementReplenish".equals(activityInfo.getProcessKey())){
+                    iterator.remove();
+                }
+            }
+            workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+            workActivityMenu.setActivities(activitieList);
+        }
+
+        WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+        WorkActivityProcess selectProcess = new WorkActivityProcess();
+        selectProcess.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
+        List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+        List<Activity> activities = workActivityMenu.getActivities();
+        if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workReimbursementReplenish")) {
+            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(workReimbursementReplenish.getAct().getFlag())) {
+                        workReimbursementReplenish.setStatus("4");
+                        workActivityProcess.setIsApproval("2");
+                        String returnBack = "-1";
+                        for (Activity activity : activities) {
+                            if (activity.getCount() == activityProcess.getCount()) {
+                                returnBack = activity.getReturnBack();
+                                notifyRole = activity.getName();
+                                break;
+                            }
+                        }
+                        if (returnBack.equals("0")) {
+                            workActivityProcess.setId("");
+                        }
+
+                    } else {
+                        workActivityProcess.setIsApproval("1");
+                    }
+                }else if(taskDefKey.equals("modifyApply")){
+                    notifyRole = "调整报销";
+                    taskCount = "0";
+                    exp = "pass";
+                    workActivityProcess.setId("");
+                    workActivityProcess.setCount(0);
+                    if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {
+                        workReimbursementReplenish.setStatus("3");
+                        workActivityProcess.setIsApproval("2");
+                    } else {
+                        workActivityProcess.setIsApproval("1");
+                    }
+                    break;
+                }
+            }
+        } else {
+            workActivityMenu.setProcessType("workReimbursementReplenish");
+            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 ("bxrbc".equals(taskDefKey) && count.contains("1")) {
+                    taskCount = "1";
+                    exp = "pass";
+                    if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
+                        //修改数电发票附件信息
+                        replenishWorkReimbursementAttachmentInfo(workReimbursement);
+                        workActivityProcessService.insertAuditsByType(auditUsers,workReimbursementReplenish.getProcessInstanceId(),2,1);
+                        notifyRole = "财务审核";
+                        workActivityProcess.setIsApproval("1");
+                        enname = "fpglys";
+                        vars.put("fpglysList", auditUsers);
+                        vars.put("fpglyscount",auditUsers.size());
+                    } else {
+                        notifyRole = "调整报销";
+                        workActivityProcess.setIsApproval("2");
+                    }
+                    break;
+                } else if ("fpglys".equals(taskDefKey) && count.contains("2")) {
+                    taskCount = "2";
+                    exp = "pass";
+                    if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
+                        notifyRole = "审批通过";
+                        workActivityProcess.setIsApproval("1");
+                    } else {
+                        notifyRole = "调整报销";
+                        workActivityProcess.setIsApproval("2");
+                    }
+                    break;
+                } else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+                    taskCount = "0";
+                    notifyRole = "财务审批";
+                    exp = "pass";
+                    workActivityProcess.setCount(0);
+                    enname = "bmzr";
+                    if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {
+                        workReimbursementReplenish.setStatus("3");
+                    }
+                    break;
+                } else if ("apply_end".equals(taskDefKey)) {
+                }
+
+            }
+        }
+        // 设置意见
+        workReimbursementReplenish.getAct().setComment(("yes".equals(workReimbursementReplenish.getAct().getFlag()) ? "[同意] " : "[驳回] ") + workReimbursementReplenish.getAct().getComment());
+        workReimbursementReplenish.preUpdate();
+        // 提交流程任务
+        vars.put(exp, "yes".equals(workReimbursementReplenish.getAct().getFlag()) ? true : false);
+        vars.put("passs", true);
+        workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workReimbursementReplenish.getProcessInstanceId(),taskDefKey,"modifyApply",workReimbursementReplenish.getAct().getFlag(),comment, activities);
+        // 提交流程任务
+        actTaskService.complete(workReimbursementReplenish.getAct().getTaskId(), workReimbursementReplenish.getAct().getProcInsId(), workReimbursementReplenish.getAct().getComment(), vars);
+        boolean state = actTaskService.isProcessEnd(workReimbursementReplenish.getAct().getProcInsId());
+        List<User> users = new ArrayList<>();
+        List<User> userList = new ArrayList<>();
+        if (!state) {
+            title =  "报销【" + workReimbursement.getNumber() + "】申请通过";
+            str = "报销【" + workReimbursement.getNumber() + "】申请通过,经办人:" + userName+",总金额:"+workReimbursement.getMoney();
+            users.add(workReimbursementReplenish.getCreateBy());
+            if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
+
+                Set<String> set = new HashSet();
+                //添加经办人人员id
+                set.add(workReimbursementReplenish.getCreateBy().getId());
+                //获取通知需要的经办人和报销人人员信息
+                List<User> informUser = Lists.newArrayList();
+                for (String userId: set) {
+                    informUser.add(UserUtils.get(userId));
+                }
+
+                workReimbursementReplenish.setStatus("5");
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(workReimbursementReplenish.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                //遍历需要通知的人员信息 进行通知(经办人和报销人员)
+                for (User user: informUser) {
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(workReimbursementReplenish.getId(),
+                                            user,
+                                            workReimbursementReplenish.getCompanyId(),
+                                            title,
+                                            str,
+                                            "111",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+                }
+
+            } else {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(workReimbursementReplenish.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                if (StringUtils.isNotBlank(workReimbursementReplenish.getStatus()) && !workReimbursementReplenish.getStatus().equals("3")){
+                    workReimbursementReplenish.setStatus("4");
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(workReimbursementReplenish.getId(),
+                                            workReimbursementReplenish.getCreateBy(),
+                                            workReimbursementReplenish.getCompanyId(),
+                                            title,
+                                            str,
+                                            "111",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+                }
+            }
+            workActivityProcessService.deleteProcessIdAuditUsers(workReimbursementReplenish.getProcessInstanceId());
+        } else {
+            if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workReimbursementReplenish")) {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(workReimbursementReplenish.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                //users.addAll(userList);
+                WorkProjectNotify workProjectNotify = UtilNotify
+                        .saveNotify(workReimbursementReplenish.getId(),
+                                new User(),
+                                workReimbursementReplenish.getCompanyId(),
+                                title,
+                                str,
+                                "111",
+                                "0",
+                                "待审批",
+                                notifyRole);
+                List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+                        activities,
+                        workProjectNotify,
+                        taskDefKey,
+                        workReimbursementReplenish.getAct().getFlag(),
+                        taskCount,
+                        workReimbursementReplenish.getCreateBy(),
+                        workReimbursementReplenish.getOfficeId(),
+                        "8");
+                for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+                    users.add(workProjectNotify1.getUser());
+                    workProjectNotify1.setId("");
+                    workProjectNotify1.setIsNewRecord(false);
+                    workProjectNotifyService
+                            .save(workProjectNotify1);
+                    if (!"modifyApply".equals(taskDefKey)){
+                        Map<String,Object> extras = new HashMap<>();
+                        if ("cw".equals(taskDefKey) || "cn".equals(taskDefKey) ){
+                            extras.put("type","7001");
+                        }else {
+                            extras.put("type","7002");
+                        }
+                        extras.put("id",workProjectNotify.getId());
+                        extras.put("procDefKey","111");
+                        UserUtils.pushInfoToApp(title,str,extras,workProjectNotify1.getUser().getId());
+
+                    }
+                }
+
+            } else {
+                if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {//驳回待办
+                    title =  "报销【" + workReimbursement.getNumber() + "】申请被驳回";
+                    str = "报销【" + workReimbursement.getNumber() + "】申请被驳回,请选择重新申请或作废";
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(workReimbursementReplenish.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    //users.addAll(userList);
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(workReimbursementReplenish.getId(),
+                                            workReimbursementReplenish.getCreateBy(),
+                                            workReimbursementReplenish.getCompanyId(),
+                                            title,
+                                            str,
+                                            "111",
+                                            "0",
+                                            "重新申请",
+                                            notifyRole));
+                    users.add( workReimbursementReplenish.getCreateBy());
+                } else {
+                    if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办
+                        title =  "报销【" + workReimbursement.getNumber() + "】申请待审批";
+                        str = "报销【" + workReimbursement.getNumber() + "】申请待审批,经办人:" + userName+",总金额:"+workReimbursement.getMoney();
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(workReimbursementReplenish.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        //users.addAll(userList1);
+                        WorkProjectNotify workProjectNotify = UtilNotify
+                                .saveNotify(workReimbursementReplenish.getId(),
+                                        new User(),
+                                        workReimbursementReplenish.getCompanyId(),
+                                        title,
+                                        str,
+                                        "111",
+                                        "0",
+                                        "待审批",
+                                        notifyRole);
+                        users.addAll(auditUsers);
+                        for (User user1:auditUsers){
+                            workProjectNotify.setId("");
+                            workProjectNotify.setUser(user1);
+                            workProjectNotify.setIsNewRecord(false);
+                            workProjectNotifyService
+                                    .save(workProjectNotify);
+                            if (!"modifyApply".equals(taskDefKey)){
+                                Map<String,Object> extras = new HashMap<>();
+                                if ("cw".equals(taskDefKey) || "cn".equals(taskDefKey) ){
+                                    extras.put("type","7001");
+                                }else {
+                                    extras.put("type","7002");
+                                }
+                                extras.put("id",workProjectNotify.getId());
+                                extras.put("procDefKey","102");
+                                UserUtils.pushInfoToApp(title,str,extras,user1.getId());
+
+                            }
+                        }
+                    }else {
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(workReimbursementReplenish.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        users.addAll(userList);
+                        users.add(workReimbursementReplenish.getCreateBy());
+                        workProjectNotifyService
+                                .save(UtilNotify
+                                        .saveNotify(workReimbursementReplenish.getId(),
+                                                workReimbursementReplenish.getCreateBy(),
+                                                workReimbursementReplenish.getCompanyId(),
+                                                title,
+                                                str,
+                                                "111",
+                                                "0",
+                                                "重新申请",
+                                                notifyRole));
+                    }
+                }
+            }
+        }
+        if (users!=null && users.size()!=0) {
+            for (User u : users) {
+                UserUtils.pushIm(u.getId(),str);
+            }
+        }
+        if (userList!=null && userList.size()!=0) {
+            for (User u : userList) {
+                UserUtils.pushMeIm(u.getId());
+            }
+        }
+
+        workReimbursementReplenishDao.update(workReimbursementReplenish);
+        return "保存审核意见成功!";
+    }
+
+
+
+    /**
+     * 报销作废:强制撤销
+     * @param workReimbursementReplenish
+     */
+    @Transactional(readOnly = false)
+    public void cancelInvalidate(WorkReimbursementReplenish workReimbursementReplenish) {
+        String invalidateProcessInstanceId = workReimbursementReplenish.getProcessInstanceId();
+        try {
+            //将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
+            WorkActivityProcess process = new WorkActivityProcess();
+            process.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
+            process.setIsApproval("0");
+            //List<WorkActivityProcess> processList1 = workActivityProcessService.findByProcInsId(process);
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
+            List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
+            WorkProjectNotify notify = new WorkProjectNotify();
+            notify.setNotifyId(workReimbursementReplenish.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(StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())){
+                        p.setDelFlag("1");
+                        p.setIsApproval("-1");
+                        workActivityProcessDao.updateDelFlagAndIsApproval(p);
+                    }
+                }
+                WorkActivityProcess pro = new WorkActivityProcess();
+                pro.setId("");
+                pro.setDelFlag("0");
+                pro.preInsert();
+                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,"报销文件补充-强制撤销");
+            workReimbursementReplenish.setStatus("3");
+            workReimbursementReplenish.preUpdate();
+            workReimbursementReplenishDao.update(workReimbursementReplenish);
+        }catch (ActivitiObjectNotFoundException e){
+            System.err.println("撤销报销补充异常,因为这个流程已不存在!");
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            logger.error("Exception e:"+e);
+        }
+
+    }
+}

+ 264 - 0
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementReplenishController.java

@@ -0,0 +1,264 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workreimbursement.web;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.mapper.JsonMapper;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+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.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.Role;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.sysmtree.entity.SysMtree;
+import com.jeeplus.modules.sysmtree.service.SysMtreeService;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workbidproject.service.WorkBidProjectService;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workreimbursement.entity.*;
+import com.jeeplus.modules.workreimbursement.service.*;
+import com.jeeplus.modules.workreimbursement.utils.VarStr;
+import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
+import com.jeeplus.modules.workreimbursementback.service.WorkReimbursementBackService;
+import com.jeeplus.modules.worksupplier.entity.WorkSupplier;
+import com.jeeplus.modules.worksupplier.service.WorkSupplierService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.*;
+
+/**
+ * 财务报销信息补充Controller
+ * @author 孟祥越
+ * @version 2017-05-02
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workReimbursementReplenish/workReimbursementReplenish")
+public class WorkReimbursementReplenishController extends BaseController {
+
+	@Autowired
+	private WorkReimbursementAllService workReimbursementService;
+	@Autowired
+	private WorkReimbursementReplenishService workReimbursementReplenishService;
+
+	@Autowired
+	protected RuntimeService runtimeService;
+
+	@Autowired
+	protected TaskService taskService;
+
+	@Autowired
+	private ActTaskService actTaskService;
+
+	@Autowired
+	protected WorkProjectNotifyService workProjectNotifyService;
+	@Autowired
+	protected WorkReimbursementService workRService;
+
+	@ModelAttribute
+	public WorkReimbursementReplenish get(@RequestParam(required=false) String id) {
+
+		WorkReimbursementReplenish entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = workReimbursementReplenishService.get(id);
+		}
+		if (entity == null){
+			entity = new WorkReimbursementReplenish();
+		}
+		return entity;
+	}
+
+
+	/**
+	 * 保存提交报销单
+	 * 启动流程
+	 */
+	@RequestMapping(value = "save")
+	public String save(WorkReimbursementReplenish workReimbursementReplenish, Model model, RedirectAttributes redirectAttributes) throws Exception{
+		WorkReimbursement workReimbursement = workReimbursementService.get(workReimbursementReplenish.getReimbursementId());
+		User user = workReimbursementReplenish.getCreateBy();
+		String sta = workReimbursementReplenish.getStatus();
+		//获取当前登陆人信息
+		User loginUser = UserUtils.getUser();
+		//如果当前登陆人是管理员,则进行管理员修改
+		//状态设置为审核中
+		workReimbursementReplenish.setStatus("2");
+		String processInstanceId ="";
+		if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+			processInstanceId = workReimbursementReplenishService.get(workReimbursementReplenish.getId()).getProcessInstanceId();
+		}
+		try {
+			Map<String, Object> variables = Maps.newHashMap();
+			workReimbursementReplenish.setCompanyId(UserUtils.getSelectCompany().getId());
+			workReimbursementReplenish.setCreateOffice(UserUtils.getSelectOffice().getId());
+			workReimbursementReplenish.setOfficeId(UserUtils.getSelectOffice().getId());
+			String str = workReimbursementReplenishService.replenishInvoiceReimbursementSave(workReimbursementReplenish,workReimbursement, variables,processInstanceId);
+
+
+			if (StringUtils.isNotBlank(str)){
+				addMessage(redirectAttributes, "报销材料补充提交失败:"+str);
+			}else {
+				addMessage(redirectAttributes, "报销材料补充已经提交");
+			}
+
+		} catch (Exception e) {
+			logger.info("Exception e:"+e);
+			addMessage(redirectAttributes, "报销材料补充提交失败!");
+		}
+		return "redirect:" + adminPath +"/workreimbursement/workReimbursementAll/?repage";
+	}
+
+
+	/**
+	 * 保存提交报销单
+	 * 启动流程
+	 */
+	@RequestMapping(value = "modify")
+	public String modify(WorkReimbursementReplenish workReimbursementReplenish, Model model, RedirectAttributes redirectAttributes) throws Exception{
+		WorkReimbursement workReimbursement = workReimbursementService.get(workReimbursementReplenish.getReimbursementId());
+		User user = workReimbursementReplenish.getCreateBy();
+		String sta = workReimbursementReplenish.getStatus();
+
+
+		ProcessInstance processInstance = actTaskService.getProcIns(workReimbursementReplenish.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);
+			workReimbursementReplenish.setAct(act);
+		}
+		model.addAttribute("workReimbursement", workReimbursement);
+		model.addAttribute("workReimbursementReplenish", workReimbursementReplenish);
+
+		return "modules/workreimbursement/replenish/workReimbursementReplenishCwAudit";
+	}
+
+	/**
+	 * 工单执行(完成任务)
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "saveAudit")
+	public String saveAudit(WorkReimbursementReplenish workReimbursementReplenish, WorkReimbursement workReimbursement, Model model,
+							RedirectAttributes redirectAttributes) {
+		try {
+			// 对不同环节的业务逻辑进行操作
+			String taskDefKey = workReimbursementReplenish.getAct().getTaskDefKey();
+			List<User> users = null;
+			if ("bxrbc".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursementReplenish.getProcessInstanceId(),2);
+				if (users==null )
+					//users = UserUtils.getByRoleActivityEnname("fgld",2,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+					users = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd", 3, workReimbursementReplenish.getOfficeId(), "8", workReimbursementReplenish.getCreateBy());
+
+			} else  if ("fpglys".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursementReplenish.getProcessInstanceId(),3);
+				if (users==null )
+					users = UserUtils.getByProssType(workReimbursementReplenish.getProcessInstanceId(),1);
+			}else if ("modifyApply".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursementReplenish.getProcessInstanceId(),1);
+			}
+			String flag = workReimbursementReplenish.getAct().getFlag();
+			if ("yes".equals(flag) &&(users==null || users.size()==0)){
+				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+			}else {
+				List<ReimbursementVATTax> reimbursementElectronicInvoiceVATTaxes = workReimbursement.getReimbursementElectronicInvoiceVATTaxes();
+				List<WorkClientAttachment> workAttachments = workReimbursement.getWorkAttachments();
+				workReimbursement = workReimbursementService.get(workReimbursementReplenish.getReimbursementId());
+				workReimbursement.setWorkAttachments(workAttachments);
+				workReimbursement.setReimbursementElectronicInvoiceVATTaxes(reimbursementElectronicInvoiceVATTaxes);
+
+				String str = workReimbursementReplenishService.auditReimbursementReplenishSave(workReimbursementReplenish,workReimbursement,users);
+				addMessage(redirectAttributes, str);
+			}
+		}catch (Exception e){
+			logger.info("Exception e:"+e);
+			addMessage(redirectAttributes, "审批失败");
+		}
+		if (StringUtils.isNotBlank(workReimbursementReplenish.getHome()) && "home".equals(workReimbursementReplenish.getHome())) {
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(workReimbursementReplenish.getHome()) && "notifyList".equals(workReimbursementReplenish.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		} else {
+			return "redirect:" + adminPath +"/workreimbursement/workReimbursementAll/?repage";
+		}
+	}
+
+
+
+	/**
+	 * 读取单个实体流程
+	 * @return
+	 */
+	@RequestMapping(value = "getProcessOne")
+	public String getProcessOne(WorkReimbursementReplenish workReimbursementReplenish,Model model) {
+		model.addAttribute("processInstanceId", workReimbursementReplenish.getProcessInstanceId());
+		return "modules/workreimbursement/workReimbursementTrack";
+	}
+
+
+	/**
+	 * 合同作废:强制撤回
+	 */
+	@RequestMapping("cancelInvalidate")
+	public String cancelInvalidate(WorkReimbursementReplenish workReimbursementReplenish,RedirectAttributes redirectAttributes){
+		try {
+			if(workReimbursementReplenish.getStatus().equals("5")){
+				addMessage(redirectAttributes, "报销材料补充已审批通过,无法撤回");
+			}else{
+				workReimbursementReplenishService.cancelInvalidate(workReimbursementReplenish);
+				addMessage(redirectAttributes, "报销材料补充撤回成功");
+			}
+		}catch (Exception e){
+			logger.error("Exception e"+e);
+			addMessage(redirectAttributes, "报销材料补充撤回失败");
+		}
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursementAll/?repage";
+	}
+
+}

+ 4 - 0
src/main/resources/mappings/modules/disputeMediation/ProjectNonPrelitigationMediationDao.xml

@@ -19,6 +19,10 @@
         a.mediation_fit as "mediationFit",
         a.defendant_first as "defendantFirst",
         a.defendant_second as "defendantSecond",
+        a.mediation_process as "mediationProcess",
+        a.plaintiff_claim as "plaintiffClaim",
+        a.respondent_opinion as "respondentOpinion",
+        a.undisputed_fact as "undisputedFact",
         area.name AS "area.name"
     </sql>
 

+ 45 - 4
src/main/resources/mappings/modules/identification/PersonOpinionDao.xml

@@ -20,6 +20,31 @@
         FROM audit_template a
         WHERE a.id = #{id}
     </select>
+
+    <select id="getFirstIdentificationList" resultType="java.lang.String" >
+        SELECT DISTINCT a.value
+        FROM person_audit_template a
+        <where>
+            a.parent_ids like concat ((SELECT z.id
+            FROM person_audit_template z
+            <where>
+                z.value = #{firstIdentification}
+            </where>),'%')
+        </where>
+    </select>
+
+    <select id="getSecondIdentificationList" resultType="java.lang.String" >
+        SELECT DISTINCT a.value
+        FROM person_audit_template a
+        <where>
+            a.value = #{secondIdentification} or
+            a.parent_ids like concat ('%',(SELECT z.id
+            FROM person_audit_template z
+            <where>
+                z.value = #{secondIdentification} and level = 2
+            </where>),'%')
+        </where>
+    </select>
     <select id="findList" resultType="com.jeeplus.modules.identification.entity.AuditTemplate" >
         SELECT
         <include refid="auditColumns"/>
@@ -32,9 +57,17 @@
             <if test="name !=null and name != ''">
                 and a.name like concat('%',#{name},'%')
             </if>
-            <if test="identification !=null and identification != ''">
-                and a.identification = #{identification}
+
+            <if test="identificationList!=null and identificationList.size!=0">
+                and a.identification in
+                <foreach collection="identificationList" item="identification" separator="," open="(" close=")">
+                    #{identification}
+                </foreach>
             </if>
+
+            <!--<if test="identification !=null and identification != ''">
+                and a.identification = #{identification}
+            </if>-->
             <if test="content !=null and content != ''">
                 and a.content like concat('%',#{content},'%')
             </if>
@@ -65,9 +98,17 @@
             <if test="name !=null and name != ''">
                 and a.name like concat('%',#{name},'%')
             </if>
-            <if test="identification !=null and identification != ''">
-                and a.identification = #{identification}
+
+            <if test="identificationList!=null and identificationList.size!=0">
+                and a.identification in
+                <foreach collection="identificationList" item="identification" separator="," open="(" close=")">
+                    #{identification}
+                </foreach>
             </if>
+
+            <!--<if test="identification !=null and identification != ''">
+                and a.identification = #{identification}
+            </if>-->
             <if test="content !=null and content != ''">
                 and a.content like concat('%',#{content},'%')
             </if>

+ 2 - 2
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -553,7 +553,7 @@
                 AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
             </if>-->
 			<if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
-				AND ((w.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w.is_master = '1' AND w.del_flag='0'
+				AND ((w1.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w1.is_master = '1' AND w1.del_flag='0'
 			</if>
 			<if test="projectStatus !=null">
 				AND a.status = #{projectStatus}
@@ -1079,7 +1079,7 @@
                 AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
             </if>-->
 			<if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
-				AND ((w.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w.is_master = '1' AND w.del_flag='0'
+				AND ((w1.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w1.is_master = '1' AND w1.del_flag='0'
 			</if>
 			<if test="projectStatus !=null">
 				AND a.status = #{projectStatus}

+ 1 - 0
src/main/resources/mappings/modules/signatureManagement/electronicSignature/DistrictDirectorApplicationDao.xml

@@ -20,6 +20,7 @@
 		area.name AS "area.name",
 		su.name as "createBy.name",
 		so.name as "office.name",
+		so.show_name as "office.showName",
 		a.status as "status"
 	</sql>
 

+ 24 - 8
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -42,7 +42,9 @@
 		a.top_company AS "topCompany",
         a.branch_no AS "branchNo",
 		a.is_son AS "isSon",
-		a.wx_office_id AS "wxOfficeId"
+		a.wx_office_id AS "wxOfficeId",
+		a.level AS "level",
+		a.show_name AS "showName"
 	</sql>
 
 	<sql id="officeJoins">
@@ -85,7 +87,9 @@
             a.branch_simple_name,
 			a.top_company,
             a.branch_no,
-			a.is_son
+			a.is_son,
+			a.level,
+			a.show_name
 		FROM sys_office  a
 		WHERE
 		a.del_flag = '0'
@@ -241,7 +245,9 @@
 		a.branch_simple_name AS "branchSimpleName",
 		a.top_company AS "topCompany",
 		a.branch_no AS "branchNo",
-		a.is_son
+		a.is_son,
+		a.level,
+		a.show_name
 		FROM sys_office a
 		left join sys_office t2 on (t2.parent_ids like concat('%',a.id,'%') and t2.type='2')
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
@@ -499,7 +505,9 @@
             branch_simple_name,
 			top_company,
             branch_no,
-			wx_office_id
+			wx_office_id,
+			level,
+			show_name
 		) VALUES (
 			#{id},
 			#{parent.id},
@@ -536,7 +544,9 @@
             #{branchSimpleName},
             #{topCompany},
             #{branchNo},
-			#{wxOfficeId}
+			#{wxOfficeId},
+			#{level},
+			#{showName}
 		)
 	</insert>
 	<select id="findWxOfficeId" resultType="String">
@@ -578,7 +588,9 @@
             simple_name = #{simpleName},
             branch_simple_name = #{branchSimpleName},
 			top_company  = #{topCompany},
-            branch_no = #{branchNo}
+            branch_no = #{branchNo},
+            level = #{level},
+			show_name = #{showName}
 		WHERE id = #{id}
 	</update>
 
@@ -673,7 +685,9 @@
 		a.branch_simple_name AS "branchSimpleName",
 		a.top_company AS "topCompany",
 		a.branch_no AS "branchNo",
-		a.is_son AS "isSon"
+		a.is_son AS "isSon",
+		a.level AS "level",
+		a.show_name AS "showName"
 		FROM sys_office a
 		left join sys_office t2 on (t2.parent_ids like concat('%',a.id,'%') and t2.type='2')
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
@@ -718,7 +732,9 @@
 		a.branch_simple_name AS "branchSimpleName",
 		a.top_company AS "topCompany",
 		a.branch_no AS "branchNo",
-		a.is_son AS "isSon"
+		a.is_son AS "isSon",
+		a.level AS "level",
+		a.show_name AS "showName"
 		FROM sys_office a
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
         <choose>

+ 1 - 1
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -38,7 +38,7 @@
 		a.bank_number AS "bankNumber",
 		a.cancle_reason AS "cancaleReason",
 		su.name AS "createBy.name",
-		so.top_company AS "office.name",
+		so.show_name AS "office.name",
 		w.name AS "client.name",
 		p.project_name AS "project.projectName",
 		p.id AS "project.id",

+ 13 - 0
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -73,6 +73,10 @@
 		,so.name as "handleOfficeName"
 		,sub.name as "submitterName"
 		,sob.name as "submitterOfficeName"
+		,wrr.id as "replenishId"
+		,wrr.create_by as "replenishUserId"
+		,wrr.status as "replenishStatus"
+		,wrr.audit_pass_date as "replenishDate"
 		FROM work_reimbursement a
 		left join work_account wa on wa.work_reimbursement_id =a.id
 		left join work_reimbursement_type_info wrt on wrt.id =wa.type
@@ -82,6 +86,15 @@
 		left join sys_office so on su.office_id = so.id
 		left join sys_user sub on sub.id = wa.reimbursement_name
 		left join sys_office sob on sub.office_id = sob.id
+		LEFT JOIN (
+			SELECT id,create_by,create_date,update_by,update_date,remarks,del_flag,office_id,company_id,reimbursement_id,process_instance_id,status,audit_pass_date
+			FROM work_reimbursement_replenish
+			WHERE (reimbursement_id, update_date) IN (
+			SELECT reimbursement_id, MAX(update_date)
+			FROM work_reimbursement_replenish
+			GROUP BY reimbursement_id
+			) and del_flag = 0
+		) wrr ON a.id = wrr.reimbursement_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="id != null and id != ''">

+ 94 - 0
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementReplenishDao.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.workreimbursement.dao.WorkReimbursementReplenishDao">
+
+	<sql id="workReimbursementColumns">
+		a.id AS "id",
+		a.process_instance_id AS "processInstanceId",
+		a.status AS "status",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.reimbursement_id as "reimbursementId"
+	</sql>
+
+	<select id="get" resultType="WorkReimbursementReplenish" >
+		SELECT
+			<include refid="workReimbursementColumns"/>
+		,a.office_id as "officeId"
+		,su.name as "createBy.name"
+		FROM work_reimbursement_replenish a
+		left join sys_user su on su.id = a.create_by
+		WHERE a.id = #{id}
+	</select>
+
+	<update id="updateProcessInstanceId">
+		UPDATE work_reimbursement_replenish SET
+			process_instance_id = #{processInstanceId}
+		WHERE id = #{id}
+	</update>
+
+	<insert id="insert">
+		INSERT INTO work_reimbursement_replenish(
+			id,
+			office_id,
+			status,
+			process_instance_id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			company_id,
+			reimbursement_id
+		) VALUES (
+			#{id},
+			#{officeId},
+			#{status},
+			#{processInstanceId},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{companyId},
+			#{reimbursementId}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE work_reimbursement_replenish SET
+			<if test="officeId != null and officeId !=''">
+				office_id = #{officeId},
+			</if>
+			status = #{status},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			company_id = #{companyId}
+
+		WHERE id = #{id}
+	</update>
+
+	<!--物理删除-->
+	<update id="delete">
+		UPDATE work_reimbursement_replenish SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+    <!-- 获取流程ID -->
+    <select id="getByProcessInstanceId" resultType="WorkReimbursementReplenish">
+        SELECT
+        <include refid="workReimbursementColumns"/>
+        FROM work_reimbursement_replenish a
+        WHERE a.process_instance_id = #{processInstanceId}
+    </select>
+
+
+</mapper>

+ 1 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml

@@ -40,6 +40,7 @@
 		a.ts AS "ts",
 		a.picture AS "picture",
 		o.top_company AS "office.name",
+		o.show_name AS "office.showName",
 		a.user_id AS "userId",
 		a.branch_office AS "branchOffice.id",
 		branch.name AS "branchOffice.name",

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

@@ -620,6 +620,24 @@ function getAuditState(id)
     return result;
 }
 
+function getReplenishAuditState(id)
+{
+    var result ={};
+    result.action = true;
+    switch(id)
+    {
+        case "0":result.label = "tempstore";result.status="无需补充";result.action = false;break;
+        case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
+        case "2":result.label = "auditing";result.status="审批中";break;
+        case "3":result.label = "cancel";result.status="撤回";break;
+        case "4":result.label = "reject";result.status="驳回";break;
+        case "5":result.label = "signed";result.status="已补充";break;
+        default:
+            result.label = "unknown";result.status="无需补充";break;
+    }
+    return result;
+}
+
 function getPaymentState(id)
 {
     var result ={};

+ 1 - 1
src/main/webapp/webpage/include/head.jsp

@@ -36,7 +36,7 @@
 
 <!-- jeeplus -->
 <link href="${ctxStatic}/common/jeeplus.css" type="text/css" rel="stylesheet" />
-<script src="${ctxStatic}/common/jeeplus.js?20" type="text/javascript"></script>
+<script src="${ctxStatic}/common/jeeplus.js?22" type="text/javascript"></script>
 <script type="text/javascript" src="${ctxStatic}/common/openShow.js"></script>
 
 <!-- jquery ui -->

+ 12 - 16
src/main/webapp/webpage/modules/disputeMediation/projectNonPrelitigationMediation/projectNonPrelitigationMediationDetail.jsp

@@ -79,11 +79,11 @@
                         <div class="layui-item layui-col-sm6 lw7">
                             <label class="layui-form-label"><span class="require-item">*</span>调解期间:</label>
                             <div class="layui-input-block readOnlyFFF">
-                                <input id="startTime" placeholder="开始时间" readonly="true" name="startTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                <input id="startTime" placeholder="开始时间" style="background-color: #f1f1f1" readonly="true" name="startTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
                                        value="<fmt:formatDate value="${projectNonPrelitigationMediation.startTime}" pattern="yyyy-MM-dd"/>"/>
                                 </input>
                                 <span class="group-sep">-</span>
-                                <input id="endTime" placeholder="结束时间" readonly="true" name="endTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                <input id="endTime" placeholder="结束时间" style="background-color: #f1f1f1" readonly="true" name="endTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
                                        value="<fmt:formatDate value="${projectNonPrelitigationMediation.endTime}" pattern="yyyy-MM-dd"/>"/>
                                 </input>
                             </div>
@@ -96,12 +96,8 @@
                         </div>
                         <div class="layui-item layui-col-sm6 lw7">
                             <label class="layui-form-label"><span class="require-item">*</span>纠纷发生地:</label>
-                            <div class="layui-input-block with-icon">
-                                <sys:treeselect id="area" name="area.id" disabled="disabled" value="${projectNonPrelitigationMediation.area.id}" labelName="area.name"
-                                                labelValue="${projectNonPrelitigationMediation.area.name}"
-                                                cssStyle="background-color:#fff"
-                                                title="区域" url="/sys/area/treeData" cssClass="form-control required layui-input"
-                                                allowClear="true" notAllowSelectParent="false"/>
+                            <div class="layui-input-block">
+                                <input placeholder="纠纷发生地" readonly="true" id="areaName" htmlEscape="false" value="${projectNonPrelitigationMediation.area.name}" class="form-control layui-input"/>
                             </div>
                         </div>
                         <div class="layui-item layui-col-sm6 lw7">
@@ -129,31 +125,31 @@
                                 <form:input placeholder="请输入被告2" readonly="true" path="defendantSecond" id="defendantSecond" htmlEscape="false" class="form-control layui-input"/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12 with-textarea">
+                        <div class="layui-item layui-col-sm12 with-textarea lw7">
                             <label class="layui-form-label">调解过程:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="mediationProcess" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="mediationProcess" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入调解过程" class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">原告诉讼请求:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="plaintiffClaim" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="plaintiffClaim" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入原告诉讼请求"  class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">被告答辩意见:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="respondentOpinion" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="respondentOpinion" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入被告答辩意见"  class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">无争议的事实:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="undisputedFact" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="undisputedFact" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入无争议的事实"  class="form-control "/>
                             </div>
                         </div>

+ 4 - 4
src/main/webapp/webpage/modules/disputeMediation/projectNonPrelitigationMediation/projectNonPrelitigationMediationForm.jsp

@@ -289,28 +289,28 @@
                             <form:input placeholder="请输入被告2" maxlength="64" path="defendantSecond" id="defendantSecond" htmlEscape="false" class="form-control layui-input"/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12 with-textarea">
+                    <div class="layui-item layui-col-sm12 with-textarea lw7">
                         <label class="layui-form-label">调解过程:</label>
                         <div class="layui-input-block">
                             <form:textarea path="mediationProcess" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入调解过程" class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">原告诉讼请求:</label>
                         <div class="layui-input-block">
                             <form:textarea path="plaintiffClaim" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入原告诉讼请求"  class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">被告答辩意见:</label>
                         <div class="layui-input-block">
                             <form:textarea path="respondentOpinion" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入被告答辩意见"  class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">无争议的事实:</label>
                         <div class="layui-input-block">
                             <form:textarea path="undisputedFact" htmlEscape="false" rows="4" maxlength="500"

+ 12 - 16
src/main/webapp/webpage/modules/disputeMediation/projectPrelitigationMediation/projectPrelitigationMediationDetail.jsp

@@ -112,11 +112,11 @@
                         <div class="layui-item layui-col-sm6 lw7">
                             <label class="layui-form-label"><span class="require-item">*</span>调解期间:</label>
                             <div class="layui-input-block readOnlyFFF">
-                                <input id="startTime" disabled="disabled" placeholder="开始时间" readonly="true" name="startTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                <input id="startTime" disabled="disabled" style="background-color: #f1f1f1" placeholder="开始时间" readonly="true" name="startTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
                                        value="<fmt:formatDate value="${projectPrelitigationMediation.startTime}" pattern="yyyy-MM-dd"/>"/>
                                 </input>
                                 <span class="group-sep">-</span>
-                                <input id="endTime" disabled="disabled" placeholder="结束时间" readonly="true" name="endTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                <input id="endTime" disabled="disabled" style="background-color: #f1f1f1" placeholder="结束时间" readonly="true" name="endTime" type="text"  maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
                                        value="<fmt:formatDate value="${projectPrelitigationMediation.endTime}" pattern="yyyy-MM-dd"/>"/>
                                 </input>
                             </div>
@@ -129,12 +129,8 @@
                         </div>
                         <div class="layui-item layui-col-sm6 lw7">
                             <label class="layui-form-label"><span class="require-item">*</span>纠纷发生地:</label>
-                            <div class="layui-input-block with-icon">
-                                <sys:treeselect id="area" name="area.id" disabled="disabled" value="${projectPrelitigationMediation.area.id}" labelName="area.name"
-                                                labelValue="${projectPrelitigationMediation.area.name}"
-                                                cssStyle="background-color:#fff"
-                                                title="区域" url="/sys/area/treeData" cssClass="form-control required layui-input"
-                                                allowClear="true" notAllowSelectParent="false"/>
+                            <div class="layui-input-block">
+                                <input placeholder="纠纷发生地" readonly="true" id="areaName" htmlEscape="false" value="${projectPrelitigationMediation.area.name}" class="form-control layui-input"/>
                             </div>
                         </div>
                         <div class="layui-item layui-col-sm6 lw7">
@@ -162,31 +158,31 @@
                                 <form:input placeholder="请输入被告2" readonly="true" path="defendantSecond" id="defendantSecond" htmlEscape="false" class="form-control layui-input"/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12 with-textarea">
+                        <div class="layui-item layui-col-sm12 with-textarea lw7">
                             <label class="layui-form-label">调解过程:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="mediationProcess" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="mediationProcess" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入调解过程" class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">原告诉讼请求:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="plaintiffClaim" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="plaintiffClaim" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入原告诉讼请求"  class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">被告答辩意见:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="respondentOpinion" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="respondentOpinion" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入被告答辩意见"  class="form-control "/>
                             </div>
                         </div>
-                        <div class="layui-item layui-col-sm12  with-textarea">
+                        <div class="layui-item layui-col-sm12  with-textarea lw7">
                             <label class="layui-form-label ">无争议的事实:</label>
                             <div class="layui-input-block">
-                                <form:textarea path="undisputedFact" readonly="true" htmlEscape="false" rows="4" maxlength="500"
+                                <form:textarea path="undisputedFact" style="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4" maxlength="500"
                                                placeholder="请输入无争议的事实"  class="form-control "/>
                             </div>
                         </div>

+ 4 - 4
src/main/webapp/webpage/modules/disputeMediation/projectPrelitigationMediation/projectPrelitigationMediationForm.jsp

@@ -278,28 +278,28 @@
                             <form:input placeholder="请输入被告2" maxlength="64" path="defendantSecond" id="defendantSecond" htmlEscape="false" class="form-control layui-input"/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12 with-textarea">
+                    <div class="layui-item layui-col-sm12 with-textarea lw7">
                         <label class="layui-form-label">调解过程:</label>
                         <div class="layui-input-block">
                             <form:textarea path="mediationProcess" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入调解过程" class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">原告诉讼请求:</label>
                         <div class="layui-input-block">
                             <form:textarea path="plaintiffClaim" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入原告诉讼请求"  class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">被告答辩意见:</label>
                         <div class="layui-input-block">
                             <form:textarea path="respondentOpinion" htmlEscape="false" rows="4" maxlength="500"
                                            placeholder="请输入被告答辩意见"  class="form-control "/>
                         </div>
                     </div>
-                    <div class="layui-item layui-col-sm12  with-textarea">
+                    <div class="layui-item layui-col-sm12  with-textarea lw7">
                         <label class="layui-form-label ">无争议的事实:</label>
                         <div class="layui-input-block">
                             <form:textarea path="undisputedFact" htmlEscape="false" rows="4" maxlength="500"

+ 29 - 23
src/main/webapp/webpage/modules/personOpinion/personOpinionList.jsp

@@ -35,7 +35,7 @@
                 console.log('identificationFirst',identificationFirst)
                 console.log('identificationSecond',identificationSecond)
                 console.log('identificationThird',identificationThird)
-                if (undefined != identificationFirst && null != identificationFirst && "" != identificationFirst){
+                /*if (undefined != identificationFirst && null != identificationFirst && "" != identificationFirst){
                     $.ajax({
                         type:"post",
                         url:'${ctx}/personOpinion/personOpinion/getMessage',
@@ -60,6 +60,7 @@
                         dataType:"json",
                         async: false,
                         success:function(data){
+                            console.log(data)
                             if(data) {
                                 for (var info in data){
                                     $('#identificationThird').append(new Option(data[info].label,data[info].value));
@@ -68,7 +69,7 @@
                         }
                     })
                     layui.form.render("select");
-                }
+                }*/
 
             });
             validateForm = $("#inputForm").validate({
@@ -161,6 +162,10 @@
             $("#inputForm").submit();
             return false;
         }
+        function sortOrRefresh(){//重置,页码清零
+            $("#inputForm").submit();
+            return false;
+        }
         function page(n,s){//翻页
             $("#pageNo").val(n);
             $("#pageSize").val(s);
@@ -180,8 +185,9 @@
                     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                     <input id="toflag" name="toflag" type="hidden" value="1"/>
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
                     <div class="commonQuery lw12" style="margin-bottom: 20px;">
-                        <div class="layui-item query athird">
+                        <div class="layui-item query athird" style="width: 25%">
                             <label class="layui-form-label">一级模板类型:</label>
                             <div class="layui-input-block readOnlyFFF">
                                     <%--                <form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>--%>
@@ -193,7 +199,7 @@
                                 </select>
                             </div>
                         </div>
-                        <div class="layui-item query athird">
+                        <div class="layui-item query athird" style="width: 25%">
                             <label class="layui-form-label double-line">二级模板类型:</label>
                             <div class="layui-input-block readOnlyFFF">
                                 <select class="form-control  simple-select" id="identificationSecond" name="identificationSecond" lay-filter="secondFilter">
@@ -204,16 +210,7 @@
                                 </select>
                             </div>
                         </div>
-                        <div class="layui-item athird">
-                            <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
-                            <div class="layui-btn-group search-spacing">
-                                <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
-                                <button id="searchReset" class="layui-btn layui-btn-sm " onclick="rereset()">重置</button>
-                            </div>
-                        </div>
-                    </div>
-                    <div id="moresees" class="commonQuery lw12" style="clear:both;display:none;">
-                        <div class="layui-item query athird">
+                        <div class="layui-item query athird" style="width: 25%">
                             <label class="layui-form-label double-line">三级模板类型:</label>
                             <div class="layui-input-block readOnlyFFF">
                                 <select class="form-control  simple-select" id="identificationThird" name="identificationThird" lay-filter="thirdFilter" >
@@ -224,7 +221,16 @@
                                 </select>
                             </div>
                         </div>
-                        <div class="layui-item query athird">
+                        <div class="layui-item athird" style="width: 25%">
+                            <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                            <div class="layui-btn-group search-spacing">
+                                <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+                                <button id="searchReset" class="layui-btn layui-btn-sm " onclick="rereset()">重置</button>
+                            </div>
+                        </div>
+                    </div>
+                    <div id="moresees" class="commonQuery lw12" style="clear:both;display:none;">
+                        <div class="layui-item query athird" style="width: 25%">
                             <label class="layui-form-label">模板内容:</label>
                             <div class="layui-input-block">
                                 <form:input path="content" htmlEscape="false" maxlength="64"   class=" form-control layui-input"/>
@@ -248,26 +254,26 @@
 
                 <table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
                     <thead>
-                    <th width="20%">模板类型</th>
-                    <th width="40%">模板</th>
-                    <th width="10%">创建人</th>
-                    <th width="10%">创建时间</th>
-                    <th width="20%">操作</th>
+                    <th width="200px">模板类型</th>
+                    <th >模板</th>
+                    <th width="100px">创建人</th>
+                    <th width="100px">创建时间</th>
+                    <th width="160px">操作</th>
                     </thead>
                     <tbody>
                     <c:forEach items="${page.list}" var="tem">
                         <tr align="center" >
                             <td>${tem.name}</td>
-                            <td><span title="${tem.content}" style="width:200px;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;">${tem.content}</span></td>
+                            <td><span title="${tem.content}">${tem.content}</span></td>
                             <td>${tem.createBy.name}</td>
                             <td><fmt:formatDate value="${tem.createDate}" pattern="yyyy-MM-dd"/></td>
                             <td>
                                 <div class="layui-btn-group">
                                     <div class="op-btn-box">
-                                        <a href="${ctx}/personOpinion/personOpinion/delete?id=${tem.id}" onclick="return deleteByid('确认要删除该审核模板吗?', this.href)"   class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
+                                        <a style="color: white" onclick="openDialogre('修改模板', '${ctx}/personOpinion/personOpinion/toAddSave?id=${tem.id}','80%', '70%','','修改,关闭')" class="layui-btn layui-btn-xs" >修改</a>
                                     </div>
                                     <div class="op-btn-box">
-                                            <a style="color: white" onclick="openDialogre('修改模板', '${ctx}/personOpinion/personOpinion/toAddSave?id=${tem.id}','80%', '70%','','修改,关闭')" class="layui-btn layui-btn-xs" >修改</a>
+                                        <a href="${ctx}/personOpinion/personOpinion/delete?id=${tem.id}" onclick="return deleteByid('确认要删除该审核模板吗?', this.href)"   class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
                                     </div>
                                 </div>
                             </td>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp

@@ -108,7 +108,7 @@
 			}
 		});
         $(document).ready(function() {
-        	var materialDefectRecordsRemarks = '${materialDefectRecords.remarks}'
+        	var materialDefectRecordsRemarks = `${materialDefectRecords.remarks}`
 			if(materialDefectRecordsRemarks){
 				$("#materialDefectRecordsRemarks").val(materialDefectRecordsRemarks)
 			}

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp

@@ -1982,7 +1982,7 @@
 			title:"意见",
 			name:'friend',
 			skin:"two-btns",
-			content: encodeURI("${ctx}/ruralProject/ruralCostProjectMessageNew/selectReproject?auditOpinion="+value+"&identification=${identifications}"),
+			content: encodeURI("${ctx}/ruralProject/ruralCostProjectMessageNew/selectReproject?auditOpinion="+value+"&identification=${identificationstwo}"),
 			btn: ['确定', '关闭'],
 			yes: function(index, layero){
 				var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();

+ 1 - 1
src/main/webapp/webpage/modules/signatureManagement/electronicSignature/districtDirectorApplicationList.jsp

@@ -465,7 +465,7 @@
                 {
                     "index":"${index.index+1}"
                     ,"id":"${districtDirectorApplication.id}"
-                    ,"officeName":"${districtDirectorApplication.office.name}"
+                    ,"officeName":"${districtDirectorApplication.office.showName}"
                     ,"areaName":"<c:out value="${districtDirectorApplication.area.name}" escapeXml="false"/>"
                     ,"createDate":"<fmt:formatDate value="${districtDirectorApplication.createDate}" pattern="yyyy-MM-dd"/>"
                     ,"status":"${districtDirectorApplication.status}"

+ 1 - 1
src/main/webapp/webpage/modules/sys/sysLogin.jsp

@@ -18,7 +18,7 @@
 	<link href="${ctxStatic}/awesome/4.4/css/font-awesome.min.css" rel="stylesheet" />
 	<!-- jeeplus -->
 	<link href="${ctxStatic}/common/jeeplus.css" type="text/css" rel="stylesheet" />
-	<script src="${ctxStatic}/common/jeeplus.js?20" type="text/javascript"></script>
+	<script src="${ctxStatic}/common/jeeplus.js?22" type="text/javascript"></script>
 	<link rel="shortcut icon" href="images/favicon.png" type="image/png">
 	<!-- text fonts -->
 	<link rel="stylesheet" href="${ctxStatic }/common/login/ace-fonts.css" />

+ 1 - 1
src/main/webapp/webpage/modules/sys/sysLogin2.jsp

@@ -16,7 +16,7 @@
 		<link href="${ctxStatic}/awesome/4.4/css/font-awesome.min.css" rel="stylesheet" />
 		<!-- jeeplus -->
 		<link href="${ctxStatic}/common/jeeplus.css" type="text/css" rel="stylesheet" />
-		<script src="${ctxStatic}/common/jeeplus.js?20" type="text/javascript"></script>
+		<script src="${ctxStatic}/common/jeeplus.js?22" type="text/javascript"></script>
 		<link rel="shortcut icon" href="images/favicon.png" type="image/png">
 		<!-- text fonts -->
 		<link rel="stylesheet" href="${ctxStatic }/common/login/ace-fonts.css" />

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

@@ -704,7 +704,7 @@
 				,{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:140,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
 				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){

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

@@ -784,7 +784,7 @@
 				,{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:140,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
 				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){

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

@@ -828,7 +828,7 @@
 				,{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:140,templet:function(d){
 						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
 					}}
 				,{field:'money',align:'center', title: '开票总金额(元)',  width:130,templet:function(d){
@@ -879,7 +879,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
 						return xml;
 					}}
-				,{align:'center', title: '作废状态', fixed: 'right', width:70,templet:function(d){
+				/*,{align:'center', title: '作废状态', fixed: 'right', width:70,templet:function(d){
 						<%--var st = getAuditState(d.status);--%>
 
 						<%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workinvoice/workInvoice/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
@@ -890,7 +890,7 @@
 						else
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >"+ st.status + "</span>";
 						return xml;
-					}}
+					}}*/
 				,{field:'op',align:'center',title:"操作",fixed: 'right',width:140,templet:function(d){
 						////对操作进行初始化
 						var xml="<div class=\"layui-btn-group\">";
@@ -931,7 +931,7 @@
 						if(d.cancellationFlag != undefined && d.cancellationFlag =="1")
 						{
 							xml +="<a href=\"javascript:void(0)\" onclick=\"openElectronicInvoiceDialogreplay('上传电子发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/electronicInvoiceForm?id=" + d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 上传电子发票</a>";
-							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 作废</a>";
+							//xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 作废</a>";
 						}
 						if(d.conditionCanedit != undefined && d.conditionCanedit =="1")
 						{

File diff suppressed because it is too large
+ 1349 - 0
src/main/webapp/webpage/modules/workreimbursement/replenish/workReimbursementReplenishAudit.jsp


File diff suppressed because it is too large
+ 1349 - 0
src/main/webapp/webpage/modules/workreimbursement/replenish/workReimbursementReplenishCwAudit.jsp


+ 96 - 3
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -274,8 +274,22 @@
                 }}
         ]
 
+        var replenishStatusView = [
+            {align:'center', title: '附件补充', width:80, templet:function(d){
+                    var st = getReplenishAuditState(d.replenishStatus);
+                    var xml;
+                    if (st.action) {
+                        xml = "<span onclick=\"openDialogView('报销单附件补充流程追踪', '${ctx}/workReimbursementReplenish/workReimbursementReplenish/getProcessOne?id=" + d.replenishId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                    } else {
+                        xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                    }
+                    return xml;
+                }}
+        ];
+
+
         var bottomView = [
-            {align:'center', title: '操作', width:130, templet:function(d){
+            {align:'center', title: '操作', width:200, templet:function(d){
                     var xml = "<div class=\"layui-btn-group\">";
                     if (d.notifyFlag != undefined && d.notifyFlag !=null && d.notifyFlag == 1) {
                         xml += "<a href=\"#\" onclick=\"notifyDialogre('报销审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.notifyId +"&home=reimbursement&pageFlag=all','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" >审批</a>";
@@ -304,9 +318,24 @@
                     if (d.candelete != undefined && d.candelete == "1") {
                         xml += "<a href=\"${ctx}/workreimbursement/workReimbursementAll/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该报销单吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\">删除</a>";
                     }
-                    if (<%=admin%> && d.status == "5") {
+                    if (<%=admin%>) {
                         xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogreAdminModify('管理员修改报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" >修改</a>";
                     }
+
+                    if (d.replenish5 != undefined && d.replenish5 == "1") {
+                        xml += "<a href=\"${ctx}/workReimbursementReplenish/workReimbursementReplenish/save?reimbursementId=" + d.id + "\" onclick=\"return confirmx('确认要对该报销单发起人发起文件补充吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-info\" >文件补充</a>";
+                    }
+
+                    if (d.replenish1 != undefined && d.replenish1 == "1") {
+                        xml += "<a href=\"${ctx}/workReimbursementReplenish/workReimbursementReplenish/cancelInvalidate?reimbursementId="+ d.id + "&id="+ d.replenishId +"\" onclick=\"return confirmx('确认要强制撤回?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\">补充撤回</a>";
+                    }
+                    if (d.replenish2 != undefined && d.replenish2 == "1") {
+                        xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改报销单', '${ctx}/workReimbursementReplenish/workReimbursementReplenish/modify?reimbursementId="+ d.id + "&id="+ d.replenishId +"','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\">补充修改</a>";
+                    }
+                    if (d.replenish3 != undefined && d.replenish3 == "1") {
+                        xml += "<a href=\"${ctx}/workReimbursementReplenish/workReimbursementReplenish/save?reimbursementId="+ d.id + "&id="+ d.replenishId +"\" onclick=\"return confirmx('确认要对该报销单发起人发起文件补充吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\">文件补充</a>";
+                    }
+
                     xml += "</div>";
                     return xml;
                 }}
@@ -334,6 +363,7 @@
         topView.push(...middleView);
 
         <shiro:hasPermission name="workreimbursement:workReimbursementAll:paymentStatus">
+        topView.push(...replenishStatusView);
         topView.push(...paymentStatusView);
         </shiro:hasPermission>
         topView.push(...bottomView);
@@ -360,7 +390,7 @@
                     ,"reimbursementType":"${workReimbursement.reimbursementType}"
                     ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
                     ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
-                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"
+                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).showName}"
                     ,"proId":"${workReimbursement.project.projectId}"
                     ,"projectId":
                         <c:if test="${workReimbursement.ext == 1}">
@@ -408,6 +438,30 @@
                     ,"paymentFlag":"1"
                     </shiro:hasPermission>
                     ,"paymentDate":"<fmt:formatDate value="${workReimbursement.paymentDate}" pattern="yyyy-MM-dd"/>"
+                    ,"replenishId":"${workReimbursement.replenishId}"
+                    ,"replenishUserId":"${workReimbursement.replenishUserId}"
+                    ,"replenishStatus":"${workReimbursement.replenishStatus}"
+                    ,"replenishDate":"<fmt:formatDate value="${workReimbursement.replenishDate}" pattern="yyyy-MM-dd"/>"
+                    <shiro:hasPermission name="workreimbursement:workReimbursementAll:paymentStatus">
+                        ,"replenish1":
+                            <c:if test="${fns:getUser().id == workReimbursement.replenishUserId && workReimbursement.replenishStatus == '2'}">"1"</c:if>
+                        <c:if test="${fns:getUser().id != workReimbursement.replenishUserId || workReimbursement.replenishStatus != '2'}">"0"</c:if>
+                        ,"replenish2":
+                            <c:if test="${fns:getUser().id == workReimbursement.replenishUserId && workReimbursement.replenishStatus == '4'}">"1"</c:if>
+                        <c:if test="${fns:getUser().id != workReimbursement.replenishUserId || workReimbursement.replenishStatus != '4'}">"0"</c:if>
+                        ,"replenish3":
+                            <c:if test="${workReimbursement.replenishStatus == '3' && fns:getUser().id == workReimbursement.replenishUserId}">"1"</c:if>
+                        <c:if test="${workReimbursement.replenishStatus != '3' || fns:getUser().id != workReimbursement.replenishUserId}">"0"</c:if>
+                        ,"replenish5":
+                            <c:choose>
+                                <c:when test="${workReimbursement.replenishStatus != '2' && workReimbursement.replenishStatus != '3' && workReimbursement.replenishStatus != '4'}">
+                                    "1"
+                                </c:when>
+                                <c:otherwise>
+                                    "0"
+                                </c:otherwise>
+                            </c:choose>
+                    </shiro:hasPermission>
                 }
                 </c:forEach>
                 </c:if>
@@ -458,6 +512,45 @@
         $("#"+obj).show();
         $("#"+obj).siblings().hide();
     }
+
+    function openDialogres(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['送审','关闭'],
+            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){
+            }
+        });
+    }
+
+
     function openDialogre(title,url,width,height,target){
 
         if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗

+ 2 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp

@@ -34,7 +34,7 @@
             }else {
                 $(".isPublic").removeClass("hide");
             }
-            var state=${isShow};
+            var state=`${isShow}`;
             if (state =='0'){
                 $(".isShow").hide();
             }else {
@@ -70,6 +70,7 @@
             });
 
             var invoiceVATTaxes = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+            console.log(invoiceVATTaxes)
             var reimbursementElectronicInvoiceVATTaxesMoneys = "";
             var reimbursementElectronicInvoiceVATTaxesTaxAmount = "";
             var reimbursementElectronicInvoiceVATTaxesSumMoney = "";

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

@@ -405,7 +405,7 @@
                     ,"reimbursementType":"${workReimbursement.reimbursementType}"
                     ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
                     ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
-                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"
+                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).showName}"
                     ,"proId":"${workReimbursement.project.projectId}"
                     ,"projectId":
                         <c:if test="${workReimbursement.ext == 1}">

+ 4 - 4
src/main/webapp/webpage/modules/workstaff/qualificationList.jsp

@@ -140,10 +140,10 @@
                         </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">
                             <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
-                                            title="部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input required" notAllowSelectParent="false" allowInput="true"/>
+                                            title="经办部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input required" notAllowSelectParent="false" allowInput="true"/>
                         </div>
                     </div>
                     <%--<div class="layui-item query athird">
@@ -245,7 +245,7 @@
                 ,{field:'certificateName',align:'center', title: '证书',minWidth:150}
                 ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
                 ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
-                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                ,{field:'office',align:'center', title: '经办部门', minWidth:100}
                 ,{field:'role',align:'center', title: '岗位', minWidth:100}
                 ,{field:'highestEducation',align:'center', title: '最高学历', minWidth:100}
 
@@ -289,7 +289,7 @@
                     ,"name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
                     ,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
                     ,'mobile':"<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
-                    ,'office':"<c:out value="${workStaffBasicInfo.office.name}" escapeXml="true"/>"
+                    ,'office':"<c:out value="${workStaffBasicInfo.office.showName}" escapeXml="true"/>"
                     ,'jobGrade':"<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
                     ,'status':"<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
                     ,'highestEducation':"<c:out value="${workStaffBasicInfo.highestEducation}"/>"

+ 1 - 1
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

@@ -374,7 +374,7 @@
                     ,"name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
                     ,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
                     ,'mobile':"<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
-                    ,'office':"<c:out value="${workStaffBasicInfo.office.name}" escapeXml="true"/>"
+                    ,'office':"<c:out value="${workStaffBasicInfo.office.showName}" escapeXml="true"/>"
                     ,'jobGrade':"<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
                     ,'status':"<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
                     ,"userId":"${workStaffBasicInfo.userId}"