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
25198d01
Commit
25198d01
authored
Apr 15, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.2-工资原表识别-优化
parent
97d8641c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
TSalaryStandardOriginalServiceImpl.java
...lary/service/impl/TSalaryStandardOriginalServiceImpl.java
+25
-3
TSalaryStandardOriginalMapper.xml
...c/main/resources/mapper/TSalaryStandardOriginalMapper.xml
+3
-1
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardOriginalServiceImpl.java
View file @
25198d01
...
...
@@ -185,7 +185,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
dataRow
=
0
;
dataRowFlag
=
true
;
// 循环当前sheet的每行内容
for
(
int
rowNum
=
0
;
rowNum
<
sheetAt
.
getLastRowNum
();
rowNum
++)
{
for
(
int
rowNum
=
0
;
rowNum
<
=
sheetAt
.
getLastRowNum
();
rowNum
++)
{
contentMap
=
new
HashMap
<>();
columnList
=
new
ArrayList
<>();
row
=
sheetAt
.
getRow
(
rowNum
);
...
...
@@ -308,7 +308,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
dataRow
=
0
;
dataRowFlag
=
true
;
// 循环当前sheet的每行内容
for
(
int
rowNum
=
0
;
rowNum
<
sheetAt
.
getLastRowNum
();
rowNum
++)
{
for
(
int
rowNum
=
0
;
rowNum
<
=
sheetAt
.
getLastRowNum
();
rowNum
++)
{
contentMap
=
new
HashMap
<>();
columnList
=
new
ArrayList
<>();
row
=
sheetAt
.
getRow
(
rowNum
);
...
...
@@ -499,6 +499,28 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
}
else
{
vo
=
readXls
(
inputStream
,
specialIdCardList
,
false
,
sheetName
);
}
if
(
vo
.
getTitleList
()
!=
null
&&
!
vo
.
getTitleList
().
isEmpty
())
{
ExcelColumnVo
title
;
for
(
int
i
=
0
;
i
<
vo
.
getTitleList
().
size
();
i
++)
{
title
=
vo
.
getTitleList
().
get
(
i
);
if
(
detailMap
.
get
(
String
.
valueOf
(
title
.
getLineNum
()))
==
null
)
{
return
R
.
failed
(
"表头与导入的不一致,第"
+
title
.
getLineNum
()+
"列表头【"
+
title
.
getContent
()+
"】未找到配置,请先配置表头!"
);
}
else
if
(!
title
.
getContent
().
equals
(
detailMap
.
get
(
String
.
valueOf
(
title
.
getLineNum
())).
getExcelName
())
&&
(!
"是否新员工(默认否)"
.
equals
(
title
.
getContent
())
||
!
"开户行总行"
.
equals
(
title
.
getContent
())
||
!
"开户行省"
.
equals
(
title
.
getContent
())
||
!
"开户行市"
.
equals
(
title
.
getContent
())
||
!
"开户行支行"
.
equals
(
title
.
getContent
())
||
!
"银行卡号"
.
equals
(
title
.
getContent
())
||
!
"手机号码"
.
equals
(
title
.
getContent
())
||
!
"计税月份"
.
equals
(
title
.
getContent
()))
)
{
return
R
.
failed
(
"表头与导入的不一致,第"
+(
i
+
1
)+
"列应为【"
+
detailMap
.
get
(
String
.
valueOf
(
title
.
getLineNum
())).
getExcelName
()+
"】,实际为【"
+
title
.
getContent
()+
"】"
);
}
}
}
else
{
return
R
.
failed
(
"表格没有表头,请检查表格数据!"
);
}
if
(
vo
.
getContentList
()
!=
null
&&
!
vo
.
getContentList
().
isEmpty
())
{
// 智能识别表头
TSalaryStandardOriginalDetail
detail
;
...
...
@@ -512,7 +534,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
newRowMap
=
new
HashMap
<>();
for
(
Map
.
Entry
<
String
,
String
>
column
:
rowMap
.
entrySet
())
{
detail
=
detailMap
.
get
(
column
.
getKey
());
if
(
detail
!=
null
)
{
if
(
detail
!=
null
&&
Common
.
isNotNull
(
detail
.
getModelName
())
)
{
value
=
column
.
getValue
();
try
{
if
(
"REDUCE"
.
equals
(
detail
.
getFlag
()))
{
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardOriginalMapper.xml
View file @
25198d01
...
...
@@ -41,6 +41,7 @@
<result
property=
"attaSize"
column=
"ATTA_SIZE"
/>
<result
property=
"attaType"
column=
"ATTA_TYPE"
/>
<result
property=
"dateNum"
column=
"DATE_NUM"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -59,7 +60,8 @@
a.ATTA_URL,
a.ATTA_SIZE,
a.ATTA_TYPE,
a.DATE_NUM
a.DATE_NUM,
a.DELETE_FLAG
</sql>
<sql
id=
"TSalaryStandardOriginal_where"
>
<if
test=
"tSalaryStandardOriginal != 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