| | |
| | | private OpeOrderService opeOrderService; |
| | | |
| | | private LazyDataModel<OpeApply> dataModel; |
| | | private LazyDataModel<OpeApply> supplerRequireMngDataModel; |
| | | private OpeOrder opeOrder; |
| | | private List<OpeApply> selectedList; |
| | | private String reagentName; |
| | |
| | | public List<OpeApply> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<OpeApply> list = null; |
| | | try { |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null,null,null); |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline,null, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null,null,null,(byte)1); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null, first, pageSize,null,null); |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline,null, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null, first, pageSize,null,null,(byte)1); |
| | | } |
| | | } 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; |
| | | // if (iterator != null) { |
| | | // OpeApply oa = null; |
| | | // while (iterator.hasNext()) { |
| | | // oa = iterator.next(); |
| | | // if (rowKey.equals(oa.getId())) { |
| | | // return oa; |
| | | // } |
| | | // } |
| | | // } |
| | | return opeApplyService.getOpeApply(rowKey); |
| | | } |
| | | }; |
| | | } |
| | | return dataModel; |
| | | } |
| | | |
| | | public LazyDataModel<OpeApply> getSupplerRequireMngDataModel() { |
| | | return new LazyDataModel<OpeApply>() { |
| | | @Override |
| | | public List<OpeApply> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<OpeApply> list = null; |
| | | try { |
| | | int count = opeApplyService.getOpeApplySupplerRequireMngTotalCount(getUser(),reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(),(byte)1); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplySupplerRequireMngList(getUser(),reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(), first, pageSize,(byte)1); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | | } |
| | | selectedList = null; |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public OpeApply getRowData(String rowKey) { |
| | | return opeApplyService.getOpeApply(rowKey); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public OpeOrder getOpeOrder() { |
| | | return opeOrder; |
| | | } |