Commit 0eb9d240 authored by huyuchen's avatar huyuchen

huych-风险管控提交

parent 63d49e6f
...@@ -67,8 +67,6 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi ...@@ -67,8 +67,6 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
*/ */
@Override @Override
public void listExport(HttpServletResponse response, TRiskMonitorSearchVo searchVo) { public void listExport(HttpServletResponse response, TRiskMonitorSearchVo searchVo) {
String menuInfo = "1838411182001954817";
searchVo.setMenuInfo(menuInfo);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L; long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId); boolean isSsc = this.haveRole(user, roleId);
...@@ -139,8 +137,6 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi ...@@ -139,8 +137,6 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
*/ */
@Override @Override
public R selectCurrentRiskMonitor(TRiskMonitorSearchVo tRiskMonitor) { public R selectCurrentRiskMonitor(TRiskMonitorSearchVo tRiskMonitor) {
String menuInfo = "1838411182001954817";
tRiskMonitor.setMenuInfo(menuInfo);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L; long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId); boolean isSsc = this.haveRole(user, roleId);
......
...@@ -338,32 +338,22 @@ ...@@ -338,32 +338,22 @@
left join (select a.DEPT_NO, left join (select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD) onContractNum count(DISTINCT a.EMP_IDCARD) onContractNum
from t_employee_contract_info a from t_employee_contract_info a
inner join t_employee_project jj on a.EMP_IDCARD = jj.EMP_IDCARD and a.DEPT_NO = jj.DEPT_NO and jj.PROJECT_STATUS = 0
and jj.DELETE_FLAG = '0'
where a.IN_USE = '0' where a.IN_USE = '0'
and CONTRACT_END >= CURDATE() and CONTRACT_END >= CURDATE()
and a.DELETE_FLAG = 0 and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0 and length(ifnull(a.DEPT_NO, 0)) > 0
and EXISTS(
select 1
from t_employee_project a1
where a1.PROJECT_STATUS = 0
and a1.DELETE_FLAG = '0'
and a.EMP_IDCARD = a1.EMP_IDCARD
and a.DEPT_NO = a1.DEPT_NO)
group by a.DEPT_NO) q on a.DEPART_NO = q.DEPT_NO group by a.DEPT_NO) q on a.DEPART_NO = q.DEPT_NO
left join left join
( (
select a.SETTLE_DOMAIN_CODE, select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) onSocialNum count(DISTINCT a.EMP_IDCARD) onSocialNum
from mvp_social.t_social_fund_info a from mvp_social.t_social_fund_info a
inner join t_employee_project jj on a.EMP_IDCARD = jj.EMP_IDCARD and a.SETTLE_DOMAIN_CODE = jj.DEPT_NO and jj.PROJECT_STATUS = 0
and jj.DELETE_FLAG = '0'
where a.SOCIAL_STATUS in ('3', '4', '9', '12') where a.SOCIAL_STATUS in ('3', '4', '9', '12')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
and EXISTS(
select 1
from t_employee_project a1
where a1.PROJECT_STATUS = 0
and a1.DELETE_FLAG = '0'
and a.EMP_IDCARD = a1.EMP_IDCARD
and a.SETTLE_DOMAIN_CODE = a1.DEPT_NO)
group by a.SETTLE_DOMAIN_CODE group by a.SETTLE_DOMAIN_CODE
) w on a.DEPART_NO = w.SETTLE_DOMAIN_CODE ) w on a.DEPART_NO = w.SETTLE_DOMAIN_CODE
left join left join
...@@ -371,15 +361,10 @@ ...@@ -371,15 +361,10 @@
select a.SETTLE_DOMAIN_CODE, select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) onFundNum count(DISTINCT a.EMP_IDCARD) onFundNum
from mvp_social.t_social_fund_info a from mvp_social.t_social_fund_info a
inner join t_employee_project jj on a.EMP_IDCARD = jj.EMP_IDCARD and a.SETTLE_DOMAIN_CODE = jj.DEPT_NO and jj.PROJECT_STATUS = 0
and jj.DELETE_FLAG = '0'
where a.fund_STATUS in ('3', '8') where a.fund_STATUS in ('3', '8')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
and EXISTS(
select 1
from t_employee_project a1
where a1.PROJECT_STATUS = 0
and a1.DELETE_FLAG = '0'
and a.EMP_IDCARD = a1.EMP_IDCARD
and a.SETTLE_DOMAIN_CODE = a1.DEPT_NO)
group by a.SETTLE_DOMAIN_CODE group by a.SETTLE_DOMAIN_CODE
) e on a.DEPART_NO = e.SETTLE_DOMAIN_CODE ) e on a.DEPART_NO = e.SETTLE_DOMAIN_CODE
left join left join
...@@ -387,18 +372,13 @@ ...@@ -387,18 +372,13 @@
select a.DEPT_NO, select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD_NO) onInsuranceNum count(DISTINCT a.EMP_IDCARD_NO) onInsuranceNum
from mvp_insurances.t_insurance_detail a from mvp_insurances.t_insurance_detail a
inner join t_employee_project jj on a.EMP_IDCARD_NO = jj.EMP_IDCARD and a.DEPT_NO = jj.DEPT_NO and jj.PROJECT_STATUS = 0
and jj.DELETE_FLAG = '0'
where a.IS_USE = 0 where a.IS_USE = 0
and IS_EFFECT = 0 and IS_EFFECT = 0
and a.IS_OVERDUE = 0 and a.IS_OVERDUE = 0
and a.DELETE_FLAG = 0 and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0 and length(ifnull(a.DEPT_NO, 0)) > 0
and EXISTS(
select 1
from t_employee_project a1
where a1.PROJECT_STATUS = 0
and a1.DELETE_FLAG = '0'
and a.EMP_IDCARD_NO = a1.EMP_IDCARD
and a.DEPT_NO = a1.DEPT_NO)
group by a.DEPT_NO group by a.DEPT_NO
) r on a.DEPART_NO = r.DEPT_NO ) r on a.DEPART_NO = r.DEPT_NO
left join left join
...@@ -406,6 +386,8 @@ ...@@ -406,6 +386,8 @@
select count(DISTINCT acc.EMP_IDCARD) as onSalaryNum, lll.DEPT_NO select count(DISTINCT acc.EMP_IDCARD) as onSalaryNum, lll.DEPT_NO
from mvp_salary.t_salary_standard lll from mvp_salary.t_salary_standard lll
left join mvp_salary.t_salary_account acc on lll.id = acc.SALARY_FORM_ID and acc.DELETE_FLAG = 0 left join mvp_salary.t_salary_account acc on lll.id = acc.SALARY_FORM_ID and acc.DELETE_FLAG = 0
inner join t_employee_project jj on acc.EMP_IDCARD = jj.EMP_IDCARD and lll.DEPT_NO = jj.DEPT_NO and jj.PROJECT_STATUS = 0
and jj.DELETE_FLAG = '0'
where lll.id in where lll.id in
(select b.id (select b.id
from ( from (
...@@ -418,13 +400,7 @@ ...@@ -418,13 +400,7 @@
group by a.DEPT_NO) hh group by a.DEPT_NO) hh
INNER JOIN mvp_salary.t_salary_standard b INNER JOIN mvp_salary.t_salary_standard b
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME) on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME)
and EXISTS(
select 1
from t_employee_project a1
where a1.PROJECT_STATUS = 0
and a1.DELETE_FLAG = '0'
and acc.EMP_IDCARD = a1.EMP_IDCARD
and lll.DEPT_NO = a1.DEPT_NO)
group by lll.DEPT_NO, lll.id group by lll.DEPT_NO, lll.id
) t on a.DEPART_NO = t.DEPT_NO ) t on a.DEPART_NO = t.DEPT_NO
where a.DELETE_FLAG = '0' where a.DELETE_FLAG = '0'
......
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