public void deleteOrgOrganization(String id) { if (!StringUtils.isBlank(id)) { OrgOrganization org = OrgOrganization.FACTORY.create(); org.setOrgid(new BigDecimal(id)); deleteOrgOrganization(new OrgOrganization[] {org}); } }
/** * 获取子机构同时获取父机构信息 * * @param child */ public OrgOrganization getOrgOrganizationWithParent(OrgOrganization child) { IDASCriteria dasCriteria = getDASTemplate().createCriteria(OrgOrganization.QNAME); dasCriteria.add(ExpressionHelper.eq("orgid", child.getOrgid())); dasCriteria.addAssociation("orgOrganization"); OrgOrganization[] orgs = getDASTemplate().queryEntitiesByCriteriaEntity(OrgOrganization.class, dasCriteria); if (orgs != null && orgs.length == 1) { return orgs[0]; } return OrgOrganization.FACTORY.create(); }