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
34e6e8e6
Commit
34e6e8e6
authored
Mar 26, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.21-0申报
parent
bad4585b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
TSalaryZeroServiceImpl.java
...s/v1/yifu/salary/service/impl/TSalaryZeroServiceImpl.java
+27
-4
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryZeroServiceImpl.java
View file @
34e6e8e6
...
@@ -300,8 +300,7 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -300,8 +300,7 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
"超过500条,不存储数据,请处理导入表格"
));
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
"超过500条,不存储数据,请处理导入表格"
));
cachedDataList
.
clear
();
cachedDataList
.
clear
();
// 中断读取
// 中断读取
context
.
interrupt
();
throw
new
RuntimeException
(
"超过500条,请减少数据条数!"
);
return
;
}
}
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
...
@@ -395,8 +394,13 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -395,8 +394,13 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
// 判断 为RuntimeException
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
if
(
e
instanceof
RuntimeException
)
{
return
R
.
failed
(
e
.
getMessage
());
}
String
errorInfo
=
"数据导入解析失败,请将单元格设为文本!"
+
e
.
getMessage
();
log
.
error
(
errorInfo
,
e
);
return
R
.
failed
(
errorInfo
);
}
}
boolean
isTrue
=
true
;
boolean
isTrue
=
true
;
for
(
ErrorMessage
message
:
errorMessageList
)
{
for
(
ErrorMessage
message
:
errorMessageList
)
{
...
@@ -482,6 +486,10 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -482,6 +486,10 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
continue
;
continue
;
}
}
if
(
judgeTaxMonth
(
excel
.
getTaxMonth
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"计税月份格式不正确!"
,
excel
));
continue
;
}
insert
=
new
TSalaryZero
();
insert
=
new
TSalaryZero
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setSettleMonth
(
settleMonth
);
insert
.
setSettleMonth
(
settleMonth
);
...
@@ -512,6 +520,21 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -512,6 +520,21 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
}
}
}
}
// 返回false则对
private
boolean
judgeTaxMonth
(
String
taxMonth
)
{
if
(
Common
.
isEmpty
(
taxMonth
))
{
return
true
;
}
if
(
taxMonth
.
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
taxMonth
=
taxMonth
.
substring
(
0
,
6
);
}
else
if
(
taxMonth
.
length
()
<
CommonConstants
.
dingleDigitIntArray
[
6
])
{
return
true
;
}
if
(
DateUtil
.
compareYearMonth
(
taxMonth
,
DateUtil
.
addMonth
(
0
)))
{
return
true
;
}
return
false
;
}
// 批量新增0申报
// 批量新增0申报
public
void
saveBatchWithTableName
(
List
<
TSalaryZero
>
insertList
,
String
tableName
)
{
public
void
saveBatchWithTableName
(
List
<
TSalaryZero
>
insertList
,
String
tableName
)
{
if
(
insertList
==
null
||
insertList
.
isEmpty
())
{
if
(
insertList
==
null
||
insertList
.
isEmpty
())
{
...
...
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