| | |
| | | @Resource |
| | | private BaseMetaService baseMetaService; |
| | | |
| | | private String groupId; |
| | | private String groupCode; |
| | | private String keyword; |
| | | private LazyDataModel<BaseMeta> dataModel; |
| | | private BaseMeta baseMeta; |
| | | private BaseMeta baseMeta=new BaseMeta(); |
| | | private List<BaseMeta> selectedList; |
| | | |
| | | private int action; |
| | |
| | | return; |
| | | } |
| | | |
| | | if (this.baseMetaService.isBaseMetaExist(this.baseMeta.getGroupId(), this.baseMeta.getMetaKey(), null)) { |
| | | if (this.baseMetaService.isBaseMetaExist(this.baseMeta.getGroupCode(), this.baseMeta.getMetaKey(), null)) { |
| | | FacesUtils.warn("种类下存在相同的字典编码。"); |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | if (this.baseMetaService.isBaseMetaExist(this.baseMeta.getGroupId(), this.baseMeta.getMetaKey(), this.baseMeta.getId())) { |
| | | if (this.baseMetaService.isBaseMetaExist(this.baseMeta.getGroupCode(), this.baseMeta.getMetaKey(), this.baseMeta.getId())) { |
| | | FacesUtils.warn("种类下存在相同的字典编码。"); |
| | | return; |
| | | } |
| | |
| | | FacesUtils.warn("请选择数据。"); |
| | | return; |
| | | } |
| | | List<String> ids = new ArrayList<String>(); |
| | | List<Long> ids = new ArrayList<Long>(); |
| | | for (BaseMeta bm : this.selectedList) { |
| | | ids.add(bm.getId()); |
| | | } |
| | |
| | | public List<BaseMeta> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<BaseMeta> list = null; |
| | | try { |
| | | int count = baseMetaService.getBaseMetaTotalCount(groupId, keyword); |
| | | int count = baseMetaService.getBaseMetaTotalCount(groupCode, keyword); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = baseMetaService.getBaseMetaList(groupId, keyword, first, pageSize); |
| | | list = baseMetaService.getBaseMetaList(groupCode, keyword, first, pageSize); |
| | | } |
| | | selectedList = new ArrayList<>(); |
| | | } catch (Exception e) { |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | return baseMetaService.getBaseMeta(rowKey); |
| | | Long id=Long.valueOf(rowKey); |
| | | return baseMetaService.getBaseMeta(id); |
| | | } |
| | | }; |
| | | } |
| | | return dataModel; |
| | | } |
| | | |
| | | public String getGroupId() { |
| | | return groupId; |
| | | public String getGroupCode() { |
| | | return groupCode; |
| | | } |
| | | |
| | | public void setGroupId(String groupId) { |
| | | this.groupId = groupId; |
| | | public void setGroupCode(String groupCode) { |
| | | this.groupCode = groupCode; |
| | | } |
| | | |
| | | public String getKeyword() { |