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
15a2b241
You need to sign in or sign up before continuing.
Commit
15a2b241
authored
Nov 10, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代扣,只能金额
parent
c610a4f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
28 deletions
+12
-28
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+7
-6
SalaryCommonUtil.java
...yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
+3
-22
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+2
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
15a2b241
...
...
@@ -170,7 +170,7 @@ public class SalaryAccountUtil implements Serializable {
}
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
try
{
relaySalary
=
new
BigDecimal
(
cellValueStr
);
relaySalary
=
new
BigDecimal
(
cellValueStr
.
replace
(
","
,
""
)
);
sai
=
new
TSalaryAccountItemVo
();
sai
.
setCnName
(
dbFiedName
);
sai
.
setJavaFiedName
(
scs
.
getJavaFiedName
());
...
...
@@ -186,7 +186,7 @@ public class SalaryAccountUtil implements Serializable {
}
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
try
{
actualSalarySum
=
new
BigDecimal
(
cellValueStr
);
actualSalarySum
=
new
BigDecimal
(
cellValueStr
.
replace
(
","
,
""
)
);
entity
.
setActualSalary
(
actualSalarySum
);
}
catch
(
Exception
e
)
{
errorFlag
=
false
;
...
...
@@ -196,12 +196,13 @@ public class SalaryAccountUtil implements Serializable {
}
}
if
(
SalaryConstants
.
PDEDUCTION_JAVA
.
equals
(
scs
.
getJavaFiedName
())
||
SalaryConstants
.
UDEDUCTION_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
||
SalaryConstants
.
UDEDUCTION_JAVA
.
equals
(
scs
.
getJavaFiedName
())
||
scs
.
getJavaFiedName
().
contains
(
SalaryConstants
.
WITHHOLIDING
))
{
try
{
new
BigDecimal
(
cellValueStr
);
new
BigDecimal
(
cellValueStr
.
replace
(
","
,
""
)
);
}
catch
(
Exception
ex
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:
个人、单位代扣
,只能是金额!"
;
error
=
"第"
+
(
i
+
2
)
+
"行:
代扣
,只能是金额!"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
...
...
@@ -247,7 +248,7 @@ public class SalaryAccountUtil implements Serializable {
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
}
try
{
cellValueBig
=
new
BigDecimal
(
cellValueStr
);
cellValueBig
=
new
BigDecimal
(
cellValueStr
.
replace
(
","
,
""
)
);
cellValueBig
=
cellValueBig
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//四舍五入
if
(
cellValueBig
.
toString
().
length
()
>
11
)
{
if
(
cellValueBig
.
toString
().
length
()
>
500
)
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryCommonUtil.java
View file @
15a2b241
...
...
@@ -432,6 +432,9 @@ public class SalaryCommonUtil implements Serializable {
if
(
cellValueStr
.
indexOf
(
'%'
)
!=
-
1
)
{
cellValueStr
=
cellValueStr
.
replace
(
"%"
,
""
);
}
if
(
cellValueStr
.
indexOf
(
','
)
!=
-
1
)
{
cellValueStr
=
cellValueStr
.
replace
(
","
,
""
);
}
field
.
set
(
entity
,
BigDecimal
.
valueOf
(
Double
.
valueOf
(
cellValueStr
)));
}
...
...
@@ -518,26 +521,4 @@ public class SalaryCommonUtil implements Serializable {
entity
.
setFormType
(
salaryType
);
}
/**
* @Description: 简单的Set转化为String
* @Author: hgw
* @Date: 2022-1-11 11:16:50
* @return: java.lang.String
**/
public
static
String
setToStrEasy
(
Set
<
String
>
strSet
)
{
String
result
=
""
;
if
(
strSet
!=
null
&&
!
strSet
.
isEmpty
())
{
int
i
=
0
;
for
(
String
str
:
strSet
)
{
if
(
i
==
0
)
{
result
=
str
;
}
else
{
result
=
result
.
concat
(
","
).
concat
(
str
);
}
i
++;
}
}
return
result
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
15a2b241
...
...
@@ -154,6 +154,8 @@ public class SalaryConstants {
public
static
final
String
IS_PERSON
=
"个人承担全部税费"
;
//个人代扣
public
static
final
String
PDEDUCTION_JAVA
=
"pdeduction"
;
// 代扣前缀
public
static
final
String
WITHHOLIDING
=
"withholiding"
;
//单位代扣
public
static
final
String
UDEDUCTION_JAVA
=
"udeduction"
;
//免个税个人代扣
...
...
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