kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
src/main/java/com/nanometer/smartlab/controller/BaseMetaController.java
@@ -29,10 +29,10 @@
    @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;
@@ -66,7 +66,7 @@
                    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;
                }
@@ -82,7 +82,7 @@
                    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;
                }
@@ -105,7 +105,7 @@
                FacesUtils.warn("请选择数据。");
                return;
            }
            List<String> ids = new ArrayList<String>();
            List<Long> ids = new ArrayList<Long>();
            for (BaseMeta bm : this.selectedList) {
                ids.add(bm.getId());
            }
@@ -126,10 +126,10 @@
                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) {
@@ -150,19 +150,20 @@
//                            }
//                        }
//                    }
                    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() {