Commit f7015f8c authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
parents 362c1dc7 95c90321
......@@ -15,7 +15,7 @@ spring:
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#url: jdbc:mysql://119.96.147.6:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
......
......@@ -248,10 +248,7 @@
a.GRADUTION_DATE,
a.REMARK,
a.FILE_SOURCE,
if(count(b.id)>1,'是','否') IS_PROJECTS,
a.PROJECT_NUM,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
......@@ -447,35 +444,35 @@
AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress}
</if>
<if test="tEmployeeInfo.empNatureArray != null">
<if test="tEmployeeInfo.empNatureArray != null and tEmployeeInfo.empNatureArray.length > 0">
AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeInfo.empNatureArray" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.contractStatusArray != null">
<if test="tEmployeeInfo.contractStatusArray != null and tEmployeeInfo.contractStatusArray.length > 0">
AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.contractStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.insuranceStatusArray != null">
<if test="tEmployeeInfo.insuranceStatusArray != null and tEmployeeInfo.insuranceStatusArray.length > 0">
AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.insuranceStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.socialStatusArray != null">
<if test="tEmployeeInfo.socialStatusArray != null and tEmployeeInfo.socialStatusArray.length > 0">
AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.socialStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.fundStatusArray != null">
<if test="tEmployeeInfo.fundStatusArray != null and tEmployeeInfo.fundStatusArray.length > 0">
AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.fundStatusArray" open="("
separator="," close=")">
......@@ -491,14 +488,20 @@
select
<include refid="baseParam"/>
from t_employee_info a
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.DEPT_ID') ">
<!--<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.DEPT_ID') ">
left join t_employee_project b on a.id=b.EMP_ID and b.DELETE_FLAG = '0'
</if>
</if>-->
where a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and b.DELETE_FLAG = '0'
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
order by a.CREATE_TIME desc
</select>
......@@ -747,38 +750,71 @@
select
<include refid="Base_Export_List"/>
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID and b.DELETE_FLAG = '0'
<!--left join (
select
b.EMP_ID,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO
from t_employee_project b where
1=1 and b.DELETE_FLAG = '0'
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>-->
) b on a.id = b.EMP_ID
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo离职档案导出查询-->
<select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap">
select * from (
SELECT
<include refid="Base_Export_List"/>,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME
,
GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
<include refid="Base_Export_List"/>
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_USER_NAME
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID and b.DELETE_FLAG = '0'
<!--left join (
select
b.EMP_ID,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME,
GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
from t_employee_project b where
1=1 and b.DELETE_FLAG = '0'
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>
) b on a.id = b.EMP_ID-->
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
) b
where 1=1
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
......
......@@ -79,7 +79,7 @@ public class TDispatchInfoController {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfo);
if (Common.isNotNull(tDispatchInfo.getAuthSql())) {
if(tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
if (tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){
......@@ -185,8 +185,14 @@ public class TDispatchInfoController {
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfo);
if (Common.isNotNull(tDispatchInfo.getAuthSql()) && tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
if (Common.isNotNull(tDispatchInfo.getAuthSql())) {
if (tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("s.", "a."));
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace("f.", "a."));
}
}
tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment