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
487aa248
Commit
487aa248
authored
Apr 17, 2024
by
TEEMO\xzh64
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备日志记录
parent
1a17a5b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
449 additions
and
0 deletions
+449
-0
HPSB002.java
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB002.java
+305
-0
HPSB002.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
+144
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB002.java
0 → 100644
View file @
487aa248
/**
* Generate time : 2024-04-17 9:51:19
* Version : 1.0
*/
package
com
.
baosight
.
hpjx
.
hp
.
sb
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* THpsb002
*
*/
public
class
HPSB002
extends
DaoEPBase
{
private
String
id
=
" "
;
/* ID*/
private
String
fileName
=
" "
;
/* 文件名*/
private
String
equipmentType
=
" "
;
/* 设备状态*/
private
String
equipmentCode
=
" "
;
/* 设备编码*/
private
String
logValue
=
" "
;
/* 日志类容*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
Integer
.
valueOf
(
0
);
/* 是否删除0.否1.是*/
/**
* initialize the metadata
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
"id"
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
"ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"fileName"
);
eiColumn
.
setDescName
(
"文件名"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"equipmentType"
);
eiColumn
.
setDescName
(
"设备状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"equipmentCode"
);
eiColumn
.
setDescName
(
"设备编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"logValue"
);
eiColumn
.
setDescName
(
"日志类容"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"createdBy"
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"createdName"
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"createdTime"
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"updatedBy"
);
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"updatedName"
);
eiColumn
.
setDescName
(
"更新人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"updatedTime"
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"deleteFlag"
);
eiColumn
.
setDescName
(
"是否删除0.否1.是"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor
*/
public
HPSB002
()
{
initMetaData
();
}
/**
* get the id - ID
* @return the id
*/
public
String
getId
()
{
return
this
.
id
;
}
/**
* set the id - ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* get the fileName - 文件名
* @return the fileName
*/
public
String
getFileName
()
{
return
this
.
fileName
;
}
/**
* set the fileName - 文件名
*/
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
/**
* get the equipmentType - 设备状态
* @return the equipmentType
*/
public
String
getEquipmentType
()
{
return
this
.
equipmentType
;
}
/**
* set the equipmentType - 设备状态
*/
public
void
setEquipmentType
(
String
equipmentType
)
{
this
.
equipmentType
=
equipmentType
;
}
/**
* get the equipmentCode - 设备编码
* @return the equipmentCode
*/
public
String
getEquipmentCode
()
{
return
this
.
equipmentCode
;
}
/**
* set the equipmentCode - 设备编码
*/
public
void
setEquipmentCode
(
String
equipmentCode
)
{
this
.
equipmentCode
=
equipmentCode
;
}
/**
* get the logValue - 日志类容
* @return the logValue
*/
public
String
getLogValue
()
{
return
this
.
logValue
;
}
/**
* set the logValue - 日志类容
*/
public
void
setLogValue
(
String
logValue
)
{
this
.
logValue
=
logValue
;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 更新人名称
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the deleteFlag - 是否删除0.否1.是
* @return the deleteFlag
*/
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
/**
* set the deleteFlag - 是否删除0.否1.是
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* get the value from Map
*/
public
void
fromMap
(
Map
map
)
{
setId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"id"
)),
id
));
setFileName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"fileName"
)),
fileName
));
setEquipmentType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"equipmentType"
)),
equipmentType
));
setEquipmentCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"equipmentCode"
)),
equipmentCode
));
setLogValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"logValue"
)),
logValue
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"createdBy"
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"createdName"
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"createdTime"
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedBy"
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedName"
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedTime"
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
"deleteFlag"
)),
deleteFlag
));
}
/**
* set the value to Map
*/
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
"id"
)));
map
.
put
(
"fileName"
,
StringUtils
.
toString
(
fileName
,
eiMetadata
.
getMeta
(
"fileName"
)));
map
.
put
(
"equipmentType"
,
StringUtils
.
toString
(
equipmentType
,
eiMetadata
.
getMeta
(
"equipmentType"
)));
map
.
put
(
"equipmentCode"
,
StringUtils
.
toString
(
equipmentCode
,
eiMetadata
.
getMeta
(
"equipmentCode"
)));
map
.
put
(
"logValue"
,
StringUtils
.
toString
(
logValue
,
eiMetadata
.
getMeta
(
"logValue"
)));
map
.
put
(
"createdBy"
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
"createdBy"
)));
map
.
put
(
"createdName"
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
"createdName"
)));
map
.
put
(
"createdTime"
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
"createdTime"
)));
map
.
put
(
"updatedBy"
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
"updatedBy"
)));
map
.
put
(
"updatedName"
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
"updatedName"
)));
map
.
put
(
"updatedTime"
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
"updatedTime"
)));
map
.
put
(
"deleteFlag"
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
"deleteFlag"
)));
return
map
;
}
}
\ No newline at end of file
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
0 → 100644
View file @
487aa248
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-04-17 9:51:19
Version : 1.0
tableName :hpjx.t_hpsb002
ID VARCHAR NOT NULL primarykey,
FILE_NAME VARCHAR,
EQUIPMENT_TYPE VARCHAR,
EQUIPMENT_CODE VARCHAR,
LOG_VALUE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap
namespace=
"HPSB002"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sb.domain.HPSB002"
>
SELECT
ID as "id",
<!-- ID -->
FILE_NAME as "fileName",
<!-- 文件名 -->
EQUIPMENT_TYPE as "equipmentType",
<!-- 设备状态 -->
EQUIPMENT_CODE as "equipmentCode",
<!-- 设备编码 -->
LOG_VALUE as "logValue",
<!-- 日志类容 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除0.否1.是 -->
FROM hpjx.t_hpsb002 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpsb002 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="fileName">
FILE_NAME = #fileName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="equipmentType">
EQUIPMENT_TYPE = #equipmentType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="equipmentCode">
EQUIPMENT_CODE = #equipmentCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="logValue">
LOG_VALUE = #logValue#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO hpjx.t_hpsb002 (ID,
<!-- ID -->
FILE_NAME,
<!-- 文件名 -->
EQUIPMENT_TYPE,
<!-- 设备状态 -->
EQUIPMENT_CODE,
<!-- 设备编码 -->
LOG_VALUE,
<!-- 日志类容 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG
<!-- 是否删除0.否1.是 -->
)
VALUES (#id#, #fileName#, #equipmentType#, #equipmentCode#, #logValue#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
</insert>
<delete
id=
"delete"
>
DELETE FROM hpjx.t_hpsb002 WHERE
ID = #id#
</delete>
<delete
id=
"deleteByCreatedTime"
>
DELETE FROM hpjx.t_hpsb002 WHERE
SUBSTR(CREATED_TIME,1,8)
<
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 30 day),'%Y%m%d')
</delete>
<update
id=
"update"
>
UPDATE hpjx.t_hpsb002
SET
FILE_NAME = #fileName#,
<!-- 文件名 -->
EQUIPMENT_TYPE = #equipmentType#,
<!-- 设备状态 -->
EQUIPMENT_CODE = #equipmentCode#,
<!-- 设备编码 -->
LOG_VALUE = #logValue#,
<!-- 日志类容 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_NAME = #createdName#,
<!-- 创建人名称 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#
<!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ 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