Commit 2298ca73 by shiwenbo

组织机构增加获取生效中的组织机构

parent 1a79563b
......@@ -168,7 +168,8 @@ public class DinasOrganizationDaoImpl implements DinasOrganizationDao, DinasOrga
public List<KObject> queryAllOrganization() {
return template.execute(session -> {
Query<KObject> query = session.createQuery(" from " + ORGANIZATION_ENTITY + " as f ", KObject.class);
Query<KObject> query = session.createQuery(" from " + ORGANIZATION_ENTITY + " as f where (discard is null or discard = 0) and type=:type", KObject.class);
query.setParameter("type", "REGIONAL_COMPANY");
return query.getResultList();
});
}
......
......@@ -144,4 +144,9 @@ public class DinasOrganizationServiceImpl implements DinasOrganizationService {
public KObject getOneRegionalCompany() {
return dinasOrganizationDao.queryOneRegionalCompany();
}
@Override
public Object getAllEnabledRegionalCompany() {
return dinasOrganizationDao.queryAllOrganization();
}
}
......@@ -17,6 +17,8 @@ public interface DinasOrganizationService {
KObject load(UUID id);
KObject getOneRegionalCompany();
Object getAllEnabledRegionalCompany();
List<UUID> queryStaffByPostId(String postId);
......
......@@ -44,6 +44,17 @@ public class DinasOrganizationController {
return dinasOrganizationService.getOneRegionalCompany();
}
/**
* 查询所有生效的区域公司
* @param id
* @return
*/
@ResponseBody
@RequestMapping(value = "/dinasBiz/organization/getAllEnabledRegionalCompany", method = RequestMethod.GET)
public Object getAllEnabledRegionalCompany() {
return dinasOrganizationService.getAllEnabledRegionalCompany();
}
/**
* @Description: 查询区域公司下的所有人
* @param id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment