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
Show 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 @@
...
@@ -218,193 +218,304 @@
<!--tRiskMonitor批量生成-->
<!--tRiskMonitor批量生成-->
<select
id=
"selectRiskMonitorList"
resultMap=
"tRiskMonitorMap"
>
<select
id=
"selectRiskMonitorList"
resultMap=
"tRiskMonitorMap"
>
select A.id as DEPT_ID,
SELECT
a.STOP_FLAG
,
A.id AS DEPT_ID
,
a.DEPART_NAME,
a.DEPART_NAME,
a.DEPART_NO,
a.DEPART_NO,
ifnull(a.SECOND_INDICATOR_BELONG,''
) SECOND_INDICATOR_BELONG,
ifnull( a.SECOND_INDICATOR_BELONG, ''
) SECOND_INDICATOR_BELONG,
a.CUSTOMER_NAME,
a.CUSTOMER_NAME,
a.CUSTOMER_NO,
a.CUSTOMER_NO,
ifnull(a.BUSINESS_SECOND_TYPE,'') BUSINESS_SECOND_TYPE,
ifnull( a.BUSINESS_SECOND_TYPE, '' ) BUSINESS_SECOND_TYPE,
ifnull(a.BUSINESS_PRIMARY_TYPE,'') BUSINESS_PRIMARY_TYPE,
ifnull( a.BUSINESS_PRIMARY_TYPE, '' ) BUSINESS_PRIMARY_TYPE,
ifnull(a.BUSINESS_THIRD_TYPE,'') BUSINESS_THIRD_TYPE,
ifnull( a.BUSINESS_THIRD_TYPE, '' ) BUSINESS_THIRD_TYPE,
ifnull(a.BU_BELONG,'') BU_BELONG,
ifnull( a.BU_BELONG, '' ) BU_BELONG,
ifnull(a.LINE_TYPE,'') LINE_TYPE,
ifnull( a.LINE_TYPE, '' ) LINE_TYPE,
CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','')
CONCAT(
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','')
IF
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','')
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','')
IF
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','')
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','')
IF
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','')
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','')
IF
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','')
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,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,
) RISK_TYPE,
if (length(CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','')
IF
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','')
(
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','')
length(
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','')
CONCAT(
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','')
IF
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','')
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','')
IF
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','')
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','')
IF
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,0) >0, '工资多发 / ','')
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
)) >0,'0','1') IS_RISK,
IF
ifnull(q.onContractNum, 0) PRO_CONTRACT_NUM,
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
ifnull(w.onSocialNum, 0) PRO_SOCIAL_NUM,
IF
ifnull(e.onFundNum, 0) PRO_FUND_NUM,
( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
ifnull(r.onInsuranceNum, 0) PRO_INSURANCE_NUM,
IF
ifnull(t.onSalaryNum, 0) PRO_SALARY_NUM,
( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
ifnull(ht.countContract, 0) - ifnull(q.onContractNum, 0) UNPRO_CONTRACT_NUM,
IF
ifnull(so.countSocial, 0) - ifnull(w.onSocialNum, 0) UNPRO_SOCIAL_NUM,
( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
ifnull(fu.countFund, 0) - ifnull(e.onFundNum, 0) UNPRO_FUND_NUM,
IF
ifnull(sx.countInsurance, 0) - ifnull(r.onInsuranceNum, 0) UNPRO_INSURANCE_NUM,
( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
ifnull(sa.countSalary, 0) - ifnull(t.onSalaryNum, 0) UNPRO_SALARY_NUM,
IF
ifnull(DATE_FORMAT(sa.CREATE_TIME,'%Y-%m-%d %H:%i:%s'),'') LAST_SALARY_TIME,
( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
ifnull(pro.countPer, 0) PROJECT_NUM,
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,
'1' create_by,
'超管' create_name,
'超管' create_name,
'1' UPDATE_BY
'1' UPDATE_BY
from t_settle_domain a
FROM
left join (
t_settle_domain a
select a.DEPT_NO,
LEFT JOIN (
count(DISTINCT a.EMP_IDCARD) as countContract
SELECT
from t_employee_contract_info a
a.DEPT_NO,
where a.IN_USE = '0'
count( DISTINCT a.EMP_IDCARD ) AS countContract
and a.DELETE_FLAG = 0
FROM
and CONTRACT_END >= CURDATE()
t_employee_contract_info a
and length(ifnull(a.DEPT_NO, 0)) > 0
WHERE
group by a.DEPT_NO
a.IN_USE = '0'
) ht on a.DEPART_NO = ht.DEPT_NO
AND a.DELETE_FLAG = 0
left join (
AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
select a.SETTLE_DOMAIN_CODE,
AND length(
count(DISTINCT a.EMP_IDCARD) as countSocial
ifnull(a.DEPT_NO, '')) > 0
from mvp_social.t_social_fund_info a
GROUP BY
where a.SOCIAL_STATUS in ('3', '4', '9', '12')
a.DEPT_NO
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
) ht ON a.DEPART_NO = ht.DEPT_NO
group by a.SETTLE_DOMAIN_CODE
LEFT JOIN (
) so on so.SETTLE_DOMAIN_CODE = a.DEPART_NO
SELECT
left join (
a.SETTLE_DOMAIN_CODE,
select a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) AS countSocial
count(DISTINCT a.EMP_IDCARD) as countFund
FROM
from mvp_social.t_social_fund_info a
mvp_social.t_social_fund_info a
where a.fund_STATUS in ('3', '8')
WHERE
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
group by a.SETTLE_DOMAIN_CODE
AND length(
) fu on fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
left join (
GROUP BY
select a.DEPT_NO,
a.SETTLE_DOMAIN_CODE
count(DISTINCT a.EMP_IDCARD_NO) as countInsurance
) so ON so.SETTLE_DOMAIN_CODE = a.DEPART_NO
from mvp_insurances.t_insurance_detail a
LEFT JOIN (
where a.IS_USE = 0
SELECT
and IS_EFFECT = 0
a.SETTLE_DOMAIN_CODE,
and a.IS_OVERDUE = 0
count( DISTINCT a.EMP_IDCARD ) AS countFund
and a.DELETE_FLAG = 0
FROM
and length(ifnull(a.DEPT_NO, 0)) > 0
mvp_social.t_social_fund_info a
group by a.DEPT_NO
WHERE
) sx on a.DEPART_NO = sx.DEPT_NO
a.fund_STATUS IN ( '3', '8' )
AND length(
left join (
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
select count(DISTINCT acc.EMP_IDCARD) as countSalary, lll.CREATE_TIME, lll.DEPT_NO
GROUP BY
from mvp_salary.t_salary_standard lll
a.SETTLE_DOMAIN_CODE
left join mvp_salary.t_salary_account acc on lll.id = acc.SALARY_FORM_ID and acc.DELETE_FLAG = 0
) fu ON fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
where lll.id in
LEFT JOIN (
(select b.id
SELECT
from (
a.DEPT_NO,
select a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD_NO ) AS countInsurance
a.id,
FROM
max(a.CREATE_TIME) CREATE_TIME
mvp_insurances.t_insurance_detail a
from mvp_salary.t_salary_standard a
WHERE
where a.DELETE_FLAG = 0
a.IS_USE = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
AND IS_EFFECT = 0
group by a.DEPT_NO) hh
AND a.IS_OVERDUE = 0
INNER JOIN mvp_salary.t_salary_standard b
AND a.DELETE_FLAG = 0
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME)
AND length(
group by lll.id
ifnull( a.DEPT_NO, '')) > 0
) sa on a.DEPART_NO = sa.DEPT_NO
GROUP BY
a.DEPT_NO
left join
) 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,
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,
a.EMP_IDCARD,
count(DISTINCT a.EMP_IDCARD) countPer
count( DISTINCT a.EMP_IDCARD ) countPer
from t_employee_project a
FROM
where a.PROJECT_STATUS = 0
t_employee_project a
and a.DELETE_FLAG = '0'
WHERE
group by a.DEPT_NO) pro on a.DEPART_NO = pro.DEPT_NO
a.PROJECT_STATUS = 0
AND a.DELETE_FLAG = '0'
left join (select a.DEPT_NO,
GROUP BY
count(DISTINCT a.EMP_IDCARD) onContractNum
a.DEPT_NO
from t_employee_contract_info a
) pro ON a.DEPART_NO = pro.DEPT_NO
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
LEFT JOIN (
and jj.DELETE_FLAG = '0'
SELECT
where a.IN_USE = '0'
a.DEPT_NO,
and CONTRACT_END >= CURDATE()
count( DISTINCT a.EMP_IDCARD ) onContractNum
and a.DELETE_FLAG = 0
FROM
and length(ifnull(a.DEPT_NO, 0)) > 0
t_employee_contract_info a
group by a.DEPT_NO) q on a.DEPART_NO = q.DEPT_NO
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
left join
AND a.DEPT_NO = jj.DEPT_NO
(
AND jj.PROJECT_STATUS = 0
select a.SETTLE_DOMAIN_CODE,
AND jj.DELETE_FLAG = '0'
count(DISTINCT a.EMP_IDCARD) onSocialNum
WHERE
from mvp_social.t_social_fund_info a
a.IN_USE = '0'
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 (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
and jj.DELETE_FLAG = '0'
AND a.DELETE_FLAG = 0
where a.SOCIAL_STATUS in ('3', '4', '9', '12')
AND length(
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
ifnull( a.DEPT_NO, '')) > 0
group by a.SETTLE_DOMAIN_CODE
GROUP BY
) w on a.DEPART_NO = w.SETTLE_DOMAIN_CODE
a.DEPT_NO
left join
) q ON a.DEPART_NO = q.DEPT_NO
(
LEFT JOIN (
select a.SETTLE_DOMAIN_CODE,
SELECT
count(DISTINCT a.EMP_IDCARD) onFundNum
a.SETTLE_DOMAIN_CODE,
from mvp_social.t_social_fund_info a
count( DISTINCT a.EMP_IDCARD ) onSocialNum
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
FROM
and jj.DELETE_FLAG = '0'
mvp_social.t_social_fund_info a
where a.fund_STATUS in ('3', '8')
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
AND a.SETTLE_DOMAIN_CODE = jj.DEPT_NO
group by a.SETTLE_DOMAIN_CODE
AND jj.PROJECT_STATUS = 0
) e on a.DEPART_NO = e.SETTLE_DOMAIN_CODE
AND jj.DELETE_FLAG = '0'
left join
WHERE
(
a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
select a.DEPT_NO,
AND length(
count(DISTINCT a.EMP_IDCARD_NO) onInsuranceNum
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
from mvp_insurances.t_insurance_detail a
GROUP BY
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
a.SETTLE_DOMAIN_CODE
and jj.DELETE_FLAG = '0'
) w ON a.DEPART_NO = w.SETTLE_DOMAIN_CODE
where a.IS_USE = 0
LEFT JOIN (
and IS_EFFECT = 0
SELECT
and a.IS_OVERDUE = 0
a.SETTLE_DOMAIN_CODE,
and a.DELETE_FLAG = 0
count( DISTINCT a.EMP_IDCARD ) onFundNum
and length(ifnull(a.DEPT_NO, 0)) > 0
FROM
group by a.DEPT_NO
mvp_social.t_social_fund_info a
) r on a.DEPART_NO = r.DEPT_NO
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
left join
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 count(DISTINCT acc.EMP_IDCARD) as onSalaryNum, lll.DEPT_NO
SELECT
from mvp_salary.t_salary_standard lll
a.DEPT_NO,
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,
a.id,
max(a.CREATE_TIME) CREATE_TIME
max( a.CREATE_TIME ) CREATE_TIME
from mvp_salary.t_salary_standard a
FROM
where a.DELETE_FLAG = 0
mvp_salary.t_salary_standard a
and length(ifnull(a.DEPT_NO, 0)) > 0
WHERE
group by a.DEPT_NO) hh
a.DELETE_FLAG = 0
INNER JOIN mvp_salary.t_salary_standard b
AND length(
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME)
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
group by lll.DEPT_NO, lll.id
a.DEPT_NO
) t on a.DEPART_NO = t.DEPT_NO
) hh
where a.DELETE_FLAG = '0'
INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
group by a.DEPART_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>
<select
id=
"getTRiskMonitorPer"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.RiskMonitorPerVo"
>
<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