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
5a86b79f
Commit
5a86b79f
authored
Mar 29, 2024
by
Fuzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实体类
parent
69eae076
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
205 additions
and
222 deletions
+205
-222
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+205
-222
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
5a86b79f
...
...
@@ -28,8 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
*/
@Service
@EnableTransactionManagement
public
class
ActSuppliesHistorydataServiceImpl
implements
IActSuppliesHistorydataService
{
public
class
ActSuppliesHistorydataServiceImpl
implements
IActSuppliesHistorydataService
{
@Autowired
private
ActSuppliesHistorydataMapper
actSuppliesHistorydataMapper
;
...
...
@@ -46,8 +45,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 历史数据
*/
@Override
public
ActSuppliesHistorydata
selectActSuppliesHistorydataById
(
Long
id
)
{
public
ActSuppliesHistorydata
selectActSuppliesHistorydataById
(
Long
id
)
{
//return actSuppliesHistorydataMapper.selectActSuppliesHistorydataById(id);
return
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydataCopyById
(
id
);
...
...
@@ -60,8 +58,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 历史数据
*/
@Override
public
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataList
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
public
List
<
ActSuppliesHistorydata
>
selectActSuppliesHistorydataList
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
actSuppliesHistorydata
.
setCreateBy
(
user
.
getUserName
());
//return actSuppliesHistorydataMapper.selectActSuppliesHistorydataList(actSuppliesHistorydata);
...
...
@@ -76,10 +73,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 结果
*/
@Override
public
int
insertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
public
int
insertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
Long
status
=
actSuppliesHistorydata
.
get
(
i
).
getStatus
();
...
...
@@ -94,8 +90,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 结果
*/
@Override
public
int
updateActSuppliesHistorydata
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
public
int
updateActSuppliesHistorydata
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
{
return
actSuppliesHistorydataMapper
.
updateActSuppliesHistorydata
(
actSuppliesHistorydata
);
}
...
...
@@ -106,8 +101,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 结果
*/
@Override
public
int
deleteActSuppliesHistorydataByIds
(
Long
[]
ids
)
{
public
int
deleteActSuppliesHistorydataByIds
(
Long
[]
ids
)
{
return
actSuppliesHistorydataMapper
.
deleteActSuppliesHistorydataByIds
(
ids
);
}
...
...
@@ -118,10 +112,10 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 结果
*/
@Override
public
int
deleteActSuppliesHistorydataById
(
Long
id
)
{
public
int
deleteActSuppliesHistorydataById
(
Long
id
)
{
return
actSuppliesHistorydataMapper
.
deleteActSuppliesHistorydataById
(
id
);
}
/**
* 新增 历史数据信息
*
...
...
@@ -136,33 +130,33 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
List
<
ActSuppliesHistorydata
>
s
=
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydatauuid
(
actSuppliesHistorydata
.
get
(
0
));
if
(
s
.
size
()
>
0
)
{
if
(
s
.
size
()
>
0
)
{
//如果存在相同时间和所属矿的表
if
(
s
.
get
(
0
).
getCleanStatus
()
>
0
)
{
if
(
s
.
get
(
0
).
getCleanStatus
()
>
0
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
0
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
0
)
{
//删除导入表数据
actSuppliesCleaningRuleMapper
.
deleteActSuppliesImportTable
(
s
.
get
(
j
).
getId
());
actSuppliesCleaningRuleMapper
.
deleteActSuppliesImportCleaning
(
s
.
get
(
j
).
getId
());
}
else
if
(
s
.
get
(
j
).
getIdentifyingCode
()==
1
)
{
}
else
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
1
)
{
//删除生成表数据
actSuppliesCleaningRuleMapper
.
deleteActSuppliesSixMinesSummaryTable
(
s
.
get
(
j
).
getId
());
}
}
}
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
0
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
0
)
{
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
0
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
0
)
{
actSuppliesHistorydata
.
get
(
i
).
setImportUuid
(
s
.
get
(
j
).
getImportUuid
());
}
}
}
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
1
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
1
)
{
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
1
)
{
for
(
int
j
=
0
;
j
<
s
.
size
();
j
++)
{
if
(
s
.
get
(
j
).
getIdentifyingCode
()
==
1
)
{
actSuppliesHistorydata
.
get
(
i
).
setImportUuid
(
s
.
get
(
j
).
getImportUuid
());
}
}
...
...
@@ -174,13 +168,13 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesHistorydataMapper
.
updateActSUppliesHistoryContent
(
actSuppliesHistorydata
.
get
(
i
));
}
}
else
{
}
else
{
//如果没有重复数据直接新增导入表和生成表
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
UUID
uuid
=
UUID
.
randomUUID
();
String
uuids
=
StringUtils
.
remove
(
uuid
.
toString
(),
'-'
);
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
0
)
{
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
0
)
{
actSuppliesHistorydata1
=
actSuppliesHistorydata
.
get
(
i
);
actSuppliesHistorydata1
.
setImportUuid
(
uuids
);
...
...
@@ -190,7 +184,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesHistorydataMapper
.
insertActSuppliesHistorycontent
(
actSuppliesHistorydata1
);
}
else
{
}
else
{
actSuppliesHistorydata1
=
actSuppliesHistorydata
.
get
(
i
);
actSuppliesHistorydata1
.
setImportUuid
(
uuids
);
actSuppliesHistorydata1
.
setStatus
(
0L
);
...
...
@@ -203,7 +197,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
actSuppliesHistorydata
.
get
(
i
).
setCreateBy
(
user
.
getUserName
());
actSuppliesHistorydata
.
get
(
i
).
setCreateTime
(
DateUtils
.
getNowDate
());
...
...
@@ -240,11 +234,11 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
@Transactional
public
void
addInsertImport
(
List
<
ActOperation1
>
actOperation2s
)
{
//创建新线程
Thread
thread
=
new
Thread
(){
Thread
thread
=
new
Thread
()
{
public
void
run
(){
public
void
run
()
{
for
(
int
i
=
0
;
i
<
actOperation2s
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
actOperation2s
.
size
();
i
++)
{
//获取生成excel表数据存储到生成表实体类中
for
(
int
x
=
2
;
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
...
...
@@ -318,7 +312,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//int k=(int)parse.getJSONObject(0).get("HeaderRow");
//获取导入excel表数据存储到生成表实体类中
JSONArray
parse1
=
(
JSONArray
)
JSONArray
.
parse
(
actOperation2s
.
get
(
i
).
getHistoryRole
());
for
(
int
x
=
(
int
)
parse1
.
getJSONObject
(
0
).
get
(
"HeaderRow"
);
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
for
(
int
x
=
(
int
)
parse1
.
getJSONObject
(
0
).
get
(
"HeaderRow"
);
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//判断数据是否为空,为空结束循环
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
ActSuppliesImportCleaning
actSuppliesImportCleaning
=
new
ActSuppliesImportCleaning
();
...
...
@@ -346,7 +340,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesImportCleaning
.
setNumberColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setMoneyColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
());
Object
dateColumn
=
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
);
if
(
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
).
hashCode
()>
0
)
{
if
(
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
).
hashCode
()
>
0
)
{
actSuppliesImportCleaning
.
setDateColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
)
-
1
)].
getV
());
}
//actSuppliesImportCleaning.setDateColumn(actOperation2s.get(i).getActOperation2()[x][JSON.parseObject(actOperation2s.get(i).getHistoryRole()).getInteger("DateColumn")].getV());
...
...
@@ -407,9 +401,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
String
[]
attributes
=
new
String
[
200
];
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
attributes
[
i
-
1
]=
'A'
+
String
.
valueOf
(
i
);
attributes
[
i
-
1
]
=
'A'
+
String
.
valueOf
(
i
);
}
...
...
@@ -417,7 +411,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//获取导入excel表数据存储到生成表实体类中
for
(
int
x
=
0
;
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//判断数据是否为空,为空结束循环
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
ActSuppliesImportTable
actSuppliesImportTable
=
new
ActSuppliesImportTable
();
UUID
uuid
=
UUID
.
randomUUID
();
...
...
@@ -432,7 +426,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//循环保存到实体类字段中
for
(
int
y
=
0
;
y
<
count
;
y
++)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
()
!=
null
)
{
try
{
actSuppliesImportTable
.
getClass
().
getMethod
(
"set"
+
attributes
[
y
],
String
.
class
).
invoke
(
actSuppliesImportTable
,
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
());
...
...
@@ -447,7 +441,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
//新增一条生成表数据
actSuppliesCleaningRuleMapper
.
addActSuppliesImportTable
(
actSuppliesImportTable
);
}
else
{
}
else
{
break
;
}
...
...
@@ -482,9 +476,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
String
[]
attributes
=
new
String
[
200
];
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
attributes
[
i
-
1
]=
'A'
+
String
.
valueOf
(
i
);
attributes
[
i
-
1
]
=
'A'
+
String
.
valueOf
(
i
);
}
...
...
@@ -492,7 +486,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//获取导入excel表数据存储到生成表实体类中
for
(
int
x
=
0
;
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//判断数据是否为空,为空结束循环
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
ActSuppliesImportTable
actSuppliesImportTable
=
new
ActSuppliesImportTable
();
UUID
uuid
=
UUID
.
randomUUID
();
...
...
@@ -507,7 +501,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//循环保存到实体类字段中
for
(
int
y
=
0
;
y
<
count
;
y
++)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
()
!=
null
)
{
try
{
actSuppliesImportTable
.
getClass
().
getMethod
(
"set"
+
attributes
[
y
],
String
.
class
).
invoke
(
actSuppliesImportTable
,
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
());
...
...
@@ -521,7 +515,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
//新增一条生成表数据
actSuppliesCleaningRuleMapper
.
addInsertConvert1
(
actSuppliesImportTable
);
}
else
{
}
else
{
break
;
}
...
...
@@ -550,13 +544,12 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
public
void
run
()
{
//String[] attributes = {"A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "A16", "A17", "A18", "A19", "A20", "A21", "A22", "A23", "A24", "A25", "A26", "A27", "A28", "A29", "A30", "A31", "A32", "A33", "A34", "A35", "A36", "A37", "A38", "A39", "A40", "A41", "A42", "A43", "A44", "A45", "A46", "A47", "A48", "A49", "A50", "A51", "A52", "A53", "A54", "A55", "A56", "A57", "A58", "A59", "A60", "A61", "A62", "A63"};
String
[]
attributes
=
new
String
[
200
];
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
attributes
[
i
-
1
]=
'A'
+
String
.
valueOf
(
i
);
attributes
[
i
-
1
]
=
'A'
+
String
.
valueOf
(
i
);
}
...
...
@@ -564,7 +557,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//获取导入excel表数据存储到生成表实体类中
for
(
int
x
=
0
;
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//判断数据是否为空,为空结束循环
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
ActSuppliesImportTable
actSuppliesImportTable
=
new
ActSuppliesImportTable
();
UUID
uuid
=
UUID
.
randomUUID
();
...
...
@@ -579,7 +572,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
//循环保存到实体类字段中
for
(
int
y
=
0
;
y
<
count
;
y
++)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
()
!=
null
)
{
try
{
actSuppliesImportTable
.
getClass
().
getMethod
(
"set"
+
attributes
[
y
],
String
.
class
).
invoke
(
actSuppliesImportTable
,
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
());
...
...
@@ -593,7 +586,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
//新增一条生成表数据
actSuppliesCleaningRuleMapper
.
addInsertConvert2
(
actSuppliesImportTable
);
}
else
{
}
else
{
break
;
}
...
...
@@ -614,7 +607,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
public
void
addInsertImportAccpunt
(
List
<
ActOperation1
>
actOperation2s
)
{
}
...
...
@@ -632,7 +624,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
// });
// Thread thread = new Thread() {
//
// public void run() {
...
...
@@ -641,9 +632,9 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
String
[]
attributes
=
new
String
[
200
];
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
for
(
int
i
=
1
;
i
<=
200
;
i
++)
{
attributes
[
i
-
1
]
=
'A'
+
String
.
valueOf
(
i
);
attributes
[
i
-
1
]
=
'A'
+
String
.
valueOf
(
i
);
}
...
...
@@ -652,36 +643,31 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
List
<
ActSuppliesDetails
>
actSuppliesDetails1
=
actSuppliesDetailsMapper
.
selectActSuppliesDetailsMaterialList
(
actSuppliesDetails
);
for
(
int
i
=
0
;
i
<
actOperation2s
.
size
();
i
++)
{
Gson
gson
=
new
Gson
();
JSONArray
parse
=
(
JSONArray
)
JSONArray
.
parse
(
actOperation2s
.
get
(
i
).
getConvenRole
());
Map
<
String
,
String
>[]
mapArray
=
gson
.
fromJson
(
actOperation2s
.
get
(
i
).
getHistoryRole
(),
Map
[].
class
);
Map
<
String
,
String
[]>
mapcode
=
new
HashMap
<>();
Map
<
String
,
String
[]>
mapcode
=
new
HashMap
<>();
for
(
Map
<
String
,
String
>
map
:
mapArray
)
{
String
key
=
map
.
get
(
"key"
);
String
value
=
map
.
get
(
"value"
);
String
[]
values
=
value
.
split
(
","
);
mapcode
.
put
(
key
,
values
);
mapcode
.
put
(
key
,
values
);
}
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
for
(
ActSuppliesDetails
entity
:
actSuppliesDetails1
)
{
resultMap
.
put
(
entity
.
getCode
(),
entity
.
getCodes
());
}
List
<
ActSuppliesImportCleaningAcc
>
actSuppliesImportCleaningAccs
=
new
ArrayList
<>();
//获取导入excel表数据存储到生成表实体类中
for
(
int
x
=
((
int
)
parse
.
getJSONObject
(
0
).
get
(
"HeaderRow"
)
-
1
);
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
for
(
int
x
=
((
int
)
parse
.
getJSONObject
(
0
).
get
(
"HeaderRow"
)
-
1
);
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//判断数据是否为空,为空结束循环
String
[]
s1
=
mapcode
.
get
(
String
.
valueOf
(
x
));
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]!=
null
){
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
ActSuppliesImportTable
actSuppliesImportTable
=
new
ActSuppliesImportTable
();
ActSuppliesImportCleaningAcc
actSuppliesImportCleaningAcc
=
new
ActSuppliesImportCleaningAcc
();
UUID
uuid
=
UUID
.
randomUUID
();
String
s
=
StringUtils
.
remove
(
uuid
.
toString
(),
'-'
);
if
(
s1
!=
null
)
{
if
(
s1
!=
null
)
{
actSuppliesImportTable
.
setKmCode
(
s1
[
0
]);
}
actSuppliesImportTable
.
setId
(
s
);
...
...
@@ -690,7 +676,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesImportTable
.
setMining
(
actOperation2s
.
get
(
i
).
getMining
());
actSuppliesImportTable
.
setExportUuid
(
actOperation2s
.
get
(
i
).
getExportUuid
());
if
(
s1
!=
null
)
{
if
(
s1
!=
null
)
{
actSuppliesImportCleaningAcc
.
setKmCode
(
s1
[
0
]);
actSuppliesImportCleaningAcc
.
setsOfExpenses
(
s1
[
1
]);
}
...
...
@@ -705,14 +691,13 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
long
count
=
Arrays
.
stream
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]).
filter
(
Objects:
:
nonNull
).
count
();
//循环保存到实体类字段中
for
(
int
y
=
0
;
y
<
count
;
y
++)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
()
!=
null
)
{
try
{
actSuppliesImportTable
.
getClass
().
getMethod
(
"set"
+
attributes
[
y
],
String
.
class
).
invoke
(
actSuppliesImportTable
,
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
...
...
@@ -728,10 +713,10 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesImportCleaningAcc
.
setCodeColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaningAcc
.
setDepartmentColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DepartmentColumn"
)
-
1
)].
getV
());
if
(
actOperation2s
.
get
(
i
).
getMining
().
equals
(
"011702"
))
{
if
(
actOperation2s
.
get
(
i
).
getMining
().
equals
(
"011702"
))
{
int
moneycolumn
=
(
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
;
int
numbercolumn
=
(
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
;
int
moneycolumn
=
(
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
;
int
numbercolumn
=
(
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
;
while
(
true
)
{
...
...
@@ -745,37 +730,37 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
else
{
moneycolumn
=
moneycolumn
+
5
;
numbercolumn
=
numbercolumn
+
5
;
if
(
moneycolumn
>
count
)
{
if
(
moneycolumn
>
count
)
{
break
;
}
}
}
}
else
{
}
else
{
actSuppliesImportCleaningAcc
.
setNumberColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaningAcc
.
setMoneyColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
());
BigDecimal
moneyColumn1
=
new
BigDecimal
(
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
()));
BigDecimal
moneyColumn2
=
new
BigDecimal
(
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
()));
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
actSuppliesImportCleaningAcc
.
setMoneyColumns
(
df
.
format
(
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
())*
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
())));
actSuppliesImportCleaningAcc
.
setMoneyColumns
(
df
.
format
(
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
())
*
Double
.
parseDouble
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
())));
}
Object
dateColumn
=
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
);
if
(
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
).
hashCode
()>
0
)
{
if
(
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
).
hashCode
()
>
0
)
{
actSuppliesImportCleaningAcc
.
setDateColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
)
-
1
)].
getV
());
}
String
codeColumn
=
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)
-
1
)].
getV
();
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
6
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
6
)));
}
else
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
4
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
4
)));
}
else
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
2
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
2
)));
}
else
{
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
6
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
6
)));
}
else
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
4
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
4
)));
}
else
if
(
resultMap
.
containsKey
(
codeColumn
.
substring
(
0
,
2
)))
{
actSuppliesImportCleaningAcc
.
setCategories
(
resultMap
.
get
(
codeColumn
.
substring
(
0
,
2
)));
}
else
{
actSuppliesImportCleaningAcc
.
setCategories
(
"10"
);
}
//actSuppliesImportCleaning.setDateColumn(actOperation2s.get(i).getActOperation2()[x][JSON.parseObject(actOperation2s.get(i).getHistoryRole()).getInteger("DateColumn")].getV());
...
...
@@ -785,21 +770,21 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
}
}
else
{
}
else
{
break
;
}
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)
-
1
)]
==
null
)
{
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)
-
1
)]
==
null
)
{
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaningAcc
(
actSuppliesImportCleaningAccs
);
actSuppliesImportCleaningAccs
.
clear
();
break
;
}
else
{
}
else
{
String
codeColumn
=
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)
-
1
)].
getV
();
}
if
(
x
%
500
==
0
)
{
if
(
x
%
500
==
0
)
{
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaningAcc
(
actSuppliesImportCleaningAccs
);
actSuppliesImportCleaningAccs
.
clear
();
}
else
if
(
x
==
actOperation2s
.
get
(
i
).
getActOperation2
().
length
-
1
)
{
}
else
if
(
x
==
actOperation2s
.
get
(
i
).
getActOperation2
().
length
-
1
)
{
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaningAcc
(
actSuppliesImportCleaningAccs
);
actSuppliesImportCleaningAccs
.
clear
();
}
...
...
@@ -818,7 +803,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
// thread.start();
}
@Override
...
...
@@ -833,7 +817,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
String
uuids
=
StringUtils
.
remove
(
uuid
.
toString
(),
'-'
);
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()
==
0
)
{
actSuppliesHistorydata1
=
actSuppliesHistorydata
.
get
(
i
);
...
...
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