李宇
2021-11-12 43ee95fbdcb6fe0a9d548d0935c23c232d5ffeaa
src/main/java/com/nanometer/smartlab/controller/ApprovalMngController.java
@@ -93,7 +93,8 @@
        String id=getUserId();
        SysUser sysUser = sysUserService.getSysUser(id);
        // 不是管理员时
        if (sysUser.getSeeFlag().getKey() != SeeFlag.MANAGE.getKey()) {
        if (sysUser.getSeeFlag().getKey() != SeeFlag.MANAGE.getKey()
        && sysUser.getSeeFlag().getKey() != SeeFlag.LEADING.getKey()) {
            this.approvalFlag=false;
        }else {
            this.approvalFlag=true;
@@ -242,6 +243,7 @@
            boolean result = this.opeApplyService.updateSelectedOpeApplyStatus(memo, applyIds, adminApproveUserId, adminApplyIds,firstUserIds);
            FacesUtils.info("已批准。");
            RequestContext.getCurrentInstance().execute("PF('approvalDialog').hide()");
            RequestContext.getCurrentInstance().update("approvalMngForm:approvalMngDataTable");
        } catch (Exception e) {
            logger.error("操作失败。", e);
            FacesUtils.warn("操作失败。");
@@ -270,6 +272,7 @@
            FacesUtils.info("已拒绝。");
            RequestContext.getCurrentInstance().execute("PF('approvalDialog').hide()");
            RequestContext.getCurrentInstance().update("approvalMngForm:approvalMngDataTable");
        } catch (Exception e) {
            logger.error("操作失败。", e);
            FacesUtils.warn("操作失败。");
@@ -466,22 +469,23 @@
                    /*} catch (Exception e) {
                        logger.error(e);
                    }*/
                    selectedList = null;
                    return list;
                }
                @Override
                public OpeApply getRowData(String rowKey) {
                    Iterator<OpeApply> iterator = this.iterator();
                    if (iterator != null) {
                        OpeApply oa = null;
                        while (iterator.hasNext()) {
                            oa = iterator.next();
                            if (rowKey.equals(oa.getId())) {
                                return oa;
                            }
                        }
                    }
                    return null;
//                    Iterator<OpeApply> iterator = this.iterator();
//                    if (iterator != null) {
//                        OpeApply oa = null;
//                        while (iterator.hasNext()) {
//                            oa = iterator.next();
//                            if (rowKey.equals(oa.getId())) {
//                                return oa;
//                            }
//                        }
//                    }
                    return opeApplyService.getOpeApply(rowKey);
                }
            };
        }