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