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
9472cf99
Commit
9472cf99
authored
Jan 11, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算状态同步增加定时任务
parent
d23f33b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
681 additions
and
134 deletions
+681
-134
SalaryDaprUtil.java
...u/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
+3
-2
SocialDaprUtils.java
.../cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
+4
-4
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+5
-0
TUpdateStatusError.java
...ud/plus/v1/yifu/insurances/entity/TUpdateStatusError.java
+78
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+14
-0
TUpdateStatusErrorMapper.java
...nsurances/mapper/insurances/TUpdateStatusErrorMapper.java
+41
-0
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+8
-0
TUpdateStatusErrorService.java
...surances/service/insurance/TUpdateStatusErrorService.java
+31
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+45
-12
TUpdateStatusErrorServiceImpl.java
...service/insurance/impl/TUpdateStatusErrorServiceImpl.java
+36
-0
DoJointInsuranceTask.java
...ud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
+245
-55
TUpdateStatusErrorMapper.xml
.../resources/mapper/insurances/TUpdateStatusErrorMapper.xml
+79
-0
UpdateOverdueTask.java
...com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
+13
-0
TSalaryAccountController.java
...s/v1/yifu/salary/controller/TSalaryAccountController.java
+2
-2
TSalaryAccountService.java
...ud/plus/v1/yifu/salary/service/TSalaryAccountService.java
+1
-1
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+19
-13
TIncomeController.java
...oud/plus/v1/yifu/social/controller/TIncomeController.java
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+2
-2
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+1
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+1
-1
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+16
-10
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+35
-29
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SalaryDaprUtil.java
View file @
9472cf99
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
...
@@ -29,7 +30,7 @@ public class SalaryDaprUtil {
...
@@ -29,7 +30,7 @@ public class SalaryDaprUtil {
* @Param
* @Param
* @return
* @return
**/
**/
public
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
public
R
<
Boolean
>
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateSalarySettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Object
.
class
,
SecurityConstants
.
FROM_IN
);
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateSalarySettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
}
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
View file @
9472cf99
...
@@ -143,8 +143,8 @@ public class SocialDaprUtils {
...
@@ -143,8 +143,8 @@ public class SocialDaprUtils {
* @Param
* @Param
* @return
* @return
**/
**/
public
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
public
R
<
Boolean
>
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/updateSocialSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Object
.
class
,
SecurityConstants
.
FROM_IN
);
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/updateSocialSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
/**
/**
...
@@ -154,7 +154,7 @@ public class SocialDaprUtils {
...
@@ -154,7 +154,7 @@ public class SocialDaprUtils {
* @Param
* @Param
* @return
* @return
**/
**/
public
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
infoVo
)
{
public
R
<
Boolean
>
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
infoVo
)
{
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateIncomeSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Object
.
class
,
SecurityConstants
.
FROM_IN
);
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/updateIncomeSettleStatus"
,
JSON
.
toJSONString
(
infoVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
9472cf99
...
@@ -1291,4 +1291,9 @@ public class InsurancesConstants {
...
@@ -1291,4 +1291,9 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
HANDLE_PROVINCE_IS_NULL
=
"该记录的商险办理地为空"
;
public
static
final
String
HANDLE_PROVINCE_IS_NULL
=
"该记录的商险办理地为空"
;
/**
* 再次同步状态成功
*/
public
static
final
String
AGAIN_UPDATE_STATUS
=
"再次同步状态成功"
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TUpdateStatusError.java
0 → 100644
View file @
9472cf99
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Data
@TableName
(
"t_update_status_error"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"同步结算状态的错误表"
)
public
class
TUpdateStatusError
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 内容
*/
@Schema
(
description
=
"内容"
)
private
String
title
;
/**
* 结算单号
*/
@Schema
(
description
=
"结算单号"
)
private
String
settleNo
;
/**
* 结算单号类型 0 收入 1 支出
*/
@Schema
(
description
=
"结算单号类型 0 收入 1 支出"
)
private
String
settleType
;
/**
* 结算单类型 0 社保 1公积金 2管理费 3风险金 4 商险 5 薪资
*/
@Schema
(
description
=
"结算单类型 0 社保 1公积金 2管理费 3风险金 4 商险 5 薪资"
)
private
String
typeFlag
;
/**
* 创建人时间
*/
@Schema
(
description
=
"创建人时间"
)
private
Date
createTime
;
/**
* 更新状态 0 未更新 1 已更新
*/
@Schema
(
description
=
"更新状态 0 未更新 1 已更新"
)
private
Integer
status
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
9472cf99
...
@@ -734,4 +734,18 @@ public class TInsuranceDetailController {
...
@@ -734,4 +734,18 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
updateSalarySettleStatus
(
vo
);
return
tInsuranceDetailService
.
updateSalarySettleStatus
(
vo
);
}
}
/**
* 重新更新结算状态同步失败的数据
*
* @author licancan
* @param
* @return void
*/
@SysLog
(
"重新更新结算状态同步失败的数据"
)
@Inner
@PostMapping
(
"/inner/updateSettleStatus"
)
public
void
updateSettleStatus
()
{
tInsuranceDetailService
.
updateSettleStatus
();
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TUpdateStatusErrorMapper.java
0 → 100644
View file @
9472cf99
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Mapper
public
interface
TUpdateStatusErrorMapper
extends
BaseMapper
<
TUpdateStatusError
>
{
/**
* 同步结算状态的错误表简单分页查询
* @param tUpdateStatusError 同步结算状态的错误表
* @return
*/
IPage
<
TUpdateStatusError
>
getTUpdateStatusErrorPage
(
Page
<
TUpdateStatusError
>
page
,
@Param
(
"tUpdateStatusError"
)
TUpdateStatusError
tUpdateStatusError
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
9472cf99
...
@@ -501,4 +501,12 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
...
@@ -501,4 +501,12 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return: R
* @return: R
**/
**/
R
updateSalarySettleStatus
(
EkpStatusParamVo
vo
);
R
updateSalarySettleStatus
(
EkpStatusParamVo
vo
);
/**
* @Description: 重新更新结算状态同步失败的数据
* @Author: huyc
* @Date: 2023/1/11 15:56
* @return:
**/
void
updateSettleStatus
();
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TUpdateStatusErrorService.java
0 → 100644
View file @
9472cf99
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError
;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
public
interface
TUpdateStatusErrorService
extends
IService
<
TUpdateStatusError
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
9472cf99
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
...
@@ -123,6 +124,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -123,6 +124,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
TBusinessOperateService
tBusinessOperateService
;
private
TBusinessOperateService
tBusinessOperateService
;
@Resource
@Resource
private
TInsuranceAreaResService
tInsuranceAreaResService
;
private
TInsuranceAreaResService
tInsuranceAreaResService
;
@Resource
private
TUpdateStatusErrorMapper
updateStatusErrorMapper
;
/***********************商险办理********************************/
/***********************商险办理********************************/
/**
/**
* 每日定时刷新商险到期数据
* 每日定时刷新商险到期数据
...
@@ -7260,12 +7263,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -7260,12 +7263,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
}
try
{
doJointInsuranceTask
.
updateSocialSettleStatus
(
vo
);
doJointInsuranceTask
.
updateSocialSettleStatus
(
vo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"社保结算状态更新异常"
,
e
);
return
R
.
failed
(
"社保结算状态更新异常"
);
}
return
R
.
ok
();
}
return
R
.
ok
();
}
@Override
@Override
...
@@ -7273,12 +7271,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -7273,12 +7271,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isEmpty
(
vo
))
{
if
(
Common
.
isEmpty
(
vo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
}
try
{
doJointInsuranceTask
.
updateIncomeSettleStatus
(
vo
);
doJointInsuranceTask
.
updateIncomeSettleStatus
(
vo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"收入结算状态更新异常"
,
e
);
return
R
.
failed
(
"收入结算状态更新异常"
);
}
return
R
.
ok
();
}
return
R
.
ok
();
}
...
@@ -7295,6 +7288,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -7295,6 +7288,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
return
R
.
ok
();
}
return
R
.
ok
();
}
@Override
public
void
updateSettleStatus
()
{
//获取所有结算状态同步失败的数据
long
count
=
updateStatusErrorMapper
.
selectCount
(
Wrappers
.<
TUpdateStatusError
>
query
().
lambda
()
.
eq
(
TUpdateStatusError:
:
getStatus
,
CommonConstants
.
ZERO_INT
));
if
(
count
>
0
)
{
List
<
TUpdateStatusError
>
list
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
list
=
updateStatusErrorMapper
.
selectList
(
Wrappers
.<
TUpdateStatusError
>
query
().
lambda
()
.
eq
(
TUpdateStatusError:
:
getStatus
,
CommonConstants
.
ZERO_INT
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
list
))
{
for
(
TUpdateStatusError
t:
list
)
{
//更新商险结算状态
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
t
.
getTypeFlag
()))
{
doJointInsuranceTask
.
aUpdateInsuranceSettleStatus
(
t
);
}
//更新社保结算状态
if
(
CommonConstants
.
ONE_STRING
.
equals
(
t
.
getTypeFlag
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
t
.
getTypeFlag
()))
{
doJointInsuranceTask
.
aUpdateSocialSettleStatus
(
t
);
}
//更新收入结算状态
if
(
CommonConstants
.
TWO_STRING
.
equals
(
t
.
getTypeFlag
())
||
CommonConstants
.
THREE_STRING
.
equals
(
t
.
getTypeFlag
()))
{
doJointInsuranceTask
.
aUpdateIncomeSettleStatus
(
t
);
}
//更新薪资结算状态
if
(
CommonConstants
.
FIVE_STRING
.
equals
(
t
.
getTypeFlag
()))
{
doJointInsuranceTask
.
aUpdateSalarySettleStatus
(
t
);
}
}
}
}
}
}
}
private
Map
<
String
,
TSettleDomainSelectVo
>
getSelectVoMap
()
{
private
Map
<
String
,
TSettleDomainSelectVo
>
getSelectVoMap
()
{
R
<
TSettleDomainListVo
>
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
R
<
TSettleDomainListVo
>
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
null
;
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
null
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TUpdateStatusErrorServiceImpl.java
0 → 100644
View file @
9472cf99
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TUpdateStatusErrorService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Log4j2
@Service
public
class
TUpdateStatusErrorServiceImpl
extends
ServiceImpl
<
TUpdateStatusErrorMapper
,
TUpdateStatusError
>
implements
TUpdateStatusErrorService
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
View file @
9472cf99
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TUpdateStatusErrorMapper.xml
0 → 100644
View file @
9472cf99
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper"
>
<resultMap
id=
"tUpdateStatusErrorMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"title"
column=
"TITLE"
/>
<result
property=
"settleNo"
column=
"SETTLE_NO"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
/>
<result
property=
"typeFlag"
column=
"TYPE_FLAG"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"status"
column=
"STATUS"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.TITLE,
a.SETTLE_NO,
a.SETTLE_TYPE,
a.TYPE_FLAG,
a.CREATE_TIME,
a.STATUS
</sql>
<sql
id=
"tUpdateStatusError_where"
>
<if
test=
"tUpdateStatusError != null"
>
<if
test=
"tUpdateStatusError.id != null and tUpdateStatusError.id.trim() != ''"
>
AND a.ID = #{tUpdateStatusError.id}
</if>
<if
test=
"tUpdateStatusError.title != null and tUpdateStatusError.title.trim() != ''"
>
AND a.TITLE = #{tUpdateStatusError.title}
</if>
<if
test=
"tUpdateStatusError.settleNo != null and tUpdateStatusError.settleNo.trim() != ''"
>
AND a.SETTLE_NO = #{tUpdateStatusError.settleNo}
</if>
<if
test=
"tUpdateStatusError.settleType != null and tUpdateStatusError.settleType.trim() != ''"
>
AND a.SETTLE_TYPE = #{tUpdateStatusError.settleType}
</if>
<if
test=
"tUpdateStatusError.typeFlag != null and tUpdateStatusError.typeFlag.trim() != ''"
>
AND a.TYPE_FLAG = #{tUpdateStatusError.typeFlag}
</if>
<if
test=
"tUpdateStatusError.createTime != null"
>
AND a.CREATE_TIME = #{tUpdateStatusError.createTime}
</if>
<if
test=
"tUpdateStatusError.status != null"
>
AND a.STATUS = #{tUpdateStatusError.status}
</if>
</if>
</sql>
<!--tUpdateStatusError简单分页查询-->
<select
id=
"getTUpdateStatusErrorPage"
resultMap=
"tUpdateStatusErrorMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_update_status_error a
<where>
1=1
<include
refid=
"tUpdateStatusError_where"
/>
</where>
</select>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
View file @
9472cf99
...
@@ -33,4 +33,17 @@ public class UpdateOverdueTask {
...
@@ -33,4 +33,17 @@ public class UpdateOverdueTask {
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/insuranceDetail/inner/updateOverdueByTask"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/insuranceDetail/inner/updateOverdueByTask"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------更新商险到期-定时任务结束------------"
);
log
.
info
(
"------------更新商险到期-定时任务结束------------"
);
}
}
/**
* 重新更新结算状态同步失败的数据
*
* @author huyc
* @param
* @return void
*/
public
void
updateSettleStatus
()
throws
Exception
{
log
.
info
(
"-------------重新更新结算状态同步失败的数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/insuranceDetail/inner/updateSettleStatus"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------重新更新结算状态同步失败的数据-定时任务结束------------"
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryAccountController.java
View file @
9472cf99
...
@@ -301,7 +301,7 @@ public class TSalaryAccountController {
...
@@ -301,7 +301,7 @@ public class TSalaryAccountController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/updateSalarySettleStatus"
)
@PostMapping
(
"/inner/updateSalarySettleStatus"
)
public
void
updateSalarySettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
public
Boolean
updateSalarySettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
tSalaryAccountService
.
updateSalarySettleStatus
(
viewVo
);
return
tSalaryAccountService
.
updateSalarySettleStatus
(
viewVo
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryAccountService.java
View file @
9472cf99
...
@@ -134,7 +134,7 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
...
@@ -134,7 +134,7 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/12/26 17:56
* @Date: 2022/12/26 17:56
* @return: R
* @return: R
**/
**/
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
Boolean
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
/**
/**
* @param page 分页
* @param page 分页
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
9472cf99
...
@@ -237,24 +237,30 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
...
@@ -237,24 +237,30 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
@Override
@Override
public
void
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
public
Boolean
updateSalarySettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
TSalaryAccount
account
;
TSalaryAccount
account
;
if
(!
viewVoList
.
isEmpty
())
{
try
{
for
(
EkpSocialViewVo
viewVo:
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
//根据明细id更新结算状态
for
(
EkpSocialViewVo
viewVo
:
viewVoList
)
{
account
=
baseMapper
.
selectById
(
viewVo
.
getId
());
//根据明细id更新结算状态
if
(
Common
.
isNotNull
(
account
))
{
account
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
if
(
Common
.
isNotNull
(
account
))
{
account
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
account
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
account
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
}
else
{
account
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
account
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
}
else
{
account
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
account
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
account
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateById
(
account
);
}
}
baseMapper
.
updateById
(
account
);
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"更新薪资结算状态失败"
,
e
);
return
false
;
}
}
return
true
;
}
}
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TIncomeController.java
View file @
9472cf99
...
@@ -231,7 +231,7 @@ public class TIncomeController {
...
@@ -231,7 +231,7 @@ public class TIncomeController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/updateIncomeSettleStatus"
)
@PostMapping
(
"/inner/updateIncomeSettleStatus"
)
public
void
updateSocialSettleStatus
(
@RequestBody
List
<
EkpInsuranceViewVo
>
viewVo
)
{
public
Boolean
updateSocialSettleStatus
(
@RequestBody
List
<
EkpInsuranceViewVo
>
viewVo
)
{
tIncomeService
.
updateIncomeSettleStatus
(
viewVo
);
return
tIncomeService
.
updateIncomeSettleStatus
(
viewVo
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
9472cf99
...
@@ -456,7 +456,7 @@ public class TPaymentInfoController {
...
@@ -456,7 +456,7 @@ public class TPaymentInfoController {
**/
**/
@Inner
@Inner
@PostMapping
(
"/inner/updateSocialSettleStatus"
)
@PostMapping
(
"/inner/updateSocialSettleStatus"
)
public
void
updateSocialSettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
public
Boolean
updateSocialSettleStatus
(
@RequestBody
List
<
EkpSocialViewVo
>
viewVo
)
{
tPaymentInfoService
.
updateSocialSettleStatus
(
viewVo
);
return
tPaymentInfoService
.
updateSocialSettleStatus
(
viewVo
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
9472cf99
...
@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> {
...
@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/12/26 17:56
* @Date: 2022/12/26 17:56
* @return:
* @return:
**/
**/
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVo
);
Boolean
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
9472cf99
...
@@ -167,7 +167,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
...
@@ -167,7 +167,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
**/
R
<
String
>
changeDeptByEkp
(
ChangeDeptVo
changeDeptVo
);
R
<
String
>
changeDeptByEkp
(
ChangeDeptVo
changeDeptVo
);
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
Boolean
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVo
);
// hgw2023-1-6 10:42:06:以下:B端相关接口:
// hgw2023-1-6 10:42:06:以下:B端相关接口:
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
9472cf99
...
@@ -802,19 +802,25 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -802,19 +802,25 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
@Override
@Override
public
void
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVoList
)
{
public
Boolean
updateIncomeSettleStatus
(
List
<
EkpInsuranceViewVo
>
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
try
{
TIncome
income
;
if
(!
viewVoList
.
isEmpty
())
{
for
(
EkpInsuranceViewVo
viewVo
:
viewVoList
)
{
TIncome
income
;
//根据明细id更新结算状态
for
(
EkpInsuranceViewVo
viewVo
:
viewVoList
)
{
income
=
baseMapper
.
selectById
(
viewVo
.
getId
());
//根据明细id更新结算状态
if
(
Common
.
isNotNull
(
income
))
{
income
=
baseMapper
.
selectById
(
viewVo
.
getId
());
income
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
if
(
Common
.
isNotNull
(
income
))
{
income
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
income
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
baseMapper
.
updateById
(
income
);
income
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
baseMapper
.
updateById
(
income
);
}
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"更新收入结算状态失败"
,
e
);
return
false
;
}
}
return
true
;
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
9472cf99
...
@@ -3273,44 +3273,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3273,44 +3273,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
@Override
@Override
public
void
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
public
Boolean
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
if
(!
viewVoList
.
isEmpty
())
{
TPaymentInfo
paymentInfo
;
TPaymentInfo
paymentInfo
;
TForecastLibrary
library
;
TForecastLibrary
library
;
for
(
EkpSocialViewVo
viewVo:
viewVoList
)
{
try
{
//判断预估还是实缴
for
(
EkpSocialViewVo
viewVo
:
viewVoList
)
{
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
//判断预估还是实缴
//根据明细id更新结算状态
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
//根据明细id更新结算状态
if
(
Common
.
isNotNull
(
paymentInfo
))
{
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
//判断是收入还是支出结算单号
if
(
Common
.
isNotNull
(
paymentInfo
))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
//判断是收入还是支出结算单号
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
}
else
{
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
}
else
{
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateStatusById
(
paymentInfo
);
log
.
info
(
"缴费库实缴费用状态更新"
);
}
}
baseMapper
.
updateStatusById
(
paymentInfo
);
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
))
{
log
.
info
(
"缴费库实缴费用状态更新"
);
//根据明细id更新结算状态
}
library
=
tForecastLibraryMapper
.
selectById
(
viewVo
.
getId
());
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
))
{
if
(
Common
.
isNotNull
(
library
))
{
//根据明细id更新结算状态
//判断是收入还是支出结算单号
library
=
tForecastLibraryMapper
.
selectById
(
viewVo
.
getId
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
if
(
Common
.
isNotNull
(
library
))
{
library
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
//判断是收入还是支出结算单号
library
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
}
else
{
library
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
library
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
library
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
library
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
else
{
}
library
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
tForecastLibraryMapper
.
updateById
(
library
);
library
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
}
tForecastLibraryMapper
.
updateById
(
library
);
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"更新社保结算状态失败"
,
e
);
return
false
;
}
}
}
}
return
true
;
}
}
/**
/**
...
...
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