Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
b5d2b3d9
Commit
b5d2b3d9
authored
Jun 28, 2024
by
刘_震
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电力汇总(表格的导入以及特殊表的处理)-bug的修改
parent
3af37f72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerWagesServiceImpl.java
.../com/ruoyi/system/service/impl/PowerWagesServiceImpl.java
+37
-1
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerWagesServiceImpl.java
View file @
b5d2b3d9
...
...
@@ -17,7 +17,9 @@ import org.springframework.web.multipart.MultipartFile;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Field
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -68,7 +70,7 @@ public class PowerWagesServiceImpl implements PowerWagesService {
PowerList
=
PowerList
.
parallelStream
()
.
filter
(
v
->
v
.
getA2
()
!=
null
&&
!
v
.
getA2
().
equals
(
"null"
)
&&
!
filterList
.
contains
(
v
.
getA2
()))
.
filter
(
v
->
v
.
getA
1
()
!=
null
&&
!
v
.
getA3
().
equals
(
"null"
)
&&
!
filterList
.
contains
(
v
.
getA3
()))
.
filter
(
v
->
v
.
getA
3
()
!=
null
&&
!
v
.
getA3
().
equals
(
"null"
)
&&
!
filterList
.
contains
(
v
.
getA3
()))
.
peek
(
v
->
v
.
setComparisonId
(
comparisonId
))
.
collect
(
Collectors
.
toList
());
deMapper
.
insertBatch
(
PowerList
,
mineId
,
date
);
...
...
@@ -133,10 +135,44 @@ public class PowerWagesServiceImpl implements PowerWagesService {
ceMapper
.
add
(
powerDetails
,
mineId
,
importTime
,
type
);
}
}
}
@Override
public
List
<
PowerWagesDetails
>
selectByMineIdAndDate
(
String
mineId
,
String
date
)
throws
IllegalAccessException
{
List
<
PowerWagesDetails
>
details
=
deMapper
.
selectByMineIdAndDate
(
mineId
,
date
);
// for (PowerWagesDetails detail : details) {
// PowerWagesComparation comparation = ceMapper.selectByCId(detail.getComparisonId());
// if (comparation != null) {
// // 获取PowerWagesDetails和PowerWagesComparation的字段
// Field[] detailFields = PowerWagesDetails.class.getDeclaredFields();
// Field[] comparationFields = PowerWagesComparation.class.getDeclaredFields();
//
// for (Field comparationField : comparationFields) {
// comparationField.setAccessible(true);
// // 遍历details中的字段,找到同名且类型相同的字段进行赋值
// for (Field detailField : detailFields) {
// if (detailField.getName().equals(comparationField.getName()) &&
// detailField.getType().equals(comparationField.getType())) {
// detailField.setAccessible(true);
// Object detailsValue = detailField.get(detail);
// // 将comparation中的值替换为details中的值
// comparationField.set(comparation, detailsValue);
// break;
// }
// }
// }
// } else {
// return null; // 或者根据业务逻辑处理未找到comparation的情况
// }
// }
return
details
;
// 返回处理后的details列表
}
}
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