| | |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | |
| | | this.dangerousFlag = false; |
| | | this.dangerousFlag = false;//二级审批标志 |
| | | this.adminApproveUserId = null; |
| | | for (OpeApply opeApply : this.selectedList) { |
| | | if (!this.opeApplyService.isApplyPendingApproval(opeApply)) { |
| | |
| | | dangerousFlag = true; |
| | | } |
| | | }*/ |
| | | String controlProducts = opeApply.getReagent().getControlProducts(); |
| | | if (StringUtils.isNotBlank(controlProducts)) { |
| | | String baseMetaValue = baseMetaService.getBaseMetaValue(controlProducts); |
| | | if (StringUtils.isNotBlank(baseMetaValue) && !"15fc90a1f7bf43bda01313904b543195".equals(this.getUser().getRoleId())) { |
| | | if(getActiveEnv().equalsIgnoreCase("gslab")){//姑苏实验室打开二级审批 |
| | | if(StringUtils.isBlank(opeApply.getBeforeApproveUserId())){ |
| | | dangerousFlag = true; |
| | | } |
| | | |
| | | }else{//其他情形:管制品打开二级审批 |
| | | String controlProducts = opeApply.getReagent().getControlProducts(); |
| | | if (StringUtils.isNotBlank(controlProducts)) { |
| | | String baseMetaValue = baseMetaService.getBaseMetaValue(controlProducts); |
| | | if (StringUtils.isNotBlank(baseMetaValue) &&StringUtils.isBlank(opeApply.getBeforeApproveUserId())) { |
| | | dangerousFlag = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | this.memo = null; |
| | |
| | | applyIds.add(opeApply.getId()); |
| | | }*/ |
| | | |
| | | System.out.println("管制品========="+opeApply.getReagent().getControlProducts()); |
| | | String baseMetaValue = baseMetaService.getBaseMetaValue(opeApply.getReagent().getControlProducts()); |
| | | if (this.dangerousFlag && StringUtils.isNotBlank(baseMetaValue)) { |
| | | //if (this.dangerousFlag && StringUtils.isNotBlank(baseMetaValue)) { |
| | | if (this.dangerousFlag&& StringUtils.isBlank(opeApply.getBeforeApproveUserId())) { |
| | | adminApplyIds.add(opeApply.getId()); |
| | | firstUserIds.add(opeApply.getApproveUserId()); |
| | | } else { |
| | | applyIds.add(opeApply.getId()); |
| | | } |
| | | } |
| | | System.out.println("adminApplyIds=========="+adminApplyIds); |
| | | System.out.println(applyIds); |
| | | 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("操作失败。"); |
| | |
| | | |
| | | FacesUtils.info("已拒绝。"); |
| | | RequestContext.getCurrentInstance().execute("PF('approvalDialog').hide()"); |
| | | RequestContext.getCurrentInstance().update("approvalMngForm:approvalMngDataTable"); |
| | | } catch (Exception e) { |
| | | logger.error("操作失败。", e); |
| | | FacesUtils.warn("操作失败。"); |
| | |
| | | /*} 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); |
| | | } |
| | | }; |
| | | } |