mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-12-29 11:29:58 +08:00
取消所有业务功能与公司信息的直接关联
This commit is contained in:
parent
b5cf9185a6
commit
822e957af5
46 changed files with 796 additions and 782 deletions
|
@ -130,72 +130,6 @@ public class SysEnclosureController {
|
|||
sysEnclosureService.querySysEnclosureListToTreeByUserId(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择获取所有公司和人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryAllPeopleToTree")
|
||||
public void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.queryAllPeopleToTree(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryCompanyPeopleToTreeByUserBelongCompany")
|
||||
public void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.queryCompanyPeopleToTreeByUserBelongCompany(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryDepartmentPeopleToTreeByUserBelongDepartment")
|
||||
public void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.queryDepartmentPeopleToTreeByUserBelongDepartment(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司岗位展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryJobPeopleToTreeByUserBelongJob")
|
||||
public void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.queryJobPeopleToTreeByUserBelongJob(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司同级部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/querySimpleDepPeopleToTreeByUserBelongSimpleDep")
|
||||
public void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.querySimpleDepPeopleToTreeByUserBelongSimpleDep(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据聊天组展示用户
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryTalkGroupUserListByUserId")
|
||||
public void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEnclosureService.queryTalkGroupUserListByUserId(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一次性上传附件
|
||||
*
|
||||
|
|
|
@ -31,20 +31,6 @@ public interface SysEnclosureDao {
|
|||
|
||||
List<Map<String, Object>> querySysEnclosureListToTreeByUserId(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryAllPeopleToTree(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryCompanyPeopleToTreeByUserBelongCompany(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> queryCompanyMationByUserId(Map<String, Object> user);
|
||||
|
||||
List<Map<String, Object>> queryDepartmentPeopleToTreeByUserBelongDepartment(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryJobPeopleToTreeByUserBelongJob(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> querySimpleDepPeopleToTreeByUserBelongSimpleDep(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryTalkGroupUserListByUserId(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryEnclosureInfo(@Param("enclosure") String enclosure);
|
||||
|
||||
}
|
||||
|
|
|
@ -32,18 +32,6 @@ public interface SysEnclosureService {
|
|||
|
||||
void querySysEnclosureListToTreeByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void insertUploadFileToDataByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryEnclosureInfo(InputObject inputObject, OutputObject outputObject);
|
||||
|
|
|
@ -19,7 +19,6 @@ import com.skyeye.eve.entity.search.SearchParamsConfigMation;
|
|||
import com.skyeye.eve.service.ISearchConfigService;
|
||||
import com.skyeye.eve.service.SearchConfigService;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -29,7 +28,6 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -75,10 +73,8 @@ public class SearchConfigServiceImpl implements SearchConfigService {
|
|||
Map<String, Object> result = querySearchParamsConfig(urlId, appId);
|
||||
if (result != null) {
|
||||
result.forEach((key, value) -> {
|
||||
Map classMap = new HashMap();
|
||||
classMap.put("searchCondition", SearchOperatorMation.class);
|
||||
SearchParamsConfigMation searchParamsConfigMation = (SearchParamsConfigMation) JSONObject.toBean((JSONObject) value,
|
||||
SearchParamsConfigMation.class, classMap);
|
||||
String valueStr = JSONUtil.toJsonStr(value);
|
||||
SearchParamsConfigMation searchParamsConfigMation = JSONUtil.toBean(valueStr, SearchParamsConfigMation.class);
|
||||
// 获取筛选条件
|
||||
List<SearchOperatorMation> searchCondition = searchParamsConfigMation.getSearchCondition();
|
||||
if (CollectionUtils.isNotEmpty(searchCondition)) {
|
||||
|
@ -123,7 +119,7 @@ public class SearchConfigServiceImpl implements SearchConfigService {
|
|||
public Map<String, Object> querySearchParamsConfig(String urlId, String appId) {
|
||||
SearchMation searchMation = querySearchMation(urlId, appId);
|
||||
if (searchMation != null) {
|
||||
Map<String, Object> result = JSONObject.fromObject(searchMation.getParamsConfigStr());
|
||||
Map<String, Object> result = JSONUtil.toBean(searchMation.getParamsConfigStr(), null);
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -354,130 +354,6 @@ public class SysEnclosureServiceImpl implements SysEnclosureService {
|
|||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择获取所有公司和人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.queryAllPeopleToTree(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
//根据用户信息获取该用户所属的公司id。部门id,职位id
|
||||
Map<String, Object> company = sysEnclosureDao.queryCompanyMationByUserId(user);
|
||||
map.put("companyId", company.get("companyId"));
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.queryCompanyPeopleToTreeByUserBelongCompany(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
//根据用户信息获取该用户所属的公司id。部门id,职位id
|
||||
Map<String, Object> company = sysEnclosureDao.queryCompanyMationByUserId(user);
|
||||
map.put("companyId", company.get("companyId"));
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.queryDepartmentPeopleToTreeByUserBelongDepartment(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司岗位展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
//根据用户信息获取该用户所属的公司id。部门id,职位id
|
||||
Map<String, Object> company = sysEnclosureDao.queryCompanyMationByUserId(user);
|
||||
map.put("companyId", company.get("companyId"));
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.queryJobPeopleToTreeByUserBelongJob(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司同级部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
//根据用户信息获取该用户所属的公司id。部门id,职位id
|
||||
Map<String, Object> company = sysEnclosureDao.queryCompanyMationByUserId(user);
|
||||
map.put("departmentId", company.get("departmentId"));
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.querySimpleDepPeopleToTreeByUserBelongSimpleDep(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据聊天组展示用户
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
map.put("createId", user.get("id"));
|
||||
List<Map<String, Object>> beans = sysEnclosureDao.queryTalkGroupUserListByUserId(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员列表时的参数转换
|
||||
*
|
||||
* @param map
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> compareSelUserListByParams(Map<String, Object> map, InputObject inputObject) {
|
||||
//人员列表中是否包含自己--1.包含;其他参数不包含
|
||||
String chooseOrNotMy = map.get("chooseOrNotMy").toString();
|
||||
if (!"1".equals(chooseOrNotMy)) {
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
map.put("userId", user.get("id"));
|
||||
}
|
||||
//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
|
||||
String chooseOrNotEmail = map.get("chooseOrNotEmail").toString();
|
||||
if ("1".equals(chooseOrNotEmail)) {
|
||||
map.put("hasEmail", "1");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 一次性上传附件
|
||||
*
|
||||
|
|
|
@ -53,12 +53,16 @@
|
|||
</select>
|
||||
|
||||
<select id="queryAllParentNodeById" resultType="java.util.Map">
|
||||
SELECT
|
||||
T2.id parentId,
|
||||
T2.dict_name `name`,
|
||||
k.*
|
||||
FROM (
|
||||
<foreach collection="ids" item="id" index="idx" separator="UNION">
|
||||
SELECT
|
||||
T${idx}._id,
|
||||
#{id} childId,
|
||||
T1.lvl level,
|
||||
T2.id parentId,
|
||||
T2.dict_name `name`
|
||||
T${idx}.lvl level
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
|
@ -69,6 +73,7 @@
|
|||
FROM
|
||||
sys_dict_data
|
||||
WHERE id = _id
|
||||
LIMIT 1
|
||||
) AS parent_id,
|
||||
@l${idx} := @l${idx} + 1 AS lvl
|
||||
FROM
|
||||
|
@ -79,9 +84,10 @@
|
|||
) vars,
|
||||
sys_dict_data h
|
||||
WHERE @r${idx} != '0'
|
||||
) T1
|
||||
JOIN sys_dict_data T2 ON T1._id = T2.id
|
||||
</foreach>
|
||||
) T${idx}
|
||||
</foreach>) k,
|
||||
sys_dict_data T2
|
||||
where k._id = T2.id
|
||||
</select>
|
||||
|
||||
<select id="queryAllChildIdsByParentId" resultType="java.lang.String">
|
||||
|
|
|
@ -159,296 +159,6 @@
|
|||
ORDER BY k.orderBy DESC
|
||||
</select>
|
||||
|
||||
<select id="queryAllPeopleToTree" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.company_name `name`,
|
||||
a.p_id pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.department_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyMationByUserId" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.company_id companyId,
|
||||
a.department_id departmentId,
|
||||
a.job_id jobId
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE
|
||||
a.user_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyPeopleToTreeByUserBelongCompany" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.company_name `name`,
|
||||
'0' pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
WHERE a.id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.department_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryDepartmentPeopleToTreeByUserBelongDepartment" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.company_name `name`,
|
||||
'0' pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
WHERE a.id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.department_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryJobPeopleToTreeByUserBelongJob" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.company_name `name`,
|
||||
'0' pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
WHERE a.id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.company_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="querySimpleDepPeopleToTreeByUserBelongSimpleDep" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
'0' pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.id = #{departmentId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.department_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.department_id = #{departmentId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryTalkGroupUserListByUserId" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.group_name `name`,
|
||||
'0' pId,
|
||||
'isGroup' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/talk-group-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
sys_talk_group a,
|
||||
sys_talk_group_user b
|
||||
WHERE
|
||||
a.id = b.group_id
|
||||
AND b.user_id = #{createId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
c.group_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a,
|
||||
sys_talk_group_user b,
|
||||
sys_talk_group_user c
|
||||
WHERE a.state = '1'
|
||||
AND a.user_id = c.user_id
|
||||
AND b.user_id = #{createId}
|
||||
AND c.group_id = b.group_id
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryEnclosureInfo" resultType="java.util.Map">
|
||||
SELECT
|
||||
id,
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.skyeye.annotation.api.ApiModel;
|
|||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.entity.other.AreaInfo;
|
||||
import lombok.Data;
|
||||
|
||||
|
@ -28,7 +29,7 @@ import java.util.Map;
|
|||
@Data
|
||||
@ApiModel("企业信息实体类")
|
||||
@UniqueField
|
||||
@RedisCacheField(name = "organization:company")
|
||||
@RedisCacheField(name = CacheConstants.ORGANIZATION_COMPANY_CACHE_KEY)
|
||||
@TableName(value = "company_mation")
|
||||
public class Company extends AreaInfo {
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity.organization.department;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.entity.CommonOperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName: Department
|
||||
* @Description: 部门信息实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/20 21:27
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("部门信息实体类")
|
||||
@UniqueField
|
||||
@RedisCacheField(name = CacheConstants.ORGANIZATION_COMPANY_CACHE_KEY)
|
||||
@TableName(value = "company_department")
|
||||
public class Department extends CommonOperatorUserInfo {
|
||||
|
||||
@TableId("id")
|
||||
@ApiModelProperty(value = "主键id。为空时新增,不为空时编辑")
|
||||
private String id;
|
||||
|
||||
}
|
|
@ -11,6 +11,7 @@ import com.skyeye.annotation.api.ApiModel;
|
|||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.constans.RedisConstants;
|
||||
import com.skyeye.common.entity.CommonOperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
@ -27,7 +28,7 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
@UniqueField
|
||||
@RedisCacheField(name = "team:template", cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@RedisCacheField(name = CacheConstants.TEAM_TEMPLATE_CACHE_KEY, cacheTime = RedisConstants.THIRTY_DAY_SECONDS)
|
||||
@TableName(value = "team_template")
|
||||
@ApiModel("团队模板实体类")
|
||||
public class TeamTemplate extends CommonOperatorUserInfo {
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.skyeye.annotation.api.ApiModel;
|
|||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.annotation.cache.RedisCacheField;
|
||||
import com.skyeye.annotation.unique.UniqueField;
|
||||
import com.skyeye.common.constans.CacheConstants;
|
||||
import com.skyeye.common.entity.CommonOperatorUserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
|
@ -25,7 +26,7 @@ import lombok.Data;
|
|||
@Data
|
||||
@ApiModel("区域管理实体类")
|
||||
@UniqueField
|
||||
@RedisCacheField(name = "sys:tarea")
|
||||
@RedisCacheField(name = CacheConstants.SYS_TAREA_CACHE_KEY)
|
||||
@TableName(value = "t_area")
|
||||
public class SysTArea extends CommonOperatorUserInfo {
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.skyeye.annotation.api.Api;
|
|||
import com.skyeye.annotation.api.ApiImplicitParam;
|
||||
import com.skyeye.annotation.api.ApiImplicitParams;
|
||||
import com.skyeye.annotation.api.ApiOperation;
|
||||
import com.skyeye.common.entity.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.organization.service.CompanyDepartmentService;
|
||||
|
@ -113,6 +114,8 @@ public class CompanyDepartmentController {
|
|||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "companydepartment008", value = "获取用户列表", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/CompanyDepartmentController/queryCompanyDepartmentListToChoose")
|
||||
public void queryCompanyDepartmentListToChoose(InputObject inputObject, OutputObject outputObject) {
|
||||
companyDepartmentService.queryCompanyDepartmentListToChoose(inputObject, outputObject);
|
||||
|
@ -124,12 +127,12 @@ public class CompanyDepartmentController {
|
|||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "companydepartment009", value = "根据部门ids获取部门信息列表", method = "POST", allUse = "2")
|
||||
@ApiOperation(id = "queryDepartmentListByIds", value = "根据部门ids获取部门信息列表", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "ids", name = "ids", value = "部门ids,逗号隔开", required = "required")})
|
||||
@RequestMapping("/post/CompanyDepartmentController/queryCompanyDepartmentListByIds")
|
||||
public void queryCompanyDepartmentListByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
companyDepartmentService.queryCompanyDepartmentListByIds(inputObject, outputObject);
|
||||
@RequestMapping("/post/CompanyDepartmentController/queryDepartmentListByIds")
|
||||
public void queryDepartmentListByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
companyDepartmentService.selectByIds(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,8 +54,8 @@ public class CompanyMationController {
|
|||
*/
|
||||
@ApiOperation(id = "writeCompanyMation", value = "添加/编辑公司信息", method = "POST", allUse = "1")
|
||||
@ApiImplicitParams(classBean = Company.class)
|
||||
@RequestMapping("/post/CompanyMationController/insertCompanyMation")
|
||||
public void insertCompanyMation(InputObject inputObject, OutputObject outputObject) {
|
||||
@RequestMapping("/post/CompanyMationController/writeCompanyMation")
|
||||
public void writeCompanyMation(InputObject inputObject, OutputObject outputObject) {
|
||||
companyMationService.saveOrUpdateEntity(inputObject, outputObject);
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,9 @@ public class CompanyMationController {
|
|||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "companymation006", value = "获取总公司信息列表", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "notId", name = "notId", value = "不包含的企业id")})
|
||||
@RequestMapping("/post/CompanyMationController/queryOverAllCompanyMationList")
|
||||
public void queryOverAllCompanyMationList(InputObject inputObject, OutputObject outputObject) {
|
||||
companyMationService.queryOverAllCompanyMationList(inputObject, outputObject);
|
||||
|
@ -147,4 +150,18 @@ public class CompanyMationController {
|
|||
companyMationService.queryPageList(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id批量查询公司信息
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryCompanyListByIds", value = "根据id批量查询公司信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "ids", name = "ids", value = "主键id,多个用逗号隔开", required = "required")})
|
||||
@RequestMapping("/post/CompanyMationController/queryCompanyListByIds")
|
||||
public void queryCompanyListByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
companyMationService.selectByIds(inputObject, outputObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
package com.skyeye.organization.dao;
|
||||
|
||||
import com.skyeye.common.entity.CommonPageInfo;
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.eve.entity.organization.department.Department;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -17,7 +20,7 @@ import java.util.Map;
|
|||
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
public interface CompanyDepartmentDao {
|
||||
public interface CompanyDepartmentDao extends SkyeyeBaseMapper<Department> {
|
||||
|
||||
List<Map<String, Object>> queryCompanyDepartmentList(Map<String, Object> map);
|
||||
|
||||
|
@ -43,9 +46,7 @@ public interface CompanyDepartmentDao {
|
|||
|
||||
List<Map<String, Object>> queryCompanyDepartmentOrganization(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryCompanyDepartmentListToChoose(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryCompanyDepartmentListByIds(@Param("idsList") List<String> idsList);
|
||||
List<Map<String, Object>> queryCompanyDepartmentListToChoose(CommonPageInfo pageInfo);
|
||||
|
||||
List<Map<String, Object>> queryDepartmentListByCompanyId(@Param("companyId") String companyId);
|
||||
}
|
||||
|
|
|
@ -27,4 +27,5 @@ public interface CompanyMationDao extends SkyeyeBaseMapper<Company> {
|
|||
|
||||
List<Map<String, Object>> queryCompanyListToSelect(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryAllDataToTree(@Param("id") String id);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,6 @@ public interface CompanyTaxRateDao {
|
|||
*/
|
||||
int deleteCompanyTaxRateByCompanyId(@Param("companyId") String companyId);
|
||||
|
||||
List<Map<String, Object>> queryCompanyTaxRateByCompanyId(@Param("companyId") String companyId);
|
||||
List<Map<String, Object>> queryCompanyTaxRateByCompanyId(@Param("companyIds") List<String> companyIds);
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
|
||||
package com.skyeye.organization.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.entity.organization.department.Department;
|
||||
|
||||
public interface CompanyDepartmentService {
|
||||
public interface CompanyDepartmentService extends SkyeyeBusinessService<Department> {
|
||||
|
||||
void queryCompanyDepartmentList(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
|
@ -25,7 +27,5 @@ public interface CompanyDepartmentService {
|
|||
|
||||
void queryCompanyDepartmentListToChoose(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryCompanyDepartmentListByIds(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryDepartmentListByCurrentUserBelong(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ import com.skyeye.common.object.InputObject;
|
|||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.entity.organization.company.Company;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CompanyMationService extends SkyeyeBusinessService<Company> {
|
||||
|
||||
void queryOverAllCompanyMationList(InputObject inputObject, OutputObject outputObject);
|
||||
|
@ -18,4 +21,6 @@ public interface CompanyMationService extends SkyeyeBusinessService<Company> {
|
|||
void queryCompanyListToSelect(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryCompanyOrganization(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
List<Map<String, Object>> queryAllDataToTree(String companyId);
|
||||
}
|
||||
|
|
|
@ -6,21 +6,23 @@ package com.skyeye.organization.service.impl;
|
|||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.common.constans.CommonNumConstants;
|
||||
import com.skyeye.common.constans.OrganizationConstants;
|
||||
import com.skyeye.common.entity.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.DataCommonUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.eve.entity.organization.department.Department;
|
||||
import com.skyeye.organization.dao.CompanyDepartmentDao;
|
||||
import com.skyeye.organization.service.CompanyDepartmentService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -33,11 +35,14 @@ import java.util.Map;
|
|||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Service
|
||||
public class CompanyDepartmentServiceImpl implements CompanyDepartmentService {
|
||||
public class CompanyDepartmentServiceImpl extends SkyeyeBusinessServiceImpl<CompanyDepartmentDao, Department> implements CompanyDepartmentService {
|
||||
|
||||
@Autowired
|
||||
private CompanyDepartmentDao companyDepartmentDao;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
/**
|
||||
* 获取公司部门信息列表
|
||||
*
|
||||
|
@ -175,35 +180,17 @@ public class CompanyDepartmentServiceImpl implements CompanyDepartmentService {
|
|||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void queryCompanyDepartmentListToChoose(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
|
||||
List<Map<String, Object>> beans = companyDepartmentDao.queryCompanyDepartmentListToChoose(map);
|
||||
CommonPageInfo pageInfo = inputObject.getParams(CommonPageInfo.class);
|
||||
Page pages = PageHelper.startPage(pageInfo.getPage(), pageInfo.getLimit());
|
||||
List<Map<String, Object>> beans = companyDepartmentDao.queryCompanyDepartmentListToChoose(pageInfo);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门ids获取部门信息列表
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryCompanyDepartmentListByIds(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
List<String> idsList = Arrays.asList(map.get("ids").toString().split(","));
|
||||
List<Map<String, Object>> beans = new ArrayList<>();
|
||||
if (!idsList.isEmpty()) {
|
||||
beans = companyDepartmentDao.queryCompanyDepartmentListByIds(idsList);
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(beans.size());
|
||||
} else {
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门id获取部门加班结算方式
|
||||
*
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.skyeye.common.util.ToolUtil;
|
|||
import com.skyeye.organization.dao.CompanyJobDao;
|
||||
import com.skyeye.organization.dao.CompanyJobScoreDao;
|
||||
import com.skyeye.organization.service.CompanyJobService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -36,6 +37,9 @@ public class CompanyJobServiceImpl implements CompanyJobService {
|
|||
@Autowired
|
||||
private CompanyJobScoreDao companyJobScoreDao;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
/**
|
||||
* 获取公司部门职位信息列表
|
||||
*
|
||||
|
@ -46,6 +50,7 @@ public class CompanyJobServiceImpl implements CompanyJobService {
|
|||
public void queryCompanyJobList(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
List<Map<String, Object>> beans = companyJobDao.queryCompanyJobList(map);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
String[] s;
|
||||
for (Map<String, Object> bean : beans) {
|
||||
s = bean.get("pId").toString().split(",");
|
||||
|
|
|
@ -20,10 +20,8 @@ import com.skyeye.organization.service.CompanyMationService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName: CompanyMationServiceImpl
|
||||
|
@ -114,10 +112,25 @@ public class CompanyMationServiceImpl extends SkyeyeBusinessServiceImpl<CompanyM
|
|||
public Company getDataFromDb(String id) {
|
||||
Company company = super.getDataFromDb(id);
|
||||
// 个人所得税税率信息
|
||||
company.setTaxRate(companyTaxRateDao.queryCompanyTaxRateByCompanyId(id));
|
||||
company.setTaxRate(companyTaxRateDao.queryCompanyTaxRateByCompanyId(Arrays.asList(id)));
|
||||
return company;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Company> getDataFromDb(List<String> ids) {
|
||||
List<Company> companyList = super.getDataFromDb(ids);
|
||||
if (CollectionUtil.isEmpty(companyList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<Map<String, Object>> taxRateList = companyTaxRateDao.queryCompanyTaxRateByCompanyId(ids);
|
||||
Map<String, List<Map<String, Object>>> taxRateMap = taxRateList.stream()
|
||||
.collect(Collectors.groupingBy(bean -> bean.get("companyId").toString()));
|
||||
companyList.forEach(company -> {
|
||||
company.setTaxRate(taxRateMap.get(company.getId()));
|
||||
});
|
||||
return companyList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取总公司信息列表
|
||||
*
|
||||
|
@ -230,4 +243,10 @@ public class CompanyMationServiceImpl extends SkyeyeBusinessServiceImpl<CompanyM
|
|||
return this.queryDataList(inputObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryAllDataToTree(String companyId) {
|
||||
List<Map<String, Object>> beans = companyMationDao.queryAllDataToTree(companyId);
|
||||
return CollectionUtil.isNotEmpty(beans) ? beans : new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -138,39 +138,22 @@
|
|||
<select id="queryCompanyDepartmentListToChoose" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
CONCAT_WS('_', b.company_name, a.department_name) departmentName,
|
||||
a.department_desc departmentDesc,
|
||||
(SELECT COUNT(*) FROM sys_eve_user_staff b WHERE b.department_id = a.id) userNum,
|
||||
(SELECT COUNT(*) FROM company_job c WHERE c.department_id = a.id) jobNum
|
||||
a.company_id companyId,
|
||||
a.department_name departmentName,
|
||||
a.department_desc departmentDesc
|
||||
FROM
|
||||
company_department a,
|
||||
company_mation b
|
||||
WHERE a.company_id = b.id
|
||||
<if test="departmentName != '' and departmentName != null">
|
||||
AND a.department_name LIKE '%${departmentName}%'
|
||||
</if>
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND b.company_name LIKE '%${companyName}%'
|
||||
</if>
|
||||
company_department a
|
||||
<where>
|
||||
<if test="sqlExtract != '' and sqlExtract != null">
|
||||
${sqlExtract}
|
||||
</if>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND a.`name` LIKE '%${keyword}%'
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyDepartmentListByIds" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
CONCAT_WS('_', b.company_name, a.department_name) `name`,
|
||||
a.overtime_settlement_type overtimeSettlementType
|
||||
FROM
|
||||
company_department a,
|
||||
company_mation b
|
||||
WHERE a.company_id = b.id
|
||||
<if test="idsList != null and idsList.size() > 0">
|
||||
<foreach collection="idsList" item="id" separator="," open=" AND a.id in(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryDepartmentListByCompanyId" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
(SELECT COUNT(*) FROM sys_eve_user_staff b WHERE b.job_id = a.id) userNum,
|
||||
CONVERT(a.create_time, char) createTime,
|
||||
a.p_id pId,
|
||||
b.company_name companyName,
|
||||
a.company_id companyId,
|
||||
c.department_name departmentName
|
||||
FROM
|
||||
company_job a
|
||||
LEFT JOIN company_mation b ON a.company_id = b.id
|
||||
LEFT JOIN company_department c ON a.department_id = c.id
|
||||
<where>
|
||||
<if test="jobName != '' and jobName != null">
|
||||
|
|
|
@ -90,4 +90,22 @@
|
|||
company_mation a
|
||||
</select>
|
||||
|
||||
<select id="queryAllDataToTree" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.`name`,
|
||||
a.p_id pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
<where>
|
||||
<if test="id != '' and id != null">
|
||||
AND a.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -42,7 +42,10 @@
|
|||
a.sort_no sortNo
|
||||
FROM
|
||||
company_tax_rate a
|
||||
WHERE a.company_id = #{companyId}
|
||||
WHERE a.company_id IN
|
||||
<foreach collection="companyIds" item="companyId" index="index" open="(" close=")" separator=",">
|
||||
#{companyId}
|
||||
</foreach>
|
||||
ORDER BY a.sort_no ASC
|
||||
</select>
|
||||
|
||||
|
|
|
@ -1,45 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<controller modelName="组织模块">
|
||||
|
||||
<!--
|
||||
- allUse 是否需要登录才能使用 1是 0否 2需要登陆才能访问,但无需授权 默认为否
|
||||
-->
|
||||
|
||||
<!-- 公司管理开始 -->
|
||||
<url id="companymation002" path="/post/CompanyMationController/insertCompanyMation" val="添加公司信息信息" allUse="1" groupName="企业管理">
|
||||
<property id="companyName" name="companyName" ref="required" var="公司名称"/>
|
||||
<property id="companyDesc" name="companyDesc" ref="" var="公司简介"/>
|
||||
<property id="pId" name="pId" ref="required" var="公司总公司"/>
|
||||
<property id="provinceId" name="provinceId" ref="required" var="行政区划省"/>
|
||||
<property id="cityId" name="cityId" ref="" var="行政区划市"/>
|
||||
<property id="areaId" name="areaId" ref="" var="行政区划县"/>
|
||||
<property id="townshipId" name="townshipId" ref="" var="行政区划镇"/>
|
||||
<property id="addressDetailed" name="addressDetailed" ref="required" var="行政区划具体地址"/>
|
||||
<property id="taxRateStr" name="taxRateStr" ref="required,json" var="公司个人所得税税率信息"/>
|
||||
</url>
|
||||
<url id="companymation003" path="/post/CompanyMationController/deleteCompanyMationById" val="删除公司信息信息" allUse="1" groupName="企业管理">
|
||||
<property id="rowId" name="id" ref="required" var="公司信息id"/>
|
||||
</url>
|
||||
<url id="companymation004" path="/post/CompanyMationController/queryCompanyMationToEditById" val="编辑公司信息信息时进行回显" allUse="2" groupName="企业管理">
|
||||
<property id="rowId" name="id" ref="required" var="公司信息id"/>
|
||||
</url>
|
||||
<url id="companymation005" path="/post/CompanyMationController/editCompanyMationById" val="编辑公司信息信息" allUse="1" groupName="企业管理">
|
||||
<property id="rowId" name="id" ref="required" var="公司信息id"/>
|
||||
<property id="companyName" name="companyName" ref="required" var="公司名称"/>
|
||||
<property id="companyDesc" name="companyDesc" ref="" var="公司简介"/>
|
||||
<property id="pId" name="pId" ref="required" var="公司总公司"/>
|
||||
<property id="provinceId" name="provinceId" ref="required" var="行政区划省"/>
|
||||
<property id="cityId" name="cityId" ref="" var="行政区划市"/>
|
||||
<property id="areaId" name="areaId" ref="" var="行政区划县"/>
|
||||
<property id="townshipId" name="townshipId" ref="" var="行政区划镇"/>
|
||||
<property id="addressDetailed" name="addressDetailed" ref="required" var="行政区划具体地址"/>
|
||||
<property id="taxRateStr" name="taxRateStr" ref="required,json" var="公司个人所得税税率信息"/>
|
||||
</url>
|
||||
<url id="companymation006" path="/post/CompanyMationController/queryOverAllCompanyMationList" val="获取总公司信息列表" allUse="2" groupName="企业管理">
|
||||
<property id="notId" name="notId" ref="" var="不包含的企业id"/>
|
||||
</url>
|
||||
<!-- 公司管理结束 -->
|
||||
|
||||
<!-- 部门管理开始 -->
|
||||
<url id="companydepartment001" path="/post/CompanyDepartmentController/queryCompanyDepartmentList" val="获取公司部门信息列表" allUse="1" groupName="部门管理">
|
||||
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
|
||||
|
@ -73,12 +37,6 @@
|
|||
<url id="companydepartment007" path="/post/CompanyDepartmentController/queryCompanyDepartmentListByCompanyIdToSelect" val="根据公司id获取部门列表展示为下拉选择框" allUse="2" groupName="部门管理">
|
||||
<property id="companyId" name="companyId" ref="" var="公司id"/>
|
||||
</url>
|
||||
<url id="companydepartment008" path="/post/CompanyDepartmentController/queryCompanyDepartmentListToChoose" val="获取部门列表展示为表格供其他选择" allUse="2" groupName="部门管理">
|
||||
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
|
||||
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
|
||||
<property id="companyName" name="companyName" ref="" var="公司名称"/>
|
||||
<property id="departmentName" name="departmentName" ref="" var="部门名称"/>
|
||||
</url>
|
||||
<!-- 部门管理结束 -->
|
||||
|
||||
<!-- 职位管理开始 -->
|
||||
|
|
|
@ -20,12 +20,17 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- 引入基础模块的依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-userauth</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-organization</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -13,10 +13,13 @@ import com.skyeye.common.object.OutputObject;
|
|||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.dao.UserPhoneDao;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.eve.service.SysAuthorityService;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.skyeye.organization.service.CompanyMationService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.service.UserPhoneService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -39,6 +42,12 @@ public class UserPhoneServiceImpl implements UserPhoneService {
|
|||
@Autowired
|
||||
private SysAuthorityService sysAuthorityService;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
@Autowired
|
||||
private CompanyMationService companyMationService;
|
||||
|
||||
/**
|
||||
* 账号状态
|
||||
*/
|
||||
|
@ -133,6 +142,7 @@ public class UserPhoneServiceImpl implements UserPhoneService {
|
|||
//如果已经绑定用户,则获取用户信息
|
||||
if (bean.containsKey("userId") && !ToolUtil.isBlank(bean.get("userId").toString())) {
|
||||
Map<String, Object> userMation = userPhoneDao.queryUserMationByOPenId(openId);
|
||||
iCompanyService.setName(userMation, "companyId", "companyName");
|
||||
// 2.将账号的信息存入redis
|
||||
SysUserAuthConstants.setUserLoginRedisCache(bean.get("userId").toString() + SysUserAuthConstants.APP_IDENTIFYING, userMation);
|
||||
//3.将权限的信息存入redis
|
||||
|
@ -153,6 +163,7 @@ public class UserPhoneServiceImpl implements UserPhoneService {
|
|||
//如果已经绑定用户,则获取用户信息
|
||||
if (map.containsKey("userId") && !ToolUtil.isBlank(map.get("userId").toString())) {
|
||||
Map<String, Object> userMation = userPhoneDao.queryUserMationByOPenId(openId);
|
||||
iCompanyService.setName(userMation, "companyId", "companyName");
|
||||
//2.将账号的信息存入redis
|
||||
SysUserAuthConstants.setUserLoginRedisCache(map.get("userId").toString() + SysUserAuthConstants.APP_IDENTIFYING, userMation);
|
||||
//3.将权限的信息存入redis
|
||||
|
@ -245,6 +256,7 @@ public class UserPhoneServiceImpl implements UserPhoneService {
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
List<Map<String, Object>> beans = userPhoneDao.queryAllPeopleToTree(map);
|
||||
beans.addAll(companyMationService.queryAllDataToTree(StringUtils.EMPTY));
|
||||
beans = ToolUtil.listToTree(beans, "id", "pId", "children");
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
@ -253,7 +265,7 @@ public class UserPhoneServiceImpl implements UserPhoneService {
|
|||
* 获取人员列表时的参数转换
|
||||
*
|
||||
* @param map
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> compareSelUserListByParams(Map<String, Object> map, InputObject inputObject) {
|
||||
|
|
|
@ -85,13 +85,12 @@
|
|||
b.win_bottom_menu_icon loadBottomMenuIcon,
|
||||
c.user_name userName,
|
||||
c.user_photo userPhoto,
|
||||
p.company_name companyName,
|
||||
c.company_id companyId,
|
||||
q.department_name departmentName
|
||||
FROM
|
||||
sys_eve_user a
|
||||
LEFT JOIN sys_eve_user_install b ON a.id = b.user_id
|
||||
LEFT JOIN sys_eve_user_staff c ON a.id = c.user_id
|
||||
LEFT JOIN company_mation p ON c.company_id = p.id
|
||||
LEFT JOIN company_department q ON c.department_id = q.id,
|
||||
wx_user_mation e
|
||||
WHERE
|
||||
|
@ -100,17 +99,6 @@
|
|||
</select>
|
||||
|
||||
<select id="queryAllPeopleToTree" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.company_name `name`,
|
||||
a.p_id pId,
|
||||
'isCompany' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/company-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_mation a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-entity</artifactId>
|
||||
<artifactId>skyeye-organization</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -69,17 +69,6 @@ public class CommonController {
|
|||
commonService.querySysWinMationById(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在职的,拥有账号的员工
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/CommonController/queryAllSysUserIsIncumbency")
|
||||
public void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject) {
|
||||
commonService.queryAllSysUserIsIncumbency(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件类型获取文件的保存地址以及访问地址
|
||||
*
|
||||
|
|
|
@ -17,7 +17,5 @@ public interface CommonService {
|
|||
|
||||
void querySysWinMationById(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryFilePathByFileType(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
||||
|
|
|
@ -271,30 +271,6 @@ public class CommonServiceImpl implements CommonService {
|
|||
outputObject.settotal(CommonNumConstants.NUM_ONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在职的,拥有账号的员工
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
List<Integer> state = this.getIncumbencyState();
|
||||
map.put("state", state);
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.queryAllSysUserIsIncumbency(map);
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(beans.size());
|
||||
}
|
||||
|
||||
private List<Integer> getIncumbencyState() {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.add(SysEveUserStaffServiceImpl.State.ON_THE_JOB.getState());
|
||||
list.add(SysEveUserStaffServiceImpl.State.PROBATION.getState());
|
||||
list.add(SysEveUserStaffServiceImpl.State.PROBATION_PERIOD.getState());
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件类型获取文件的保存地址以及访问地址
|
||||
*
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.skyeye.common.util.ToolUtil;
|
|||
import com.skyeye.eve.dao.CompanyChatDao;
|
||||
import com.skyeye.eve.service.CompanyChatService;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import com.skyeye.websocket.TalkWebSocket;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -31,6 +32,9 @@ public class CompanyChatServiceImpl implements CompanyChatService {
|
|||
@Autowired
|
||||
private JedisClientService jedisService;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
/**
|
||||
* 获取好友列表,群聊信息,个人信息
|
||||
*
|
||||
|
@ -47,6 +51,7 @@ public class CompanyChatServiceImpl implements CompanyChatService {
|
|||
Map<String, Object> mine = null;
|
||||
if (ToolUtil.isBlank(jedisService.get(Constants.getSysTalkUserThisMainMationById(userId)))) {
|
||||
mine = companyChatDao.queryUserMineByUserId(map);
|
||||
iCompanyService.setName(mine, "companyId", "companyName");
|
||||
jedisService.set(Constants.getSysTalkUserThisMainMationById(userId), JSONUtil.toJsonStr(mine));
|
||||
} else {
|
||||
mine = JSONUtil.toBean(jedisService.get(Constants.getSysTalkUserThisMainMationById(userId)), null);
|
||||
|
@ -69,6 +74,7 @@ public class CompanyChatServiceImpl implements CompanyChatService {
|
|||
List<Map<String, Object>> userList = null;
|
||||
if (ToolUtil.isBlank(jedisService.get(Constants.getSysTalkGroupUserListMationById(depart.get("id").toString() + "_" + userId)))) {
|
||||
userList = companyChatDao.queryDepartmentUserByDepartId(depart);
|
||||
iCompanyService.setName(userList, "companyId", "companyName");
|
||||
jedisService.set(Constants.getSysTalkGroupUserListMationById(depart.get("id").toString() + "_" + userId), JSONUtil.toJsonStr(userList));
|
||||
} else {
|
||||
userList = JSONUtil.toList(jedisService.get(Constants.getSysTalkGroupUserListMationById(depart.get("id").toString() + "_" + userId)), null);
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.skyeye.common.util.DateUtil;
|
|||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.eve.dao.SysEveUserStaffCapitalDao;
|
||||
import com.skyeye.eve.service.SysEveUserStaffCapitalService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -34,6 +35,9 @@ public class SysEveUserStaffCapitalServiceImpl implements SysEveUserStaffCapital
|
|||
@Autowired
|
||||
private SysEveUserStaffCapitalDao sysEveUserStaffCapitalDao;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
/**
|
||||
* 新增员工待结算资金池信息(用于定时任务)
|
||||
*
|
||||
|
@ -104,6 +108,7 @@ public class SysEveUserStaffCapitalServiceImpl implements SysEveUserStaffCapital
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
|
||||
List<Map<String, Object>> beans = sysEveUserStaffCapitalDao.queryStaffCapitalWaitPayMonthList(map);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.personnel.classenum;
|
||||
|
||||
import com.skyeye.common.base.classenum.SkyeyeEnumClass;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName: UserLockState
|
||||
* @Description: 用户锁定状态枚举
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/11/20 21:33
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public enum UserLockState implements SkyeyeEnumClass {
|
||||
|
||||
SYS_USER_LOCK_STATE_ISUNLOCK(0, "未锁定", true, true),
|
||||
SYS_USER_LOCK_STATE_ISLOCK(1, "锁定", false, true);
|
||||
|
||||
private Integer key;
|
||||
|
||||
private String value;
|
||||
|
||||
private Boolean show;
|
||||
|
||||
private Boolean isDefault;
|
||||
|
||||
}
|
|
@ -342,4 +342,82 @@ public class SysEveUserController {
|
|||
sysEveUserService.queryDeskTopsMenuByUserId(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择获取所有公司和人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryAllPeopleToTree")
|
||||
public void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryAllPeopleToTree(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryCompanyPeopleToTreeByUserBelongCompany")
|
||||
public void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryCompanyPeopleToTreeByUserBelongCompany(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryDepartmentPeopleToTreeByUserBelongDepartment")
|
||||
public void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryDepartmentPeopleToTreeByUserBelongDepartment(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司岗位展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryJobPeopleToTreeByUserBelongJob")
|
||||
public void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryJobPeopleToTreeByUserBelongJob(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司同级部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/querySimpleDepPeopleToTreeByUserBelongSimpleDep")
|
||||
public void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.querySimpleDepPeopleToTreeByUserBelongSimpleDep(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据聊天组展示用户
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@RequestMapping("/post/SysEnclosureController/queryTalkGroupUserListByUserId")
|
||||
public void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryTalkGroupUserListByUserId(inputObject, outputObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在职的,拥有账号的员工
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "commonselpeople007", value = "获取所有在职的,拥有账号的员工", method = "POST", allUse = "2")
|
||||
@RequestMapping("/post/SysEveUserController/queryAllSysUserIsIncumbency")
|
||||
public void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject) {
|
||||
sysEveUserService.queryAllSysUserIsIncumbency(inputObject, outputObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -81,4 +81,16 @@ public interface SysEveUserDao {
|
|||
*/
|
||||
int editSysUserLock(@Param("userId") String userId, @Param("lockState") Integer lockState);
|
||||
|
||||
List<Map<String, Object>> queryAllPeopleToTree(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryCompanyPeopleToTreeByUserBelongCompany(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryDepartmentPeopleToTreeByUserBelongDepartment(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryJobPeopleToTreeByUserBelongJob(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> querySimpleDepPeopleToTreeByUserBelongSimpleDep(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> queryTalkGroupUserListByUserId(Map<String, Object> map);
|
||||
|
||||
}
|
||||
|
|
|
@ -67,4 +67,18 @@ public interface SysEveUserService {
|
|||
void querySysDeskTopByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryDeskTopsMenuByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject);
|
||||
|
||||
void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject);
|
||||
}
|
||||
|
|
|
@ -17,22 +17,23 @@ import com.skyeye.common.object.PutObject;
|
|||
import com.skyeye.common.util.DataCommonUtil;
|
||||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.personnel.dao.SysEveUserStaffDao;
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserQueryDo;
|
||||
import com.skyeye.eve.service.SysAuthorityService;
|
||||
import com.skyeye.personnel.service.SysEveUserService;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.skyeye.organization.service.CompanyMationService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import com.skyeye.personnel.classenum.UserLockState;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.personnel.dao.SysEveUserStaffDao;
|
||||
import com.skyeye.personnel.service.SysEveUserService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: SysEveUserServiceImpl
|
||||
|
@ -59,29 +60,11 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
@Autowired
|
||||
private SysAuthorityService sysAuthorityService;
|
||||
|
||||
/**
|
||||
* 账号状态
|
||||
*/
|
||||
public static enum STATE {
|
||||
SYS_USER_LOCK_STATE_ISUNLOCK(0, "未锁定"),
|
||||
SYS_USER_LOCK_STATE_ISLOCK(1, "锁定");
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
private int state;
|
||||
private String name;
|
||||
|
||||
STATE(int state, String name) {
|
||||
this.state = state;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@Autowired
|
||||
private CompanyMationService companyMationService;
|
||||
|
||||
/**
|
||||
* 获取管理员用户列表
|
||||
|
@ -94,6 +77,7 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
SysUserQueryDo sysUserQuery = inputObject.getParams(SysUserQueryDo.class);
|
||||
Page pages = PageHelper.startPage(sysUserQuery.getPage(), sysUserQuery.getLimit());
|
||||
List<Map<String, Object>> beans = sysEveUserDao.querySysUserList(sysUserQuery);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
@ -110,9 +94,9 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
Map<String, Object> bean = sysEveUserDao.querySysUserLockStateById(map);
|
||||
int userLock = Integer.parseInt(bean.get("userLock").toString());
|
||||
if (STATE.SYS_USER_LOCK_STATE_ISUNLOCK.getState() == userLock) {
|
||||
if (UserLockState.SYS_USER_LOCK_STATE_ISUNLOCK.getKey() == userLock) {
|
||||
// 未锁定,设置为锁定
|
||||
map.put("userLock", STATE.SYS_USER_LOCK_STATE_ISLOCK.getState());
|
||||
map.put("userLock", UserLockState.SYS_USER_LOCK_STATE_ISLOCK.getKey());
|
||||
sysEveUserDao.editSysUserLockStateToLockById(map);
|
||||
} else {
|
||||
outputObject.setreturnMessage("该账号已被锁定,请刷新页面.");
|
||||
|
@ -131,9 +115,9 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
Map<String, Object> bean = sysEveUserDao.querySysUserLockStateById(map);
|
||||
int userLock = Integer.parseInt(bean.get("userLock").toString());
|
||||
if (STATE.SYS_USER_LOCK_STATE_ISLOCK.getState() == userLock) {
|
||||
if (UserLockState.SYS_USER_LOCK_STATE_ISLOCK.getKey() == userLock) {
|
||||
// 锁定,设置为解锁
|
||||
map.put("userLock", STATE.SYS_USER_LOCK_STATE_ISUNLOCK.getState());
|
||||
map.put("userLock", UserLockState.SYS_USER_LOCK_STATE_ISUNLOCK.getKey());
|
||||
sysEveUserDao.editSysUserLockStateToUnLockById(map);
|
||||
} else {
|
||||
outputObject.setreturnMessage("该账号已解锁,请刷新页面.");
|
||||
|
@ -255,10 +239,11 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
String userDBPassword = userMation.get("password").toString();
|
||||
if (password.equals(userDBPassword)) {
|
||||
int userLock = Integer.parseInt(userMation.get("userLock").toString());
|
||||
if (STATE.SYS_USER_LOCK_STATE_ISLOCK.getState() == userLock) {
|
||||
if (UserLockState.SYS_USER_LOCK_STATE_ISLOCK.getKey() == userLock) {
|
||||
outputObject.setreturnMessage("您的账号已被锁定,请联系管理员解除!");
|
||||
} else {
|
||||
String userId = userMation.get("id").toString();
|
||||
setUserOtherMation(userMation);
|
||||
List<Map<String, Object>> authPoints = getMenuAndAuthToRedis(userMation, userId);
|
||||
judgeAndGetSchoolMation(userMation, userId);
|
||||
LOGGER.info("set userMation to redis cache start.");
|
||||
|
@ -275,6 +260,10 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
}
|
||||
}
|
||||
|
||||
private void setUserOtherMation(Map<String, Object> userMation) {
|
||||
iCompanyService.setName(userMation, "companyId", "companyName");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户菜单权限信息并存入redis缓存
|
||||
*
|
||||
|
@ -615,6 +604,7 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
public void queryUserDetailsMationByUserId(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
Map<String, Object> bean = sysEveUserDao.queryUserDetailsMationByUserId(user.get("id").toString());
|
||||
iCompanyService.setName(bean, "companyId", "companyName");
|
||||
outputObject.setBean(bean);
|
||||
outputObject.settotal(CommonNumConstants.NUM_ONE);
|
||||
}
|
||||
|
@ -682,4 +672,157 @@ public class SysEveUserServiceImpl implements SysEveUserService {
|
|||
outputObject.settotal(deskTops.size());
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择获取所有公司和人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryAllPeopleToTree(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
List<Map<String, Object>> beans = sysEveUserDao.queryAllPeopleToTree(map);
|
||||
setOrganization(beans, StringUtils.EMPTY);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置组织信息
|
||||
*
|
||||
* @param beans
|
||||
* @param companyId
|
||||
*/
|
||||
private void setOrganization(List<Map<String, Object>> beans, String companyId) {
|
||||
beans.addAll(companyMationService.queryAllDataToTree(companyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryCompanyPeopleToTreeByUserBelongCompany(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
String companyId = inputObject.getLogParams().get("companyId").toString();
|
||||
map.put("companyId", companyId);
|
||||
List<Map<String, Object>> beans = sysEveUserDao.queryCompanyPeopleToTreeByUserBelongCompany(map);
|
||||
setOrganization(beans, companyId);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryDepartmentPeopleToTreeByUserBelongDepartment(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
String companyId = inputObject.getLogParams().get("companyId").toString();
|
||||
map.put("companyId", companyId);
|
||||
List<Map<String, Object>> beans = sysEveUserDao.queryDepartmentPeopleToTreeByUserBelongDepartment(map);
|
||||
setOrganization(beans, companyId);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司岗位展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryJobPeopleToTreeByUserBelongJob(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
String companyId = inputObject.getLogParams().get("companyId").toString();
|
||||
map.put("companyId", companyId);
|
||||
List<Map<String, Object>> beans = sysEveUserDao.queryJobPeopleToTreeByUserBelongJob(map);
|
||||
setOrganization(beans, companyId);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员选择根据当前用户所属公司获取这个公司同级部门展示的人
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void querySimpleDepPeopleToTreeByUserBelongSimpleDep(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
map.put("departmentId", inputObject.getLogParams().get("departmentId"));
|
||||
List<Map<String, Object>> beans = sysEveUserDao.querySimpleDepPeopleToTreeByUserBelongSimpleDep(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据聊天组展示用户
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryTalkGroupUserListByUserId(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
map = compareSelUserListByParams(map, inputObject);
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
map.put("createId", user.get("id"));
|
||||
List<Map<String, Object>> beans = sysEveUserDao.queryTalkGroupUserListByUserId(map);
|
||||
outputObject.setBeans(beans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员列表时的参数转换
|
||||
*
|
||||
* @param map
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> compareSelUserListByParams(Map<String, Object> map, InputObject inputObject) {
|
||||
//人员列表中是否包含自己--1.包含;其他参数不包含
|
||||
String chooseOrNotMy = map.get("chooseOrNotMy").toString();
|
||||
if (!"1".equals(chooseOrNotMy)) {
|
||||
Map<String, Object> user = inputObject.getLogParams();
|
||||
map.put("userId", user.get("id"));
|
||||
}
|
||||
//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
|
||||
String chooseOrNotEmail = map.get("chooseOrNotEmail").toString();
|
||||
if ("1".equals(chooseOrNotEmail)) {
|
||||
map.put("hasEmail", "1");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有在职的,拥有账号的员工
|
||||
*
|
||||
* @param inputObject 入参以及用户信息等获取对象
|
||||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@Override
|
||||
public void queryAllSysUserIsIncumbency(InputObject inputObject, OutputObject outputObject) {
|
||||
Map<String, Object> map = inputObject.getParams();
|
||||
List<Integer> state = this.getIncumbencyState();
|
||||
map.put("state", state);
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.queryAllSysUserIsIncumbency(map);
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(beans.size());
|
||||
}
|
||||
|
||||
private List<Integer> getIncumbencyState() {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.add(SysEveUserStaffServiceImpl.State.ON_THE_JOB.getState());
|
||||
list.add(SysEveUserStaffServiceImpl.State.PROBATION.getState());
|
||||
list.add(SysEveUserStaffServiceImpl.State.PROBATION_PERIOD.getState());
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
package com.skyeye.personnel.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.skyeye.common.constans.CommonNumConstants;
|
||||
|
@ -12,14 +13,16 @@ import com.skyeye.common.object.InputObject;
|
|||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.personnel.dao.SysEveUserStaffDao;
|
||||
import com.skyeye.eve.dao.WagesFieldTypeDao;
|
||||
import com.skyeye.eve.entity.userauth.user.SysUserStaffQueryDo;
|
||||
import com.skyeye.personnel.service.SysEveUserService;
|
||||
import com.skyeye.personnel.service.SysEveUserStaffService;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.skyeye.organization.service.ICompanyService;
|
||||
import com.skyeye.personnel.classenum.UserLockState;
|
||||
import com.skyeye.personnel.dao.SysEveUserDao;
|
||||
import com.skyeye.personnel.dao.SysEveUserStaffDao;
|
||||
import com.skyeye.personnel.service.SysEveUserService;
|
||||
import com.skyeye.personnel.service.SysEveUserStaffService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -59,6 +62,9 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
@Value("${skyeye.jobNumberPrefix}")
|
||||
private String jobNumberPrefix;
|
||||
|
||||
@Autowired
|
||||
private ICompanyService iCompanyService;
|
||||
|
||||
/**
|
||||
* 员工状态
|
||||
*/
|
||||
|
@ -106,6 +112,7 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
SysUserStaffQueryDo sysUserStaffQuery = inputObject.getParams(SysUserStaffQueryDo.class);
|
||||
Page pages = PageHelper.startPage(sysUserStaffQuery.getPage(), sysUserStaffQuery.getLimit());
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.querySysUserStaffList(sysUserStaffQuery);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
@ -321,7 +328,8 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
String staffId = map.get("id").toString();
|
||||
Map<String, Object> bean = sysEveUserStaffDao.querySysUserStaffByIdToDetails(staffId);
|
||||
if (bean != null && !bean.isEmpty()) {
|
||||
if (CollectionUtil.isNotEmpty(bean)) {
|
||||
iCompanyService.setName(bean, "companyId", "companyName");
|
||||
bean.put("stateName", State.getNameByState(Integer.parseInt(bean.get("state").toString())));
|
||||
// 1.员工考勤时间段信息
|
||||
List<Map<String, Object>> staffTimeMation = sysEveUserStaffDao
|
||||
|
@ -354,7 +362,7 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
// 删除redis中缓存的单位下的用户
|
||||
jedisClient.delKeys(Constants.getSysTalkGroupUserListMationById(departmentId) + "*");
|
||||
// 锁定帐号
|
||||
sysEveUserDao.editSysUserLock(userId, SysEveUserServiceImpl.STATE.SYS_USER_LOCK_STATE_ISLOCK.getState());
|
||||
sysEveUserDao.editSysUserLock(userId, UserLockState.SYS_USER_LOCK_STATE_ISLOCK.getKey());
|
||||
// 退出登录
|
||||
sysEveUserService.removeLogin(userId);
|
||||
}
|
||||
|
@ -373,10 +381,10 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
String staffId = map.get("staffId").toString();
|
||||
|
||||
// 员工类型判断
|
||||
Map<String, Object> staffType = sysEveUserStaffDao.querySysUserStaffByIdToDetails(staffId);
|
||||
if (staffType != null && !staffType.isEmpty()) {
|
||||
Map<String, Object> staffMation = sysEveUserStaffDao.querySysUserStaffByIdToDetails(staffId);
|
||||
if (CollectionUtil.isNotEmpty(staffMation)) {
|
||||
//如果是普通员工,则允许转教职工
|
||||
if ("1".equals(staffType.get("staffType").toString())) {
|
||||
if ("1".equals(staffMation.get("staffType").toString())) {
|
||||
//修改类型
|
||||
sysEveUserStaffDao.editStaffTypeById(staffId);
|
||||
//添加教职工学校绑定信息
|
||||
|
@ -404,6 +412,7 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
Map<String, Object> map = inputObject.getParams();
|
||||
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
|
||||
List<Map<String, Object>> beans = sysEveUserStaffDao.querySysUserStaffListToTable(map);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
|
@ -438,6 +447,7 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
public void querySysUserStaffLogin(InputObject inputObject, OutputObject outputObject) {
|
||||
String staffId = inputObject.getLogParams().get("staffId").toString();
|
||||
Map<String, Object> bean = sysEveUserStaffDao.querySysUserStaffByIdToDetails(staffId);
|
||||
iCompanyService.setName(bean, "companyId", "companyName");
|
||||
outputObject.setBean(bean);
|
||||
outputObject.settotal(CommonNumConstants.NUM_ONE);
|
||||
}
|
||||
|
@ -457,6 +467,7 @@ public class SysEveUserStaffServiceImpl implements SysEveUserStaffService {
|
|||
// 用户id和员工id只要有一个不为空就进行查询
|
||||
if (!ToolUtil.isBlank(userIds) || !ToolUtil.isBlank(staffIds)) {
|
||||
beans = sysEveUserStaffDao.queryUserMationList(userIds, staffIds);
|
||||
iCompanyService.setName(beans, "companyId", "companyName");
|
||||
}
|
||||
outputObject.setBeans(beans);
|
||||
outputObject.settotal(beans.size());
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
a.user_lock userLock,
|
||||
(SELECT c.user_name FROM sys_eve_user_staff c WHERE a.creater = c.user_id) createName,
|
||||
(SELECT group_concat(distinct b.role_name) FROM sys_eve_role b WHERE INSTR(CONCAT(',', a.role_id, ','), CONCAT(',', b.id, ','))) roleName,
|
||||
m.company_name companyName,
|
||||
k.company_id companyId,
|
||||
m.department_name departmentName,
|
||||
m.job_name jobName,
|
||||
CONVERT(a.create_time, char) createTime
|
||||
|
@ -24,14 +24,12 @@
|
|||
o.user_id,
|
||||
p.job_name,
|
||||
q.department_name,
|
||||
u.company_name
|
||||
o.company_id companyId
|
||||
FROM
|
||||
sys_eve_user_staff o,
|
||||
company_job p,
|
||||
company_department q,
|
||||
company_mation u
|
||||
WHERE o.company_id = u.id
|
||||
AND o.department_id = q.id
|
||||
company_department q
|
||||
WHERE o.department_id = q.id
|
||||
AND o.job_id = p.id) m ON a.id = m.user_id,
|
||||
sys_eve_user_staff k
|
||||
<where>
|
||||
|
@ -101,7 +99,6 @@
|
|||
c.user_name userName,
|
||||
c.user_photo userPhoto,
|
||||
c.company_id companyId,
|
||||
u.`name` companyName,
|
||||
c.department_id departmentId,
|
||||
q.department_name departmentName,
|
||||
c.job_id jobId,
|
||||
|
@ -112,7 +109,6 @@
|
|||
sys_eve_user_staff c
|
||||
LEFT JOIN company_job p ON c.job_id = p.id
|
||||
LEFT JOIN company_department q ON c.department_id = q.id
|
||||
LEFT JOIN company_mation u ON c.company_id = u.id
|
||||
WHERE
|
||||
a.user_code = #{userCode}
|
||||
AND a.id = c.user_id
|
||||
|
@ -343,7 +339,6 @@
|
|||
IFNULL(a.user_sign, '暂无签名') userSign,
|
||||
CASE a.state WHEN '1' THEN 'state-up' WHEN '2' THEN 'state-down' END colorClass,
|
||||
a.company_id companyId,
|
||||
u.company_name companyName,
|
||||
a.department_id departmentId,
|
||||
q.department_name departmentName,
|
||||
p.job_name jobName,
|
||||
|
@ -354,11 +349,9 @@
|
|||
LEFT JOIN company_job_score o ON a.job_score_id = o.id,
|
||||
company_job p,
|
||||
company_department q,
|
||||
company_mation u,
|
||||
sys_eve_user b
|
||||
WHERE a.user_id = #{userId}
|
||||
AND b.id = a.user_id
|
||||
AND a.company_id = u.id
|
||||
AND a.department_id = q.id
|
||||
AND a.job_id = p.id
|
||||
</select>
|
||||
|
@ -442,5 +435,237 @@
|
|||
</set>
|
||||
WHERE id = #{userId}
|
||||
</update>
|
||||
|
||||
<select id="queryAllPeopleToTree" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.department_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyPeopleToTreeByUserBelongCompany" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.department_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryDepartmentPeopleToTreeByUserBelongDepartment" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
a.company_id pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.department_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryJobPeopleToTreeByUserBelongJob" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.job_name `name`,
|
||||
a.company_id pId,
|
||||
'isJob' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/job-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_job a
|
||||
WHERE a.company_id = #{companyId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.job_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.company_id = #{companyId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="querySimpleDepPeopleToTreeByUserBelongSimpleDep" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.department_name `name`,
|
||||
'0' pId,
|
||||
'isDepartment' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/department-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
company_department a
|
||||
WHERE a.id = #{departmentId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
a.department_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a
|
||||
WHERE a.state = '1'
|
||||
AND a.department_id = #{departmentId}
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryTalkGroupUserListByUserId" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.group_name `name`,
|
||||
'0' pId,
|
||||
'isGroup' folderType,
|
||||
1 isParent,
|
||||
'../../assets/images/talk-group-icon.png' `icon`,
|
||||
'' `email`
|
||||
FROM
|
||||
sys_talk_group a,
|
||||
sys_talk_group_user b
|
||||
WHERE
|
||||
a.id = b.group_id
|
||||
AND b.user_id = #{createId}
|
||||
UNION ALL
|
||||
SELECT
|
||||
a.user_id id,
|
||||
CONCAT_WS('_', a.job_number, a.user_name) `name`,
|
||||
c.group_id pId,
|
||||
'isPeople' folderType,
|
||||
0 isParent,
|
||||
'../../assets/images/people-icon.png' `icon`,
|
||||
a.email `email`
|
||||
FROM
|
||||
sys_eve_user_staff a,
|
||||
sys_talk_group_user b,
|
||||
sys_talk_group_user c
|
||||
WHERE a.state = '1'
|
||||
AND a.user_id = c.user_id
|
||||
AND b.user_id = #{createId}
|
||||
AND c.group_id = b.group_id
|
||||
AND LENGTH(a.user_id) > 0 AND a.user_id != ''
|
||||
<if test="userId != null and userId != ''">
|
||||
AND a.user_id != #{userId}
|
||||
</if>
|
||||
<if test="hasEmail != null and hasEmail != ''">
|
||||
AND LENGTH(a.email) > 0 AND a.email != ''
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -16,7 +16,7 @@
|
|||
a.home_phone homePhone,
|
||||
a.qq,
|
||||
a.state,
|
||||
u.company_name companyName,
|
||||
a.company_id companyId,
|
||||
q.department_name departmentName,
|
||||
p.job_name jobName,
|
||||
a.`type` staffType,
|
||||
|
@ -26,7 +26,6 @@
|
|||
LEFT JOIN sys_eve_user_staff_time b ON a.id = b.staff_id
|
||||
LEFT JOIN company_job p ON a.job_id = p.id
|
||||
LEFT JOIN company_department q ON a.department_id = q.id
|
||||
LEFT JOIN company_mation u ON a.company_id = u.id
|
||||
<where>
|
||||
<if test="sqlExtract != '' and sqlExtract != null">
|
||||
${sqlExtract}
|
||||
|
@ -144,7 +143,7 @@
|
|||
a.trial_time trialTime,
|
||||
a.become_worker_time becomeWorkerTime,
|
||||
CASE a.user_sex WHEN '2' THEN '女' WHEN '1' THEN '男' ELSE '保密' END userSex,
|
||||
u.company_name companyName,
|
||||
a.company_id companyId,
|
||||
a.department_id departmentId,
|
||||
q.department_name departmentName,
|
||||
p.job_name jobName,
|
||||
|
@ -154,7 +153,6 @@
|
|||
LEFT JOIN company_job_score o ON a.job_score_id = o.id
|
||||
LEFT JOIN company_job p ON a.job_id = p.id
|
||||
LEFT JOIN company_department q ON a.department_id = q.id
|
||||
LEFT JOIN company_mation u ON a.company_id = u.id
|
||||
WHERE a.id = #{staffId}
|
||||
</select>
|
||||
|
||||
|
@ -224,7 +222,6 @@
|
|||
IFNULL(a.user_sign, '暂无签名') userSign,
|
||||
CASE a.state WHEN '1' THEN 'state-up' WHEN '2' THEN 'state-down' END colorClass,
|
||||
a.company_id companyId,
|
||||
u.company_name companyName,
|
||||
a.department_id departmentId,
|
||||
q.department_name departmentName,
|
||||
p.job_name jobName,
|
||||
|
@ -235,8 +232,7 @@
|
|||
LEFT JOIN company_job_score o ON a.job_score_id = o.id
|
||||
LEFT JOIN sys_eve_user b ON b.id = a.user_id,
|
||||
company_job p,
|
||||
company_department q,
|
||||
company_mation u
|
||||
company_department q
|
||||
<where>
|
||||
<choose>
|
||||
<when test="userIds != '' and userIds != null">
|
||||
|
@ -246,7 +242,6 @@
|
|||
INSTR(CONCAT(',', #{staffIds}, ','), CONCAT(',', a.id, ','))
|
||||
</otherwise>
|
||||
</choose>
|
||||
AND a.company_id = u.id
|
||||
AND a.department_id = q.id
|
||||
AND a.job_id = p.id
|
||||
</where>
|
||||
|
@ -266,7 +261,6 @@
|
|||
a.qq,
|
||||
a.state,
|
||||
a.company_id companyId,
|
||||
u.company_name companyName,
|
||||
a.department_id departmentId,
|
||||
q.department_name departmentName,
|
||||
a.job_id jobId,
|
||||
|
@ -278,10 +272,8 @@
|
|||
sys_eve_user_staff a
|
||||
LEFT JOIN company_job_score o ON a.job_score_id = o.id,
|
||||
company_job p,
|
||||
company_department q,
|
||||
company_mation u
|
||||
WHERE a.company_id = u.id
|
||||
AND a.department_id = q.id
|
||||
company_department q
|
||||
WHERE a.department_id = q.id
|
||||
AND a.job_id = p.id
|
||||
<if test="userName != '' and userName != null">
|
||||
AND a.user_name LIKE '%${userName}%'
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
a.id,
|
||||
'online' status,
|
||||
b.user_photo avatar,
|
||||
c.company_name companyName,
|
||||
b.company_id companyId,
|
||||
d.department_name departmentName,
|
||||
b.user_sign sign
|
||||
FROM
|
||||
sys_eve_user a,
|
||||
sys_eve_user_staff b LEFT JOIN company_mation c ON b.company_id = c.id
|
||||
LEFT JOIN company_department d ON d.id = b.department_id
|
||||
sys_eve_user_staff b
|
||||
LEFT JOIN company_department d ON d.id = b.department_id
|
||||
WHERE a.id = b.user_id
|
||||
AND a.id = #{userId}
|
||||
</select>
|
||||
|
@ -55,7 +55,7 @@
|
|||
'offline' status,
|
||||
a.user_photo avatar,
|
||||
IFNULL(a.user_sign, '暂无签名') sign,
|
||||
m.company_name companyName,
|
||||
a.company_id companyId,
|
||||
m.department_name departmentName,
|
||||
m.job_name jobName
|
||||
FROM
|
||||
|
@ -63,15 +63,12 @@
|
|||
LEFT JOIN (SELECT
|
||||
o.user_id,
|
||||
p.job_name,
|
||||
q.department_name,
|
||||
u.company_name
|
||||
q.department_name
|
||||
FROM
|
||||
sys_eve_user_staff o,
|
||||
company_job p,
|
||||
company_department q,
|
||||
company_mation u
|
||||
WHERE o.company_id = u.id
|
||||
AND o.department_id = q.id
|
||||
company_department q
|
||||
WHERE o.department_id = q.id
|
||||
AND o.job_id = p.id) m ON m.user_id = a.user_id,
|
||||
sys_eve_user b
|
||||
WHERE a.department_id = #{id}
|
||||
|
|
|
@ -28,20 +28,15 @@
|
|||
|
||||
<select id="queryStaffCapitalWaitPayMonthList" resultType="java.util.Map">
|
||||
SELECT
|
||||
b.company_name companyName,
|
||||
a.company_id companyId,
|
||||
c.department_name departmentName,
|
||||
a.month_time monthTime,
|
||||
FORMAT(SUM(a.money), 2) monthAllMony
|
||||
FROM
|
||||
sys_eve_user_staff_capital a,
|
||||
company_mation b,
|
||||
company_department c
|
||||
WHERE a.company_id = b.id
|
||||
AND a.department_id = c.id
|
||||
AND a.type = 1
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND b.company_name LIKE '%${companyName}%'
|
||||
</if>
|
||||
WHERE a.department_id = c.id
|
||||
AND a.type = 1
|
||||
<if test="departmentName != '' and departmentName != null">
|
||||
AND c.department_name LIKE '%${departmentName}%'
|
||||
</if>
|
||||
|
|
|
@ -104,8 +104,6 @@
|
|||
<property id="chooseOrNotMy" name="chooseOrNotMy" ref="required,num" var="人员列表中是否包含自己--1.包含;其他参数不包含" />
|
||||
<property id="chooseOrNotEmail" name="chooseOrNotEmail" ref="required,num" var="人员列表中是否必须绑定邮箱--1.必须;其他参数没必要" />
|
||||
</url>
|
||||
<url id="commonselpeople007" path="/post/CommonController/queryAllSysUserIsIncumbency" val="获取所有在职的,拥有账号的员工" allUse="2" groupName="企业人员选择模块">
|
||||
</url>
|
||||
<!-- 人员选择结束 -->
|
||||
|
||||
<!-- 系统各部分说明开始 -->
|
||||
|
|
Loading…
Reference in a new issue