Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
aaee51b2
Commit
aaee51b2
authored
Jan 09, 2024
by
徐澳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台规范
parent
c176b254
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
4 deletions
+116
-4
CompanyTypeEnum.java
...ain/java/com/baosight/iplat4j/common/CompanyTypeEnum.java
+54
-0
HPConstants.java
src/main/java/com/baosight/iplat4j/common/HPConstants.java
+31
-0
package-info.java
src/main/java/com/baosight/iplat4j/common/package-info.java
+0
-2
CommonMethod.java
src/main/java/com/baosight/iplat4j/util/CommonMethod.java
+31
-0
package-info.java
src/main/java/com/baosight/iplat4j/util/package-info.java
+0
-2
No files found.
src/main/java/com/baosight/iplat4j/common/CompanyTypeEnum.java
0 → 100644
View file @
aaee51b2
package
com
.
baosight
.
iplat4j
.
common
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
CompanyTypeEnum
{
GQ
(
1
,
"国企"
),
MY
(
2
,
"民营"
);
private
Integer
code
;
private
String
value
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
CompanyTypeEnum
(
Integer
code
,
String
value
)
{
this
.
code
=
code
;
this
.
value
=
value
;
}
public
static
EiBlock
generatorEiBlock
(){
EiBlock
block
=
new
EiBlock
(
"company_type_block_id"
);
List
<
Map
<
String
,
Object
>>
rows
=
new
ArrayList
<
Map
<
String
,
Object
>>(){{
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
HPConstants
.
TEXT_FIELD
,
GQ
.
code
);
put
(
HPConstants
.
VALUE_FIELD
,
GQ
.
value
);
}});
add
(
new
HashMap
<
String
,
Object
>(){{
put
(
HPConstants
.
TEXT_FIELD
,
MY
.
code
);
put
(
HPConstants
.
VALUE_FIELD
,
MY
.
value
);
}});
}};
block
.
setRows
(
rows
);
return
block
;
}
}
src/main/java/com/baosight/iplat4j/common/HPConstants.java
0 → 100644
View file @
aaee51b2
package
com
.
baosight
.
iplat4j
.
common
;
/**
* @author xuao
* @date 2024年01月09日 14:53
*/
public
class
HPConstants
{
//公司編碼
public
static
final
String
SQL_FIELD_COMPANYCODE
=
"companyCode"
;
//創建人
public
static
final
String
SQL_FIELD_CREATED_BY
=
"createdBy"
;
//創建時間
public
static
final
String
SQL_FIELD_CREATED_TIME
=
"createdTime"
;
//修改人
public
static
final
String
SQL_FIELD_UPDATED_BY
=
"updatedBy"
;
//修改時間
public
static
final
String
SQL_FIELD_UPDATED_TIME
=
"updatedTime"
;
//代碼名字分隔符
public
static
final
String
SPLICING_SYMBOL
=
"-"
;
public
static
final
String
TEXT_FIELD
=
"textField"
;
public
static
final
String
VALUE_FIELD
=
"valueField"
;
}
src/main/java/com/baosight/iplat4j/common/package-info.java
deleted
100644 → 0
View file @
c176b254
package
com
.
baosight
.
iplat4j
.
common
;
\ No newline at end of file
src/main/java/com/baosight/iplat4j/util/CommonMethod.java
0 → 100644
View file @
aaee51b2
package
com
.
baosight
.
iplat4j
.
util
;
import
com.baosight.iplat4j.common.HPConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.util.DateUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
/**
* @author xuao
* @date 2024年01月09日 14:50
*/
public
class
CommonMethod
{
public
static
void
creatorInfo
(
EiInfo
eiInfo
,
String
resultBlock
){
EiBlock
block
=
eiInfo
.
getBlock
(
resultBlock
);
String
userId
=
UserSession
.
getLoginName
();
String
userName
=
UserSession
.
getLoginCName
();
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_COMPANYCODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_BY
,
userId
+
HPConstants
.
SPLICING_SYMBOL
+
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_TIME
,
time
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_BY
,
userId
+
HPConstants
.
SPLICING_SYMBOL
+
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_TIME
,
time
);
}
}
}
src/main/java/com/baosight/iplat4j/util/package-info.java
deleted
100644 → 0
View file @
c176b254
package
com
.
baosight
.
iplat4j
.
util
;
\ No newline at end of file
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