Kaynağa Gözat

报销添加管理员修改功能

user5 1 yıl önce
ebeveyn
işleme
7434a6deeb
18 değiştirilmiş dosya ile 1016 ekleme ve 70 silme
  1. 131 0
      src/main/java/com/jeeplus/common/service/BaseService.java
  2. 2 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  3. 1 1
      src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java
  4. 31 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  5. 24 0
      src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkReimbursementDao.java
  6. 28 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursementadminupdatehistory.java
  7. 75 4
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  8. 8 0
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementController.java
  9. 128 54
      src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementNewController.java
  10. 0 2
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  11. 64 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  12. 1 1
      src/main/webapp/static/common/css/style.css
  13. 335 3
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp
  14. 8 1
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursementNewFormAdd.jsp
  15. 79 0
      src/main/webapp/webpage/modules/workreimbursement/new/workReimbursmentHistoryView.jsp
  16. 46 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp
  17. 8 1
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  18. 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);
+        }
+    }
+
     /**
      * 数据范围过滤
      *

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

@@ -4712,10 +4712,10 @@ 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},'%')");
+			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", "");
 			}

+ 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());

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

@@ -6892,6 +6892,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();

+ 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);
 }

+ 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;
+    }
+}

+ 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);
+    }
 }

+ 8 - 0
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" :

+ 128 - 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";
 	}
@@ -419,4 +441,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";
+	}
+
 }

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

@@ -3462,7 +3462,6 @@
 				and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
 			</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 !=''">
@@ -3684,7 +3683,6 @@
 				and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
 			</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 !=''">

+ 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>

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

@@ -886,7 +886,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>

+ 46 - 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>
@@ -274,7 +277,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}/workReimbursementNew/workReimbursementNew/form?id="+ d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 修改</a>";
+                        }
                         xml+="</div>"
                         return xml;
                     }}
@@ -567,8 +572,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){
+            }
+        });
+
 
     }
+
 </script>
 </body>
 </html>

+ 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){