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
b412129b
Commit
b412129b
authored
Sep 29, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-风险管控提交
parent
061d8c98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
17 deletions
+34
-17
TRiskMonitorMapper.java
...loud/plus/v1/yifu/archives/mapper/TRiskMonitorMapper.java
+6
-0
TRiskMonitorServiceImpl.java
...1/yifu/archives/service/impl/TRiskMonitorServiceImpl.java
+5
-4
TRiskMonitorMapper.xml
...ives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
+23
-13
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TRiskMonitorMapper.java
View file @
b412129b
...
...
@@ -52,4 +52,10 @@ public interface TRiskMonitorMapper extends BaseMapper<TRiskMonitor> {
* @return
*/
RiskMonitorPerVo
getTRiskMonitorPer
(
@Param
(
"tRiskMonitor"
)
TRiskMonitorSearchVo
tRiskMonitor
);
/**
* 删除所有监控数据
* @return
*/
void
deleteAllRiskMonitorInfo
();
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TRiskMonitorServiceImpl.java
View file @
b412129b
...
...
@@ -4,7 +4,6 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor
;
...
...
@@ -68,6 +67,8 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TRiskMonitorSearchVo
searchVo
)
{
String
menuInfo
=
"1838411182001954817"
;
searchVo
.
setMenuInfo
(
menuInfo
);
YifuUser
user
=
SecurityUtils
.
getUser
();
long
roleId
=
1839501715787390978L
;
boolean
isSsc
=
this
.
haveRole
(
user
,
roleId
);
...
...
@@ -124,8 +125,7 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
@Override
public
void
createRiskMonitor
()
{
//批量删除之前生成的管控统计
baseMapper
.
delete
(
Wrappers
.<
TRiskMonitor
>
query
().
lambda
()
.
eq
(
TRiskMonitor:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
baseMapper
.
deleteAllRiskMonitorInfo
();
//批量生成统计数据
List
<
TRiskMonitor
>
list
=
baseMapper
.
selectRiskMonitorList
();
if
(!
list
.
isEmpty
())
{
...
...
@@ -139,7 +139,8 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
*/
@Override
public
R
selectCurrentRiskMonitor
(
TRiskMonitorSearchVo
tRiskMonitor
)
{
String
menuInfo
=
"1838411182001954817"
;
tRiskMonitor
.
setMenuInfo
(
menuInfo
);
YifuUser
user
=
SecurityUtils
.
getUser
();
long
roleId
=
1839501715787390978L
;
boolean
isSsc
=
this
.
haveRole
(
user
,
roleId
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
View file @
b412129b
...
...
@@ -269,16 +269,17 @@
from t_settle_domain a
left join (
select a.DEPT_NO,
count(a.EMP_IDCARD) as countContract
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(a.EMP_IDCARD) as countSocial
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
...
...
@@ -286,7 +287,7 @@
) so on so.SETTLE_DOMAIN_CODE = a.DEPART_NO
left join (
select a.SETTLE_DOMAIN_CODE,
count(a.EMP_IDCARD) as countFund
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
...
...
@@ -294,19 +295,20 @@
) fu on fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
left join (
select a.DEPT_NO,
count(a.EMP_IDCARD_NO) as countInsurance
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(acc.EMP_IDCARD) as countSalary, lll.CREATE_TIME, lll.DEPT_NO
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
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 (
...
...
@@ -326,16 +328,18 @@
(
select a.DEPT_NO,
a.EMP_IDCARD,
count(a.EMP_IDCARD) countPer
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(a.EMP_IDCARD) onContractNum
count(
DISTINCT
a.EMP_IDCARD) onContractNum
from t_employee_contract_info a
where a.IN_USE = '0'
and CONTRACT_END >= CURDATE()
and a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0
and EXISTS(
select 1
...
...
@@ -348,7 +352,7 @@
left join
(
select a.SETTLE_DOMAIN_CODE,
count(a.EMP_IDCARD) onSocialNum
count(
DISTINCT
a.EMP_IDCARD) onSocialNum
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
...
...
@@ -364,7 +368,7 @@
left join
(
select a.SETTLE_DOMAIN_CODE,
count(a.EMP_IDCARD) onFundNum
count(
DISTINCT
a.EMP_IDCARD) onFundNum
from mvp_social.t_social_fund_info a
where a.fund_STATUS in ('3', '8')
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0
...
...
@@ -380,11 +384,12 @@
left join
(
select a.DEPT_NO,
count(a.EMP_IDCARD_NO) onInsuranceNum
count(
DISTINCT
a.EMP_IDCARD_NO) onInsuranceNum
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
and EXISTS(
select 1
...
...
@@ -397,9 +402,9 @@
) r on a.DEPART_NO = r.DEPT_NO
left join
(
select count(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
left join mvp_salary.t_salary_account acc on lll.id = acc.SALARY_FORM_ID
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 (
...
...
@@ -440,4 +445,9 @@
${tRiskMonitor.authSql}
</if>
</select>
<!--删除所有监控数据-->
<update
id=
"deleteAllRiskMonitorInfo"
>
TRUNCATE t_risk_monitor
</update>
</mapper>
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