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
f9402c13
Commit
f9402c13
authored
Dec 08, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收入生成打标修改
parent
4c067a75
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
7 deletions
+138
-7
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+14
-1
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+13
-0
TPaymentInfo.java
...m/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
+7
-0
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+14
-1
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+2
-0
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+2
-0
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+74
-1
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+12
-4
No files found.
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
f9402c13
...
...
@@ -59,7 +59,20 @@ public class ArchivesDaprUtil {
}
return
res
;
}
/**
* @Author huyc
* @Description 通过项目编码获取项目及客户信息
* @Date 21:18 2022/7/20
* @Param
* @return
**/
public
R
<
TSettleDomainListVo
>
getSettleInfoByCodes
(
List
<
String
>
codes
){
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleInfoByCodes"
,
JSON
.
toJSONString
(
codes
),
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"通过项目编码获取项目及客户信息失败!"
);
}
return
res
;
}
/**
* @Author fxj
* @Description 获取派单校验需要的档案信息
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
f9402c13
...
...
@@ -132,4 +132,17 @@ public class SocialTask {
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tincome/inner/pushDetail"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务生成统计表数据-定时任务结束------------"
);
}
/**
* @Description: 定时任务标识根据项目不需要生成收入的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
public
void
signPaymentNoIncomeFlag
()
{
log
.
info
(
"------------定时任务标识根据项目不需要生成收入的数据-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tpaymentinfo/inner/signPaymentNoIncomeFlag"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务标识根据项目不需要生成收入的数据-定时任务结束------------"
);
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
View file @
f9402c13
...
...
@@ -632,6 +632,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"工资公积金结算状态"
)
private
String
salaryFundFlag
;
/**
* 是否需要生成收入
*/
@Schema
(
description
=
"是否需要生成收入 0需要 1不需要"
)
@ExcelIgnore
private
String
isIncomeStatus
;
/**
* 是否导入重复标识
*/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
f9402c13
...
...
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -381,6 +380,20 @@ public class TPaymentInfoController {
tPaymentInfoService
.
createPaymentFundIncome
();
}
/**
* @Description: 定时任务标识根据项目不需要生成收入的数据
* @Author: huyc
* @Date: 2022/8/30
* @return: void
**/
@Operation
(
summary
=
"定时任务标识根据项目不需要生成收入的数据"
,
description
=
"定时任务标识根据项目不需要生成收入的数据"
)
@SysLog
(
"定时任务标识根据项目不需要生成收入的数据"
)
@Inner
@PostMapping
(
"/inner/signPaymentNoIncomeFlag"
)
public
void
signPaymentNoIncomeFlag
()
{
tPaymentInfoService
.
signPaymentNoIncomeFlag
();
}
/**
* @param info
* @Description: 查询缴费库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
f9402c13
...
...
@@ -200,6 +200,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void
updateBySocialIncomePayment
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomeFlag
(
@Param
(
"id"
)
String
id
);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
f9402c13
...
...
@@ -146,6 +146,8 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void
createPaymentInfoIncome
();
void
createPaymentFundIncome
();
void
signPaymentNoIncomeFlag
();
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
void
pushPaymentSocialFundInfo
(
TPaymentInfoSearchVo
searchVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
f9402c13
...
...
@@ -2601,6 +2601,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIsIncomeStatus
,
CommonConstants
.
ZERO_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
...
...
@@ -2626,6 +2627,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getIsIncomeStatus
,
CommonConstants
.
ZERO_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
...
...
@@ -2645,6 +2647,30 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
@Override
public
void
signPaymentNoIncomeFlag
()
{
//标识根据项目不需要生成收入的数据
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
));
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//判断是否需要生成收入并标识
signIncomeFlag
(
unPushInfo
);
}
}
}
}
}
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
//获取所有未推送的社保实缴明细数据
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
...
...
@@ -3099,10 +3125,51 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public
void
signIncomeFlag
(
List
<
TPaymentInfo
>
updateList
)
{
//获取所有的项目编码
List
<
String
>
deptNoList
=
updateList
.
stream
().
map
(
TPaymentInfo:
:
getSettleDomainCode
).
collect
(
Collectors
.
toList
());
//获取对应项目信息
Map
<
String
,
TSettleDomain
>
data
=
new
HashMap
<>();
TSettleDomain
settleDomain
;
try
{
R
<
TSettleDomainListVo
>
infoByCodes
=
archivesDaprUtil
.
getSettleInfoByCodes
(
deptNoList
);
if
(
null
!=
infoByCodes
&&
Common
.
isNotNull
(
infoByCodes
.
getData
()))
{
data
=
infoByCodes
.
getData
().
getMapVO
();
}
if
(
Common
.
isNotNull
(
data
))
{
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
settleDomain
=
data
.
get
(
paymentInfo
.
getSettleDomainCode
());
boolean
isIncomeFlag
=
false
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getSocialId
()))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getFundId
())))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//实缴模式
isIncomeFlag
=
true
;
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getSocialId
()))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
Common
.
isNotNull
(
paymentInfo
.
getFundId
())))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//实缴模式
isIncomeFlag
=
true
;
}
}
if
(!
isIncomeFlag
)
{
baseMapper
.
updateBySocialIncomeFlag
(
paymentInfo
.
getId
());
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"标识是否需要生成收入异常"
,
e
);
}
}
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
List
<
TIncomeDetail
>
exitIncome
;
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
boolean
exitFlag
=
false
;
List
<
TIncomeDetail
>
exitIncome
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
exitIncome
=
detailMapper
.
selectList
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
...
...
@@ -3149,6 +3216,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
boolean
isIncomeFlag
=
false
;
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
...
...
@@ -3173,6 +3241,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if
(!
exitFlag
||
isSum
==
1
)
{
isIncomeFlag
=
true
;
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
socialFundFlag
);
...
...
@@ -3203,12 +3272,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if
(!
exitFlag
||
isSum
==
2
)
{
isIncomeFlag
=
true
;
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
socialFundFlag
);
}
}
}
if
(!
isIncomeFlag
)
{
baseMapper
.
updateBySocialIncomeFlag
(
paymentInfo
.
getId
());
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
f9402c13
...
...
@@ -100,6 +100,7 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"incomeStatus"
column=
"INCOME_STATUS"
/>
<result
property=
"isIncomeStatus"
column=
"IS_INCOME_STATUS"
/>
</resultMap>
<resultMap
id=
"tPaymentInfoSumMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
...
@@ -1266,7 +1267,7 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
...
...
@@ -1278,7 +1279,7 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
...
...
@@ -1300,6 +1301,13 @@
ID = #{id}
</update>
<update
id=
"updateBySocialIncomeFlag"
>
update t_payment_info
set IS_INCOME_STATUS = '1'
where
ID = #{id}
</update>
<select
id=
"getTPaymentSocialPushCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
...
...
@@ -1327,7 +1335,7 @@
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
...
...
@@ -1338,7 +1346,7 @@
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
AND a.IS_INCOME_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
...
...
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