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: ...@@ -15,7 +15,7 @@ spring:
username: root username: root
password: yf_zsk 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://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 @@ ...@@ -248,10 +248,7 @@
a.GRADUTION_DATE, a.GRADUTION_DATE,
a.REMARK, a.REMARK,
a.FILE_SOURCE, a.FILE_SOURCE,
if(count(b.id)>1,'是','否') IS_PROJECTS,
a.PROJECT_NUM, a.PROJECT_NUM,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
a.CONTRACT_STATUS, a.CONTRACT_STATUS,
a.INSURANCE_STATUS, a.INSURANCE_STATUS,
a.SOCIAL_STATUS, a.SOCIAL_STATUS,
...@@ -447,35 +444,35 @@ ...@@ -447,35 +444,35 @@
AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress} AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress}
</if> </if>
<if test="tEmployeeInfo.empNatureArray != null"> <if test="tEmployeeInfo.empNatureArray != null and tEmployeeInfo.empNatureArray.length > 0">
AND a.EMP_NATRUE in AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeInfo.empNatureArray" open="(" separator="," <foreach item="idStr" index="index" collection="tEmployeeInfo.empNatureArray" open="(" separator=","
close=")"> close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeInfo.contractStatusArray != null"> <if test="tEmployeeInfo.contractStatusArray != null and tEmployeeInfo.contractStatusArray.length > 0">
AND a.CONTRACT_STATUS in AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.contractStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeInfo.contractStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeInfo.insuranceStatusArray != null"> <if test="tEmployeeInfo.insuranceStatusArray != null and tEmployeeInfo.insuranceStatusArray.length > 0">
AND a.INSURANCE_STATUS in AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.insuranceStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeInfo.insuranceStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeInfo.socialStatusArray != null"> <if test="tEmployeeInfo.socialStatusArray != null and tEmployeeInfo.socialStatusArray.length > 0">
AND a.SOCIAL_STATUS in AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.socialStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeInfo.socialStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeInfo.fundStatusArray != null"> <if test="tEmployeeInfo.fundStatusArray != null and tEmployeeInfo.fundStatusArray.length > 0">
AND a.FUND_STATUS in AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.fundStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeInfo.fundStatusArray" open="("
separator="," close=")"> separator="," close=")">
...@@ -491,14 +488,20 @@ ...@@ -491,14 +488,20 @@
select select
<include refid="baseParam"/> <include refid="baseParam"/>
from t_employee_info a 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' left join t_employee_project b on a.id=b.EMP_ID and b.DELETE_FLAG = '0'
</if> </if>-->
where a.DELETE_FLAG = '0' where a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/> <include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"> <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} ${tEmployeeInfo.authSql}
)
</if> </if>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
...@@ -747,38 +750,71 @@ ...@@ -747,38 +750,71 @@
select select
<include refid="Base_Export_List"/> <include refid="Base_Export_List"/>
from t_employee_info a 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> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/> <include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"> <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} ${tEmployeeInfo.authSql}
)
</if> </if>
</where> </where>
GROUP BY a.id order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--tEmployeeInfo离职档案导出查询--> <!--tEmployeeInfo离职档案导出查询-->
<select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap"> <select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap">
select * from ( select * from (
SELECT SELECT
<include refid="Base_Export_List"/>,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME <include refid="Base_Export_List"/>
,
GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
,a.LEAVE_TIME ,a.LEAVE_TIME
,a.LEAVE_USER ,a.LEAVE_USER
,a.LEAVE_USER_NAME ,a.LEAVE_USER_NAME
,a.LEAVE_REASON ,a.LEAVE_REASON
from t_employee_info a 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> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/> <include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''"> <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} ${tEmployeeInfo.authSql}
)
</if> </if>
</where> </where>
GROUP BY a.id order by a.CREATE_TIME desc order by a.CREATE_TIME desc
) b ) b
where 1=1 where 1=1
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''"> <if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
......
...@@ -79,7 +79,7 @@ public class TDispatchInfoController { ...@@ -79,7 +79,7 @@ public class TDispatchInfoController {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfo); menuUtil.setAuthSql(user, tDispatchInfo);
if (Common.isNotNull(tDispatchInfo.getAuthSql())) { 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")); tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
} }
if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){ if (tDispatchInfo.getAuthSql().contains("s.") || tDispatchInfo.getAuthSql().contains("f.")){
...@@ -185,8 +185,14 @@ public class TDispatchInfoController { ...@@ -185,8 +185,14 @@ public class TDispatchInfoController {
tDispatchInfo.setStatus(CommonConstants.ONE_STRING); tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tDispatchInfo); menuUtil.setAuthSql(user, tDispatchInfo);
if (Common.isNotNull(tDispatchInfo.getAuthSql()) && tDispatchInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(tDispatchInfo.getAuthSql())) {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN")); 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()); tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); 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