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
4e2b2fee
You need to sign in or sign up before continuing.
Commit
4e2b2fee
authored
Nov 30, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/dev-fxj' into feature/dev-fxj
parents
aa69d480
6f9a20a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
46 deletions
+63
-46
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+1
-1
TSalaryStandard.java
...ifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
+4
-4
TSalaryStandardExportVo.java
...cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
+1
-1
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+13
-7
DoJointSalaryAsyncTask.java
...loud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
+44
-33
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
4e2b2fee
...
...
@@ -200,7 +200,7 @@ public interface CommonConstants {
* @Author pwang
* @Date 2019-08-02 16:39
**/
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
};
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
};
/**
* 个位数字串(阿里编码规约不允许直接使用‘魔法值’)
* @Author pwang
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandard.java
View file @
4e2b2fee
...
...
@@ -148,12 +148,12 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty
(
"款项来源(0客户到款/1垫付)"
)
private
Integer
moneyFrom
;
/**
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送失败 11 推送收入中)
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送失败 11 推送收入中
12推送收入失败
)
*/
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 推送收入中
)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 推送收入中
)不能为空"
)
@ExcelAttribute
(
name
=
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 已审核生成收入中12已审核生成收入失败
)"
,
isNotEmpty
=
true
,
errorInfo
=
"状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空"
)
@NotBlank
(
message
=
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印10 推送失败 11 已审核生成收入中12已审核生成收入失败
)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送
3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送失败 11 推送收入中
)"
)
@ExcelProperty
(
"状态(0待提交1待审核2:待推送
明细3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印 10 推送失败 11 已审核生成收入中12已审核生成收入失败
)"
)
private
Integer
status
;
/**
* 提交时间
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryStandardExportVo.java
View file @
4e2b2fee
...
...
@@ -26,7 +26,7 @@ public class TSalaryStandardExportVo implements Serializable {
/**
* 状态0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败
*/
@ExcelAttribute
(
name
=
"状态"
,
isDataId
=
true
,
readConverterExp
=
"0=待提交,1=待审核,2=
审核通过,3=发送成功,5=审核不通过,6=确认不通过,10=发送
失败"
)
@ExcelAttribute
(
name
=
"状态"
,
isDataId
=
true
,
readConverterExp
=
"0=待提交,1=待审核,2=
待推送明细,3=发送成功,5=审核不通过,6=确认不通过,10=发送失败,11=已审核生成收入中,12=已审核生成收入
失败"
)
@NotBlank
(
message
=
"状态(0待提交 1待审核 2审核通过 3发送成功 5审核不通过 10 发送失败)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"薪酬状态"
)
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
4e2b2fee
...
...
@@ -223,6 +223,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 将审核状态变为中间态
tSalaryStandard
.
setStatus
(
CommonConstants
.
dingleDigitIntArray
[
11
]);
tSalaryStandard
.
setIncomeStartTime
(
new
Date
());
baseMapper
.
updateById
(
tSalaryStandard
);
// 异步-收入相关
doSalaryAsync
.
doIncomeDetail
(
dept
,
salaryAccountList
,
id
,
tSalaryStandard
);
}
...
...
@@ -816,12 +817,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Override
public
R
<
String
>
salaryDoIncome
(
String
id
)
{
TSalaryStandard
tSalaryStandard
=
this
.
getById
(
id
);
if
(
tSalaryStandard
!=
null
&&
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
if
(
tSalaryStandard
!=
null
&&
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
])
&&
tSalaryStandard
.
getIncomeStartTime
()
!=
null
)
{
Long
start
=
tSalaryStandard
.
getIncomeStartTime
().
getTime
()
+
600000
;
Long
end
=
new
Date
().
getTime
();
if
(
start
>
end
)
{
return
R
.
failed
(
"上次生成时间:"
+
tSalaryStandard
.
getIncomeStartTime
()
+
",请稍等10分钟"
);
if
(
tSalaryStandard
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
])
{
long
start
=
tSalaryStandard
.
getIncomeStartTime
().
getTime
()
+
1800000
;
long
end
=
new
Date
().
getTime
();
if
(
start
>
end
)
{
return
R
.
failed
(
"上次生成时间:"
+
tSalaryStandard
.
getIncomeStartTime
()
+
",请稍等30分钟"
);
}
}
R
<
TSettleDomainSelectVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
archivesProperties
.
getAppUrl
(),
archivesProperties
.
getAppId
()
,
"/tsettledomain/inner/getSettleDomainVoById"
,
tSalaryStandard
.
getDeptId
()
...
...
@@ -837,14 +842,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
// 将重置生成推送时间
tSalaryStandard
.
setIncomeStartTime
(
new
Date
());
tSalaryStandard
.
setIncomeEndTime
(
null
);
this
.
updateById
(
tSalaryStandard
);
// 异步-收入相关
doSalaryAsync
.
doIncomeDetail
(
dept
,
salaryAccountList
,
id
,
tSalaryStandard
);
return
R
.
ok
(
"生成收入并推送中,请耐心等待
1
0分钟!"
);
return
R
.
ok
(
"生成收入并推送中,请耐心等待
3
0分钟!"
);
}
return
R
.
failed
(
"未获取到报账明细,请重试"
);
}
else
{
return
R
.
failed
(
"
不是待生成收入状态,请勿点击
!"
);
return
R
.
failed
(
"
请耐心等待
!"
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/DoJointSalaryAsyncTask.java
View file @
4e2b2fee
...
...
@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo
;
...
...
@@ -34,7 +35,7 @@ import java.util.*;
public
class
DoJointSalaryAsyncTask
{
private
final
DaprSocialProperties
socialProperties
;
private
final
TSalaryStandard
Service
tSalaryStandardService
;
private
final
TSalaryStandard
Mapper
salaryStandardMapper
;
/**
* @Description: 收入
...
...
@@ -52,43 +53,53 @@ public class DoJointSalaryAsyncTask {
}
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
boolean
isTrue
=
true
;
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
if
(
failed1
!=
null
)
{
isTrue
=
false
;
}
else
{
// 含有薪资,则计算收入
// 管理费
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
TSalaryStandard
s
=
salaryStandardMapper
.
selectById
(
id
);
try
{
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
if
(
failed1
!=
null
)
{
isTrue
=
false
;
}
else
{
// 含有薪资,则计算收入
// 管理费
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
}
}
}
// 风险金
if
(
isTrue
&&
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
// 风险金
if
(
isTrue
&&
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
}
else
{
// 保存明细
isTrue
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
}
}
}
}
catch
(
Exception
e
)
{
isTrue
=
false
;
log
.
error
(
e
.
getMessage
());
}
if
(
isTrue
)
{
TSalaryStandard
s
=
tSalaryStandardService
.
getById
(
id
);
if
(
s
!=
null
&&
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
])
{
if
(
s
!=
null
&&
(
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
11
]
||
s
.
getStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
12
]))
{
tSalaryStandard
.
setIncomeEndTime
(
new
Date
());
if
(
isTrue
)
{
s
.
setStatus
(
CommonConstants
.
TWO_INT
);
tSalaryStandard
.
setIncomeEndTime
(
new
Date
());
tSalaryStandardService
.
updateById
(
s
);
salaryStandardMapper
.
updateById
(
s
);
}
else
{
s
.
setStatus
(
CommonConstants
.
dingleDigitIntArray
[
12
]);
salaryStandardMapper
.
updateById
(
s
);
}
}
}
...
...
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