Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
e440e504
Commit
e440e504
authored
Sep 30, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-风险管控提交
parent
c9352d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
298 additions
and
187 deletions
+298
-187
TRiskMonitorMapper.xml
...ives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
+298
-187
No files found.
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
View file @
e440e504
...
...
@@ -218,193 +218,304 @@
<!--tRiskMonitor批量生成-->
<select
id=
"selectRiskMonitorList"
resultMap=
"tRiskMonitorMap"
>
select A.id as DEPT_ID,
a.STOP_FLAG,
a.DEPART_NAME,
a.DEPART_NO,
ifnull(a.SECOND_INDICATOR_BELONG,'') SECOND_INDICATOR_BELONG,
a.CUSTOMER_NAME,
a.CUSTOMER_NO,
ifnull(a.BUSINESS_SECOND_TYPE,'') BUSINESS_SECOND_TYPE,
ifnull(a.BUSINESS_PRIMARY_TYPE,'') BUSINESS_PRIMARY_TYPE,
ifnull(a.BUSINESS_THIRD_TYPE,'') BUSINESS_THIRD_TYPE,
ifnull(a.BU_BELONG,'') BU_BELONG,
ifnull(a.LINE_TYPE,'') LINE_TYPE,
CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','')
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','')
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','')
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','')
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','')
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','')
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,0) >0, '工资多发 / ','')
) RISK_TYPE,
if (length(CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','')
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','')
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','')
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','')
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','')
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','')
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','')
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,0) >0, '工资多发 / ','')
)) >0,'0','1') IS_RISK,
ifnull(q.onContractNum, 0) PRO_CONTRACT_NUM,
ifnull(w.onSocialNum, 0) PRO_SOCIAL_NUM,
ifnull(e.onFundNum, 0) PRO_FUND_NUM,
ifnull(r.onInsuranceNum, 0) PRO_INSURANCE_NUM,
ifnull(t.onSalaryNum, 0) PRO_SALARY_NUM,
ifnull(ht.countContract, 0) - ifnull(q.onContractNum, 0) UNPRO_CONTRACT_NUM,
ifnull(so.countSocial, 0) - ifnull(w.onSocialNum, 0) UNPRO_SOCIAL_NUM,
ifnull(fu.countFund, 0) - ifnull(e.onFundNum, 0) UNPRO_FUND_NUM,
ifnull(sx.countInsurance, 0) - ifnull(r.onInsuranceNum, 0) UNPRO_INSURANCE_NUM,
ifnull(sa.countSalary, 0) - ifnull(t.onSalaryNum, 0) UNPRO_SALARY_NUM,
ifnull(DATE_FORMAT(sa.CREATE_TIME,'%Y-%m-%d %H:%i:%s'),'') LAST_SALARY_TIME,
ifnull(pro.countPer, 0) PROJECT_NUM,
'1' create_by,
'超管' create_name,
'1' UPDATE_BY
from t_settle_domain a
left join (
select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD) as countContract
from t_employee_contract_info a
where a.IN_USE = '0'
and a.DELETE_FLAG = 0
and CONTRACT_END >= CURDATE()
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO
) ht on a.DEPART_NO = ht.DEPT_NO
left join (
select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) as countSocial
from mvp_social.t_social_fund_info a
where a.SOCIAL_STATUS in ('3', '4', '9', '12')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
group by a.SETTLE_DOMAIN_CODE
) so on so.SETTLE_DOMAIN_CODE = a.DEPART_NO
left join (
select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) as countFund
from mvp_social.t_social_fund_info a
where a.fund_STATUS in ('3', '8')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
group by a.SETTLE_DOMAIN_CODE
) fu on fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
left join (
select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD_NO) as countInsurance
from mvp_insurances.t_insurance_detail a
where a.IS_USE = 0
and IS_EFFECT = 0
and a.IS_OVERDUE = 0
and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO
) sx on a.DEPART_NO = sx.DEPT_NO
left join (
select count(DISTINCT acc.EMP_IDCARD) as countSalary, lll.CREATE_TIME, lll.DEPT_NO
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
where lll.id in
(select b.id
from (
select a.DEPT_NO,
a.id,
max(a.CREATE_TIME) CREATE_TIME
from mvp_salary.t_salary_standard a
where a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO) hh
INNER JOIN mvp_salary.t_salary_standard b
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME)
group by lll.id
) sa on a.DEPART_NO = sa.DEPT_NO
left join
(
select a.DEPT_NO,
a.EMP_IDCARD,
count(DISTINCT a.EMP_IDCARD) countPer
from t_employee_project a
where a.PROJECT_STATUS = 0
and a.DELETE_FLAG = '0'
group by a.DEPT_NO) pro on a.DEPART_NO = pro.DEPT_NO
left join (select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD) onContractNum
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'
and CONTRACT_END >= CURDATE()
and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO) q on a.DEPART_NO = q.DEPT_NO
left join
(
select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) onSocialNum
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')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
group by a.SETTLE_DOMAIN_CODE
) w on a.DEPART_NO = w.SETTLE_DOMAIN_CODE
left join
(
select a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) onFundNum
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')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
group by a.SETTLE_DOMAIN_CODE
) e on a.DEPART_NO = e.SETTLE_DOMAIN_CODE
left join
(
select a.DEPT_NO,
count(DISTINCT a.EMP_IDCARD_NO) onInsuranceNum
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
and IS_EFFECT = 0
and a.IS_OVERDUE = 0
and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO
) r on a.DEPART_NO = r.DEPT_NO
left join
(
select count(DISTINCT acc.EMP_IDCARD) as onSalaryNum, lll.DEPT_NO
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
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
(select b.id
from (
select a.DEPT_NO,
a.id,
max(a.CREATE_TIME) CREATE_TIME
from mvp_salary.t_salary_standard a
where a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
group by a.DEPT_NO) hh
INNER JOIN mvp_salary.t_salary_standard b
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME)
group by lll.DEPT_NO, lll.id
) t on a.DEPART_NO = t.DEPT_NO
where a.DELETE_FLAG = '0'
group by a.DEPART_NO
SELECT
A.id AS DEPT_ID,
a.DEPART_NAME,
a.DEPART_NO,
ifnull( a.SECOND_INDICATOR_BELONG, '' ) SECOND_INDICATOR_BELONG,
a.CUSTOMER_NAME,
a.CUSTOMER_NO,
ifnull( a.BUSINESS_SECOND_TYPE, '' ) BUSINESS_SECOND_TYPE,
ifnull( a.BUSINESS_PRIMARY_TYPE, '' ) BUSINESS_PRIMARY_TYPE,
ifnull( a.BUSINESS_THIRD_TYPE, '' ) BUSINESS_THIRD_TYPE,
ifnull( a.BU_BELONG, '' ) BU_BELONG,
ifnull( a.LINE_TYPE, '' ) LINE_TYPE,
CONCAT(
IF
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
IF
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
IF
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
IF
( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
IF
( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
IF
( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
) RISK_TYPE,
IF
(
length(
CONCAT(
IF
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
IF
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
IF
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
IF
( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
IF
( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
IF
( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
)) > 0,
'0',
'1'
) IS_RISK,
ifnull( q.onContractNum, 0 ) PRO_CONTRACT_NUM,
ifnull( w.onSocialNum, 0 ) PRO_SOCIAL_NUM,
ifnull( e.onFundNum, 0 ) PRO_FUND_NUM,
ifnull( r.onInsuranceNum, 0 ) PRO_INSURANCE_NUM,
ifnull( t.onSalaryNum, 0 ) PRO_SALARY_NUM,
ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) UNPRO_CONTRACT_NUM,
ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) UNPRO_SOCIAL_NUM,
ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) UNPRO_FUND_NUM,
ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) UNPRO_INSURANCE_NUM,
ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) UNPRO_SALARY_NUM,
ifnull( DATE_FORMAT( sa.CREATE_TIME, '%Y-%m-%d %H:%i:%s' ), '' ) LAST_SALARY_TIME,
ifnull( pro.countPer, 0 ) PROJECT_NUM,
'1' create_by,
'超管' create_name,
'1' UPDATE_BY
FROM
t_settle_domain a
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD ) AS countContract
FROM
t_employee_contract_info a
WHERE
a.IN_USE = '0'
AND a.DELETE_FLAG = 0
AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
AND length(
ifnull(a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) ht ON a.DEPART_NO = ht.DEPT_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) AS countSocial
FROM
mvp_social.t_social_fund_info a
WHERE
a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) so ON so.SETTLE_DOMAIN_CODE = a.DEPART_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) AS countFund
FROM
mvp_social.t_social_fund_info a
WHERE
a.fund_STATUS IN ( '3', '8' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) fu ON fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD_NO ) AS countInsurance
FROM
mvp_insurances.t_insurance_detail a
WHERE
a.IS_USE = 0
AND IS_EFFECT = 0
AND a.IS_OVERDUE = 0
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) sx ON a.DEPART_NO = sx.DEPT_NO
LEFT JOIN (
SELECT
count( DISTINCT acc.EMP_IDCARD ) AS countSalary,
lll.CREATE_TIME,
lll.DEPT_NO
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
WHERE
lll.id IN (
SELECT
b.id
FROM
(
SELECT
a.DEPT_NO,
a.id,
max( a.CREATE_TIME ) CREATE_TIME
FROM
mvp_salary.t_salary_standard a
WHERE
a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) hh
INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
AND hh.CREATE_TIME = b.CREATE_TIME
)
GROUP BY
lll.id
) sa ON a.DEPART_NO = sa.DEPT_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
a.EMP_IDCARD,
count( DISTINCT a.EMP_IDCARD ) countPer
FROM
t_employee_project a
WHERE
a.PROJECT_STATUS = 0
AND a.DELETE_FLAG = '0'
GROUP BY
a.DEPT_NO
) pro ON a.DEPART_NO = pro.DEPT_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD ) onContractNum
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'
AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) q ON a.DEPART_NO = q.DEPT_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) onSocialNum
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' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) w ON a.DEPART_NO = w.SETTLE_DOMAIN_CODE
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) onFundNum
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' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) e ON a.DEPART_NO = e.SETTLE_DOMAIN_CODE
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD_NO ) onInsuranceNum
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
AND IS_EFFECT = 0
AND a.IS_OVERDUE = 0
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) r ON a.DEPART_NO = r.DEPT_NO
LEFT JOIN (
SELECT
count( DISTINCT acc.EMP_IDCARD ) AS onSalaryNum,
lll.DEPT_NO
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
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 (
SELECT
b.id
FROM
(
SELECT
a.DEPT_NO,
a.id,
max( a.CREATE_TIME ) CREATE_TIME
FROM
mvp_salary.t_salary_standard a
WHERE
a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) hh
INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
AND hh.CREATE_TIME = b.CREATE_TIME
)
GROUP BY
lll.DEPT_NO,
lll.id
) t ON a.DEPART_NO = t.DEPT_NO
WHERE
a.DELETE_FLAG = '0'
GROUP BY
a.DEPART_NO
</select>
<select
id=
"getTRiskMonitorPer"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.RiskMonitorPerVo"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment