Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
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
platform
hg-smart
Commits
ba7010fc
Commit
ba7010fc
authored
May 08, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List<Map>转Eiblock
parent
10b8d496
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
76 deletions
+97
-76
CompanyTypeEnum.java
src/main/java/com/baosight/hggp/common/CompanyTypeEnum.java
+4
-4
CustomerTypeEnum.java
src/main/java/com/baosight/hggp/common/CustomerTypeEnum.java
+4
-4
HGConstants.java
src/main/java/com/baosight/hggp/common/HGConstants.java
+1
-1
InitiateModeEnum.java
src/main/java/com/baosight/hggp/common/InitiateModeEnum.java
+4
-4
InventTypeEnum.java
src/main/java/com/baosight/hggp/common/InventTypeEnum.java
+8
-8
LogInformationController.java
...om/baosight/hggp/controller/LogInformationController.java
+0
-16
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+3
-3
HGPZ008.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ008.xml
+13
-0
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+60
-36
No files found.
src/main/java/com/baosight/hggp/common/CompanyTypeEnum.java
View file @
ba7010fc
...
...
@@ -24,12 +24,12 @@ public enum CompanyTypeEnum {
EiBlock
block
=
new
EiBlock
(
"company_type_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
P
Constants
.
TEXT_FIELD
,
GQ
.
code
+
"-"
+
GQ
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
GQ
.
code
);
put
(
H
G
Constants
.
TEXT_FIELD
,
GQ
.
code
+
"-"
+
GQ
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
GQ
.
code
);
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
P
Constants
.
TEXT_FIELD
,
MY
.
code
+
"-"
+
MY
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
MY
.
code
);
put
(
H
G
Constants
.
TEXT_FIELD
,
MY
.
code
+
"-"
+
MY
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
MY
.
code
);
}});
}};
block
.
setRows
(
rows
);
...
...
src/main/java/com/baosight/hggp/common/CustomerTypeEnum.java
View file @
ba7010fc
...
...
@@ -44,12 +44,12 @@ public enum CustomerTypeEnum {
EiBlock
block
=
new
EiBlock
(
"customer_type_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
P
Constants
.
TEXT_FIELD
,
SUPPLIER
.
code
);
put
(
H
P
Constants
.
VALUE_FIELD
,
SUPPLIER
.
value
);
put
(
H
G
Constants
.
TEXT_FIELD
,
SUPPLIER
.
code
);
put
(
H
G
Constants
.
VALUE_FIELD
,
SUPPLIER
.
value
);
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
P
Constants
.
TEXT_FIELD
,
CUSTOMER
.
code
);
put
(
H
P
Constants
.
VALUE_FIELD
,
CUSTOMER
.
value
);
put
(
H
G
Constants
.
TEXT_FIELD
,
CUSTOMER
.
code
);
put
(
H
G
Constants
.
VALUE_FIELD
,
CUSTOMER
.
value
);
}});
}};
block
.
setRows
(
rows
);
...
...
src/main/java/com/baosight/hggp/common/H
P
Constants.java
→
src/main/java/com/baosight/hggp/common/H
G
Constants.java
View file @
ba7010fc
...
...
@@ -4,7 +4,7 @@ package com.baosight.hggp.common;
* @author xuao
* @date 2024年01月09日 14:53
*/
public
class
H
P
Constants
{
public
class
H
G
Constants
{
/** 多字段拼接符号 XTC */
public
static
final
String
BLOCK_DETAIL
=
"detail"
;
...
...
src/main/java/com/baosight/hggp/common/InitiateModeEnum.java
View file @
ba7010fc
...
...
@@ -43,12 +43,12 @@ public enum InitiateModeEnum {
EiBlock
block
=
new
EiBlock
(
"initiate_mode_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>(){{
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
H
P
Constants
.
TEXT_FIELD
,
STOP
.
code
);
put
(
H
P
Constants
.
VALUE_FIELD
,
STOP
.
value
);
put
(
H
G
Constants
.
TEXT_FIELD
,
STOP
.
code
);
put
(
H
G
Constants
.
VALUE_FIELD
,
STOP
.
value
);
}});
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
H
P
Constants
.
TEXT_FIELD
,
USING
.
code
);
put
(
H
P
Constants
.
VALUE_FIELD
,
USING
.
value
);
put
(
H
G
Constants
.
TEXT_FIELD
,
USING
.
code
);
put
(
H
G
Constants
.
VALUE_FIELD
,
USING
.
value
);
}});
}};
block
.
setRows
(
rows
);
...
...
src/main/java/com/baosight/hggp/common/InventTypeEnum.java
View file @
ba7010fc
...
...
@@ -67,20 +67,20 @@ public enum InventTypeEnum {
EiBlock
block
=
new
EiBlock
(
"customer_type_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>()
{{
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
PConstants
.
TEXT_FIELD
,
MATERIAL
.
code
+
HP
Constants
.
SPLICING_SYMBOL
+
MATERIAL
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
MATERIAL
.
code
);
put
(
H
GConstants
.
TEXT_FIELD
,
MATERIAL
.
code
+
HG
Constants
.
SPLICING_SYMBOL
+
MATERIAL
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
MATERIAL
.
code
);
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
PConstants
.
TEXT_FIELD
,
CONSUMABLE
.
code
+
HP
Constants
.
SPLICING_SYMBOL
+
CONSUMABLE
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
CONSUMABLE
.
code
);
put
(
H
GConstants
.
TEXT_FIELD
,
CONSUMABLE
.
code
+
HG
Constants
.
SPLICING_SYMBOL
+
CONSUMABLE
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
CONSUMABLE
.
code
);
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
PConstants
.
TEXT_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
+
HP
Constants
.
SPLICING_SYMBOL
+
SEMI_FINISHED_PRODUCT
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
);
put
(
H
GConstants
.
TEXT_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
+
HG
Constants
.
SPLICING_SYMBOL
+
SEMI_FINISHED_PRODUCT
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
SEMI_FINISHED_PRODUCT
.
code
);
}});
add
(
new
HashMap
<
String
,
Object
>()
{{
put
(
H
PConstants
.
TEXT_FIELD
,
FINISHED_PRODUCT
.
code
+
HP
Constants
.
SPLICING_SYMBOL
+
FINISHED_PRODUCT
.
value
);
put
(
H
P
Constants
.
VALUE_FIELD
,
FINISHED_PRODUCT
.
code
);
put
(
H
GConstants
.
TEXT_FIELD
,
FINISHED_PRODUCT
.
code
+
HG
Constants
.
SPLICING_SYMBOL
+
FINISHED_PRODUCT
.
value
);
put
(
H
G
Constants
.
VALUE_FIELD
,
FINISHED_PRODUCT
.
code
);
}});
}};
block
.
setRows
(
rows
);
...
...
src/main/java/com/baosight/hggp/controller/LogInformationController.java
View file @
ba7010fc
package
com
.
baosight
.
hggp
.
controller
;
import
com.baosight.hggp.common.HPConstants
;
import
com.baosight.hggp.equipment.hp.domain.CutterbarStatus
;
import
com.baosight.hggp.equipment.hp.domain.CutterbarTime
;
import
com.baosight.hggp.equipment.hp.domain.CutterbarWarning
;
import
com.baosight.hggp.equipment.hp.domain.CutterbarWarningBase
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.xml.XmlUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@CrossOrigin
...
...
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
ba7010fc
...
...
@@ -106,12 +106,12 @@ public class UserSessionUtils extends UserSession {
* *获取登录用户所有角色的公司列表
* @return
*/
public
static
List
<
Map
<
String
,
String
>>
getRoleCompany
(){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(){{
public
static
List
<
Map
<
String
,
Object
>>
getRoleCompany
(){
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
"001"
);
put
(
"companyName"
,
"公司A"
);
}};
return
new
ArrayList
<
Map
<
String
,
String
>>(){{
add
(
map
);}};
return
new
ArrayList
<
Map
<
String
,
Object
>>(){{
add
(
map
);}};
}
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ008.xml
View file @
ba7010fc
...
...
@@ -180,4 +180,17 @@
ID = #id#
</update>
<select
id=
"queryComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
NAT_CODE as "natCode",
NAT_NAME as "natName"
FROM ${hggpSchema}.hppz008
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
ORDER BY NAT_CODE
</select>
</sqlMap>
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
ba7010fc
package
com
.
baosight
.
hggp
.
util
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.H
P
Constants
;
import
com.baosight.hggp.common.H
G
Constants
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.data.ibatis.dao.Dao
;
...
...
@@ -13,6 +13,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext
;
import
com.baosight.iplat4j.core.util.DateUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
...
...
@@ -76,33 +78,33 @@ public class CommonMethod {
}
catch
(
ClassCastException
e
){
tryValue
=
((
DaoEPBase
)
result
).
toMap
();
}
row
.
put
(
H
P
Constants
.
VALUE_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getValue
())));
row
.
put
(
H
G
Constants
.
VALUE_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getValue
())));
if
(
isSplicingSymbol
)
{
row
.
put
(
H
PConstants
.
TEXT_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
H
PConstants
.
PARAM1_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
H
PConstants
.
PARAM2_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
H
PConstants
.
PARAM3_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
H
PConstants
.
PARAM4_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
H
PConstants
.
PARAM5_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
H
PConstants
.
PARAM6_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
H
PConstants
.
PARAM7_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
H
PConstants
.
PARAM8_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
H
PConstants
.
PARAM9_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HP
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
H
GConstants
.
TEXT_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
H
GConstants
.
PARAM1_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
H
GConstants
.
PARAM2_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
H
GConstants
.
PARAM3_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
H
GConstants
.
PARAM4_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
H
GConstants
.
PARAM5_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
H
GConstants
.
PARAM6_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
H
GConstants
.
PARAM7_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
H
GConstants
.
PARAM8_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
H
GConstants
.
PARAM9_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HG
Constants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam9
())));
}
else
{
row
.
put
(
H
P
Constants
.
TEXT_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
H
P
Constants
.
PARAM1_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
H
P
Constants
.
PARAM2_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
H
P
Constants
.
PARAM3_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
H
P
Constants
.
PARAM4_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
H
P
Constants
.
PARAM5_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
H
P
Constants
.
PARAM6_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
H
P
Constants
.
PARAM7_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
H
P
Constants
.
PARAM8_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
H
P
Constants
.
PARAM9_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
H
G
Constants
.
TEXT_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
H
G
Constants
.
PARAM1_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
H
G
Constants
.
PARAM2_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
H
G
Constants
.
PARAM3_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
H
G
Constants
.
PARAM4_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
H
G
Constants
.
PARAM5_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
H
G
Constants
.
PARAM6_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
H
G
Constants
.
PARAM7_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
H
G
Constants
.
PARAM8_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
H
G
Constants
.
PARAM9_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam9
())));
}
resultRows
.
add
(
row
);
}
eiBlock
.
addBlockMeta
(
initCodeMeta
(
H
PConstants
.
TEXT_FIELD
,
HP
Constants
.
VALUE_FIELD
));
eiBlock
.
addBlockMeta
(
initCodeMeta
(
H
GConstants
.
TEXT_FIELD
,
HG
Constants
.
VALUE_FIELD
));
eiBlock
.
addRows
(
resultRows
);
inInfo
.
setBlock
(
eiBlock
);
}
...
...
@@ -116,14 +118,14 @@ public class CommonMethod {
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_ACCOUNT_CODE
,
""
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_CREATED_BY
,
userId
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_CREATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_CREATED_TIME
,
time
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_ACCOUNT_CODE
,
""
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_CREATED_BY
,
userId
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_CREATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_CREATED_TIME
,
time
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
}
}
...
...
@@ -135,10 +137,10 @@ public class CommonMethod {
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_ACCOUNT_CODE
,
""
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_ACCOUNT_CODE
,
""
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
}
}
...
...
@@ -150,8 +152,8 @@ public class CommonMethod {
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
block
.
setCell
(
i
,
H
PConstants
.
SQL_FIELD_UPDATED_BY
,
userId
+
HP
Constants
.
SPLICING_SYMBOL
+
userName
);
block
.
setCell
(
i
,
H
P
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
block
.
setCell
(
i
,
H
GConstants
.
SQL_FIELD_UPDATED_BY
,
userId
+
HG
Constants
.
SPLICING_SYMBOL
+
userName
);
block
.
setCell
(
i
,
H
G
Constants
.
SQL_FIELD_UPDATED_TIME
,
time
);
}
}
...
...
@@ -229,4 +231,26 @@ public class CommonMethod {
return
eiMetadata
;
}
public
static
void
CollectionToBlock
(
EiInfo
eiInfo
,
String
blockId
,
List
<
Map
<
String
,
Object
>>
list
){
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
Map
map
=
list
.
get
(
0
);
EiBlock
eiBlock
=
new
EiBlock
(
blockId
);
eiBlock
.
addBlockMeta
(
initMetaByMap
(
map
));
eiBlock
.
addRows
(
list
);
eiInfo
.
setBlock
(
eiBlock
);
}
}
private
static
EiBlockMeta
initMetaByMap
(
Map
<
String
,
Object
>
map
){
EiBlockMeta
eiMetadata
=
new
EiBlockMeta
();
if
(
MapUtils
.
isNotEmpty
(
map
)){
map
.
forEach
((
k
,
v
)->{
EiColumn
eiColumn
=
new
EiColumn
(
k
);
eiColumn
.
setDescName
(
k
);
eiMetadata
.
addMeta
(
eiColumn
);
});
}
return
eiMetadata
;
}
}
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