Commit 5e3d6c0d authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.6.11' into MVP1.6.11

parents f1d136e6 2744762d
...@@ -41,7 +41,7 @@ public class TRiskMonitor extends BaseEntity { ...@@ -41,7 +41,7 @@ public class TRiskMonitor extends BaseEntity {
/** /**
* 结算主体名称 * 结算主体名称
*/ */
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50) @ExcelAttribute(name = "项目名称")
@ExcelProperty("项目名称") @ExcelProperty("项目名称")
@Schema(description = "项目名称") @Schema(description = "项目名称")
private String departName; private String departName;
...@@ -49,7 +49,7 @@ public class TRiskMonitor extends BaseEntity { ...@@ -49,7 +49,7 @@ public class TRiskMonitor extends BaseEntity {
/** /**
* 结算主体编码 * 结算主体编码
*/ */
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 32) @ExcelAttribute(name = "项目编码")
@NotBlank(message = "项目编码不能为空") @NotBlank(message = "项目编码不能为空")
@ExcelProperty("项目编码") @ExcelProperty("项目编码")
@Schema(description = "项目编码") @Schema(description = "项目编码")
...@@ -58,9 +58,7 @@ public class TRiskMonitor extends BaseEntity { ...@@ -58,9 +58,7 @@ public class TRiskMonitor extends BaseEntity {
/** /**
* 项目状态:0正常 1停止服务 2 已冻结 * 项目状态:0正常 1停止服务 2 已冻结
*/ */
@ExcelAttribute(name = "项目状态", isNotEmpty = true, errorInfo = "项目状态不能为空", maxLength = 1) @ExcelAttribute(name = "项目状态")
@NotBlank(message = "项目状态:0正常 1停止服务 2 已冻结不能为空")
@Length(max = 1, message = "项目状态:0正常 1停止服务 2 已冻结不能超过1个字符")
@ExcelProperty("项目状态") @ExcelProperty("项目状态")
@Schema(description = "项目状态:0正常 1停止服务 2 已冻结") @Schema(description = "项目状态:0正常 1停止服务 2 已冻结")
private String stopFlag; private String stopFlag;
...@@ -68,8 +66,7 @@ public class TRiskMonitor extends BaseEntity { ...@@ -68,8 +66,7 @@ public class TRiskMonitor extends BaseEntity {
/** /**
* 二级指标归属 * 二级指标归属
*/ */
@ExcelAttribute(name = "二级指标归属", maxLength = 50) @ExcelAttribute(name = "二级指标归属")
@Length(max = 50, message = "二级指标归属不能超过50个字符")
@ExcelProperty("二级指标归属") @ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属") @Schema(description = "二级指标归属")
private String secondIndicatorBelong; private String secondIndicatorBelong;
......
...@@ -218,193 +218,305 @@ ...@@ -218,193 +218,305 @@
<!--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.STOP_FLAG,
a.DEPART_NO, a.DEPART_NAME,
ifnull(a.SECOND_INDICATOR_BELONG,'') SECOND_INDICATOR_BELONG, a.DEPART_NO,
a.CUSTOMER_NAME, ifnull( a.SECOND_INDICATOR_BELONG, '' ) SECOND_INDICATOR_BELONG,
a.CUSTOMER_NO, a.CUSTOMER_NAME,
ifnull(a.BUSINESS_SECOND_TYPE,'') BUSINESS_SECOND_TYPE, a.CUSTOMER_NO,
ifnull(a.BUSINESS_PRIMARY_TYPE,'') BUSINESS_PRIMARY_TYPE, ifnull( a.BUSINESS_SECOND_TYPE, '' ) BUSINESS_SECOND_TYPE,
ifnull(a.BUSINESS_THIRD_TYPE,'') BUSINESS_THIRD_TYPE, ifnull( a.BUSINESS_PRIMARY_TYPE, '' ) BUSINESS_PRIMARY_TYPE,
ifnull(a.BU_BELONG,'') BU_BELONG, ifnull( a.BUSINESS_THIRD_TYPE, '' ) BUSINESS_THIRD_TYPE,
ifnull(a.LINE_TYPE,'') LINE_TYPE, ifnull( a.BU_BELONG, '' ) BU_BELONG,
CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','') ifnull( a.LINE_TYPE, '' ) LINE_TYPE,
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','') CONCAT(
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','') IF
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','') ( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','') IF
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','') ( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','') IF
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','') ( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','') IF
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,0) >0, '工资多发 / ','') ( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
) RISK_TYPE, IF
if (length(CONCAT(if(ifnull(pro.countPer,0) > ifnull(q.onContractNum,0),'合同漏签 / ','') ( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
,if(ifnull(ht.countContract,0) - ifnull(q.onContractNum,0) > 0,'合同漏减 / ','') IF
,if(ifnull(pro.countPer,0) > ifnull(r.onInsuranceNum,0),'商险漏买 / ','') ( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
,if(ifnull(sx.countInsurance,0) - ifnull(r.onInsuranceNum,0) >0, '商险多买 / ','') IF
,if(ifnull(pro.countPer,0) > ifnull(w.onSocialNum,0), '社保漏买 / ','') ( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
,if(ifnull(so.countSocial,0) - ifnull(w.onSocialNum,0) >0, '社保多买 / ','') IF
,if(ifnull(pro.countPer,0) > ifnull(e.onFundNum,0), '公积金漏买 / ','') ( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
,if(ifnull(fu.countFund,0) - ifnull(e.onFundNum,0) >0, '公积金多买 / ','') IF
,if(ifnull(pro.countPer,0) > ifnull(t.onSalaryNum,0), '工资漏发 / ','') ( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
,if(ifnull(sa.countSalary,0) - ifnull(t.onSalaryNum,0) >0, '工资多发 / ','') IF
)) >0,'0','1') IS_RISK, ( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
ifnull(q.onContractNum, 0) PRO_CONTRACT_NUM, ) RISK_TYPE,
ifnull(w.onSocialNum, 0) PRO_SOCIAL_NUM, IF
ifnull(e.onFundNum, 0) PRO_FUND_NUM, (
ifnull(r.onInsuranceNum, 0) PRO_INSURANCE_NUM, length(
ifnull(t.onSalaryNum, 0) PRO_SALARY_NUM, CONCAT(
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( q.onContractNum, 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( ht.countContract, 0 ) - ifnull( q.onContractNum, 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( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
ifnull(pro.countPer, 0) PROJECT_NUM, IF
'1' create_by, ( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
'超管' create_name, IF
'1' UPDATE_BY ( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
from t_settle_domain a IF
left join ( ( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
select a.DEPT_NO, IF
count(DISTINCT a.EMP_IDCARD) as countContract ( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
from t_employee_contract_info a IF
where a.IN_USE = '0' ( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
and a.DELETE_FLAG = 0 IF
and CONTRACT_END >= CURDATE() ( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
and length(ifnull(a.DEPT_NO, 0)) > 0 IF
group by a.DEPT_NO ( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
) ht on a.DEPART_NO = ht.DEPT_NO )) > 0,
left join ( '0',
select a.SETTLE_DOMAIN_CODE, '1'
count(DISTINCT a.EMP_IDCARD) as countSocial ) IS_RISK,
from mvp_social.t_social_fund_info a ifnull( q.onContractNum, 0 ) PRO_CONTRACT_NUM,
where a.SOCIAL_STATUS in ('3', '4', '9', '12') ifnull( w.onSocialNum, 0 ) PRO_SOCIAL_NUM,
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 ifnull( e.onFundNum, 0 ) PRO_FUND_NUM,
group by a.SETTLE_DOMAIN_CODE ifnull( r.onInsuranceNum, 0 ) PRO_INSURANCE_NUM,
) so on so.SETTLE_DOMAIN_CODE = a.DEPART_NO ifnull( t.onSalaryNum, 0 ) PRO_SALARY_NUM,
left join ( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) UNPRO_CONTRACT_NUM,
select a.SETTLE_DOMAIN_CODE, ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) UNPRO_SOCIAL_NUM,
count(DISTINCT a.EMP_IDCARD) as countFund ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) UNPRO_FUND_NUM,
from mvp_social.t_social_fund_info a ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) UNPRO_INSURANCE_NUM,
where a.fund_STATUS in ('3', '8') ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) UNPRO_SALARY_NUM,
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 ifnull( DATE_FORMAT( sa.CREATE_TIME, '%Y-%m-%d %H:%i:%s' ), '' ) LAST_SALARY_TIME,
group by a.SETTLE_DOMAIN_CODE ifnull( pro.countPer, 0 ) PROJECT_NUM,
) fu on fu.SETTLE_DOMAIN_CODE = a.DEPART_NO '1' create_by,
left join ( '超管' create_name,
select a.DEPT_NO, '1' UPDATE_BY
count(DISTINCT a.EMP_IDCARD_NO) as countInsurance FROM
from mvp_insurances.t_insurance_detail a t_settle_domain a
where a.IS_USE = 0 LEFT JOIN (
and IS_EFFECT = 0 SELECT
and a.IS_OVERDUE = 0 a.DEPT_NO,
and a.DELETE_FLAG = 0 count( DISTINCT a.EMP_IDCARD ) AS countContract
and length(ifnull(a.DEPT_NO, 0)) > 0 FROM
group by a.DEPT_NO t_employee_contract_info a
) sx on a.DEPART_NO = sx.DEPT_NO WHERE
a.IN_USE = '0'
left join ( AND a.DELETE_FLAG = 0
select count(DISTINCT acc.EMP_IDCARD) as countSalary, lll.CREATE_TIME, lll.DEPT_NO AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
from mvp_salary.t_salary_standard lll AND length(
left join mvp_salary.t_salary_account acc on lll.id = acc.SALARY_FORM_ID and acc.DELETE_FLAG = 0 ifnull(a.DEPT_NO, '')) > 0
where lll.id in GROUP BY
(select b.id a.DEPT_NO
from ( ) ht ON a.DEPART_NO = ht.DEPT_NO
select a.DEPT_NO, LEFT JOIN (
a.id, SELECT
max(a.CREATE_TIME) CREATE_TIME a.SETTLE_DOMAIN_CODE,
from mvp_salary.t_salary_standard a count( DISTINCT a.EMP_IDCARD ) AS countSocial
where 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) hh WHERE
INNER JOIN mvp_salary.t_salary_standard b a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
on hh.DEPT_NO = b.DEPT_NO and hh.CREATE_TIME = b.CREATE_TIME) AND length(
group by lll.id ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
) sa on a.DEPART_NO = sa.DEPT_NO GROUP BY
a.SETTLE_DOMAIN_CODE
left join ) so ON so.SETTLE_DOMAIN_CODE = a.DEPART_NO
( LEFT JOIN (
select a.DEPT_NO, SELECT
a.EMP_IDCARD, a.SETTLE_DOMAIN_CODE,
count(DISTINCT a.EMP_IDCARD) countPer count( DISTINCT a.EMP_IDCARD ) AS countFund
from t_employee_project a FROM
where a.PROJECT_STATUS = 0 mvp_social.t_social_fund_info a
and a.DELETE_FLAG = '0' WHERE
group by a.DEPT_NO) pro on a.DEPART_NO = pro.DEPT_NO a.fund_STATUS IN ( '3', '8' )
AND length(
left join (select a.DEPT_NO, ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
count(DISTINCT a.EMP_IDCARD) onContractNum GROUP BY
from t_employee_contract_info a a.SETTLE_DOMAIN_CODE
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 ) fu ON fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
and jj.DELETE_FLAG = '0' LEFT JOIN (
where a.IN_USE = '0' SELECT
and CONTRACT_END >= CURDATE() a.DEPT_NO,
and a.DELETE_FLAG = 0 count( DISTINCT a.EMP_IDCARD_NO ) AS countInsurance
and length(ifnull(a.DEPT_NO, 0)) > 0 FROM
group by a.DEPT_NO) q on a.DEPART_NO = q.DEPT_NO mvp_insurances.t_insurance_detail a
left join WHERE
( a.IS_USE = 0
select a.SETTLE_DOMAIN_CODE, AND IS_EFFECT = 0
count(DISTINCT a.EMP_IDCARD) onSocialNum AND a.IS_OVERDUE = 0
from mvp_social.t_social_fund_info a AND a.DELETE_FLAG = 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 length(
and jj.DELETE_FLAG = '0' ifnull( a.DEPT_NO, '')) > 0
where a.SOCIAL_STATUS in ('3', '4', '9', '12') GROUP BY
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 a.DEPT_NO
group by a.SETTLE_DOMAIN_CODE ) sx ON a.DEPART_NO = sx.DEPT_NO
) w on a.DEPART_NO = w.SETTLE_DOMAIN_CODE LEFT JOIN (
left join SELECT
( count( DISTINCT acc.EMP_IDCARD ) AS countSalary,
select a.SETTLE_DOMAIN_CODE, lll.CREATE_TIME,
count(DISTINCT a.EMP_IDCARD) onFundNum lll.DEPT_NO
from mvp_social.t_social_fund_info a FROM
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 mvp_salary.t_salary_standard lll
and jj.DELETE_FLAG = '0' LEFT JOIN mvp_salary.t_salary_account acc ON lll.id = acc.SALARY_FORM_ID
where a.fund_STATUS in ('3', '8') AND acc.DELETE_FLAG = 0
and length(ifnull(a.SETTLE_DOMAIN_CODE, 0)) > 0 WHERE
group by a.SETTLE_DOMAIN_CODE lll.id IN (
) e on a.DEPART_NO = e.SETTLE_DOMAIN_CODE SELECT
left join b.id
( FROM
select a.DEPT_NO, (
count(DISTINCT a.EMP_IDCARD_NO) onInsuranceNum SELECT
from mvp_insurances.t_insurance_detail a a.DEPT_NO,
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.id,
and jj.DELETE_FLAG = '0' max( a.CREATE_TIME ) CREATE_TIME
where a.IS_USE = 0 FROM
and IS_EFFECT = 0 mvp_salary.t_salary_standard a
and a.IS_OVERDUE = 0 WHERE
and a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and length(ifnull(a.DEPT_NO, 0)) > 0 AND length(
group by a.DEPT_NO ifnull( a.DEPT_NO, '')) > 0
) r on a.DEPART_NO = r.DEPT_NO GROUP BY
left join a.DEPT_NO
( ) hh
select count(DISTINCT acc.EMP_IDCARD) as onSalaryNum, lll.DEPT_NO INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
from mvp_salary.t_salary_standard lll AND hh.CREATE_TIME = b.CREATE_TIME
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 GROUP BY
and jj.DELETE_FLAG = '0' lll.id
where lll.id in ) sa ON a.DEPART_NO = sa.DEPT_NO
(select b.id LEFT JOIN (
from ( SELECT
select a.DEPT_NO, a.DEPT_NO,
a.id, a.EMP_IDCARD,
max(a.CREATE_TIME) CREATE_TIME count( DISTINCT a.EMP_IDCARD ) countPer
from mvp_salary.t_salary_standard a FROM
where a.DELETE_FLAG = 0 t_employee_project a
and length(ifnull(a.DEPT_NO, 0)) > 0 WHERE
group by a.DEPT_NO) hh a.PROJECT_STATUS = 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) GROUP BY
a.DEPT_NO
group by lll.DEPT_NO, lll.id ) pro ON a.DEPART_NO = pro.DEPT_NO
) t on a.DEPART_NO = t.DEPT_NO LEFT JOIN (
where a.DELETE_FLAG = '0' SELECT
group by a.DEPART_NO 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>
<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">
......
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author huyc * @author huyc
* @date 2024-05-23 10:24:12 * @date 2024-05-23 10:24:12
*/ */
@Log4j2
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/icbcQuery" ) @RequestMapping("/icbcQuery" )
...@@ -59,6 +61,7 @@ public class IcbcTransactionFlowQueryController { ...@@ -59,6 +61,7 @@ public class IcbcTransactionFlowQueryController {
@Inner @Inner
@PostMapping("/inner/newPage") @PostMapping("/inner/newPage")
public R getIcbcTransactionFlowInner() throws IcbcApiException { public R getIcbcTransactionFlowInner() throws IcbcApiException {
log.info("开始交易流水查询");
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew(); return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
} }
......
...@@ -230,6 +230,16 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -230,6 +230,16 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据 // 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!flowRecordList.isEmpty()) { if (!flowRecordList.isEmpty()) {
log.info("获取当前账号下的流水--明细条数:" + flowRecordList.size());
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : flowRecordList) {
log.info("获取当前账号下的流水--来款单位:" + entry.getRecipName());
log.info("获取当前账号下的流水--交易类型:" + entry.getDrcrf());
log.info("获取当前账号下的流水--来款账户:" + entry.getRecipAccountNo());
log.info("获取当前账号下的流水--交易时间:" + entry.getBusiDate() + " "
+ entry.getBusiTime().replace(".",":"),DateUtil.DATETIME_PATTERN_MINUTE);
log.info("获取当前账号下的流水--流水号:" + entry.getOnlySequence());
}
// 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value // 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
List<String> serioListByAccount = serioMapByAccount.get(account); List<String> serioListByAccount = serioMapByAccount.get(account);
if(serioListByAccount == null || serioListByAccount.isEmpty()){ if(serioListByAccount == null || serioListByAccount.isEmpty()){
...@@ -238,9 +248,11 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -238,9 +248,11 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
// 过滤出需要新增流水的数据 // 过滤出需要新增流水的数据
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>(); List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>();
// 入账金额大于0再记录
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) { for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) {
if("2".equals(flowRecord.getDrcrf()) && !serioListByAccount.contains(flowRecord.getOnlySequence())){ if("2".equals(flowRecord.getDrcrf())
&& flowRecord.getCreditAmount() > 0
&& !serioListByAccount.contains(flowRecord.getOnlySequence())){
insertList.add(flowRecord); insertList.add(flowRecord);
} }
} }
......
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