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
7a7ecfa0
Commit
7a7ecfa0
authored
Sep 06, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收入优化
parent
08cbd5ea
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
224 additions
and
156 deletions
+224
-156
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+100
-114
TIncomeDetail.java
.../yifu/cloud/plus/v1/yifu/social/entity/TIncomeDetail.java
+5
-0
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+113
-42
TIncomeDetailMapper.xml
...ial-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
+6
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
7a7ecfa0
...
...
@@ -248,73 +248,71 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
else
{
return
R
.
failed
(
"获取项目信息失败,请联管理员!"
);
}
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
idCardList
.
add
(
account
.
getEmpIdcard
());
}
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
// 收入相关
R
<
String
>
failed1
=
getIncomeDetailMap
(
tSalaryStandard
,
dept
,
idCardList
,
detailMap
);
if
(
failed1
!=
null
)
return
failed1
;
// 含有薪资,则计算收入
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
))
{
// 管理费
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
if
(
Common
.
isNotNull
(
dept
.
getManageServerItem
())
&&
dept
.
getManageServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getManagementTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getManagementType
()))
{
// 收入相关
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailList"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
incomeDetail
.
getRedData
()))
{
value
++;
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
else
{
return
R
.
failed
(
"获取收入明细的详情出错,请联系管理员!"
);
}
// 风险金
if
(
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getManagementType
(),
CommonConstants
.
ONE
_STRING
);
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO
_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getManagementType
(),
CommonConstants
.
ONE
_STRING
);
R
<
String
>
failed
=
saveIncomeDetail
(
salaryAccountList
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO
_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
}
if
(
Common
.
isNotNull
(
dept
.
getRiskServerItem
())
&&
dept
.
getRiskServerItem
().
contains
(
CommonConstants
.
FOUR_STRING
))
{
// 风险金
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dept
.
getRiskFundTag
()))
{
// 金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dept
.
getRiskFundType
()))
{
// 收入相关
return
null
;
}
/**
* @Description: 获取收入信息
* @Author: hgw
* @Date: 2022/9/6 10:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
getIncomeDetailMap
(
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
List
<
String
>
idCardList
,
Map
<
String
,
Integer
>
detailMap
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setPayMonth
(
tSalaryStandard
.
getSalaryMonth
());
detail
.
setIdCardList
(
idCardList
);
detail
.
setDeptId
(
dept
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tincomedetail/inner/getTIncomeDetailList"
,
detail
,
TIncomeDetailReturnVo
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Integer
>
detailMap
=
new
HashMap
<>();
Integer
value
;
if
(
detailR
!=
null
)
{
if
(
detailR
.
getData
()
!=
null
&&
detailR
.
getData
().
getDetailList
()
!=
null
&&
!
detailR
.
getData
().
getDetailList
().
isEmpty
())
{
TIncomeDetailReturnVo
vo
=
detailR
.
getData
();
List
<
TIncomeDetail
>
detailList
=
vo
.
getDetailList
();
for
(
TIncomeDetail
incomeDetail
:
detailList
)
{
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFe
eType
());
value
=
detailMap
.
get
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourc
eType
());
if
(
Common
.
isEmpty
(
value
))
{
value
=
CommonConstants
.
ZERO_INT
;
}
...
...
@@ -324,22 +322,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
value
--;
}
detailMap
.
put
(
incomeDetail
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getDeptId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getFeeType
(),
value
);
+
incomeDetail
.
getFeeType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
incomeDetail
.
getSourceType
(),
value
);
}
}
}
else
{
return
R
.
failed
(
"获取收入明细的详情出错,请联系管理员!"
);
}
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
detailMap
,
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
else
{
// 保存明细
R
<
String
>
failed
=
saveIncomeDetail
(
id
,
tSalaryStandard
,
dept
,
new
HashMap
<>(),
dept
.
getRiskFundType
(),
CommonConstants
.
TWO_STRING
);
if
(
failed
!=
null
)
return
failed
;
}
}
}
return
null
;
}
...
...
@@ -351,12 +340,10 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @Date: 2022/9/2 17:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
saveIncomeDetail
(
String
id
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
private
R
<
String
>
saveIncomeDetail
(
List
<
TSalaryAccount
>
salaryAccountList
,
TSalaryStandard
tSalaryStandard
,
TSettleDomainSelectVo
dept
,
Map
<
String
,
Integer
>
detailMap
,
String
feeType
,
String
isManage
)
{
TIncomeDetail
detail
;
Integer
value
;
List
<
TSalaryAccount
>
salaryAccountList
=
salaryAccountService
.
getListByIncome
(
id
);
if
(
salaryAccountList
!=
null
&&
!
salaryAccountList
.
isEmpty
())
{
BigDecimal
money
;
for
(
TSalaryAccount
account
:
salaryAccountList
)
{
value
=
detailMap
.
get
(
account
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
...
...
@@ -398,7 +385,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
}
}
return
null
;
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TIncomeDetail.java
View file @
7a7ecfa0
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.entity;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -30,6 +31,7 @@ import org.hibernate.validator.constraints.Length;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* 收入明细表-全部明细
...
...
@@ -194,4 +196,7 @@ public class TIncomeDetail {
@ExcelProperty
(
"管理费风险金的结算方式:1预估2实缴"
)
private
String
mrSettleType
;
// 查询时框定范围使用
@TableField
(
exist
=
false
)
private
List
<
String
>
idCardList
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
7a7ecfa0
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/resources/mapper/TIncomeDetailMapper.xml
View file @
7a7ecfa0
...
...
@@ -131,6 +131,12 @@
<if
test=
"tIncomeDetail.redData != null and tIncomeDetail.redData.trim() != ''"
>
AND a.RED_DATA = #{tIncomeDetail.redData}
</if>
<if
test=
"tIncomeDetail.idCardList != null and tIncomeDetail.idCardList.size() > 0"
>
AND a.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"tIncomeDetail.idCardList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</if>
</sql>
...
...
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