| | |
| | | */ |
| | | private LazyDataModel<OpeReagentStatus> reagentStoreDataModel; |
| | | |
| | | private String reagentId; |
| | | private Long reagentId; |
| | | private List<SysReagent> reagentSelectList; |
| | | private List<OpeReagentStatus> selectedStoreList; |
| | | |
| | |
| | | /** |
| | | * 数据模型 |
| | | */ |
| | | private String laboratoryId; |
| | | private String laboratoryContainerId; |
| | | private Long laboratoryId; |
| | | private Long laboratoryContainerId; |
| | | |
| | | /** |
| | | * SpringMenu中初始化 |
| | |
| | | List<OpeReagentStatus> list = null; |
| | | System.out.println(reagentId); |
| | | try { |
| | | int count = opeReagentStatusService.getOpeReagentStatusTotalCountForLab(reagentId, null, |
| | | int count = opeReagentStatusService.getOpeReagentStatusTotalCountForLab(reagentId,null, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeReagentStatusService.getOpeReagentStatusListForLab(reagentId, null, |
| | | list = opeReagentStatusService.getOpeReagentStatusListForLab(reagentId,null, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName, first, pageSize); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | |
| | | @Override |
| | | public OpeReagentStatus getRowData(String rowKey) { |
| | | Iterator<OpeReagentStatus> iterator = this.iterator(); |
| | | if (iterator != null) { |
| | | OpeReagentStatus su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if (rowKey.equals(su.getId())) { |
| | | return su; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | // Iterator<OpeReagentStatus> iterator = this.iterator(); |
| | | // if (iterator != null) { |
| | | // OpeReagentStatus su = null; |
| | | // while (iterator.hasNext()) { |
| | | // su = iterator.next(); |
| | | // if (rowKey.equals(su.getId())) { |
| | | // return su; |
| | | // } |
| | | // } |
| | | // } |
| | | return null; |
| | | } |
| | | }; |
| | | } |
| | |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | | } |
| | | selectedStoreList = null; |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public OpeReagentStatus getRowData(String rowKey) { |
| | | Iterator<OpeReagentStatus> iterator = this.iterator(); |
| | | if (iterator != null) { |
| | | OpeReagentStatus su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if (rowKey.equals(su.getId())) { |
| | | return su; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | // Iterator<OpeReagentStatus> iterator = this.iterator(); |
| | | // if (iterator != null) { |
| | | // OpeReagentStatus su = null; |
| | | // while (iterator.hasNext()) { |
| | | // su = iterator.next(); |
| | | // if (rowKey.equals(su.getId())) { |
| | | // return su; |
| | | // } |
| | | // } |
| | | // } |
| | | Long id=Long.valueOf(rowKey); |
| | | return opeReagentStatusService.getOpeReagentStatusById(id); |
| | | } |
| | | }; |
| | | } |
| | |
| | | |
| | | public void exportLabStock() { |
| | | try { |
| | | List<Map> list = opeReagentStatusService.selectExportList(reagentId, null, |
| | | List<Map> list = opeReagentStatusService.selectExportList(null, null, |
| | | ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); |
| | | opeReagentStatusService.exportLabStock2Excel(list); |
| | | FacesUtils.info("导出成功"); |
| | |
| | | this.reagentSelectList = reagentSelectList; |
| | | } |
| | | |
| | | public String getReagentId() { |
| | | public Long getReagentId() { |
| | | return reagentId; |
| | | } |
| | | |
| | | public void setReagentId(String reagentId) { |
| | | public void setReagentId(Long reagentId) { |
| | | this.reagentId = reagentId; |
| | | } |
| | | |
| | |
| | | this.reagentCode = reagentCode; |
| | | } |
| | | |
| | | public String getLaboratoryId() { |
| | | public Long getLaboratoryId() { |
| | | return laboratoryId; |
| | | } |
| | | |
| | | public void setLaboratoryId(String laboratoryId) { |
| | | public void setLaboratoryId(Long laboratoryId) { |
| | | this.laboratoryId = laboratoryId; |
| | | } |
| | | |
| | | public String getLaboratoryContainerId() { |
| | | public Long getLaboratoryContainerId() { |
| | | return laboratoryContainerId; |
| | | } |
| | | |
| | | public void setLaboratoryContainerId(String laboratoryContainerId) { |
| | | public void setLaboratoryContainerId(Long laboratoryContainerId) { |
| | | this.laboratoryContainerId = laboratoryContainerId; |
| | | } |
| | | |
| | |
| | | // 是试剂柜入库,还是错误入库 |
| | | // 暂定是试剂柜入库 |
| | | public void onSaveBtnClick() { |
| | | if (StringUtils.isBlank(laboratoryId)) { |
| | | if (laboratoryId==null) { |
| | | FacesUtils.warn("请选择实验室。"); |
| | | return; |
| | | } |
| | | if (StringUtils.isBlank(laboratoryContainerId)) { |
| | | if (laboratoryContainerId==null) { |
| | | FacesUtils.warn("请选择临时存储库。"); |
| | | return; |
| | | } |
| | |
| | | } |
| | | |
| | | for (OpeReagentStatus opeReagentStatus : selectedStoreList) { |
| | | if (opeReagentStatus.getStatus().getKey() != ArrivalStatus.PERSONAL.getKey()) { |
| | | if (opeReagentStatus.getStatus() != ArrivalStatus.PERSONAL.getKey()) { |
| | | FacesUtils.warn("只能存放个人领用中的试剂。"); |
| | | return; |
| | | } |