Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

sangwenwei 1 vuosi sitten
vanhempi
commit
0626ee6704
36 muutettua tiedostoa jossa 6466 lisäystä ja 177 poistoa
  1. 131 0
      src/main/java/com/jeeplus/common/service/BaseService.java
  2. 6 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageElectronicSealDao.java
  3. 62 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageElectronicSealService.java
  4. 49 9
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  5. 85 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageElectronicSealController.java
  6. 7 0
      src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java
  7. 9 0
      src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java
  8. 75 6
      src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java
  9. 1 1
      src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java
  10. 9 0
      src/main/java/com/jeeplus/modules/workprojectnotify/entity/WorkProjectNotify.java
  11. 32 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  12. 24 0
      src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java
  13. 9 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  14. 28 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursementadminupdatehistory.java
  15. 92 23
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java
  16. 75 4
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  17. 263 48
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementAllController.java
  18. 51 5
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java
  19. 131 54
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementNewController.java
  20. 1 1
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  21. 4 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageElectronicSealDao.xml
  22. 76 9
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  23. 35 0
      src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml
  24. 64 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  25. 1 1
      src/main/webapp/static/common/css/style.css
  26. 335 3
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp
  27. 16 2
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/electronicSeal/ruralProjectMessageElectronicSealList.jsp
  28. 1680 0
      src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormAdd.jsp
  29. 908 0
      src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormDetail.jsp
  30. 1954 0
      src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllModifyApply.jsp
  31. 1 0
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp
  32. 8 9
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewFormAdd.jsp
  33. 79 0
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursmentHistoryView.jsp
  34. 110 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp
  35. 8 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  36. 47 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

+ 131 - 0
src/main/java/com/jeeplus/common/service/BaseService.java

@@ -55,6 +55,18 @@ public abstract class BaseService {
         return genSqlString("menu1_",user, menuId,sAlias, "and");
     }
 
+    /**
+     * 数据范围过滤
+     *
+     * @param user        当前用户对象,通过“entity.getCurrentUser()”获取
+     * @param officeAlias 机构表别名,多个用“,”逗号隔开。
+     * @param userAlias   用户表别名,多个用“,”逗号隔开,传递空,忽略此参数
+     * @return 标准连接条件对象
+     */
+    public static String invoiceDataScopeFilter(User user, String officeAlias, String userAlias, String sAlias, String menuId) {
+        return genInvoiceSqlString("menu1_",user, menuId,sAlias, "and");
+    }
+
     public static String genSqlString(String prefix, User user, String menuId,String sAlias, String logic) {
         if (user.isAdmin()) {
             return "";
@@ -174,6 +186,125 @@ public abstract class BaseService {
         }
     }
 
+    public static String genInvoiceSqlString(String prefix, User user, String menuId,String sAlias, String logic) {
+        if (user.isAdmin()) {
+            return "";
+        }
+        Jedis jedis = null;
+        try {
+            jedis = JedisUtils.getResource();
+            StringBuilder sqlString = new StringBuilder();
+            String sql = jedis.hget( prefix+ user.getCompany().getId() + "_" + user.getId(), menuId);
+            if (StringUtils.isNotBlank(sql)) {
+                //return sql;
+            }
+            // 进行权限过滤,多个岗位权限范围之间为或者关系。
+            List<Role> fnlRoleList = new ArrayList<>();
+            List<Role> selfRoleList = new ArrayList<>();
+            List<Role> roleList = UserUtils.getRolesByMenu(user, menuId);
+            if (roleList != null && roleList.size() > 0) {
+                for (Role role : roleList) {
+                    if (Role.DATA_SCOPE_COMPANY_AND_CHILD.equals(role.getDataScope())) {
+                        fnlRoleList.clear();
+                        fnlRoleList.add(role);
+                        break;
+                    } else if (!Role.DATA_SCOPE_SELF.equals(role.getDataScope())) {
+                        fnlRoleList.add(role);
+                    } else {
+                        selfRoleList.add(role);
+                    }
+                }
+            }
+            Set<String> officeSet = new HashSet<>();
+            for (Role r : fnlRoleList) {
+                if (Role.DATA_SCOPE_COMPANY_AND_CHILD.equals(r.getDataScope())) {
+                    if(StringUtils.isBlank(sAlias)){
+                        return logic + "1=1";
+                    }
+                    sqlString.append(logic + " a.company_id = '" + r.getCompany().getId() + "'");
+                    return sqlString.toString();
+                }
+                if (Role.DATA_SCOPE_COMPANY.equals(r.getDataScope())) {
+                    if(null == r.getBranchCompany()){
+                        sqlString.append(logic + " a.company_id = '" + r.getCompany().getId() + "'");
+                        return sqlString.toString();
+                    }
+                    //查询分公司的所有部门
+                    String key = BRANCH_OFFICE_PREFIX + r.getBranchCompany().getId();
+                    String s = jedis.get(key);
+                    List<String> officeIds = null;
+                    if (StringUtils.isBlank(s)) {
+                        officeIds = UserUtils.findBranchOfficeId(r.getBranchCompany());
+                    } else {
+                        officeIds = JSON.parseArray(s, String.class);
+                    }
+                    if (officeIds != null && officeIds.size() > 0) {
+                        jedis.set(key, JSON.toJSONString(officeIds));
+                        jedis.expire(key, 60 * 60 * 8);
+                        officeSet.addAll(officeIds);
+                    }
+                    continue;
+                }
+                if (Role.DATA_SCOPE_OFFICE_AND_CHILD.equals(r.getDataScope())) {
+                    //查询当前部门的所有子部门
+                    String key = CHILD_OFFICE_PREFIX + r.getOffice().getId();
+                    String s = jedis.get(key);
+                    List<String> officeIds = new ArrayList<>();
+                    if (StringUtils.isBlank(s)) {
+                        officeIds = UserUtils.findChildOfficeId(r.getOffice());
+                    } else {
+                        officeIds = JSON.parseArray(s, String.class);
+                    }
+                    officeIds.add(r.getOffice().getId());
+                    jedis.set(key, JSON.toJSONString(officeIds));
+                    jedis.expire(key, 60 * 60 * 8);
+                    officeSet.addAll(officeIds);
+                    continue;
+                }
+                if (Role.DATA_SCOPE_OFFICE.equals(r.getDataScope())) {
+                    officeSet.add(r.getOffice().getId());
+                    continue;
+                }
+            }
+            //所有部门权限
+            if (officeSet != null) {
+                if (officeSet.size() > 1) {
+                    sqlString.append("a.office_id in (");
+                    for (String s : officeSet) {
+                        sqlString.append("'" + s + "',");
+                    }
+                    sqlString.deleteCharAt(sqlString.length() - 1);
+                    sqlString.append(")");
+                } else if (officeSet.size() == 1) {
+                    for (String s : officeSet) {
+                        sqlString.append("a.office_id ='" + s + "'");
+                    }
+                }
+            }
+            //所有个人权限
+            for (int i = 0; i < selfRoleList.size(); i++) {
+                Role role = selfRoleList.get(i);
+                if (officeSet.contains(role.getOffice().getId())) {
+                    continue;
+                }
+                if (i > 0 || sqlString.length() > 0) {
+                    sqlString.append("or ");
+                }
+                sqlString.append( "a.create_by='" + user.getId() + "'");
+            }
+
+            if (StringUtils.isNotBlank(sqlString.toString())) {
+                sql = logic+" (" + sqlString.toString() + ")";
+                jedis.hset(prefix + user.getCompany().getId() + "_" + user.getId(), menuId, sql);
+            }
+            return sql;
+        } catch (Exception e) {
+            return "and a.company_id='" + user.getCompany().getId() + "' and a.create_by='" + user.getId() + "'";
+        } finally {
+            JedisUtils.returnResource(jedis);
+        }
+    }
+
     /**
      * 数据范围过滤
      *

+ 6 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageElectronicSealDao.java

@@ -210,4 +210,10 @@ public interface RuralProjectMessageElectronicSealDao extends CrudDao<ProjectRep
      * @return
      */
     ProjectReportSignatureInfo getInternalAuditByReportNumber(String reportNumber);
+
+    /**
+     * 根据通知title 删除通知信息
+     * @param title
+     */
+    void deleteWorkProjectNotifyByReportId(String title);
 }

+ 62 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageElectronicSealService.java

@@ -2193,6 +2193,68 @@ public class RuralProjectMessageElectronicSealService extends CrudService<RuralP
     }
 
 
+    /**
+     * 审定单签章撤回(审核完成后进行撤回)
+     * @param projectApprovalSignature
+     * @throws Exception
+     */
+    @Transactional(readOnly = false)
+    public void cancelApprovalStatusByAdmin(ProjectApprovalSignature projectApprovalSignature) {
+        RuralProjectRecords projectRecords = projectRecordsService.get(projectApprovalSignature.getProjectId());
+        ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectRecords.getId());
+        //修改审核状态为暂存
+        //结束该流程,设为"撤销"状态月
+        ProjectApprovalSignature sendMessage = new ProjectApprovalSignature();
+        sendMessage.setId(projectApprovalSignature.getId());
+        sendMessage.setStatus(ProjectStatusEnum.TSTORE.getValue());
+        sendMessage.preUpdate();
+        dao.updateApprovalSignature(sendMessage);
+        //将通知表中对应的数据进行删除
+
+        dao.deleteWorkProjectNotifyByReportId("报告号【" + projectReportData.getNumber() + "】审定单签章审批登记完成");
+    }
+
+    /**
+     * 报告签章撤回(审核完成后进行撤回)
+     * @param projectApprovalSignature
+     * @throws Exception
+     */
+    @Transactional(readOnly = false)
+    public void cancelReportSignatureStatusByAdmin(ProjectReportSignature projectApprovalSignature) {
+        RuralProjectRecords projectRecords = projectRecordsService.get(projectApprovalSignature.getProjectId());
+        ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectRecords.getId());
+        //修改审核状态为暂存
+        //结束该流程,设为"撤销"状态月
+        ProjectReportSignature sendMessage = new ProjectReportSignature();
+        sendMessage.setId(projectApprovalSignature.getId());
+        sendMessage.setStatus(ProjectStatusEnum.TSTORE.getValue());
+        sendMessage.preUpdate();
+        dao.updateReportSignature(sendMessage);
+        //将通知表中对应的数据进行删除
+
+        dao.deleteWorkProjectNotifyByReportId("报告号【" + projectReportData.getNumber() + "】报告签章审批登记完成");
+    }
+
+    /**
+     * 内审报告签章撤回(审核完成后进行撤回)
+     * @param projectApprovalSignature
+     * @throws Exception
+     */
+    @Transactional(readOnly = false)
+    public void cancelReportInternalAuditSignatureStatusByAdmin(ProjectReportSignature projectApprovalSignature) {
+        RuralProjectRecords projectRecords = projectRecordsService.get(projectApprovalSignature.getProjectId());
+        ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectRecords.getId());
+        //修改审核状态为暂存
+        //结束该流程,设为"撤销"状态月
+        ProjectReportSignature sendMessage = new ProjectReportSignature();
+        sendMessage.setId(projectApprovalSignature.getId());
+        sendMessage.setStatus(ProjectStatusEnum.TSTORE.getValue());
+        sendMessage.preUpdate();
+        dao.updateReportInternalAuditSignature(sendMessage);
+        //将通知表中对应的数据进行删除
+
+        dao.deleteWorkProjectNotifyByReportId("报告号【" + projectReportData.getNumber() + "】内审报告签章审批登记完成");
+    }
 
 
 

+ 49 - 9
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -992,13 +992,6 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	}
 
 	/**
-	 * 处理项目中上传文件的其他文件中的咨询合同列表(将项目合同中的附件信息添加进去)
-	 */
-	private void disposeWorkContractFile(){
-
-	}
-
-	/**
 	 * 管理员修改项目信息
 	 * @param projectRecords
 	 * @throws Exception
@@ -1018,6 +1011,48 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			company.setId(UserUtils.getUser().getCompany().getId());
 			office.setId(UserUtils.getUser().getOffice().getId());
 		}
+
+		//根据项目类型进行调整
+		synchronized (SYN_BYTE) {
+			if ("1".equals(projectRecords.getProjectType())) {	//工程咨询
+				if ("6".equals(projectRecords.getAttachmentProjectSort())) {
+					//工程造价鉴定 需要纸质归档
+					projectRecords.setPaperFilingStatus(null);
+				} else if ("7".equals(projectRecords.getAttachmentProjectSort())) {
+					projectRecords.setPaperFilingStatus("10");
+				} else if ("10".equals(projectRecords.getAttachmentProjectSort())) {	//工程咨询 配合类
+					projectRecords.setPaperFilingStatus("10");
+				} else {
+					projectRecords.setPaperFilingStatus("10");
+				}
+			} else if ("2".equals(projectRecords.getProjectType())) {	//造价审核
+				//预算审核、结算审核、分包审核 需要纸质归档
+				if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort())) {
+					projectRecords.setPaperFilingStatus(null);
+				}else{
+					projectRecords.setPaperFilingStatus("10");
+				}
+			}
+		}
+		//判断项目类型并判断项目类别
+		switch (projectRecords.getProjectType()){
+			case "1":
+				if("8".equals(projectRecords.getAttachmentProjectSort())){
+					projectRecords.setReportedState("10");
+				}else{
+					projectRecords.setReportedState(null);
+				}
+				break;
+			case "2":
+				if("5".equals(projectRecords.getAttachmentProjectSort()) || "6".equals(projectRecords.getAttachmentProjectSort()) || "8".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort())){
+					projectRecords.setReportedState("10");
+				}else{
+					projectRecords.setReportedState(null);
+				}
+				break;
+		}
+
+
 		projectRecords.setCompany(company);
 		projectRecords.setOffice(office);
 		projectRecords.preUpdate();
@@ -4712,10 +4747,15 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		Office office = officeService.get(officeId);
 		//如果访问的是2023年4月份之后的月报信息,则获取新的office信息
 		if(StringUtils.isBlank(isThisMonth) || !"1".equals(isThisMonth)){
-			projectRecords.getSqlMap().put("officeId", "or parent_ids like concat('%',#{officeId},'%')");
+			if(null != office && StringUtils.isNotBlank(office.getName()) && office.getName().equals("工程五部")){
+				statementCompanyComprehensiveInfo.setOfficeType("gcwb");
+			}else{
+				statementCompanyComprehensiveInfo.setOfficeType("other");
+			}
+			projectRecords.getSqlMap().put("officeId", "or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%')");
 		}else{
 			if(null != office && StringUtils.isNotBlank(office.getName()) && office.getName().equals("工程五部")){
-				projectRecords.getSqlMap().put("officeId", "or parent_ids like concat('%',#{officeId},'%')");
+				projectRecords.getSqlMap().put("officeId", "or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%')");
 			}else{
 				projectRecords.getSqlMap().put("officeId", "");
 			}

+ 85 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageElectronicSealController.java

@@ -1441,5 +1441,90 @@ public class RuralProjectMessageElectronicSealController extends BaseController
         return map;
     }
 
+    /**
+     * 已签章审定单撤回
+     * @param request
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "approvalAdminRevoke")
+    public String approvalAdminRevoke(HttpServletRequest request, RedirectAttributes redirectAttributes) {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+            ProjectApprovalSignature projectApprovalSignature = ruralProjectMessageElectronicSealService.getProjectApprovalSignature(id);
+
+            if(null != projectApprovalSignature && null != projectApprovalSignature.getStatus() && 5 != projectApprovalSignature.getStatus()){
+                addMessage(redirectAttributes, "审定单签章申请未发起或发起审批未通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+            }
+            assert projectApprovalSignature != null;
+            ruralProjectMessageElectronicSealService.cancelApprovalStatusByAdmin(projectApprovalSignature);
+            addMessage(redirectAttributes, "撤回该审定单签章申请成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该审定单签章申请失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+    }
+
+    /**
+     * 已签章报告撤回
+     * @param request
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "reportSignatureAdminRevoke")
+    public String reportSignatureAdminRevoke(HttpServletRequest request, RedirectAttributes redirectAttributes) {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+            ProjectReportSignature projectApprovalSignature = ruralProjectMessageElectronicSealService.getProjectReportSignature(id);
+
+            if(null != projectApprovalSignature && null != projectApprovalSignature.getStatus() && 5 != projectApprovalSignature.getStatus()){
+                addMessage(redirectAttributes, "报告签章申请未发起或发起审批未通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+            }
+            assert projectApprovalSignature != null;
+            ruralProjectMessageElectronicSealService.cancelReportSignatureStatusByAdmin(projectApprovalSignature);
+            addMessage(redirectAttributes, "撤回该报告签章申请成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该报告签章申请失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+    }
+
+    /**
+     * 已签章内审报告撤回
+     * @param request
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = "reportInternalAuditSignatureAdminRevoke")
+    public String reportInternalAuditSignatureAdminRevoke(HttpServletRequest request, RedirectAttributes redirectAttributes) {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+            ProjectReportSignature projectApprovalSignature = ruralProjectMessageElectronicSealService.getProjectReportInternalAudit(id);
+
+            if(null != projectApprovalSignature && null != projectApprovalSignature.getStatus() && 5 != projectApprovalSignature.getStatus()){
+                addMessage(redirectAttributes, "内审报告签章申请未发起或发起审批未通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+            }
+            assert projectApprovalSignature != null;
+            ruralProjectMessageElectronicSealService.cancelReportInternalAuditSignatureStatusByAdmin(projectApprovalSignature);
+            addMessage(redirectAttributes, "撤回该内审报告签章申请审批成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该内审报告签章申请审批失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/electronicSeal/?repage";
+    }
+
+
 
 }

+ 7 - 0
src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java

@@ -574,6 +574,13 @@ public interface StatementCompanyComprehensiveDao  extends CrudDao<StatementComp
      */
     List<StatementCompanyComprehensiveInfo> selectAllByTypeByYear(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 
+    /**
+     * 按照类型查询公司级所有报表信息 年度(五部)
+     * @param statementCompanyComprehensiveInfo
+     * @return
+     */
+    StatementCompanyComprehensiveInfo selectAllWbByTypeByYear(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
+
 
     /**
      * 根据类型查询公司及所有报表信息 已年级

+ 9 - 0
src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java

@@ -38,6 +38,7 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     private String field15;          //可变字段15(项目:B类批量归档 超期未归档)
     private String field16;          //可变字段16(项目:B类批量归档 超期归档)
     private String userName;        //用户名称
+    private String officeType;        //部门类型(用于区分是否是工程五部的限制条件)
 
     public String getYear() {
         return year;
@@ -302,4 +303,12 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     public void setUserName(String userName) {
         this.userName = userName;
     }
+
+    public String getOfficeType() {
+        return officeType;
+    }
+
+    public void setOfficeType(String officeType) {
+        this.officeType = officeType;
+    }
 }

+ 75 - 6
src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java

@@ -136,6 +136,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:开票报表
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("2");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList2 = this.selectAllByType(statementCompanyComprehensiveInfo);
         //各列合计
         String kpnum1 = "0";
@@ -161,6 +162,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:报销报表
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("3");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList3 = this.selectAllByType(statementCompanyComprehensiveInfo);
         //合计
         String bxnum1 = "0";
@@ -180,6 +182,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:合同报表
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("4");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList4= this.selectAllByType(statementCompanyComprehensiveInfo);
         //合计
         String htnum1 = "0";
@@ -205,6 +208,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:项目报表总览 年度级
         //type:类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("1");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList5 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
         //项目表 各列合计
         String xmnumyear1 = "0";
@@ -266,6 +270,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:开票报表开始
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("2");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList6 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
         //各列合计
         String kpyearnum1 = "0";
@@ -291,6 +296,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
     //公司级:报销报表
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("3");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList7 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
         //合计
         String bxyearnum1 = "0";
@@ -310,6 +316,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         //公司级:合同报表
         //类型(1:项目;2:开票;3:报销;4:合同)
         statementCompanyComprehensiveInfo.setType("4");
+        statementCompanyComprehensiveInfo.setOfficeIdList(new ArrayList<>());
         List<StatementCompanyComprehensiveInfo> reportFormList8= this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
         //合计
         String htyearnum1 = "0";
@@ -3670,7 +3677,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
     public List<StatementCompanyComprehensiveInfo> selectAllByType(StatementCompanyComprehensiveInfo info){
         //对五部数据单独处理
         //查询五部的所有部门
-        if("1".equalsIgnoreCase(info.getType())){
+        /*if("1".equalsIgnoreCase(info.getType())){
             List<Office> officeList = dao.getAllWBChildrenOfficeListInfo("工程五部");
 
             List<String> officeId = Lists.newArrayList();
@@ -3679,19 +3686,71 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
                 officeId.add(officeInfo.getId());
                 info.setOfficeIdList(officeId);
             }
+        }*/
+
+        List<Office> officeList = dao.getAllWBChildrenOfficeListInfo("工程五部");
+
+        List<String> officeId = Lists.newArrayList();
+        //获取所有子集节点,并遍历子集节点计算出所有数据信息
+        for (Office officeInfo : officeList) {
+            officeId.add(officeInfo.getId());
+            info.setOfficeIdList(officeId);
         }
         List<StatementCompanyComprehensiveInfo> list = Lists.newArrayList();
 
         if("0".equals(info.getBigDateType())){
 
             list =  dao.selectAllByTypeByYear(info);
+
+            Boolean flag = true;
+            String statementDate = "";
+            for (StatementCompanyComprehensiveInfo comprehensiveInfo : list) {
+                statementDate = comprehensiveInfo.getStatementDate();
+                if("工程五部".equals(comprehensiveInfo.getOfficeName()) /*&& "1".equals(info.getType())*/){
+                    flag = false;
+                    StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo = dao.selectAllWbByTypeByYear(comprehensiveInfo);
+                    statementCompanyComprehensiveInfo.setYear(info.getYear());
+                    statementCompanyComprehensiveInfo.setType(info.getType());
+                    statementCompanyComprehensiveInfo.setBigDateType(info.getBigDateType());
+                    statementCompanyComprehensiveInfo.setSmallDateType(info.getSmallDateType());
+                    statementCompanyComprehensiveInfo.setStatementDate(info.getStatementDate());
+                    statementCompanyComprehensiveInfo.setOfficeId(info.getOfficeId());
+
+                    list.add(statementCompanyComprehensiveInfo);
+                }
+            }
+            if(flag /*&& "1".equals(info.getType())*/){
+                StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo = dao.selectAllWbByTypeByYear(info);
+                statementCompanyComprehensiveInfo.setYear(info.getYear());
+                statementCompanyComprehensiveInfo.setType(info.getType());
+                statementCompanyComprehensiveInfo.setBigDateType(info.getBigDateType());
+                statementCompanyComprehensiveInfo.setSmallDateType(info.getSmallDateType());
+                statementCompanyComprehensiveInfo.setStatementDate(statementDate);
+                Office office = officeService.getByName("工程五部");
+                statementCompanyComprehensiveInfo.setOfficeId(office.getId());
+                statementCompanyComprehensiveInfo.setOfficeName(office.getName());
+
+                Boolean insertFlag = true;
+                for(int i= 0;i< list.size(); i++){
+                    StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo1 = list.get(i);
+                    if("工程四部".equals(statementCompanyComprehensiveInfo1.getOfficeName())){
+                        list.add(i+1,statementCompanyComprehensiveInfo);
+                        insertFlag = false;
+                    }
+                }
+                if(insertFlag){
+                    list.add(statementCompanyComprehensiveInfo);
+                }
+            }
+
+
         }else{
             list = dao.selectAllByType(info);
             Boolean flag = true;
             String statementDate = "";
             for (StatementCompanyComprehensiveInfo comprehensiveInfo : list) {
                 statementDate = comprehensiveInfo.getStatementDate();
-                if("工程五部".equals(comprehensiveInfo.getOfficeName()) && "1".equals(info.getType())){
+                if("工程五部".equals(comprehensiveInfo.getOfficeName()) /*&& "1".equals(info.getType())*/){
                     flag = false;
                     StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo = dao.selectAllWbByType(comprehensiveInfo);
                     statementCompanyComprehensiveInfo.setYear(info.getYear());
@@ -3704,7 +3763,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
                     list.add(statementCompanyComprehensiveInfo);
                 }
             }
-            if(flag && "1".equals(info.getType())){
+            if(flag /*&& "1".equals(info.getType())*/){
                 StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo = dao.selectAllWbByType(info);
                 statementCompanyComprehensiveInfo.setYear(info.getYear());
                 statementCompanyComprehensiveInfo.setType(info.getType());
@@ -3715,7 +3774,17 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
                 statementCompanyComprehensiveInfo.setOfficeId(office.getId());
                 statementCompanyComprehensiveInfo.setOfficeName(office.getName());
 
-                list.add(statementCompanyComprehensiveInfo);
+                Boolean insertFlag = true;
+                for(int i= 0;i< list.size(); i++){
+                    StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo1 = list.get(i);
+                    if("工程四部".equals(statementCompanyComprehensiveInfo1.getOfficeName())){
+                        list.add(i+1,statementCompanyComprehensiveInfo);
+                        insertFlag = false;
+                    }
+                }
+                if(insertFlag){
+                    list.add(statementCompanyComprehensiveInfo);
+                }
             }
         }
         return list;
@@ -3726,7 +3795,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         info.setBigDateType("0");
         //对五部数据单独处理
         //查询五部的所有部门
-        if("1".equalsIgnoreCase(info.getType())){
+        /*if("1".equalsIgnoreCase(info.getType())){
             List<Office> officeList = dao.getAllWBChildrenOfficeListInfo("工程五部");
 
             List<String> officeId = Lists.newArrayList();
@@ -3735,7 +3804,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
                 officeId.add(officeInfo.getId());
                 info.setOfficeIdList(officeId);
             }
-        }
+        }*/
         List<StatementCompanyComprehensiveInfo> list = dao.selectAllByTypeByYear(info);
 
         StatementCompanyComprehensiveInfo childrenInfo = dao.selectAllByTypeByYearAndOfficeId(info);

+ 1 - 1
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -243,7 +243,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 	}
 
 	public Page<WorkInvoice> findPage(Page<WorkInvoice> page, WorkInvoice workInvoice) {
-		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
+		workInvoice.getSqlMap().put("dsf", invoiceDataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
 		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
 			//查询该选择节点下所有的部门Id
 			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());

+ 9 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/entity/WorkProjectNotify.java

@@ -68,6 +68,7 @@ public class WorkProjectNotify extends DataEntity<WorkProjectNotify> {
 	private String typeLabel; // 类型label
 	private String auditUserName; // 审核人name
 	private String belongProject; // 所属系统
+	private String pageFlag; // 回跳页面判定
 
 	public WorkProjectNotify() {
 		super();
@@ -387,4 +388,12 @@ public class WorkProjectNotify extends DataEntity<WorkProjectNotify> {
 	public void setBelongProject(String belongProject) {
 		this.belongProject = belongProject;
 	}
+
+	public String getPageFlag() {
+		return pageFlag;
+	}
+
+	public void setPageFlag(String pageFlag) {
+		this.pageFlag = pageFlag;
+	}
 }

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

@@ -6893,6 +6893,37 @@ public class WorkProjectNotifyController extends BaseController {
 					}
 					model.addAttribute("datalistTwo", reviewAuditList);
 
+					ProjectMaterialDefectRecord materialDefectRecord = new ProjectMaterialDefectRecord();
+					materialDefectRecord.setReportId(ruralProjectRecords.getPrdId());
+					RuralProjectRecords materialDefectRecords = new RuralProjectRecords();
+					if(null !=ruralProjectRecords.getDefectRecordStatus() && 0 != ruralProjectRecords.getDefectRecordStatus()){
+						//获取项目信息
+						materialDefectRecords = ruralProjectRecordsService.getMaterInfo(materialDefectRecord.getReportId());
+
+						if (materialDefectRecords!=null && StringUtils.isNotBlank(materialDefectRecords.getPmdrId())){
+							Workattachment workattachment = new Workattachment();
+							workattachment.setAttachmentId(materialDefectRecords.getPmdrId());
+							workattachment.setAttachmentFlag("99");
+							materialDefectRecord.setWorkAttachments(workattachmentService.findList(workattachment));
+							workattachmentService.attachmentManageOnUrl(materialDefectRecord.getWorkAttachments());
+						}
+						materialDefectRecords.setUploadMode(uploadMode);
+						materialDefectRecords.setPmdrReportId(materialDefectRecord.getReportId());
+					}
+
+					model.addAttribute("materialDefectRecords", materialDefectRecords);
+					model.addAttribute("materialDefectRecord", materialDefectRecord);
+
+					RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(ruralProjectRecords.getId());
+					if (null!=reported){
+						model.addAttribute("reportedId",reported.getId());
+					}else {
+						model.addAttribute("reportedId","");
+					}
+
+
+
+
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						//展示
 						WorkReviewAudit workReviewAudit = new WorkReviewAudit();
@@ -10007,6 +10038,7 @@ public class WorkProjectNotifyController extends BaseController {
 		}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
 			model.addAttribute("identification","workreimbursement");
 			model.addAttribute("identificationName","报销审核意见");
+			model.addAttribute("pageFlag",workProjectNotify.getPageFlag());
 						/*if (workReimbursement.getAct() != null && StringUtils.isNotBlank(workReimbursement.getAct().getTaskDefKey()) && "cw".equals(workReimbursement.getAct().getTaskDefKey())) {
 							return "modules/workreimbursement/new/workReimbursementCWNewAudit";
 						}*/

+ 24 - 0
src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java

@@ -13,6 +13,7 @@ import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workproject.entity.WorkProject;
 import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementadminupdatehistory;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -77,4 +78,27 @@ public interface WorkReimbursementDao extends CrudDao<WorkReimbursement> {
 	 * @return
 	 */
 	Integer deleteReimbursementVatTaxByNumber(String invoiceNumber);
+
+
+	/**
+	 * 保存管理员修改报销信息记录
+	 * @param oldWorkReimbursementInfoJson
+	 * @param id
+	 * @return
+	 */
+	Integer insertAdminUpdateWorkReimbursementInfo(WorkReimbursementadminupdatehistory workReimbursementadminupdatehistory);
+
+	/**
+	 * 查询管理员修改报销信息记录
+	 * @param id
+	 * @return
+	 */
+	List<WorkReimbursementadminupdatehistory> getAdminUpdateReimbursementInfoById(String id);
+
+	/**
+	 * 根据id查询历史信息
+	 * @param id
+	 * @return
+	 */
+	WorkReimbursementadminupdatehistory getWorkReimbursementadminupdatehistoryById(String id);
 }

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

@@ -77,6 +77,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private String comment; // 意见
 	private String reimbursementType; // 报销类型
 	private String reimbursementTypeStr; // 报销类型Str
+	private String pageFlag; // 回调页面判定
 
 	public String getComment() {
 		return comment;
@@ -675,4 +676,12 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setReimbursementTypeStr(String reimbursementTypeStr) {
 		this.reimbursementTypeStr = reimbursementTypeStr;
 	}
+
+	public String getPageFlag() {
+		return pageFlag;
+	}
+
+	public void setPageFlag(String pageFlag) {
+		this.pageFlag = pageFlag;
+	}
 }

+ 28 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursementadminupdatehistory.java

@@ -0,0 +1,28 @@
+package com.jeeplus.modules.workreimbursement.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+/**
+ * @author: 徐滕
+ * @version: 2024-03-08 16:12
+ */
+public class WorkReimbursementadminupdatehistory extends DataEntity<WorkReimbursementadminupdatehistory> {
+    private String reimbursementId; //报销id
+    private String historyInformation;  //报销历史记录
+
+    public String getReimbursementId() {
+        return reimbursementId;
+    }
+
+    public void setReimbursementId(String reimbursementId) {
+        this.reimbursementId = reimbursementId;
+    }
+
+    public String getHistoryInformation() {
+        return historyInformation;
+    }
+
+    public void setHistoryInformation(String historyInformation) {
+        this.historyInformation = historyInformation;
+    }
+}

+ 92 - 23
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java

@@ -18,10 +18,12 @@ import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
 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.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
 import com.jeeplus.modules.workactivity.entity.Activity;
@@ -59,6 +61,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -133,6 +136,9 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
     public WorkReimbursement get(String id) {
         WorkReimbursement workReimbursement = super.get(id);
         if(null != workReimbursement){
+            //获取专业类型
+            List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("invoiceReimbursementType");
+
             List<WorkAccount> workAccounts = workAccountDao.findList(new WorkAccount(workReimbursement));
             for (WorkAccount workAccount:workAccounts){
                 List<WorkAccountAudit> workAccountAudits = workAccountDao.findByWorkAccount(workAccount);
@@ -150,7 +156,33 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                 }
             }
             workReimbursement.setWorkAccountList(workAccounts);
-            workReimbursement.setReimbursementVATTaxes(reimbursementVATTaxDao.findList(new ReimbursementVATTax(workReimbursement)));
+            List<ReimbursementVATTax> vatTaxDaoList = reimbursementVATTaxDao.findList(new ReimbursementVATTax(workReimbursement));
+            List<ReimbursementVATTax> vatTaxList = Lists.newArrayList();
+            List<ReimbursementVATTax> electronicInvoiceVATTaxesList = Lists.newArrayList();
+            for (ReimbursementVATTax vatTax : vatTaxDaoList) {
+                switch (vatTax.getReimbursementType()){
+                    case "0":
+                        vatTaxList.add(vatTax);
+                        break;
+                    case "1":
+                        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+                        if(null != vatTax.getInvoiceDate()){
+                            String dateString = formatter.format(vatTax.getInvoiceDate());
+                            vatTax.setInvoiceDateStr(dateString);
+                        }
+                        for (MainDictDetail dictDetail : certificateMajor) {
+                            if(dictDetail.getValue().equals(vatTax.getInvoiceType())){
+                                vatTax.setInvoiceTypeStr(dictDetail.getLabel());
+                            }
+                        }
+
+                        electronicInvoiceVATTaxesList.add(vatTax);
+                        break;
+
+                }
+            }
+            workReimbursement.setReimbursementVATTaxes(vatTaxList);
+            workReimbursement.setReimbursementElectronicInvoiceVATTaxes(electronicInvoiceVATTaxesList);
             WorkClientAttachment workClientAttachment = new WorkClientAttachment();
             workClientAttachment.setAttachmentId(id);
             workClientAttachment.setAttachmentFlag(VarStr.attachmentFlag[1]);
@@ -161,6 +193,11 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
             if (workReimbursement!=null && StringUtils.isNotBlank(workReimbursement.getOfficeId())){
                 workReimbursement.setOfficeName(UserUtils.getOfficeById(workReimbursement.getOfficeId()).getName());
             }
+
+            WorkClientAttachment workClientInvoiceAttachment = new WorkClientAttachment();
+            workClientInvoiceAttachment.setAttachmentId(id);
+            workClientInvoiceAttachment.setAttachmentFlag("workInvoiceReimbursement");
+            workReimbursement.setWorkAttachmentInvoiceReimbursements(workattachmentService.getAttachmentList(workClientInvoiceAttachment));
             //暂存状态不操作流程
 		/*if(!"1".equals(workReimbursement.getStatus())){
             Map<String,Object> variables=null;
@@ -212,9 +249,12 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
             workReimbursement.setReimbursementBackList( workReimbursementBackDao.findList(workReimbursementBack));
         }
         //添加当前文件服务器类型
-        workReimbursement.setUploadMode(uploadMode);
-        //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
-        workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
+        if(null != workReimbursement){
+            workReimbursement.setUploadMode(uploadMode);
+            //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+            workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
+            workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachmentInvoiceReimbursements());
+        }
         return workReimbursement;
     }
 
@@ -627,8 +667,21 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                     workAccountDao.delete(workAccount);
                 }
             }
+
+            if("0".equals(workReimbursement.getReimbursementType())){
+                for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
+                    reimbursementVATTaxDao.delete(reimbursementVATTax);
+                }
+            }else if("1".equals(workReimbursement.getReimbursementType())){
+                for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementVATTaxes()) {
+                    reimbursementVATTaxDao.delete(reimbursementVATTax);
+                }
+            }
+
             for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementVATTaxes()) {
                 if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
+                    //普通报销 发票信息
+                    reimbursementVATTax.setReimbursementType("0");
                     reimbursementVATTax.setWorkReimbursement(workReimbursement);
                     if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceCode())) {
                         reimbursementVATTax.preInsert();
@@ -641,6 +694,24 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                     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) {
@@ -648,14 +719,12 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                 }
                 if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
                     workClientAttachment.setAttachmentId(workReimbursement.getId());
-                    workClientAttachment.setAttachmentFlag(VarStr.attachmentFlag[1]);
+                    workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
                     workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
                     if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
-                        workClientAttachment.preInsert();
-                        workClientAttachmentDao.insert(workClientAttachment);
+                        workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
                     } else {
-                        workClientAttachment.preUpdate();
-                        workClientAttachmentDao.update(workClientAttachment);
+                        workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
                     }
                 } else {
                     workClientAttachmentDao.delete(workClientAttachment);
@@ -682,21 +751,21 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                             workReimbursementBackDao.update(reimbursementBack);
                         }
                     }
-                   //增加还款明细
+                    //增加还款明细
 
-                   if(reimbursementBack.getMoney()!=null&&!"".equals(reimbursementBack.getMoney())&&!"0".equals(reimbursementBack.getMoney())){
-                       WorkRepay workRepay=new WorkRepay();
-                       workRepay.preInsert();
-                       workRepay.setWorkLoan(reimbursementBack.getWorkLoan());
-                       workRepay.setOfficeId(workReimbursement.getOfficeId());
-                       workRepay.setCompanyId(workReimbursement.getCompanyId());
-                       workRepay.setRepayDate(new Date());
-                       workRepay.setSource("1");
-                       workRepay.setStatus("2");
-                       workRepay.setMoney(reimbursementBack.getMoney());
-                       workRepay.setWorkReimbursement(workReimbursement);
-                       workRepayDao.insert(workRepay);
-                   }
+                    if(reimbursementBack.getMoney()!=null&&!"".equals(reimbursementBack.getMoney())&&!"0".equals(reimbursementBack.getMoney())){
+                        WorkRepay workRepay=new WorkRepay();
+                        workRepay.preInsert();
+                        workRepay.setWorkLoan(reimbursementBack.getWorkLoan());
+                        workRepay.setOfficeId(workReimbursement.getOfficeId());
+                        workRepay.setCompanyId(workReimbursement.getCompanyId());
+                        workRepay.setRepayDate(new Date());
+                        workRepay.setSource("1");
+                        workRepay.setStatus("2");
+                        workRepay.setMoney(reimbursementBack.getMoney());
+                        workRepay.setWorkReimbursement(workReimbursement);
+                        workRepayDao.insert(workRepay);
+                    }
 
                 }
 

+ 75 - 4
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.workreimbursement.service;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.google.gson.Gson;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.Collections3;
@@ -279,10 +280,12 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
             workReimbursement.setReimbursementBackList( workReimbursementBackDao.findList(workReimbursementBack));
         }
         //添加当前文件服务器类型
-        workReimbursement.setUploadMode(uploadMode);
-        //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
-        workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
-        workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachmentInvoiceReimbursements());
+        if(null != workReimbursement){
+            workReimbursement.setUploadMode(uploadMode);
+            //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+            workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
+            workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachmentInvoiceReimbursements());
+        }
         return workReimbursement;
     }
 
@@ -2107,4 +2110,72 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
         }
         return map;
     }
+
+    /**
+     * 管理员修改报销信息
+     * @param reimbursement
+     * @return
+     */
+    @Transactional(readOnly = false)
+    public String updateAdminWorkReimbursement(WorkReimbursement reimbursement){
+        //如果是管理员,则先查询该报销信息原有报销记录,并将其转换成json字符串进行保存
+        if(StringUtils.isNotBlank(reimbursement.getId())){
+            WorkReimbursement workReimbursement = this.get(reimbursement.getId());
+            if(null != workReimbursement){
+                this.isNotProject(workReimbursement);
+                //判断报销类型状态并添加报销类型信息数据
+                if(StringUtils.isNotBlank(workReimbursement.getType())){
+                    WorkReimbursementTypeInfo workReimbursementTypeInfo = workReimbursementTypeService.get(workReimbursement.getType());
+                    workReimbursement.setWorkReimbursementTypeInfo(workReimbursementTypeInfo);
+                    if(StringUtils.isNotBlank(workReimbursementTypeInfo.getStandardDetail())){
+                        workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
+                    }
+                }
+                if (StringUtils.isBlank(workReimbursement.getSubmitterId())){
+                    workReimbursement.setSubmitterId(UserUtils.getUser().getId());
+                    workReimbursement.setSubmitterName(UserUtils.getUser().getName());
+                    if(UserUtils.getBasicInfo()!=null){
+                        workReimbursement.setBankCard(UserUtils.getBasicInfo().getBankCard());
+                    }
+                }
+                if (StringUtils.isNotBlank(workReimbursement.getCreateBy().getId())){
+                    User user=UserUtils.get(workReimbursement.getCreateBy().getId());
+                    workReimbursement.setCreateBy(user);
+                }
+
+                //将数据转换成json
+                Gson gson = new Gson();
+                String toJson = gson.toJson(workReimbursement);
+                //将转换后的数据进行保存
+                WorkReimbursementadminupdatehistory workReimbursementadminupdatehistory = new WorkReimbursementadminupdatehistory();
+                workReimbursementadminupdatehistory.setReimbursementId(workReimbursement.getId());
+                workReimbursementadminupdatehistory.setHistoryInformation(toJson);
+                workReimbursementadminupdatehistory.preInsert();
+                dao.insertAdminUpdateWorkReimbursementInfo(workReimbursementadminupdatehistory);
+            }
+        }
+        //对调整后的数据进行保存
+        super.save(reimbursement);
+        updateWorkReimbursementInfo(reimbursement);
+
+        return "修改成功";
+    }
+
+    /**
+     * 查询管理员修改报销信息记录
+     * @param id
+     * @return
+     */
+    public List<WorkReimbursementadminupdatehistory> getAdminUpdateReimbursementInfoById(String id){
+        return dao.getAdminUpdateReimbursementInfoById(id);
+    }
+
+    /**
+     * 查询管理员修改报销信息记录
+     * @param id
+     * @return
+     */
+    public WorkReimbursementadminupdatehistory getWorkReimbursementadminupdatehistoryById(String id){
+        return dao.getWorkReimbursementadminupdatehistoryById(id);
+    }
 }

+ 263 - 48
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementAllController.java

@@ -39,11 +39,9 @@ import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
 import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
-import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
-import com.jeeplus.modules.workreimbursement.entity.WorkAccount;
-import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
-import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
+import com.jeeplus.modules.workreimbursement.entity.*;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementAllService;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementNewService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
 import com.jeeplus.modules.workreimbursement.utils.VarStr;
@@ -69,10 +67,9 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.ConstraintViolationException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.*;
 
 /**
  * 财务报销Controller
@@ -128,6 +125,8 @@ public class WorkReimbursementAllController extends BaseController {
 	protected WorkProjectNotifyService workProjectNotifyService;
 	@Autowired
 	protected WorkReimbursementService workRService;
+	@Autowired
+	private WorkReimbursementNewService workReimbursementNewService;
 
 	@ModelAttribute
 	public WorkReimbursement get(@RequestParam(required=false) String id) {
@@ -161,6 +160,102 @@ public class WorkReimbursementAllController extends BaseController {
 		}
 		//workReimbursement.setOfficeId(UserUtils.getSelectOffice().getId());
 		Page<WorkReimbursement> page = workReimbursementService.findPage(new Page<WorkReimbursement>(request, response), workReimbursement);
+		List<WorkReimbursement> list = page.getList();
+
+		//查询所有和当前登陆人有关的项目的审核
+		WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+		workProjectNotify.setUser(UserUtils.getUser());
+		workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+		workProjectNotify.setRemarks("待审批");
+
+		List<String> typeList= jersey.repackaged.com.google.common.collect.Lists.newArrayList();
+		typeList.add("13");
+		typeList.add("102");
+		typeList.add("106");
+		typeList.add("107");
+		typeList.add("108");
+		typeList.add("109");
+		String types = org.apache.commons.lang3.StringUtils.join(typeList,',');
+		workProjectNotify.setTypes(types);
+		//添加发票对应编号
+		//workProjectNotify.setType("13");
+		//查询所有需要当前登录人进行处理的项目信息
+		List<WorkProjectNotify> notifyList = workProjectNotifyService.findList(workProjectNotify);
+
+		//添加发票对应编号
+		workProjectNotify.setType("102");
+		//查询所有需要当前登录人进行处理的项目信息
+		List<WorkProjectNotify> newNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
+		for (WorkReimbursement info: list) {
+			for (WorkProjectNotify notify: notifyList) {
+				if(notify.getNotifyId().equals(info.getId()) && "13".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(1);
+					}
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(2);
+					}
+					break;
+				}
+				//报告归档资料缺失说明修改权限处理
+				if(notify.getNotifyId().equals(info.getId()) && "102".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(4);
+					}
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(3);
+					}
+					break;
+				}
+				//报告归档资料缺失说明修改权限处理
+				if(notify.getNotifyId().equals(info.getId()) && "106".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(4);
+					}
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(3);
+					}
+					break;
+				}
+				//报告归档资料缺失说明修改权限处理
+				if(notify.getNotifyId().equals(info.getId()) && "107".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(4);
+					}
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(3);
+					}
+					break;
+				}
+				//报告归档资料缺失说明修改权限处理
+				if(notify.getNotifyId().equals(info.getId()) && "108".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(4);
+					}
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(3);
+					}
+					break;
+				}
+				//报告归档资料缺失说明修改权限处理
+				if(notify.getNotifyId().equals(info.getId()) && "109".equals(notify.getType())){
+					info.setNotifyId(notify.getId());
+					if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(4);
+					}
+					if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+						info.setNotifyFlag(3);
+					}
+					break;
+				}
+			}
+		}
 		model.addAttribute("page", page);
 		return "modules/workreimbursement/workReimbursementAllList";
 	}
@@ -196,7 +291,7 @@ public class WorkReimbursementAllController extends BaseController {
 	@RequestMapping(value = "form")
 	public String form(WorkReimbursement workReimbursement,Model model) {
 		workReimbursementService.isNotProject(workReimbursement);
-		String view = "workReimbursementFormAdd";
+		String view = "workReimbursementAllFormAdd";
 		Office office = UserUtils.getSelectOffice();
 		String tabId = request.getParameter("tabId");
 		//判断报销类型状态并添加报销类型信息数据
@@ -207,8 +302,17 @@ public class WorkReimbursementAllController extends BaseController {
 				workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
 			}
 		}
+
+		//获取历史修改记录
+		List<WorkReimbursementadminupdatehistory> adminUpdateReimbursementInfoById = workRService.getAdminUpdateReimbursementInfoById(workReimbursement.getId());
+		if(adminUpdateReimbursementInfoById.size()>0){
+			model.addAttribute("historyShow", "1");
+		}else{
+			model.addAttribute("historyShow", "");
+		}
+
 		if("1".equals(tabId)){
-			view = "workReimbursementFormDetail";
+			view = "workReimbursementAllFormDetail";
 		}else if("3".equals(tabId)){
 			ProcessInstance processInstance = actTaskService.getProcIns(workReimbursement.getProcessInstanceId());
 			if (processInstance!=null) {
@@ -264,19 +368,12 @@ public class WorkReimbursementAllController extends BaseController {
 				workReimbursement.setAchivesId(UserUtils.getBasicInfo().getId());
 			}
 		}
-		if(StringUtils.isNotBlank(workReimbursement.getProcessInstanceId())){
-			if(null == workReimbursement.getAct() || StringUtils.isBlank(workReimbursement.getAct().getProcInsId())){
-				Act act = new Act();
-				act.setProcInsId(workReimbursement.getProcessInstanceId());
-				workReimbursement.setAct(act);
-			}
-			WorkProjectNotify workProjectNotify = workProjectNotifyService.getByProcessInstanceId(workReimbursement.getProcessInstanceId());
-			if(null != workProjectNotify && StringUtils.isNotBlank(workProjectNotify.getNotifyType())){
-				model.addAttribute("projectNotifyType", workProjectNotify.getNotifyType());
-			}
+		if (StringUtils.isNotBlank(workReimbursement.getCreateBy().getId())){
+			User user=UserUtils.get(workReimbursement.getCreateBy().getId());
+			workReimbursement.setCreateBy(user);
 		}
 		model.addAttribute("workReimbursement", workReimbursement);
-		return "modules/workreimbursement/"+view;
+		return "modules/workreimbursement/all/"+view;
 	}
 
 	/**
@@ -322,27 +419,78 @@ public class WorkReimbursementAllController extends BaseController {
 		}
 		User user = workReimbursement.getCreateBy();
 		String sta = workReimbursement.getStatus();
-		//状态设置为审核中
-		workReimbursement.setStatus("2");
-		String processInstanceId ="";
-		if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
-			processInstanceId = workReimbursementService.get(workReimbursement.getId()).getProcessInstanceId();
-		}
-		try {
-			Map<String, Object> variables = Maps.newHashMap();
-			workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
-			workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
-			String str = workReimbursementService.save(workReimbursement, variables,processInstanceId);
-			if (StringUtils.isNotBlank(str)){
-				addMessage(redirectAttributes, "报销申请提交失败:"+str);
-			}else {
-				addMessage(redirectAttributes, "报销申请已经提交");
+		//获取当前登陆人信息
+		User loginUser = UserUtils.getUser();
+		//如果当前登陆人是管理员,则进行管理员修改
+		if(loginUser.isAdmin()){
+			//进行管理员修改
+			workRService.updateAdminWorkReimbursement(workReimbursement);
+		}else{
+			//状态设置为审核中
+			workReimbursement.setStatus("2");
+			String processInstanceId ="";
+			if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+				processInstanceId = workReimbursementService.get(workReimbursement.getId()).getProcessInstanceId();
 			}
+			try {
+				Map<String, Object> variables = Maps.newHashMap();
+				workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
+				workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
+				String str = "报销类型未选择";
 
-		} catch (Exception e) {
-			logger.info("Exception e:"+e);
-			addMessage(redirectAttributes, "报销申请提交失败!");
-			addMessage(redirectAttributes, "系统内部错误");
+				LocalDate reimburseLocalDate = LocalDate.of(2024, 2, 21);
+
+				Date reimburseAuditDate = Date.from(reimburseLocalDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+
+				Date nowDate = new Date();
+
+				// 调用compareTo()方法进行比较
+				int reimburseResult = -1;
+				if(StringUtils.isNotBlank(workReimbursement.getId())){
+					reimburseResult = workReimbursement.getCreateDate().compareTo(reimburseAuditDate);
+				}else{
+					reimburseResult = nowDate.compareTo(reimburseAuditDate);
+				}
+
+				LocalDate localDate = LocalDate.of(2024, 1, 20);
+
+				Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+				// 调用compareTo()方法进行比较
+				int result = nowDate.compareTo(auditDate);
+				//判定当前数据已经在数据库存在并且发起时间是在特定日期之后,并且部门是工程四部
+				//如果当前登录人为工程四部,且当前时间在2024-01-20之前
+				if(StringUtils.isNotBlank(workReimbursement.getId()) && result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
+					str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+				}else{
+					if(result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
+						str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+					} else {
+						if("0".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.saveReimburseThree(workReimbursement, variables,processInstanceId);
+							}else{
+								str = workReimbursementNewService.save(workReimbursement, variables,processInstanceId);
+							}
+						}else if("1".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.electronicInvoiceReimbursementThreeSave(workReimbursement, variables,processInstanceId);
+							}else{
+								str = workReimbursementNewService.electronicInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+							}
+						}
+					}
+				}
+				if (StringUtils.isNotBlank(str)){
+					addMessage(redirectAttributes, "报销申请提交失败:"+str);
+				}else {
+					addMessage(redirectAttributes, "报销申请已经提交");
+				}
+
+			} catch (Exception e) {
+				logger.info("Exception e:"+e);
+				addMessage(redirectAttributes, "报销申请提交失败!");
+				addMessage(redirectAttributes, "系统内部错误");
+			}
 		}
 		return "redirect:" + adminPath +"/workreimbursement/workReimbursementAll/?repage";
 //		return "modules/workreimbursement/reimbursementTodoList";
@@ -360,22 +508,62 @@ public class WorkReimbursementAllController extends BaseController {
 			// 对不同环节的业务逻辑进行操作
 			String taskDefKey = workReimbursement.getAct().getTaskDefKey();
 			List<User> users = null;
+
+			LocalDate reimburseLocalDate = LocalDate.of(2024, 2, 21);
+
+			Date reimburseAuditDate = Date.from(reimburseLocalDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+
+			// 调用compareTo()方法进行比较
+			int reimburseResult = workReimbursement.getCreateDate().compareTo(reimburseAuditDate);
+
+			LocalDate localDate = LocalDate.of(2024, 1, 20);
+
+			Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+
+			Date nowDate = new Date();
+			// 调用compareTo()方法进行比较
+			int result = nowDate.compareTo(auditDate);
+			//判定当前数据已经在数据库存在并且发起时间是在特定日期之后,并且部门是工程四部
+			//如果当前登录人为工程四部,且当前时间在2024-01-20之前
+
 			if ("bmzr".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),2);
 				if (users==null )
 					//users = UserUtils.getByRoleActivityEnname("fgld",2,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
 					users = UserUtils.getByRoleActivityEnname("cwzg", 3, workReimbursement.getOfficeId(), "8", workReimbursement.getCreateBy());
-			}/*else  if ("fgld".equals(taskDefKey)){
+
+
+				if(StringUtils.isNotBlank(workReimbursement.getId()) && result > 0 && "10de4a17d3484ba58135364bd53b88de".equals(workReimbursement.getOfficeId())){
+					users = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+
+				}
+			}else  if ("cw".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
 				if (users==null )
-					users = UserUtils.getByRoleActivityEnname("cwzg", 3, workReimbursement.getOfficeId(), "8", workReimbursement.getCreateBy());
-			}*/else  if ("cw".equals(taskDefKey)){
+					users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
+				if("0".equals(workReimbursement.getReimbursementType())){
+					if(reimburseResult>0){
+						users = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+					}else{
+						users = UserUtils.getByRoleActivityEnname("zjbfzribvf",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+					}
+				}else if ("1".equals(workReimbursement.getReimbursementType())){
+					users = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+				}
+			}else  if ("gsld".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
 				if (users==null )
 					users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
 				//users = UserUtils.getByRoleActivityEnname("zjl",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+			}else  if ("fpglys".equals(taskDefKey) || "dzfpbxshybxsd".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
+				if(reimburseResult>0){
+					users = UserUtils.getByRoleActivityEnname("zjbfzribvf",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+				}
+				if (users==null )
+					users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
 			}/*else  if ("zjl".equals(taskDefKey)){
-				*//*users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),5);
+			 *//*users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),5);
 				if (users==null )
 					users = UserUtils.getByRoleActivityEnname("cwfgld",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());*//*
 				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
@@ -388,11 +576,36 @@ public class WorkReimbursementAllController extends BaseController {
 			}*/else if ("modifyApply".equals(taskDefKey)){
 				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
 			}
-            String flag = workReimbursement.getAct().getFlag();
-            if ("yes".equals(flag) &&(users==null || users.size()==0)){
+			String flag = workReimbursement.getAct().getFlag();
+			if ("yes".equals(flag) &&(users==null || users.size()==0)){
 				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
 			}else {
-				String str = workReimbursementService.auditSave(workReimbursement,users);
+				String str = "";
+
+
+				if(StringUtils.isNotBlank(workReimbursement.getId()) && result > 0 && "10de4a17d3484ba58135364bd53b88de".equals(workReimbursement.getOfficeId())){
+					str = workReimbursementNewService.auditSpecificSave(workReimbursement,users);
+				}else{
+					if(result > 0 && "10de4a17d3484ba58135364bd53b88de".equals(workReimbursement.getOfficeId())){
+						str = workReimbursementNewService.auditSpecificSave(workReimbursement,users);
+					} else {
+						if("0".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.auditSaveThree(workReimbursement,users);
+							}else{
+								str = workReimbursementNewService.auditSave(workReimbursement,users);
+							}
+						}else if ("1".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.electronicInvoiceReimbursementThreeAuditSave(workReimbursement,users);
+							}else{
+								str = workReimbursementNewService.electronicInvoiceReimbursementAuditSave(workReimbursement,users);
+							}
+						}
+					}
+				}
+
+
 				addMessage(redirectAttributes, str);
 			}
 		}catch (Exception e){
@@ -401,8 +614,10 @@ public class WorkReimbursementAllController extends BaseController {
 		}
 		if (StringUtils.isNotBlank(workReimbursement.getHome()) && "home".equals(workReimbursement.getHome())) {
 			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		}else if (StringUtils.isNotBlank(workReimbursement.getHome()) && "notifyList".equals(workReimbursement.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
 		} else {
-			return "redirect:" + Global.getAdminPath() + "/workreimbursement/workReimbursementAll/?repage";
+			return "redirect:" + adminPath +"/workreimbursement/workReimbursementAll/?repage";
 		}
 	}
 

+ 51 - 5
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java

@@ -40,6 +40,7 @@ import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementadminupdatehistory;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementNewService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
@@ -311,6 +312,13 @@ public class WorkReimbursementController extends BaseController {
 				workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
 			}
 		}
+		//获取历史修改记录
+		List<WorkReimbursementadminupdatehistory> adminUpdateReimbursementInfoById = workReimbursementService.getAdminUpdateReimbursementInfoById(workReimbursement.getId());
+		if(adminUpdateReimbursementInfoById.size()>0){
+			model.addAttribute("historyShow", "1");
+		}else{
+			model.addAttribute("historyShow", "");
+		}
 		if("1".equals(tabId)){
 			switch (workReimbursement.getReimbursementType()){
 				case "0" :
@@ -464,11 +472,23 @@ public class WorkReimbursementController extends BaseController {
 			workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
 			String str = "报销类型未选择";
 
-			LocalDate localDate = LocalDate.of(2024, 1, 20);
+			LocalDate reimburseLocalDate = LocalDate.of(2024, 2, 21);
 
-			Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+			Date reimburseAuditDate = Date.from(reimburseLocalDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
 
 			Date nowDate = new Date();
+
+			// 调用compareTo()方法进行比较
+			int reimburseResult = -1;
+			if(StringUtils.isNotBlank(workReimbursement.getId())){
+				reimburseResult = workReimbursement.getCreateDate().compareTo(reimburseAuditDate);
+			}else{
+				reimburseResult = nowDate.compareTo(reimburseAuditDate);
+			}
+
+			LocalDate localDate = LocalDate.of(2024, 1, 20);
+
+			Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
 			// 调用compareTo()方法进行比较
 			int result = nowDate.compareTo(auditDate);
 			//判定当前数据已经在数据库存在并且发起时间是在特定日期之后,并且部门是工程四部
@@ -481,9 +501,17 @@ public class WorkReimbursementController extends BaseController {
 					str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
 				} else {
 					if("0".equals(workReimbursement.getReimbursementType())){
-						str = workReimbursementService.save(workReimbursement, variables,processInstanceId);
+						if(reimburseResult>0){
+							str = workReimbursementNewService.saveReimburseThree(workReimbursement, variables,processInstanceId);
+						}else{
+							str = workReimbursementNewService.save(workReimbursement, variables,processInstanceId);
+						}
 					}else if("1".equals(workReimbursement.getReimbursementType())){
-						str = workReimbursementNewService.electronicInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+						if(reimburseResult>0){
+							str = workReimbursementNewService.electronicInvoiceReimbursementThreeSave(workReimbursement, variables,processInstanceId);
+						}else{
+							str = workReimbursementNewService.electronicInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+						}
 					}
 				}
 			}
@@ -1106,9 +1134,10 @@ public class WorkReimbursementController extends BaseController {
 	public Map<String,Object> disposeXmlFile(HttpServletRequest request, MultipartFile multipartFile, String id){
 		Map<String,Object> map = new HashMap();
 		//创建DOM4J解析器对象
+		File file = null;
 		try {
 			//MultipartFile转File
-			File file = FtlUtils.transformMultipartFile(multipartFile);
+			file = FtlUtils.transformMultipartFile(multipartFile);
 			// 创建一个 DocumentBuilderFactory
 			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 			// 使用工厂创建一个 DocumentBuilder
@@ -1135,19 +1164,36 @@ public class WorkReimbursementController extends BaseController {
 				if(null != invoiceNumber){
 					map.put("flag",true);
 					map.put("message","发票号:" + map.get("InvoiceNumber").toString() + " 已发起或完成报销,请勿重复报销");
+					return map;
 				}else{
 					map.put("flag",false);
 				}
 			}else{
 				map.put("flag",true);
 				map.put("message","上传的数电发票格式错误,请确认后重新上传");
+				return map;
+
+			}
 
+			//对处理后的数据根据发票号进行数据库查询,查看是否存在已报销的电子发票数据
+			if(StringUtils.isNotBlank(map.get("BuyerInformationBuyerName").toString()) && "江苏兴光项目管理有限公司".equals(map.get("BuyerInformationBuyerName").toString())){
+				map.put("flag",false);
+			}else{
+				map.put("flag",true);
+				map.put("message","上传的数电发票购买方不是“江苏兴光项目管理有限公司”,无法进行报销");
+				return map;
 			}
 
 		} catch (Exception e) {
 			e.printStackTrace();
 			map.put("flag",true);
 			map.put("message","上传的数电发票格式错误,请确认后重新上传");
+			return map;
+		} finally {
+			//删除本地文件
+			if (!file.isDirectory()) {
+				file.delete();
+			}
 		}
 		return map;
 	}

+ 131 - 54
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementNewController.java

@@ -4,17 +4,22 @@
 package com.jeeplus.modules.workreimbursement.web;
 
 import com.google.common.collect.Maps;
+import com.google.gson.Gson;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementadminupdatehistory;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementNewService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
 import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
@@ -24,6 +29,7 @@ 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;
@@ -31,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.util.Date;
@@ -99,6 +106,14 @@ public class WorkReimbursementNewController extends BaseController {
 				workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
 			}
 		}
+
+		//获取历史修改记录
+		List<WorkReimbursementadminupdatehistory> adminUpdateReimbursementInfoById = workReimbursementService.getAdminUpdateReimbursementInfoById(workReimbursement.getId());
+		if(adminUpdateReimbursementInfoById.size()>0){
+			model.addAttribute("historyShow", "1");
+		}else{
+			model.addAttribute("historyShow", "");
+		}
 		if("1".equals(tabId)){
 			view = "workReimbursementFormDetail";
 		}else if("3".equals(tabId)){
@@ -178,71 +193,78 @@ public class WorkReimbursementNewController extends BaseController {
 		}
 		User user = workReimbursement.getCreateBy();
 		String sta = workReimbursement.getStatus();
-		//状态设置为审核中
-		workReimbursement.setStatus("2");
-		String processInstanceId ="";
-		if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
-			processInstanceId = workReimbursementService.get(workReimbursement.getId()).getProcessInstanceId();
-		}
-		try {
-			Map<String, Object> variables = Maps.newHashMap();
-			workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
-			workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
-			String str = "报销类型未选择";
+		//获取当前登陆人信息
+		User loginUser = UserUtils.getUser();
+		//如果当前登陆人是管理员,则进行管理员修改
+		if(loginUser.isAdmin()){
+			//进行管理员修改
+			workReimbursementService.updateAdminWorkReimbursement(workReimbursement);
+		}else{
+			//状态设置为审核中
+			workReimbursement.setStatus("2");
+			String processInstanceId ="";
+			if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+				processInstanceId = workReimbursementService.get(workReimbursement.getId()).getProcessInstanceId();
+			}
+			try {
+				Map<String, Object> variables = Maps.newHashMap();
+				workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
+				workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
+				String str = "报销类型未选择";
 
-			LocalDate reimburseLocalDate = LocalDate.of(2024, 2, 21);
+				LocalDate reimburseLocalDate = LocalDate.of(2024, 2, 21);
 
-			Date reimburseAuditDate = Date.from(reimburseLocalDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+				Date reimburseAuditDate = Date.from(reimburseLocalDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
 
-			Date nowDate = new Date();
+				Date nowDate = new Date();
 
-			// 调用compareTo()方法进行比较
-			int reimburseResult = -1;
-			if(StringUtils.isNotBlank(workReimbursement.getId())){
-				reimburseResult = workReimbursement.getCreateDate().compareTo(reimburseAuditDate);
-			}else{
-				reimburseResult = nowDate.compareTo(reimburseAuditDate);
-			}
+				// 调用compareTo()方法进行比较
+				int reimburseResult = -1;
+				if(StringUtils.isNotBlank(workReimbursement.getId())){
+					reimburseResult = workReimbursement.getCreateDate().compareTo(reimburseAuditDate);
+				}else{
+					reimburseResult = nowDate.compareTo(reimburseAuditDate);
+				}
 
-			LocalDate localDate = LocalDate.of(2024, 1, 20);
+				LocalDate localDate = LocalDate.of(2024, 1, 20);
 
-			Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
-			// 调用compareTo()方法进行比较
-			int result = nowDate.compareTo(auditDate);
-			//判定当前数据已经在数据库存在并且发起时间是在特定日期之后,并且部门是工程四部
-			User loginUser = UserUtils.getUser();
-			//如果当前登录人为工程四部,且当前时间在2024-01-20之前
-			if(StringUtils.isNotBlank(workReimbursement.getId()) && result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
-				str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
-			}else{
-				if(result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
+				Date auditDate = Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
+				// 调用compareTo()方法进行比较
+				int result = nowDate.compareTo(auditDate);
+				//判定当前数据已经在数据库存在并且发起时间是在特定日期之后,并且部门是工程四部
+				//如果当前登录人为工程四部,且当前时间在2024-01-20之前
+				if(StringUtils.isNotBlank(workReimbursement.getId()) && result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
 					str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
-				} else {
-					if("0".equals(workReimbursement.getReimbursementType())){
-						if(reimburseResult>0){
-							str = workReimbursementNewService.saveReimburseThree(workReimbursement, variables,processInstanceId);
-						}else{
-							str = workReimbursementNewService.save(workReimbursement, variables,processInstanceId);
-						}
-					}else if("1".equals(workReimbursement.getReimbursementType())){
-						if(reimburseResult>0){
-							str = workReimbursementNewService.electronicInvoiceReimbursementThreeSave(workReimbursement, variables,processInstanceId);
-						}else{
-							str = workReimbursementNewService.electronicInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+				}else{
+					if(result > 0 && null != loginUser.getOffice() && "10de4a17d3484ba58135364bd53b88de".equals(loginUser.getOffice().getId())){
+						str = workReimbursementNewService.specificInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+					} else {
+						if("0".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.saveReimburseThree(workReimbursement, variables,processInstanceId);
+							}else{
+								str = workReimbursementNewService.save(workReimbursement, variables,processInstanceId);
+							}
+						}else if("1".equals(workReimbursement.getReimbursementType())){
+							if(reimburseResult>0){
+								str = workReimbursementNewService.electronicInvoiceReimbursementThreeSave(workReimbursement, variables,processInstanceId);
+							}else{
+								str = workReimbursementNewService.electronicInvoiceReimbursementSave(workReimbursement, variables,processInstanceId);
+							}
 						}
 					}
 				}
-			}
-			if (StringUtils.isNotBlank(str)){
-				addMessage(redirectAttributes, "报销申请提交失败:"+str);
-			}else {
-				addMessage(redirectAttributes, "报销申请已经提交");
-			}
+				if (StringUtils.isNotBlank(str)){
+					addMessage(redirectAttributes, "报销申请提交失败:"+str);
+				}else {
+					addMessage(redirectAttributes, "报销申请已经提交");
+				}
 
-		} catch (Exception e) {
-			logger.info("Exception e:"+e);
-			addMessage(redirectAttributes, "报销申请提交失败!");
-			addMessage(redirectAttributes, "系统内部错误");
+			} catch (Exception e) {
+				logger.info("Exception e:"+e);
+				addMessage(redirectAttributes, "报销申请提交失败!");
+				addMessage(redirectAttributes, "系统内部错误");
+			}
 		}
 		return "redirect:" + adminPath +"/workreimbursement/workReimbursement/?repage";
 	}
@@ -368,6 +390,9 @@ public class WorkReimbursementNewController extends BaseController {
 		}else if (StringUtils.isNotBlank(workReimbursement.getHome()) && "notifyList".equals(workReimbursement.getHome())){
 			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
 		} else {
+			if(StringUtils.isNotBlank(workReimbursement.getPageFlag()) && "all".equals(workReimbursement.getPageFlag())){
+				return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursementAll/?repage";
+			}
 			return "redirect:" + Global.getAdminPath() + "/workreimbursement/workReimbursement/?repage";
 		}
 	}
@@ -419,4 +444,56 @@ public class WorkReimbursementNewController extends BaseController {
 			return "redirect:" + Global.getAdminPath() + "/workreimbursement/workReimbursement/?repage";
 		}
 	}
+
+
+	/**
+	 * 报销单列表页面
+	 */
+	@RequestMapping(value = "historyReimbursementInfo")
+	public String historyReimbursementInfo(WorkReimbursement workReimbursement, HttpServletRequest request, HttpServletResponse response, Model model) {
+		List<WorkReimbursementadminupdatehistory> adminUpdateReimbursementInfoByIdList = workReimbursementService.getAdminUpdateReimbursementInfoById(workReimbursement.getId());
+
+		model.addAttribute("adminUpdateReimbursementInfoByIdList", adminUpdateReimbursementInfoByIdList);
+		return "modules/workreimbursement/new/workReimbursmentHistoryView";
+	}
+
+
+	/**
+	 * 报销单列表页面
+	 */
+	@RequestMapping(value = "getWorkReimbursementadminupdatehistoryById")
+	public String getWorkReimbursementadminupdatehistoryById(WorkReimbursementadminupdatehistory workReimbursementadminupdatehistory, HttpServletRequest request, HttpServletResponse response, Model model) {
+		WorkReimbursementadminupdatehistory info = workReimbursementService.getWorkReimbursementadminupdatehistoryById(workReimbursementadminupdatehistory.getId());
+		WorkReimbursement workReimbursement = new WorkReimbursement();
+		//对获取数据的历史信息转换成实体类
+		if(null != info && StringUtils.isNotBlank(info.getHistoryInformation())){
+			Gson gson = new Gson();
+			workReimbursement = gson.fromJson(info.getHistoryInformation(), WorkReimbursement.class);
+
+			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.setInvoiceType(dictDetail.getLabel());
+						}
+					}
+				}
+			}
+		}
+		model.addAttribute("workReimbursement", workReimbursement);
+		return "modules/workreimbursement/workReimbursementFormDetail";
+	}
+
 }

+ 1 - 1
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -93,7 +93,7 @@
 		<include refid="projectReportDataColumns"/>
 		FROM project_report_data a
 		<include refid="projectReportDataJoins"/>
-		WHERE a.number = #{number}
+		WHERE a.number = #{number} and a.del_flag = 0
 	</select>
 	<select id="getNoInvalid" resultType="ProjectReportData" >
 		SELECT

+ 4 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageElectronicSealDao.xml

@@ -781,4 +781,8 @@
 		</where>
 	</select>
 
+	<delete id="deleteWorkProjectNotifyByReportId">
+		delete from work_project_notify where title = #{title}
+	</delete>
+
 </mapper>

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

@@ -290,7 +290,7 @@
 		left join project_report_data prd on prd.project_id = a.id
 		LEFT JOIN rural_project_report_record prr on prd.id = prr.report_id
 		LEFT JOIN sys_office o ON o.id = a.office_id
-		WHERE prd.number = #{reportNumber}
+		WHERE prd.number = #{reportNumber} and prd.del_flag = 0
 	</select>
 
 
@@ -1633,6 +1633,27 @@
 			<if test="projectProperties != null and projectProperties != ''">
 				,project_properties =#{projectProperties}
 			</if>
+
+			<if test="projectMasterId != null and projectMasterId != ''">
+				,project_master_id = #{projectMasterId}
+			</if>
+			<choose>
+				<when test="paperFilingStatus ==null or paperFilingStatus == ''">
+					,paper_filing_status = null
+				</when>
+				<otherwise>
+					,paper_filing_status = #{paperFilingStatus}
+				</otherwise>
+			</choose>
+
+			<choose>
+				<when test="reportedState ==null or reportedState == ''">
+					,reported_state = null
+				</when>
+				<otherwise>
+					,reported_state = #{reportedState}
+				</otherwise>
+			</choose>
 		WHERE id = #{id}
 	</update>
 
@@ -3452,17 +3473,21 @@
 			and a.del_flag = 0
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
-			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
 
-			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !=''">
+			<if test="statementCompanyComprehensiveInfo.bigDateType != null and statementCompanyComprehensiveInfo.bigDateType !=0">
+				and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			</if>
+
+			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !='' and statementCompanyComprehensiveInfo.bigDateType !=0">
 				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
 			</if>
 
 			<if test="statementCompanyComprehensiveInfo.officeId != null and statementCompanyComprehensiveInfo.officeId !=''">
-				and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
+				<if test="statementCompanyComprehensiveInfo.officeType != null and statementCompanyComprehensiveInfo.officeType !='gcwb'">
+					and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
+				</if>
 			</if>
 			<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
-				and a.record_state != 7
 				and pmdr.id is null
 				and a.over_record_status = 1
 				<if test="statementCompanyComprehensiveInfo.officeId != null and statementCompanyComprehensiveInfo.officeId !=''">
@@ -3502,6 +3527,26 @@
 				and rprr.accomplish_date &lt;= #{endDate}
 			</if>
 
+			<if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
+				and a.submit_money = 2
+				and a.paper_filing_status != 7
+				AND a.paper_filing_status != '10'
+				AND a.paper_filing_status != '11'
+				and a.over_paper_filing_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and pmdr.id is null
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
+				and a.submit_money = 2
+				and a.paper_filing_status = 7
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and ppf.status = 7
+				and ppf.del_flag = 0
+				and ppf.audit_pass_date >= #{beginDate}
+				and ppf.audit_pass_date &lt;= #{endDate}
+				and pmdr.id is null
+			</if>
+
 			<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
 				AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
 			</if>
@@ -3674,17 +3719,20 @@
 			and a.del_flag = 0
 			and sdi.year = #{statementCompanyComprehensiveInfo.year}
 			and sdi.type = #{statementCompanyComprehensiveInfo.type}
-			and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			<if test="statementCompanyComprehensiveInfo.bigDateType != null and statementCompanyComprehensiveInfo.bigDateType !=0">
+				and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
+			</if>
 
-			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !=''">
+			<if test="statementCompanyComprehensiveInfo.smallDateType != null and statementCompanyComprehensiveInfo.smallDateType !='' and statementCompanyComprehensiveInfo.bigDateType !=0">
 				and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
 			</if>
 
 			<if test="statementCompanyComprehensiveInfo.officeId != null and statementCompanyComprehensiveInfo.officeId !=''">
-				and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
+				<if test="statementCompanyComprehensiveInfo.officeType != null and statementCompanyComprehensiveInfo.officeType !='gcwb'">
+					and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
+				</if>
 			</if>
 			<if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
-				and a.record_state != 7
 				and pmdr.id is null
 				and a.over_record_status = 1
 				<if test="statementCompanyComprehensiveInfo.officeId != null and statementCompanyComprehensiveInfo.officeId !=''">
@@ -3723,6 +3771,25 @@
 				and rprr.accomplish_date >= #{beginDate}
 				and rprr.accomplish_date &lt;= #{endDate}
 			</if>
+			<if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
+				and a.submit_money = 2
+				and a.paper_filing_status != 7
+				AND a.paper_filing_status != '10'
+				AND a.paper_filing_status != '11'
+				and a.over_paper_filing_status = 1
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and pmdr.id is null
+			</if>
+			<if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
+				and a.submit_money = 2
+				and a.paper_filing_status = 7
+				and a.office_id in(select id  from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
+				and ppf.status = 7
+				and ppf.del_flag = 0
+				and ppf.audit_pass_date >= #{beginDate}
+				and ppf.audit_pass_date &lt;= #{endDate}
+				and pmdr.id is null
+			</if>
 
 			<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
 				AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')

+ 35 - 0
src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml

@@ -1689,6 +1689,41 @@
 		</where>
 	</select>
 
+	<select id="selectAllWbByTypeByYear" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
+		select
+		sum(a.field1) as "field1",
+		sum(a.field2) as "field2",
+		sum(a.field3) as "field3",
+		sum(a.field4) as "field4",
+		sum(a.field5) as "field5",
+		sum(a.field6) as "field6",
+		sum(a.field7) as "field7",
+		sum(a.field8) as "field8",
+		sum(a.field9) as "field9",
+		sum(a.field10) as "field10",
+		sum(a.field11) as "field11",
+		sum(a.field12) as "field12",
+		sum(a.field13) as "field13",
+		sum(a.field14) as "field14",
+		sum(a.field15) as "field15",
+		sum(a.field16) as "field16"
+		from statement_company_comprehensive_info2 a
+		<where>
+			a.type = #{type}
+			and a.del_flag = 0
+			and a.big_date_type = #{bigDateType}
+			and a.year = #{year}
+			and a.small_date_type = #{smallDateType}
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+		</where>
+	</select>
+
 
 
 	<select id="selectAllByTypeInYearReport" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">

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

@@ -991,4 +991,68 @@
 		del_flag = 1
 		where invoice_number = #{invoiceNumber}
 	</update>
+
+	<insert id="insertAdminUpdateWorkReimbursementInfo">
+		INSERT INTO work_reimbursement_admin_update_history (
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		reimbursement_id,
+		history_information,
+		admin_update_date
+		)
+		values (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{reimbursementId},
+			#{historyInformation},
+			now()
+		)
+	</insert>
+
+	<select id="getAdminUpdateReimbursementInfoById" resultType="WorkReimbursementadminupdatehistory">
+		select
+		  a.id,
+		  a.create_by as "createBy.id",
+		  su.name as "createBy.name",
+		  a.create_date as "create_date",
+		  a.update_by as "updateBy.id",
+		  a.update_date as "updateDate",
+		  a.del_flag as "delFlag",
+		  a.remarks as "remarks",
+		  a.reimbursement_id as "reimbursementId",
+		  a.history_information as "historyInformation",
+		  a.admin_update_date as "adminUpdateDate"
+		from work_reimbursement_admin_update_history a
+		left join sys_user su on su.id = a.create_by
+		where a.reimbursement_id = #{id}
+		order by a.update_date desc
+	</select>
+
+	<select id="getWorkReimbursementadminupdatehistoryById" resultType="WorkReimbursementadminupdatehistory">
+		select
+		  a.id,
+		  a.create_by as "createBy.id",
+		  su.name as "createBy.name",
+		  a.create_date as "create_date",
+		  a.update_by as "updateBy.id",
+		  a.update_date as "updateDate",
+		  a.del_flag as "delFlag",
+		  a.remarks as "remarks",
+		  a.reimbursement_id as "reimbursementId",
+		  a.history_information as "historyInformation",
+		  a.admin_update_date as "adminUpdateDate"
+		from work_reimbursement_admin_update_history a
+		left join sys_user su on su.id = a.create_by
+		where a.id = #{id}
+	</select>
 </mapper>

+ 1 - 1
src/main/webapp/static/common/css/style.css

@@ -9543,7 +9543,7 @@ a.attention-info.a_visited{
 /*默认最小宽度940,所以最小设为940 - 15 * 2*/
 @media (min-width:768px){.container{width:930px}}
 @media (min-width:992px){.container{width:970px}}
-@media (min-width:1200px){.container{width:1170px}}
+@media (min-width:1500px){.container{width:1470px}}
 /*@media (min-width:1300px){.container{width:1260px}}*/
 /*@media (min-width:1400px){.container{width:1350px}}*/
 

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

@@ -8,6 +8,9 @@
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
 	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/common/css/style.css"/>
+	<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+	<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+	<script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
 	<%@include file="/webpage/include/treetable.jsp" %>
 	<style>
 		td input{
@@ -65,7 +68,50 @@
 
             return false;
         }
+		layui.use(['tree', 'util'], function () {
+			var reportId = "${materialDefectRecords.pmdrReportId}"
+			var defectRecordStatus = "${projectRecords.defectRecordStatus}"
+			if(defectRecordStatus != '0'){
+				let re = [];
+				$.ajax({
+					//几个参数需要注意一下
+					type: "post",//方法类型
+					dataType: "json",//预期服务器返回的数据类型
+					url: '${ctx}/projectReportDefectRecord/projectReportDefectRecord/getZuzhi2',
+					data: {"reportId": reportId},
+					success: function (result) {
+						console.log('result', result)
+						re=result;
+						// var tree = layui.tree;
+						// var util = layui.util
+						var tree = layui.tree
+								, layer = layui.layer
+								, util = layui.util
+								, data = re
+						// , data = [{
+						// id: 1,
+						// title: '成果文件'
+						// , children: re}]
+						console.log('tree', tree)
+						tree.render({
+							elem: '#test2'
+							,data: data
+							,showCheckbox: false  //是否显示复选框
+							,id: 'demoId1'
+							,isJump: false //是否允许点击节点时弹出新窗口跳转
+						});
+					},
+					error : function(e) {
+						alert("发生未知错误!");
+					}
+				});
+			}
+		});
         $(document).ready(function() {
+        	var materialDefectRecordsRemarks = '${materialDefectRecords.remarks}'
+			if(materialDefectRecordsRemarks){
+				$("#materialDefectRecordsRemarks").val(materialDefectRecordsRemarks)
+			}
 			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
 			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
 			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
@@ -146,7 +192,7 @@
 				$(".overallProcessDiv").show();
 			}else {
 			}
-			var contents=${ruralProjectRecordsReported.contentsIncludeList}
+			var contents='${ruralProjectRecordsReported.contentsIncludeList}'
 			for(var i=0;i<contents.length;i++){
 				var con=contents[i];
 				$(".contents_"+con+"").prop("checked",true)
@@ -188,12 +234,21 @@
 							<li><a>质量复核信息</a><span class="hide">qualityView</span></li>
 							<li><a>报告签发信息</a><span class="hide">issueView</span></li>
 							<li><a>档案信息</a><span class="hide">AccessoryView</span></li>
+							<c:if test="${projectRecords.defectRecordStatus != '0'}">
+								<li><a>资料缺失说明</a><span class="hide">descriptionView</span></li>
+							</c:if>
 						</ul>
 					</div>
 				</div>
 			</div>
 			<div style="margin-top: 50px">
 				<div class="form-group layui-row first" id="projectInfo">
+					<div class="form-group-label">
+						<c:if test="${not empty reportedId}">
+							<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogView('上报信息', '${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${reportedId}','85%', '85%','','关闭')" class="layui-btn layui-btn-sm" >上报信息</a></div>
+						</c:if>
+						<h2>基本信息</h2>
+					</div>
 						<%--				<div class="form-group-label"><h2>项目基本信息</h2></div>--%>
 					<div class="layui-item layui-col-sm6 lw6">
 						<label class="layui-form-label">项目名称:</label>
@@ -1842,6 +1897,253 @@
 					</div>
 
 				</div>
+
+				<div class="form-group layui-row first hide" id="descriptionView">
+					<div class="form-group layui-row first lw12">
+						<div class="form-group-label"><h2>资料缺失说明</h2></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">
+								<input type="radio" title="短期" disabled lay-filter="ext" name="hiatus" id="hiatus1" value="0" <c:if test="${materialDefectRecords.hiatus=='0'}">checked</c:if>>
+								<input type="radio" title="永久" disabled lay-filter="ext" name="hiatus" id="hiatus2" value="1" <c:if test="${materialDefectRecords.hiatus=='1'}">checked</c:if>>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm12  with-textarea">
+							<label class="layui-form-label"><span class="require-item">*</span>资料缺失说明:</label>
+							<div class="layui-input-block">
+
+								<form:textarea placeholder="请输入资料缺失说明:" readonly="true" id="materialDefectRecordsRemarks" path="remarks" htmlEscape="false" rows="8"
+											   maxlength="255" class="form-control required" value="${materialDefectRecords.remarks}"/>
+							</div>
+						</div>
+							<%--                <div class="layui-item layui-col-sm12  with-textarea">--%>
+							<%--                    <div id="test2" class="demo-tree-more"></div>--%>
+							<%--                </div>--%>
+					</div>
+					<div class="form-group layui-row first lw12">
+						<div class="form-group-label"><h2>资料缺失文件类型</h2></div>
+						<div class="layui-item layui-col-sm12  with-textarea">
+							<div id="test2" class="demo-tree-more"></div>
+						</div>
+					</div>
+					<input id="zuZhiList" name="zuZhiList" htmlEscape="false" readonly="true" style="display: none"/>
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>说明扫描件</h2></div>
+						<div id="addFile_attachment" style="display: none" class="upload-progress">
+							<span id="fileName_attachment"></span>
+							<b><span id="baifenbi_attachment"></span></b>
+							<div class="progress">
+								<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+								</div>
+							</div>
+						</div>
+						<input id="attachment_file" type="file" name="attachment_file" multiple="multiple"
+							   style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+						<span id="attachment_title"></span>
+						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+							<table id="listAttachment" class="table table-bordered table-condensed details">
+								<thead>
+								<tr>
+										<%-- <th>序号</th>--%>
+									<th>文件预览</th>
+									<th>上传人</th>
+									<th>上传时间</th>
+									<th width="200px">操作</th>
+								</tr>
+								</thead>
+								<tbody id="file_attachment">
+								<c:forEach items="${materialDefectRecord.workAttachments}" var="workClientAttachment"
+										   varStatus="status">
+									<tr>
+
+											<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${materialDefectRecords.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)"
+																	   onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a>
+																</td>
+															</c:when>
+															<c:otherwise>
+																<c:choose>
+																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																		<td><a class="attention-info" href="javascript:void(0)"
+																			   onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a>
+																		</td>
+																	</c:when>
+																	<c:otherwise>
+																		<td><a class="attention-info" href="javascript:void(0)"
+																			   onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a>
+																		</td>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+														<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<td><a class="attention-info" href="javascript:void(0)"
+																	   onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+																</td>
+															</c:when>
+															<c:otherwise>
+																<c:choose>
+																	<c:when test="${materialDefectRecords.uploadMode == 2}">
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+																				<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																						<td><a class="attention-info"
+																							   href="javascript:void(0)"
+																							   onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a>
+																						</td>
+																					</c:when>
+																					<c:otherwise>
+																						<c:choose>
+																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																								<td><a class="attention-info"
+																									   href="javascript:void(0)"
+																									   onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a>
+																								</td>
+																							</c:when>
+																							<c:otherwise>
+																								<td><a class="attention-info"
+																									   href="javascript:void(0)"
+																									   onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a>
+																								</td>
+																							</c:otherwise>
+																						</c:choose>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+																				<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																						<td><a href="javascript:void(0)"
+																							   onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
+																						</td>
+																					</c:when>
+																					<c:otherwise>
+																						<c:choose>
+																							<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																								<td><a class="attention-info"
+																									   href="javascript:void(0)"
+																									   onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a>
+																								</td>
+																							</c:when>
+																							<c:otherwise>
+																								<td><a class="attention-info"
+																									   href="javascript:void(0)"
+																									   onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a>
+																								</td>
+																							</c:otherwise>
+																						</c:choose>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+
+										<td>${workClientAttachment.createBy.name}</td>
+										<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+										<td class="op-td">
+											<div class="op-btn-box">
+													<%--附件下载删除--%>
+												<c:choose>
+													<c:when test="${materialDefectRecords.uploadMode == 2}">
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																<a href="${workClientAttachment.temporaryUrl}" target="_blank"
+																   class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+															</c:when>
+															<c:otherwise>
+																<a href="${workClientAttachment.temporaryUrl}"
+																   class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+															</c:otherwise>
+														</c:choose>
+													</c:when>
+													<c:otherwise>
+														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');"
+														   class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:otherwise>
+												</c:choose>
+												<c:if test="${workClientAttachment.collectFlag != 1}">
+													<a href="javascript:void(0)"
+													   onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')"
+													   class="op-btn op-btn-delete" style="background-color: #FFB800"><i
+															class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+												</c:if>
+												<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+													<a href="javascript:void(0)"
+													   onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')"
+												</c:if>
+
+											</div>
+										</td>
+									</tr>
+								</c:forEach>
+								</tbody>
+							</table>
+						</div>
+					</div>
+				</div>
 			</div>
 
 			<div class="form-group layui-row page-end"></div>
@@ -1855,8 +2157,6 @@
 		</div>
 		</div>
 </div>
-<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
-<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 <script>
 	function f1(row) {
 		// window.parent.document.getElementById('opinion').value = row;
@@ -2200,6 +2500,38 @@
 			content: value
 		});
 	}
+	//打开对话框(查看)
+	function openDialogListView(title,url,width,height){
+
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		$.ajax({
+			async: false,
+			url: url,
+			dataType: "json",
+			success: function (data) {
+				if(data.success){
+					top.layer.open({
+						type: 2,
+						skin: 'one-btn',
+						area: [width, height],
+						title: title,
+						maxmin: true, //开启最大化最小化按钮
+						content: url ,
+						btn: ['关闭'],
+						cancel: function(index){
+						}
+					});
+				}
+			}
+		});
+
+	}
 </script>
 </body>
 </html>

+ 16 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/electronicSeal/ruralProjectMessageElectronicSealList.jsp

@@ -1,5 +1,9 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/webpage/include/taglib.jsp"%>
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%
+	boolean admin = UserUtils.getUser().isAdmin();
+%>
 <html>
 <head>
 	<title>项目列表</title>
@@ -304,6 +308,10 @@
 				}else{
 					xml+="<a href=\"${ctx}/ruralProject/signatureCallBack/downLoadAttach?contractId="+ d.signatureContractId +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>审定单签章下载</a>"
 				}
+				<c:if test="<%=admin%>">
+					//撤回审定单审核
+					xml+="<a href=\"${ctx}/ruralProject/electronicSeal/approvalAdminRevoke?id=" + d.id + "\" onclick=\"return confirmx('确认要撤回该审定单签章吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;' > 撤回审定单签章</a>";
+				</c:if>
 
 			}
 			if(d.reportSignatureStatus == 5){
@@ -314,7 +322,10 @@
 				}else{
 					xml+="<a href=\"${ctx}/ruralProject/signatureCallBack/downLoadReportAttach?contractId="+ d.reportSignatureContractId +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>报告签章下载</a>"
 				}
-
+				<c:if test="<%=admin%>">
+					//撤回报告审核
+					xml+="<a href=\"${ctx}/ruralProject/electronicSeal/reportSignatureAdminRevoke?id=" + d.id + "\" onclick=\"return confirmx('确认要撤回该报告签章吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" style='height:32px;margin-top: 5px;margin-bottom: 5px;' > 撤回报告签章</a>";
+				</c:if>
 			}
 
 			if(d.reportInternalAuditStatus == 5){
@@ -325,7 +336,10 @@
 				}else{
 					xml+="<a href=\"${ctx}/ruralProject/signatureCallBack/downLoadReportAttach?contractId="+ d.reportInternalAuditSignatureContractId +"\" class=\"layui-btn  layui-btn-xs layui-bg-orange\" style='height:32px;margin-top: 5px;margin-bottom: 5px;'>内审报告签章下载</a>"
 				}
-
+				<c:if test="<%=admin%>">
+					//撤回内审报告审核
+					xml+="<a href=\"${ctx}/ruralProject/electronicSeal/reportInternalAuditSignatureAdminRevoke?id=" + d.id + "\" onclick=\"return confirmx('确认要撤回该内审报告签章吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" style='height:32px;margin-top: 5px;margin-bottom: 5px;' > 撤回内审报告签章</a>";
+				</c:if>
 			}
 			xml+="</div>";
 			return[xml].join('');

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1680 - 0
src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormAdd.jsp


+ 908 - 0
src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllFormDetail.jsp

@@ -0,0 +1,908 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>报销单管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+    <script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+
+            var reimbursementTypeRadio = '${workReimbursement.reimbursementType}';//后端获取值
+            if(undefined == reimbursementTypeRadio || null == reimbursementTypeRadio || '' == reimbursementTypeRadio || reimbursementTypeRadio == "0"){
+                $(".count2").hide();
+                $(".count1").show();
+            }else{
+                $(".count1").hide();
+                $(".count2").show();
+            }
+
+            if (${workReimbursement.ext == 0}){
+                $(".td1").removeClass("hide");
+                $(".project_reimbursement_div").show();
+                $(".not_project_reimbursement_div").hide();
+            }else {
+                $(".td1").addClass("hide");
+                $(".project_reimbursement_div").hide();
+                $(".not_project_reimbursement_div").show();
+            }
+            if (${workReimbursement.isPublic =='0'}){
+                $(".isPublic").addClass("hide");
+            }else {
+                $(".isPublic").removeClass("hide");
+            }
+            var state=${isShow};
+            if (state =='0'){
+                $(".isShow").hide();
+            }else {
+                $(".isShow").show();
+            }
+            if($("#backmoney").val()==null||$("#backmoney").val()==''){
+                $("#backmoney").val('0');
+            }
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                    number:{
+                        required:true
+                    },
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            var invoiceVATTaxes = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
+            var reimbursementElectronicInvoiceVATTaxesMoneys = "";
+            var reimbursementElectronicInvoiceVATTaxesTaxAmount = "";
+            var reimbursementElectronicInvoiceVATTaxesSumMoney = "";
+            for(var i = 0;i < invoiceVATTaxes;i++){
+                var moneys = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val();
+                var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
+                var rsumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
+
+                if (moneys!=undefined && !isNaN(moneys)){
+                    if(reimbursementElectronicInvoiceVATTaxesMoneys==""){
+                        reimbursementElectronicInvoiceVATTaxesMoneys = parseFloat(moneys).toFixed(2);
+                    }else {
+                        reimbursementElectronicInvoiceVATTaxesMoneys = (parseFloat(reimbursementElectronicInvoiceVATTaxesMoneys) + parseFloat(moneys)).toFixed(2);
+                    }
+                }
+                if (taxAmount!=undefined && !isNaN(taxAmount)){
+                    if(reimbursementElectronicInvoiceVATTaxesTaxAmount==""){
+                        reimbursementElectronicInvoiceVATTaxesTaxAmount = parseFloat(taxAmount).toFixed(2);
+                    }else {
+                        reimbursementElectronicInvoiceVATTaxesTaxAmount = (parseFloat(reimbursementElectronicInvoiceVATTaxesTaxAmount) + parseFloat(taxAmount)).toFixed(2);
+                    }
+                }
+                if (rsumMoney!=undefined && !isNaN(rsumMoney)){
+                    if(reimbursementElectronicInvoiceVATTaxesSumMoney==""){
+                        reimbursementElectronicInvoiceVATTaxesSumMoney = parseFloat(rsumMoney).toFixed(2);
+                    }else {
+                        reimbursementElectronicInvoiceVATTaxesSumMoney = (parseFloat(reimbursementElectronicInvoiceVATTaxesSumMoney) + parseFloat(rsumMoney)).toFixed(2);
+                    }
+                }
+            }
+            $("#reimbursementElectronicInvoiceVATTaxesMoneys").val(reimbursementElectronicInvoiceVATTaxesMoneys);
+            $("#reimbursementElectronicInvoiceVATTaxesTaxAmount").val(reimbursementElectronicInvoiceVATTaxesTaxAmount);
+            $("#reimbursementElectronicInvoiceVATTaxesSumMoney").val(reimbursementElectronicInvoiceVATTaxesSumMoney);
+
+
+
+        });
+
+    </script>
+    <style>
+        /*超过5个汉字,调整label的长度,以下是配套的*/
+        .layui-item .layui-form-label{
+            width:90px;
+        }
+        .form-group .layui-item .layui-input-block,
+        .query .layui-input-block {
+            margin-left: 116px;
+        }
+    </style>
+</head>
+<body>
+<div class="single-form">
+    <div class="container view-form">
+<form:form id="inputForm" modelAttribute="workReimbursement" action="${ctx}/workreimbursement/workReimbursement/save" method="post" class="form-horizontal" >
+<form:hidden path="ext"/>
+<%--<sys:message content="${message}"/>--%>
+    <div class="form-group layui-row first ">
+        <div class="form-group-label">
+            <div style="float: right">
+                <c:if test="${not empty historyShow}">
+                        <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogView('历史调整信息', '${ctx}/workReimbursementNew/workReimbursementNew/historyReimbursementInfo?id=${workReimbursement.id}','1100px', '35%','','关闭')" class="layui-btn layui-btn-sm" >历史调整信息</a>
+                </c:if>
+            </div>
+            <h2>基础信息</h2>
+        </div>
+
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label"><span class="require-item">*</span>报销项:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value = "${workReimbursement.reimbursementTypeStr}"/>
+            </div>
+        </div>
+
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销编号:</label>
+            <div class="layui-input-block">
+                <div class="input-group">
+                    <input htmlEscape="false"  readonly="true" style="background-color: #f1f1f1"  class="form-control layui-input" value="${workReimbursement.number}"/>
+                    <span class="input-group-btn">
+                        <label class="form-status"><c:choose><c:when test="${not empty workReimbursement.status}">${fns:getDictLabel(workReimbursement.status, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                     </span>
+                </div>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label"><span class="require-item">*</span>报销人:</label>
+            <div class="layui-input-block">
+                <form:input path="submitterName" readonly="true" cssStyle="background-color: #f1f1f1" htmlEscape="false"  id="submitterName"  class="form-control layui-input" value = "${workReimbursement.submitterName}"/>
+            </div>
+        </div>
+
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">所属部门:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false" style="background-color: #f1f1f1"  readonly="true" class="form-control layui-input" value = "${workReimbursement.officeName}"/>
+            </div>
+        </div>
+        <%--<div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">银行卡号:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false" readonly="true"  class="form-control layui-input" value = "${workReimbursement.bankCard}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销类型:</label>
+            <div class="layui-input-block">
+                <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                       value="<c:choose><c:when test="${workReimbursement.ext == 0}">项目报销</c:when><c:otherwise>非项目报销</c:otherwise></c:choose>"/>
+            </div>
+        </div>
+
+        <div class="layui-item layui-col-sm6 td1">
+            <label class="layui-form-label">报销项目:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.project.projectName}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销类别:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.typeName}"/>
+            </div>
+        </div>
+        &lt;%&ndash;<div class="layui-item layui-col-sm6 td1">
+            <label class="layui-form-label">项目负责人:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.projectMasterName}"/>
+            </div>
+        </div>&ndash;%&gt;
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label double-line">是否对公报销:</label>
+            <div class="layui-input-block">
+                <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                       value="<c:choose><c:when test="${workReimbursement.isPublic == '0'}">否</c:when><c:otherwise>是</c:otherwise></c:choose>"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">公司名称:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.comname}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">开户行:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bank}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">银行账号:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bankNo}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销人:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.submitterName}"/>
+            </div>
+        </div>--%>
+
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销日期:</label>
+            <div class="layui-input-block">
+                <input readonly="readonly" style="background-color: #f1f1f1" class="form-control layui-input" value="<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 with-textarea">
+            <label class="layui-form-label ">备注:</label>
+            <div class="layui-input-block">
+                <form:textarea path="remarks" cssStyle="background-color: #f1f1f1" readonly="true" htmlEscape="false" rows="4"  maxlength="255" value="${workReimbursement.remarks}"  class="form-control "/>
+            </div>
+        </div>
+    </div>
+    <%--<div class="form-group layui-row">
+        <div class="form-group-label"><h2>借款明细</h2></div>
+        <div class="layui-item layui-col-xs12 form-table-container" >
+            <table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
+                <thead>
+                <tr>
+                    <th width="190px">借款日期</th>
+                    <th width="190px">借款类型</th>
+                    <th width="190px">借款项目</th>
+                    <th width="190px">借款金额</th>
+                    <th width="180px">未还金额</th>
+                    <th width="100px">本次还款</th>
+                    <th width="120px">借款编号</th>
+                </tr>
+                </thead>
+                <tbody id="reimbursementBackList">
+                <c:if test="${not empty workReimbursement.reimbursementBackList}">
+                    <c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">
+                        <tr id="reimbursementBackList${index.index}">
+                            <td class="hide">
+                                <input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>
+                                <input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>
+                                <input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"
+                                       value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_6" readonly="true"  name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"   class="form-control number "/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>
+                            </td>
+                        </tr>
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+            <table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">
+                <tr>
+                    <td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td >
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td width="180px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td width="100px" style="vertical-align:middle;text-align: center;">
+                        <input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>
+                    </td>
+                    <td  width="120px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </div>--%>
+    <div class="form-group layui-row">
+        <div class="form-group-label"><h2>报销详情</h2></div>
+            <div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+                <table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                <thead>
+                <tr>
+                    <th width="200px">报销人</th>
+                    <th width="200px">报销部门</th>
+                    <th width="200px">报销类型</th>
+                    <th width="200px">报销项目</th>
+                    <th width="200px">报告号</th>
+                    <th width="200px">费用(元)</th>
+                    <th width="200px">收据张数</th>
+                    <th width="200px">出差天数</th>
+                    <th width="200px">内容</th>
+                </tr>
+                </thead>
+                <tbody id="workAccountList">
+                <c:if test="${not empty workReimbursement.workAccountList}">
+                    <c:forEach items="${workReimbursement.workAccountList}" var="workAccount" varStatus="index">
+                        <c:if test="${not empty workAccount.workAccountAuditList}">
+                            <c:forEach items="${workAccount.workAccountAuditList}" var="workAccountAudit" varStatus="index">
+                                <c:if test="${index.index==0}">
+                                    <tr>
+                                        <td class="hide">
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle">
+                                                    ${workAccount.reimbursementName}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle">
+                                                    ${workAccount.officeId}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.typeName}">
+                                                ${workAccount.typeName}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.project.projectName}">
+                                                ${workAccount.project.projectName}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.projectReportNumber}">
+                                                ${workAccount.projectReportNumber}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle">
+                                            <fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.bills}">
+                                                ${workAccount.bills}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.evectionNumber}">
+                                                ${workAccount.evectionNumber}
+                                        </td>
+                                        <td style="text-align: center; vertical-align: middle" title="${workAccount.remarks}">
+                                                ${workAccount.remarks}
+                                        </td>
+
+                                    </tr>
+                                </c:if>
+                                <c:if test="${index.index!=0}">
+                                    <tr>
+                                        <td class="hide">
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+
+                                    </tr>
+                                </c:if>
+
+                            </c:forEach>
+                        </c:if>
+                        <c:if test="${empty workAccount.workAccountAuditList}">
+                            <tr>
+                                <td class="hide">
+                                </td>
+                                <td style="text-align: center; vertical-align: middle">
+                                            ${workAccount.reimbursementName}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle">
+                                            ${workAccount.officeId}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.typeName}">
+                                        ${workAccount.typeName}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.project.projectName}">
+                                        ${workAccount.project.projectName}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.projectReportNumber}">
+                                        ${workAccount.projectReportNumber}
+                                </td>
+
+                                <td style="text-align: center; vertical-align: middle">
+                                    <fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.bills}">
+                                        ${workAccount.bills}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.evectionNumber}">
+                                        ${workAccount.evectionNumber}
+                                </td>
+                                <td style="text-align: center; vertical-align: middle" title="${workAccount.remarks}">
+                                        ${workAccount.remarks}
+                                </td>
+                            </tr>
+                        </c:if>
+
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+                <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+                    <thead>
+                    <tr style="border: 0px">
+                        <td width="200px" style="vertical-align:middle;text-align: center;background-color: #ffffff;"><label>总报销费用(元):</label></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="border: 0px;font-weight: bold;text-align: center;background-color: #ffffff;">
+                            <fmt:formatNumber value="${workReimbursement.money}" pattern="#,#00.00"/>
+                        </td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                        <td width="200px" style="background-color: #ffffff;"></td>
+                    </tr>
+                    </thead>
+                </table>
+        </div>
+    </div>
+    <div class="form-group layui-row count1">
+        <div class="form-group-label"><h2>专用发票信息</h2></div>
+        <div class="layui-item layui-col-xs12 form-table-container" >
+            <table id="contentTable2" class="table table-bordered table-condensed no-bottom-margin details">
+                <thead>
+                <tr>
+                    <th width="300px">发票代码</th>
+                    <th width="200px">发票号</th>
+                    <th width="200px">金额</th>
+                    <th width="200px">税额</th>
+                    <th width="200px">价税合计</th>
+                </tr>
+                </thead>
+                <tbody id="reimbursementVATTaxes">
+                <c:if test="${not empty workReimbursement.reimbursementVATTaxes}">
+                    <c:forEach items="${workReimbursement.reimbursementVATTaxes}" var="reimbursementVATTaxe" varStatus="index">
+                        <tr>
+                            <td class="hide">
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.invoiceCode}
+                            </td>
+
+                            <td>
+                                    ${reimbursementVATTaxe.invoiceNumber}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.money}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.taxAmount}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.sumMoney}
+                            </td>
+                        </tr>
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+        </div>
+    </div>
+
+    <div class="form-group layui-row count2">
+        <div class="form-group-label"><h2>数电发票信息</h2></div>
+        <div class="layui-item layui-col-xs12 form-table-container">
+            <table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
+                <thead>
+                <tr>
+                    <th width="200px"><font color="red">*</font>发票类型</th>
+                    <th width="200px"><font color="red">*</font>发票项目名</th>
+                    <th width="200px"><font color="red">*</font>发票号</th>
+                    <th width="200px"><font color="red">*</font>开票日期</th>
+                    <th width="200px"><font color="red">*</font>开票单位</th>
+                    <th width="200px"><font color="red">*</font>金额</th>
+                    <th width="200px"><font color="red">*</font>税额</th>
+                    <th width="200px"><font color="red">*</font>价税合计</th>
+                    <th width="200px">备注</th>
+                </tr>
+                </thead>
+                <tbody id="reimbursementElectronicInvoiceVATTaxes">
+                <c:if test="${not empty workReimbursement.reimbursementElectronicInvoiceVATTaxes}">
+                    <c:forEach items="${workReimbursement.reimbursementElectronicInvoiceVATTaxes}" var="reimbursementElectronicInvoiceVATTaxes" varStatus="index">
+                        <tr id="reimbursementElectronicInvoiceVATTaxes${index.index}">
+                                <%--发票类型--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceTypeStr}" onmouseover="this.title=this.value"  class="form-control "/>
+                            </td>
+                                <%--发票项目名--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceProjectName" onmouseover="this.title=this.value" readOnly="true" maxlength="500" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceProjectName" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceProjectName}" placeholder="请输入发票项目名"  class="form-control "/>
+                            </td>
+                                <%--发票号--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceNumber" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceNumber" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceNumber}" onmouseover="this.title=this.value" placeholder="请输入发票号"  class="form-control "/>
+                            </td>
+                                <%--开票日期--%>
+                            <td>
+                                <input lay-verify="date" placeholder="yyyy-MM-dd HH:mm:ss" readonly autocomplete="off" onmouseover="this.title=this.value" readOnly="true" id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceDate" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceDate" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceDateStr}"  onmouseover="this.title=this.value" class="form-control datetime"/>
+                            </td>
+                                <%--开票单位--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceUnit" onmouseover="this.title=this.value" readOnly="true" maxlength="30" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceUnit" type="text" value="${reimbursementElectronicInvoiceVATTaxes.invoiceUnit}"  placeholder="请输入开票单位"  onmouseover="this.title=this.value" class="form-control "/>
+                            </td>
+                                <%--金额--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_money" onmouseover="this.title=this.value" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.money}"  placeholder="请输入金额"  onmouseover="this.title=this.value" class="form-control "/>
+                            </td>
+                                <%--税额--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_taxAmount" onmouseover="this.title=this.value" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.taxAmount}"  placeholder="请输入税额"  onmouseover="this.title=this.value" class="form-control "/>
+                            </td>
+                                <%--合计价税--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_sumMoney" onmouseover="this.title=this.value" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[${index.index}].sumMoney" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.sumMoney}"  onmouseover="this.title=this.value" class="form-control"/>
+                            </td>
+                                <%--备注--%>
+                            <td>
+                                <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value" readOnly="true"  name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}"    class="form-control input"/>
+                            </td>
+                        </tr>
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+            <table id="contentTable4" class="table table-bordered table-condensed can-edit no-bottom-margin">
+                <thead>
+                <tr >
+                    <td width="200px" style="vertical-align:middle;text-align: center;"><label>费用汇总(元):</label></td>
+                    <td width="200px"></td>
+                    <td width="200px"></td>
+                    <td width="200px"></td>
+                    <td width="200px"></td>
+                    <td width="200px" style="border: 0px">
+                        <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesMoneys" name="reimbursementElectronicInvoiceVATTaxesMoneys" readonly="true" class="form-control layui-input" value=""/>
+                    </td>
+                    <td width="200px">
+                        <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesTaxAmount" name="reimbursementElectronicInvoiceVATTaxesTaxAmount" readonly="true" class="form-control layui-input" value=""/>
+                    </td>
+                    <td width="200px">
+                        <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesSumMoney" name="reimbursementElectronicInvoiceVATTaxesSumMoney" readonly="true" class="form-control layui-input" value=""/>
+                    </td>
+                    <td width="200px"></td>
+                </tr>
+                </thead>
+            </table>
+        </div>
+    </div>
+
+    <div class="form-group layui-row count2">
+        <input id="attachment_InvoiceReimbursement_file" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(this.value);"/>
+        <span id="attachment_title"></span>
+        <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+            <table id="listAttachment" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                        <%-- <th>序号</th>--%>
+                    <th>数电发票文件预览</th>
+                    <th>上传人</th>
+                    <th>上传时间</th>
+                    <th width="200px">操作</th>
+                </tr>
+                </thead>
+                <tbody id="file_attachment_InvoiceReimbursement">
+                <c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" var = "workClientAttachment" varStatus="status">
+                    <tr>
+
+                            <%-- <td>${status.index + 1}</td>--%>
+                        <c:choose>
+                            <c:when test="${workReimbursement.uploadMode == 2}">
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:when>
+                            <c:otherwise>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${workReimbursement.uploadMode == 2}">
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <c:choose>
+                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <c:choose>
+                                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                        <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                    </c:when>
+                                                                    <c:otherwise>
+                                                                        <c:choose>
+                                                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:when>
+                                                                            <c:otherwise>
+                                                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                            </c:otherwise>
+                                                                        </c:choose>
+                                                                    </c:otherwise>
+                                                                </c:choose>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:otherwise>
+                        </c:choose>
+
+                        <td>${workClientAttachment.createBy.name}</td>
+                        <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                        <td class="op-td">
+                            <div class="op-btn-box" >
+                                    <%--附件下载删除--%>
+                                <c:choose>
+                                    <c:when test="${workReimbursement.uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
+                                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </c:otherwise>
+                                </c:choose>
+                                <%--<c:if test="${workClientAttachment.collectFlag != 1}">
+                                    <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                </c:if>--%>
+
+                            </div>
+                        </td>
+                    </tr>
+                </c:forEach>
+                </tbody>
+            </table>
+        </div>
+    </div>
+
+    <div class="form-group layui-row">
+        <div class="form-group-label"><h2>附件</h2></div>
+        <div class="layui-item layui-col-xs12 form-table-container" >
+            <table id="upTable" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                        <%-- <th>序号</th>--%>
+                    <th>文件预览</th>
+                    <th>上传人</th>
+                    <th>上传时间</th>
+                    <th width="150px">操作</th>
+                </tr>
+                </thead>
+                <tbody id="file_attachment">
+                <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
+                    <tr>
+                            <%-- <td>${status.index + 1}</td>--%>
+                        <c:choose>
+                            <c:when test="${workReimbursement.uploadMode == 2}">
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:when>
+                            <c:otherwise>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:otherwise>
+                        </c:choose>
+
+                        <td>${workClientAttachment.createBy.name}</td>
+                        <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                        <td class="op-td">
+                            <div class="op-btn-box" >
+                                    <%--附件下载删除--%>
+                                <c:choose>
+                                    <c:when test="${workReimbursement.uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
+                                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </c:otherwise>
+                                </c:choose>
+                                <c:if test="${workClientAttachment.collectFlag != 1}">
+                                    <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                </c:if>
+                             <%--   <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                    <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                </c:if>--%>
+                            </div>
+                        </td>
+                    </tr>
+                </c:forEach>
+                </tbody>
+            </table>
+        </div>
+    </div>
+
+    <div class="form-group layui-row">
+        <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
+        <div class="layui-item layui-col-xs12 form-table-container" >
+            <act:flowChart procInsId="${workReimbursement.act.procInsId}"/>
+            <act:histoicFlow procInsId="${workReimbursement.act.procInsId}" />
+        </div>
+    </div>
+    <div class="form-group layui-row page-end"></div>
+</form:form>
+    </div>
+</div>
+</body>
+</html>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1954 - 0
src/main/webapp/webpage/modules/workreimbursement/all/workReimbursementAllModifyApply.jsp


+ 1 - 0
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewAudit.jsp

@@ -134,6 +134,7 @@
 		<form:hidden id="flag" path="act.flag"/>
 		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
 		<input type="hidden" id="reimbursementType" name="reimbursementType" value="${workReimbursement.reimbursementType}"/>
+		<input type="hidden" id="pageFlag" name="pageFlag" value="${pageFlag}"/>
 		<div class="form-group layui-row first ">
 			<div class="form-group-label"><h2>基础信息</h2></div>
 

+ 8 - 9
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewFormAdd.jsp

@@ -411,8 +411,6 @@
 
         }
         function delRowA(obj, prefix){
-            console.log("obj:",obj)
-            console.log("prefix:",prefix)
             var id = $(prefix+"_id");
             var delFlag = $(prefix+"_delFlag");
             var invoiceNumber = $(prefix+"_invoiceNumber").val();
@@ -492,14 +490,11 @@
                         async: false,
                         processData: false,
                         success:function (data) {
-                            console.log(data)
                             if(data.flag){
                                 top.layer.msg(data.message,{icon:2});
                             }else{
-                                console.log(3123124)
                                 //获取专用发票信息 行数
                                 var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
-                                console.log("trlen:" , trlen)
                                 //创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
                                 var includeFlag = false;
                                 //xml文件处理
@@ -584,7 +579,6 @@
                                     var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
                                     var divId = "_attachment_InvoiceReimbursement";
                                     $("#addFile"+divId).show();
-                                    console.log(file)
                                     invoiceReimbursementMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
                                 }else{
                                     parent.layer.msg("该电子发票xml文件已经上传,无法重复上传!", {icon: 5});
@@ -643,7 +637,6 @@
 
         function deleteInvoiceReimbursementByNumber(number){
             if (number){
-                console.log("invoiceNumber:",number)
                 //xml文件处理
                 //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
                 //获取专用发票信息 行数
@@ -727,7 +720,6 @@
                 var file = files[i];
                 var attachmentId = "";
                 var attachmentFlag = "6";
-                console.log(file);
                 var timestamp=new Date().getTime();
                 var storeAs = "wrkReimbursement";
                 var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
@@ -886,7 +878,14 @@
         <input type="hidden" id="numberFlag" value="${workReimbursement.number}" />
         <input id="wId" type="hidden" value="${workReimbursement.id}">
         <div class="form-group layui-row first">
-            <div class="form-group-label"><h2>基础信息</h2></div>
+            <div class="form-group-label">
+                <div style="float: right">
+                    <c:if test="${not empty historyShow}">
+                        <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogView('历史调整信息', '${ctx}/workReimbursementNew/workReimbursementNew/historyReimbursementInfo?id=${workReimbursement.id}','1100px', '35%','','关闭')" class="layui-btn layui-btn-sm" >历史调整信息</a>
+                    </c:if>
+                </div>
+                <h2>基础信息</h2>
+            </div>
             <div class="layui-item layui-col-sm6">
                 <label class="layui-form-label"><span class="require-item">*</span>报销类型:</label>
                 <div class="layui-input-block layui-form">

+ 79 - 0
src/main/webapp/webpage/modules/workreimbursement/new/workReimbursmentHistoryView.jsp

@@ -0,0 +1,79 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>发票管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		#workInvoiceProjectRelationList td{
+			padding-left: 0px;
+			padding-right: 0px;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+
+		  return false;
+		}
+		$(document).ready(function() {
+			$("#name").focus();
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body >
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="WorkReimbursementadminupdatehistory" action="" method="post" class="form-horizontal">
+
+			<div class="form-group layui-row first lw7">
+				<div class="form-group-label"><h2>历史报销修改记录信息</h2></div>
+				<div class=""  style="padding:0px">
+					<table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="200px">修改时间</th>
+							<th width="200px">修改人</th>
+						</tr>
+						</thead>
+						<tbody id="workInvoiceProjectRelationList">
+						<c:forEach items="${adminUpdateReimbursementInfoByIdList}" var="list">
+							<tr>
+								<td>
+									<a onclick="openDialogView('修改详情', '${ctx}/workReimbursementNew/workReimbursementNew/getWorkReimbursementadminupdatehistoryById?id=${list.id}','95%', '95%')">
+									<input style="text-align:center;" type="text" value="<fmt:formatDate value="${list.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control"/></a>
+								</td>
+								<td>
+									<input style="text-align:center;" type="text" value="${list.createBy.name}" readonly="readonly"  class="form-control"/>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

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

@@ -1,6 +1,9 @@
 <%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/webpage/include/taglib.jsp"%>
+<%
+    boolean admin = UserUtils.getUser().isAdmin();
+%>
 <html>
 <head>
     <title>报销单管理</title>
@@ -264,6 +267,14 @@
                 ,{align:'center',title:"操作",width:130,templet:function(d){
                         ////对操作进行初始化
                         var xml = "<div class=\"layui-btn-group\">";
+                        if(d.notifyFlag != undefined && d.notifyFlag !=null && "" != d.notifyFlag && 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>";
+                        }
+                        if(d.notifyFlag != undefined && d.notifyFlag !=null && "" != d.notifyFlag && d.notifyFlag == 3)
+                        {
+                            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>";
+                        }
                         if(d.cancancel != undefined && d.cancancel == "1")
                             xml += "<a href=\"${ctx}/workreimbursement/workReimbursementAll/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\">撤回</a>";
                         if(d.canedit1 != undefined && d.canedit1 == "1")
@@ -274,7 +285,9 @@
                             xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" >修改</a>";
                         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"){
+                            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>";
+                        }
                         xml+="</div>"
                         return xml;
                     }}
@@ -288,6 +301,8 @@
                     ,"id":"${workReimbursement.id}"
                     ,"submitterId":"${index.index+1}"
                     ,"realnumber":"${workReimbursement.number}"
+                    ,"notifyFlag":"${workReimbursement.notifyFlag}"
+                    ,"notifyId":"${workReimbursement.notifyId}"
                     ,"number":"${workReimbursement.number}"
                     ,"taskName":"${workReimbursement.taskName}"
                     ,"reimbursementType":"${workReimbursement.reimbursementType}"
@@ -567,6 +582,100 @@
                 }
             }
         });
+    }
+    function openDialogreAdminModify(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: ['修改','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+
+
+    }
+
+
+    function notifyDialogre(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:"three-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,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(2) ){
+                    top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+                return false;
+            },
+            btn3: function(index){
+            }
+        });
 
     }
 </script>

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

@@ -127,7 +127,14 @@
 <form:hidden path="ext"/>
 <%--<sys:message content="${message}"/>--%>
     <div class="form-group layui-row first ">
-        <div class="form-group-label"><h2>基础信息</h2></div>
+        <div class="form-group-label">
+            <div style="float: right">
+                <c:if test="${not empty historyShow}">
+                        <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogView('历史调整信息', '${ctx}/workReimbursementNew/workReimbursementNew/historyReimbursementInfo?id=${workReimbursement.id}','1100px', '35%','','关闭')" class="layui-btn layui-btn-sm" >历史调整信息</a>
+                </c:if>
+            </div>
+            <h2>基础信息</h2>
+        </div>
 
         <div class="layui-item layui-col-sm6">
             <label class="layui-form-label"><span class="require-item">*</span>报销项:</label>

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

@@ -1,6 +1,9 @@
 <%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ include file="/webpage/include/taglib.jsp"%>
+<%
+    boolean admin = UserUtils.getUser().isAdmin();
+%>
 <html>
 <head>
     <title>报销单管理</title>
@@ -331,6 +334,8 @@
                             xml += "<a href=\"${ctx}/workreimbursement/workReimbursement/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 撤回</a>";
                         if(d.canedit1 != undefined && d.canedit1 == "1")
                             xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改报销单', '${ctx}/workReimbursementNew/workReimbursementNew/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改</a>";
+                        if(<%=admin%> && d.status == "5")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreAdminModify('管理员修改报销单', '${ctx}/workReimbursementNew/workReimbursementNew/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改</a>";
                         if(d.canedit2 != undefined && d.canedit2 == "1")
                             //判断是什么流程(新旧流程)
                             if(d.notifyFlag != undefined && d.notifyFlag !=null && "" != d.notifyFlag && d.notifyFlag == 2){
@@ -606,6 +611,48 @@
     }
 
 
+    function openDialogreAdminModify(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: ['修改','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+
+
+    }
+
+
     //打开对话框(查看)
     function openDialogListView(title,url,id,width,height){