| | |
| | | private boolean isSearch = false; |
| | | private boolean isAnalysSearch = false; |
| | | private LazyDataModel<HazardousWaste> analysisDataModel; |
| | | private HazardousWaste selectedOne; |
| | | |
| | | @Resource |
| | | private HazardousWasteService hazardousWasteService; |
| | |
| | | statusList.add("待确认"); |
| | | statusList.add("已确认"); |
| | | statusList.add("已拒绝"); |
| | | statusList.add("已取消"); |
| | | return statusList; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public void cancelOne(){ |
| | | //待确认状态的才能取消 |
| | | if (this.selectedOne == null) { |
| | | FacesUtils.warn("请选择"); |
| | | return; |
| | | } |
| | | if (!"待确认".equals(this.selectedOne.getStatus())) { |
| | | FacesUtils.warn("非待确认不能取消"); |
| | | return; |
| | | } |
| | | try { |
| | | this.selectedOne.setStatus("已取消"); |
| | | hazardousWasteService.updateWaste(this.selectedOne); |
| | | FacesUtils.warn("操作成功"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | FacesUtils.warn("操作失败"); |
| | | } |
| | | } |
| | | |
| | | public void recoverOne(){ |
| | | if (this.selectedOne == null) { |
| | | FacesUtils.warn("请选择"); |
| | | return; |
| | | } |
| | | if (!"已取消".equals(this.selectedOne.getStatus())) { |
| | | FacesUtils.warn("非已取消不能恢复"); |
| | | return; |
| | | } |
| | | try { |
| | | this.selectedOne.setStatus("待确认"); |
| | | hazardousWasteService.updateWaste(this.selectedOne); |
| | | FacesUtils.warn("操作成功"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | FacesUtils.warn("操作失败"); |
| | | } |
| | | } |
| | | |
| | | public String getTid() { |
| | | return tid; |
| | | } |
| | |
| | | public void setTid(String tid) { |
| | | this.tid = tid; |
| | | } |
| | | |
| | | public HazardousWaste getSelectedOne() { |
| | | return selectedOne; |
| | | } |
| | | |
| | | public void setSelectedOne(HazardousWaste selectedOne) { |
| | | this.selectedOne = selectedOne; |
| | | } |
| | | } |