新增部门按地区查询
This commit is contained in:
parent
c7b98e87e7
commit
a8156ac3d3
@ -30,6 +30,22 @@ public interface IDepartmentBaseService {
|
|||||||
*/
|
*/
|
||||||
List<DepartmentDTO> list(Map<String, Object> params);
|
List<DepartmentDTO> list(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门列表
|
||||||
|
*
|
||||||
|
* @param areaCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DepartmentDTO> listByAreaCode(String areaCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门列表
|
||||||
|
*
|
||||||
|
* @param areaCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DepartmentDTO> listAllByAreaCode(String areaCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID获取组织部门详情
|
* 通过ID获取组织部门详情
|
||||||
*
|
*
|
||||||
@ -55,6 +71,24 @@ public interface IDepartmentBaseService {
|
|||||||
*/
|
*/
|
||||||
SuccessResultList<List<DepartmentDTO>> listPageByParentId(String departmentParentId, ListPage page);
|
SuccessResultList<List<DepartmentDTO>> listPageByParentId(String departmentParentId, ListPage page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织部门列表
|
||||||
|
*
|
||||||
|
* @param departmentParentId
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SuccessResultList<List<DepartmentDTO>> listPageByAreaCode(String areaCode, ListPage page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织部门列表
|
||||||
|
*
|
||||||
|
* @param departmentParentId
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SuccessResultList<List<DepartmentDTO>> listPageAllByAreaCode(String areaCode, ListPage page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织部门列表,递归获取全部内容
|
* 组织部门列表,递归获取全部内容
|
||||||
*
|
*
|
||||||
|
@ -43,6 +43,20 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
return departmentRemoteService.list(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), params);
|
return departmentRemoteService.list(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DepartmentDTO> listByAreaCode(String areaCode) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("departmentAreaCode", areaCode);
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DepartmentDTO> listAllByAreaCode(String areaCode) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("departmentAreaCodeLike", WStringUtil.cutContinuityRepeatCharDesc(areaCode, '0'));
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DepartmentDTO get(String departmentId) {
|
public DepartmentDTO get(String departmentId) {
|
||||||
return departmentRemoteService.get(apiPathProperties.getUserCenter(), departmentId, OAuth2ClientTokenManager.getInstance().getToken().getAccessToken());
|
return departmentRemoteService.get(apiPathProperties.getUserCenter(), departmentId, OAuth2ClientTokenManager.getInstance().getToken().getAccessToken());
|
||||||
@ -59,6 +73,18 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
return listPage(page);
|
return listPage(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<DepartmentDTO>> listPageByAreaCode(String areaCode, ListPage page) {
|
||||||
|
page.getParams().put("departmentAreaCode", areaCode);
|
||||||
|
return listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<DepartmentDTO>> listPageAllByAreaCode(String areaCode, ListPage page) {
|
||||||
|
page.getParams().put("departmentAreaCodeLike", WStringUtil.cutContinuityRepeatCharDesc(areaCode, '0'));
|
||||||
|
return listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentDTO> listAll(Map<String, Object> params) {
|
public List<DepartmentDTO> listAll(Map<String, Object> params) {
|
||||||
return departmentRemoteService.listAll(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), params);
|
return departmentRemoteService.listAll(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), params);
|
||||||
|
@ -9,7 +9,6 @@ import ink.wgink.common.base.DefaultBaseService;
|
|||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.module.dictionary.service.IAreaService;
|
|
||||||
import ink.wgink.module.file.excel.error.AbstractErrorExcelHandler;
|
import ink.wgink.module.file.excel.error.AbstractErrorExcelHandler;
|
||||||
import ink.wgink.module.file.service.IFileService;
|
import ink.wgink.module.file.service.IFileService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
@ -60,8 +59,6 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
private IDepartmentAdjustmentService departmentAdjustmentService;
|
private IDepartmentAdjustmentService departmentAdjustmentService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFileService fileService;
|
private IFileService fileService;
|
||||||
@Autowired
|
|
||||||
private IAreaService areaService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(DepartmentVO departmentVO) {
|
public void save(DepartmentVO departmentVO) {
|
||||||
@ -192,6 +189,20 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
return destDepartmentDTOs;
|
return destDepartmentDTOs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DepartmentDTO> listByAreaCode(String areaCode) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("departmentAreaCode", areaCode);
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DepartmentDTO> listAllByAreaCode(String areaCode) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("departmentAreaCodeLike", WStringUtil.cutContinuityRepeatCharDesc(areaCode, '0'));
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResultList<List<DepartmentDTO>> listPage(ListPage page) {
|
public SuccessResultList<List<DepartmentDTO>> listPage(ListPage page) {
|
||||||
PageHelper.startPage(page.getPage(), page.getRows());
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
@ -215,6 +226,18 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
return listPage(page);
|
return listPage(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<DepartmentDTO>> listPageByAreaCode(String areaCode, ListPage page) {
|
||||||
|
page.getParams().put("departmentAreaCode", areaCode);
|
||||||
|
return listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<DepartmentDTO>> listPageAllByAreaCode(String areaCode, ListPage page) {
|
||||||
|
page.getParams().put("departmentAreaCodeLike", WStringUtil.cutContinuityRepeatCharDesc(areaCode, '0'));
|
||||||
|
return listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DepartmentDTO get(String departmentId) {
|
public DepartmentDTO get(String departmentId) {
|
||||||
Map<String, Object> params = getHashMap(1);
|
Map<String, Object> params = getHashMap(1);
|
||||||
@ -243,7 +266,7 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ZTreeDTO> listZTree(String departmentParentId, Map<String, Object> params) {
|
public List<ZTreeDTO> listZTree(String departmentParentId, Map<String, Object> params) {
|
||||||
if (StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) {
|
if (securityComponent.getCurrentUser() != null && StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) {
|
||||||
List<String> listBaseDepartmentIds = listBaseDepartmentIds();
|
List<String> listBaseDepartmentIds = listBaseDepartmentIds();
|
||||||
if (listBaseDepartmentIds != null && !listBaseDepartmentIds.isEmpty()) {
|
if (listBaseDepartmentIds != null && !listBaseDepartmentIds.isEmpty()) {
|
||||||
params.put("departmentIds", listBaseDepartmentIds);
|
params.put("departmentIds", listBaseDepartmentIds);
|
||||||
|
@ -408,6 +408,14 @@
|
|||||||
AND
|
AND
|
||||||
gmt_create <![CDATA[ <= ]]> #{endTime}
|
gmt_create <![CDATA[ <= ]]> #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="departmentAreaCode != null and departmentAreaCode != ''">
|
||||||
|
AND
|
||||||
|
department_area_code = #{departmentAreaCode}
|
||||||
|
</if>
|
||||||
|
<if test="departmentAreaCodeLike != null and departmentAreaCodeLike != ''">
|
||||||
|
AND
|
||||||
|
department_area_code LIKE CONCAT(#{departmentAreaCode}, '%')
|
||||||
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="sort != null and (sort == 'departmentName' or sort == 'departmentNameEn' or sort == 'departmentNameOther' or sort == 'departmentCode' or sort == 'departmentType' or sort == 'departmentState')">
|
<when test="sort != null and (sort == 'departmentName' or sort == 'departmentNameEn' or sort == 'departmentNameOther' or sort == 'departmentCode' or sort == 'departmentType' or sort == 'departmentState')">
|
||||||
ORDER BY
|
ORDER BY
|
||||||
@ -665,6 +673,10 @@
|
|||||||
AND
|
AND
|
||||||
department_area_code = #{departmentAreaCode}
|
department_area_code = #{departmentAreaCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="departmentAreaCodeLike != null and departmentAreaCodeLike != ''">
|
||||||
|
AND
|
||||||
|
department_area_code LIKE CONCAT(#{departmentAreaCode}, '%')
|
||||||
|
</if>
|
||||||
<if test="departmentType != null and departmentType != ''">
|
<if test="departmentType != null and departmentType != ''">
|
||||||
AND
|
AND
|
||||||
department_type = #{departmentType}
|
department_type = #{departmentType}
|
||||||
|
@ -315,7 +315,7 @@
|
|||||||
areaName += item.areaName;
|
areaName += item.areaName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#departmentAreaCode').val(departmentAreaCode);
|
$('#departmentAreaCode').val(areaCode);
|
||||||
$('#departmentAreaName').val(areaName);
|
$('#departmentAreaName').val(areaName);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -290,7 +290,7 @@
|
|||||||
areaName += item.areaName;
|
areaName += item.areaName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#departmentAreaCode').val(departmentAreaCode);
|
$('#departmentAreaCode').val(areaCode);
|
||||||
$('#departmentAreaName').val(areaName);
|
$('#departmentAreaName').val(areaName);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user