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
3ed31d95
Commit
3ed31d95
authored
Aug 19, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errorFlag = false;
parent
d8a7dca0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+14
-2
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
3ed31d95
...
...
@@ -123,8 +123,11 @@ public class SalaryAccountUtil implements Serializable {
String
areaStr
;
// 员工新建保存的反馈,null 保存成功,其他,保存失败,反馈原因
String
saveNewEmpReturn
;
// 每一行是否有错误 true : 无错误
boolean
errorFlag
;
for
(
int
i
=
0
;
i
<
rows
;
i
++)
{
error
=
""
;
errorFlag
=
true
;
temp
=
list
.
get
(
i
);
entity
=
new
TSalaryAccountVo
();
emp
=
null
;
...
...
@@ -144,6 +147,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
cellValueObj
!=
null
&&
scs
!=
null
)
{
cellValueStr
=
getStringValByObject
(
cellValueObj
);
if
(!
StringUtils
.
isNotBlank
(
cellValueStr
))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:"
+
entry
.
getKey
()
+
"列_不识别对象类型"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -165,6 +169,7 @@ public class SalaryAccountUtil implements Serializable {
sai
.
setSalaryMoney
(
relaySalary
);
saiList
.
add
(
sai
);
}
catch
(
Exception
e
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:应发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -175,6 +180,7 @@ public class SalaryAccountUtil implements Serializable {
actualSalarySum
=
new
BigDecimal
(
cellValueStr
);
entity
.
setActualSalary
(
actualSalarySum
);
}
catch
(
Exception
e
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:实发工资:'"
+
cellValueStr
+
"'错误,请检查数据"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -185,6 +191,7 @@ public class SalaryAccountUtil implements Serializable {
try
{
new
BigDecimal
(
cellValueStr
);
}
catch
(
Exception
ex
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:个人、单位代扣,只能是金额!"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -205,6 +212,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
checkIdNumberMap
.
get
(
cellValueStr
)
==
null
)
{
checkIdNumberMap
.
put
(
cellValueStr
,
(
i
+
2
));
}
else
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行与第:"
+
checkIdNumberMap
.
get
(
cellValueStr
)
+
"行身份证重复:"
+
cellValueStr
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
break
;
...
...
@@ -239,7 +247,6 @@ public class SalaryAccountUtil implements Serializable {
}
}
catch
(
NumberFormatException
e
)
{
sai
.
setTextValue
(
cellValueStr
);
//非数字,不保存
}
saiList
.
add
(
sai
);
}
else
{
...
...
@@ -251,6 +258,7 @@ public class SalaryAccountUtil implements Serializable {
setFields
(
field
,
cellValueStr
,
attr
,
fieldType
,
entity
);
error
=
validateUtil
(
cellValueStr
,
attr
,
(
i
+
2
));
if
(
null
!=
error
)
{
errorFlag
=
false
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
...
...
@@ -268,17 +276,20 @@ public class SalaryAccountUtil implements Serializable {
}
}
if
(
Common
.
isNotNull
(
must
))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:"
+
must
+
"列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【实发劳务费】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"4"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【稿酬】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -286,6 +297,7 @@ public class SalaryAccountUtil implements Serializable {
// 应发、实发、实发劳务费不可都为空
if
(
relaySalary
==
null
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【应发工资】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
...
...
@@ -308,7 +320,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
Common
.
isNotNull
(
checkListY
)
&&
checkListY
.
contains
(
entity
.
getEmpIdcard
()))
{
entity
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
!
Common
.
isNotNull
(
errorList
)
)
{
if
(
errorFlag
)
{
if
(
Common
.
isNotNull
(
entity
.
getSalaryStyle
()))
{
salaryStyle
=
entity
.
getSalaryStyle
();
}
else
if
(
configSalary
.
getGrantType
()
!=
null
)
{
...
...
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