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
60422ff2
Commit
60422ff2
authored
Aug 21, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.附件一对多的形式
parent
96c8bb80
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1086 additions
and
175 deletions
+1086
-175
HgCwSqlConstant.java
...ava/com/baosight/hggp/hg/cw/constant/HgCwSqlConstant.java
+24
-0
HGCW999.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW999.java
+127
-72
ServiceHGCW999.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW999.java
+3
-5
HGCW999.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW999.xml
+42
-50
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+30
-4
HgWdSqlConstant.java
...ava/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
+0
-4
HGWD001B.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001B.java
+24
-0
HGWD001C.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001C.java
+24
-0
HGWD002.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
+696
-0
ServiceHGWD001B.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
+2
-1
ServiceHGWD001C.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
+2
-1
ServiceHGWD002.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
+3
-2
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+3
-4
HGWD001B.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001B.xml
+5
-3
HGWD001C.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001C.xml
+5
-3
HGWD002.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
+91
-0
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+0
-24
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+1
-0
HGCW099.js
src/main/webapp/HG/CW/HGCW099.js
+1
-0
HGCW999.js
src/main/webapp/HG/CW/HGCW999.js
+1
-0
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+2
-2
No files found.
src/main/java/com/baosight/hggp/hg/cw/constant/HgCwSqlConstant.java
0 → 100644
View file @
60422ff2
package
com
.
baosight
.
hggp
.
hg
.
cw
.
constant
;
/**
* @author:songx
* @date:2024/8/16,15:51
*/
public
class
HgCwSqlConstant
{
/**
* HGCW999 SQL定义
*
* @author:songx
* @date:2024/2/22,13:57
*/
public
static
class
HgCw999
{
// 预览自增
public
static
final
String
PREVIEW_INCR
=
"HGCW999.previewIncr"
;
// 下载自增
public
static
final
String
DOWNLOAD_INCR
=
"HGCW999.downloadIncr"
;
}
}
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW999.java
View file @
60422ff2
...
...
@@ -9,13 +9,13 @@ import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:H
GCW
999.java <br>
* Title:H
gcw
999.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-0
5-14 14:08:59
create
* @history 2024-0
8-21 9:59:15
create
*/
public
class
HGCW999
extends
DaoEPBase
{
...
...
@@ -26,35 +26,36 @@ public class HGCW999 extends DaoEPBase {
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 物料ID*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 文件ID*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 修改人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 修改时间*/
public
static
final
String
FIELD_DOC_NAME
=
"docName"
;
/* 文件ID*/
public
static
final
String
FIELD_COMPANY_CODES
=
"companyCodes"
;
/*用户角色权限*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 物料ID*/
public
static
final
String
FIELD_BIZ_TYPE
=
"bizType"
;
/* 业务类型*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 文件ID*/
public
static
final
String
FIELD_DOC_NAME
=
"docName"
;
/* 文件名称*/
public
static
final
String
FIELD_PREVIEW_NUM
=
"previewNum"
;
/* 预览次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
COL_ID
=
"ID"
;
/* 主键ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 公司编码*/
public
static
final
String
COL_COMPANY_NAME
=
"COMPANY_NAME"
;
/* 公司名称*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码 预留*/
public
static
final
String
COL_MAT_ID
=
"MAT_ID"
;
/* 物料ID*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 文件ID*/
public
static
final
String
COL_DOC_NAME
=
"DOC_NAME"
;
/* 文件ID*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 修改人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改时间*/
public
static
final
String
COL_MAT_ID
=
"MAT_ID"
;
/* 物料ID*/
public
static
final
String
COL_BIZ_TYPE
=
"BIZ_TYPE"
;
/* 业务类型*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 文件ID*/
public
static
final
String
COL_DOC_NAME
=
"DOC_NAME"
;
/* 文件名称*/
public
static
final
String
COL_PREVIEW_NUM
=
"PREVIEW_NUM"
;
/* 预览次数*/
public
static
final
String
COL_DOWNLOAD_NUM
=
"DOWNLOAD_NUM"
;
/* 下载次数*/
public
static
final
String
QUERY
=
"HGCW999.query"
;
public
static
final
String
COUNT
=
"HGCW999.count"
;
...
...
@@ -67,16 +68,18 @@ public class HGCW999 extends DaoEPBase {
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
Long
matId
=
new
Long
(
0
);
/* 物料ID*/
private
String
docId
=
" "
;
/* 文件ID*/
private
String
docName
=
" "
;
/* 文件ID*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
Long
matId
=
new
Long
(
0
);
/* 物料ID*/
private
String
bizType
=
" "
;
/* 业务类型*/
private
String
docId
=
" "
;
/* 文件ID*/
private
String
docName
=
" "
;
/* 文件名称*/
private
Integer
previewNum
=
new
Integer
(
0
);
/* 预览次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
/**
* initialize the metadata.
...
...
@@ -105,18 +108,6 @@ public class HGCW999 extends DaoEPBase {
eiColumn
.
setDescName
(
"部门编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MAT_ID
);
eiColumn
.
setDescName
(
"物料ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_NAME
);
eiColumn
.
setDescName
(
"文件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -141,10 +132,30 @@ public class HGCW999 extends DaoEPBase {
eiColumn
.
setDescName
(
"修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MAT_ID
);
eiColumn
.
setDescName
(
"物料ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_BIZ_TYPE
);
eiColumn
.
setDescName
(
"业务类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_NAME
);
eiColumn
.
setDescName
(
"文件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PREVIEW_NUM
);
eiColumn
.
setDescName
(
"预览次数"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOWNLOAD_NUM
);
eiColumn
.
setDescName
(
"下载次数"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -236,38 +247,6 @@ public class HGCW999 extends DaoEPBase {
this
.
depCode
=
depCode
;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public
Long
getMatId
()
{
return
this
.
matId
;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public
void
setMatId
(
Long
matId
)
{
this
.
matId
=
matId
;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
...
...
@@ -364,6 +343,22 @@ public class HGCW999 extends DaoEPBase {
this
.
updatedTime
=
updatedTime
;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public
Long
getMatId
()
{
return
this
.
matId
;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public
void
setMatId
(
Long
matId
)
{
this
.
matId
=
matId
;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
...
...
@@ -380,6 +375,70 @@ public class HGCW999 extends DaoEPBase {
this
.
bizType
=
bizType
;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public
String
getDocName
()
{
return
this
.
docName
;
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public
void
setDocName
(
String
docName
)
{
this
.
docName
=
docName
;
}
/**
* get the previewNum - 预览次数.
* @return the previewNum
*/
public
Integer
getPreviewNum
()
{
return
this
.
previewNum
;
}
/**
* set the previewNum - 预览次数.
*
* @param previewNum - 预览次数
*/
public
void
setPreviewNum
(
Integer
previewNum
)
{
this
.
previewNum
=
previewNum
;
}
/**
* get the downloadNum - 下载次数.
* @return the downloadNum
*/
public
Integer
getDownloadNum
()
{
return
this
.
downloadNum
;
}
/**
* set the downloadNum - 下载次数.
*
* @param downloadNum - 下载次数
*/
public
void
setDownloadNum
(
Integer
downloadNum
)
{
this
.
downloadNum
=
downloadNum
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -392,16 +451,18 @@ public class HGCW999 extends DaoEPBase {
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
setDocName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_NAME
)),
docName
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setBizType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BIZ_TYPE
)),
bizType
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
setDocName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_NAME
)),
docName
));
setPreviewNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PREVIEW_NUM
)),
previewNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
}
/**
...
...
@@ -416,25 +477,19 @@ public class HGCW999 extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
map
.
put
(
FIELD_DOC_NAME
,
StringUtils
.
toString
(
docName
,
eiMetadata
.
getMeta
(
FIELD_DOC_NAME
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_BIZ_TYPE
,
StringUtils
.
toString
(
bizType
,
eiMetadata
.
getMeta
(
FIELD_BIZ_TYPE
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
map
.
put
(
FIELD_DOC_NAME
,
StringUtils
.
toString
(
docName
,
eiMetadata
.
getMeta
(
FIELD_DOC_NAME
)));
map
.
put
(
FIELD_PREVIEW_NUM
,
StringUtils
.
toString
(
previewNum
,
eiMetadata
.
getMeta
(
FIELD_PREVIEW_NUM
)));
map
.
put
(
FIELD_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
return
map
;
}
public
String
getDocName
()
{
return
docName
;
}
public
void
setDocName
(
String
docName
)
{
this
.
docName
=
docName
;
}
}
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW999.java
View file @
60422ff2
...
...
@@ -2,8 +2,8 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.S3Constant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW003
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
...
...
@@ -55,8 +55,7 @@ public class ServiceHGCW999 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
FileLocation
.
S3
.
equalsIgnoreCase
(
S3Constant
.
FILE_LOCATION
))
{
inInfo
=
super
.
query
(
inInfo
,
"HGCW999.queryRun"
,
new
HGCW999
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HGCW999.queryDev"
,
new
HGCW999
());
...
...
@@ -75,8 +74,7 @@ public class ServiceHGCW999 extends ServiceEPBase {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"docId"
,
docId
);
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
FileLocation
.
S3
.
equalsIgnoreCase
(
S3Constant
.
FILE_LOCATION
))
{
list
=
this
.
dao
.
query
(
"HGCW999.queryRun"
,
map
);
}
else
{
list
=
this
.
dao
.
query
(
"HGCW999.queryDev"
,
map
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW999.xml
View file @
60422ff2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-14 14:08:59
Version : 1.0
schema : hggp
tableName : HGCW999
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
DEP_CODE VARCHAR NOT NULL,
MAT_ID BIGINT,
DOC_ID VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
BIZ_TYPE VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCW999"
>
<sql
id=
"column"
>
...
...
@@ -27,15 +8,18 @@
A.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
A.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
A.DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
A.MAT_ID as "matId",
<!-- 物料ID -->
A.DOC_ID as "docId",
<!-- 文件ID -->
A.CREATED_BY as "createdBy",
<!-- 创建人 -->
A.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
A.CREATED_TIME as "createdTime",
<!-- 创建时间 -->
A.UPDATED_BY as "updatedBy",
<!-- 修改人 -->
A.UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
A.BIZ_TYPE as "bizType"
<!-- 业务类型 -->
A.MAT_ID as "matId",
<!-- 物料ID -->
A.BIZ_TYPE as "bizType",
<!-- 业务类型 -->
A.DOC_ID as "docId",
<!-- 文件ID -->
<!--A.DOC_NAME as "docName",-->
<!-- 文件名称 -->
A.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
A.DOWNLOAD_NUM as "downloadNum"
<!-- 下载次数 -->
</sql>
<sql
id=
"columnDev"
>
...
...
@@ -169,53 +153,43 @@
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCW999 (ID,
<!-- 主键ID -->
INSERT INTO ${hggpSchema}.HGCW999 (
ACCOUNT_CODE,
<!-- 企业编码 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
DEP_CODE,
<!-- 部门编码 预留 -->
MAT_ID,
<!-- 物料ID -->
DOC_ID,
<!-- 文件ID -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 修改人 -->
UPDATED_NAME,
<!-- 修改人名称 -->
UPDATED_TIME,
<!-- 修改时间 -->
BIZ_TYPE
<!-- 业务类型 -->
MAT_ID,
<!-- 物料ID -->
BIZ_TYPE,
<!-- 业务类型 -->
DOC_ID,
<!-- 文件ID -->
DOC_NAME
<!-- 文件文件 -->
) VALUES (
#accountCode#, #companyCode#, #companyName#, #depCode#,
#createdBy#, #createdName#, #createdTime#, #matId#, #bizType#, #docId#, #docName#
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #depCode#, #matId#, #docId#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #bizType#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCW999 WHERE
ID = #id#
DELETE FROM ${hggpSchema}.HGCW999 WHERE ID = #id#
</delete>
<delete
id=
"deleteMatId"
>
DELETE FROM ${hggpSchema}.HGCW999 WHERE
MAT_ID = #matId#
DELETE FROM ${hggpSchema}.HGCW999 WHERE MAT_ID = #matId#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCW999
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
DEP_CODE = #depCode#,
<!-- 部门编码 预留 -->
BIZ_TYPE = #bizType#,
<!-- 业务类型 -->
MAT_ID = #matId#,
<!-- 物料ID -->
DOC_ID = #docId#,
<!-- 文件ID -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_NAME = #createdName#,
<!-- 创建人名称 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 修改时间 -->
BIZ_TYPE = #bizType#
<!-- 业务类型 -->
WHERE
ID = #id#
DOC_NAME = #docName#,
<!-- 文件文件 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
<update
id=
"batchUpdate"
>
UPDATE ${hggpSchema}.HGCW999
SET
...
...
@@ -223,7 +197,25 @@
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
WHERE
DOC_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"docIds"
>
#docIds[]#
</iterate>
WHERE DOC_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"docIds"
>
#docIds[]#
</iterate>
</update>
<!-- 预览自增 -->
<update
id=
"previewIncr"
>
UPDATE ${hggpSchema}.HGCW999
SET
PREVIEW_NUM = PREVIEW_NUM + 1,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE DOC_ID = #docId#
</update>
<!-- 下载自增 -->
<update
id=
"downloadIncr"
>
UPDATE ${hggpSchema}.HGCW999
SET
DOWNLOAD_NUM = DOWNLOAD_NUM + 1,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE DOC_ID = #docId#
</update>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
60422ff2
...
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.constant.HgCwSqlConstant
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.kc.domain.*
;
...
...
@@ -24,10 +25,6 @@ import java.math.BigDecimal;
import
java.math.BigInteger
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -1130,8 +1127,37 @@ public class HGCWTools {
}
}
/**
*
* @author:songx
* @date:2024/8/21,9:44
*/
public
static
class
HgCw999
{
/**
* 预览记录自增
*
* @param docId
*/
public
static
void
previewIncr
(
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGCW999
.
FIELD_DOC_ID
,
docId
);
DaoUtils
.
update
(
HgCwSqlConstant
.
HgCw999
.
PREVIEW_INCR
,
queryMap
);
}
/**
* 下载记录自增
*
* @param docId
*/
public
static
void
downloadIncr
(
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGCW999
.
FIELD_DOC_ID
,
docId
);
DaoUtils
.
update
(
HgCwSqlConstant
.
HgCw999
.
DOWNLOAD_INCR
,
queryMap
);
}
public
static
void
batchUpdate
(
List
<
Map
>
rows
,
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"业务ID不能为空!"
);
String
[]
docIds
=
rows
.
stream
().
map
(
row
->
row
.
get
(
"docId"
).
toString
()).
toArray
(
String
[]::
new
);
...
...
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
60422ff2
...
...
@@ -14,10 +14,6 @@ public class HgWdSqlConstant {
*/
public
static
class
HgWd001
{
// 预览自增
public
static
final
String
PREVIEW_INCR
=
"HGWD001.previewIncr"
;
// 下载自增
public
static
final
String
DOWNLOAD_INCR
=
"HGWD001.downloadIncr"
;
}
}
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001B.java
View file @
60422ff2
...
...
@@ -32,6 +32,7 @@ public class HGWD001B extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 记录修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 0-未删除,1-已删除*/
public
static
final
String
FIELD_FILE_ID
=
"fileId"
;
/* 文件ID*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 附件ID*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -44,6 +45,7 @@ public class HGWD001B extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 0-未删除,1-已删除*/
public
static
final
String
COL_FILE_ID
=
"FILE_ID"
;
/* 文件ID*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 附件ID*/
public
static
final
String
QUERY
=
"HGWD001B.query"
;
public
static
final
String
COUNT
=
"HGWD001B.count"
;
...
...
@@ -62,6 +64,7 @@ public class HGWD001B extends DaoEPBase {
private
String
updatedTime
=
" "
;
/* 记录修改时间*/
private
Integer
deleteFlag
;
/* 0-未删除,1-已删除*/
private
String
fileId
=
" "
;
/* 文件ID*/
private
String
docId
=
" "
;
/* 附件ID*/
/**
* initialize the metadata.
...
...
@@ -114,6 +117,9 @@ public class HGWD001B extends DaoEPBase {
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"附件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -301,6 +307,22 @@ public class HGWD001B extends DaoEPBase {
this
.
fileId
=
fileId
;
}
/**
* get the docId - 附件ID.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -319,6 +341,7 @@ public class HGWD001B extends DaoEPBase {
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setFileId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_ID
)),
fileId
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
}
/**
...
...
@@ -339,6 +362,7 @@ public class HGWD001B extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_FILE_ID
,
StringUtils
.
toString
(
fileId
,
eiMetadata
.
getMeta
(
FIELD_FILE_ID
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001C.java
View file @
60422ff2
...
...
@@ -32,6 +32,7 @@ public class HGWD001C extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 记录修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 0-未删除,1-已删除*/
public
static
final
String
FIELD_FILE_ID
=
"fileId"
;
/* 文件ID*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 附件ID*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -44,6 +45,7 @@ public class HGWD001C extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 0-未删除,1-已删除*/
public
static
final
String
COL_FILE_ID
=
"FILE_ID"
;
/* 文件ID*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 附件ID*/
public
static
final
String
QUERY
=
"HGWD001C.query"
;
public
static
final
String
COUNT
=
"HGWD001C.count"
;
...
...
@@ -62,6 +64,7 @@ public class HGWD001C extends DaoEPBase {
private
String
updatedTime
=
" "
;
/* 记录修改时间*/
private
Integer
deleteFlag
;
/* 0-未删除,1-已删除*/
private
String
fileId
=
" "
;
/* 文件ID*/
private
String
docId
=
" "
;
/* 附件ID*/
/**
* initialize the metadata.
...
...
@@ -114,6 +117,9 @@ public class HGWD001C extends DaoEPBase {
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"附件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -301,6 +307,22 @@ public class HGWD001C extends DaoEPBase {
this
.
fileId
=
fileId
;
}
/**
* get the docId - 附件ID.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -319,6 +341,7 @@ public class HGWD001C extends DaoEPBase {
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setFileId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_ID
)),
fileId
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
}
/**
...
...
@@ -339,6 +362,7 @@ public class HGWD001C extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_FILE_ID
,
StringUtils
.
toString
(
fileId
,
eiMetadata
.
getMeta
(
FIELD_FILE_ID
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
0 → 100644
View file @
60422ff2
package
com
.
baosight
.
hggp
.
hg
.
wd
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Project: <br>
* Title:Hgwd001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-19 14:34:38 create
*/
public
class
HGWD002
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 记录创建名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 记录创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 记录修改者*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 记录修改名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 记录修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 0-未删除,1-已删除*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_FILE_ID
=
"fileId"
;
/* 文件ID*/
public
static
final
String
FIELD_FILE_TYPE
=
"fileType"
;
/* 文件类型*/
public
static
final
String
FIELD_FILE_NAME
=
"fileName"
;
/* 文件名称*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 文件号*/
public
static
final
String
FIELD_DOC_NAME
=
"docName"
;
/* 文件附件名称*/
public
static
final
String
FIELD_DOC_VERSION
=
"docVersion"
;
/* 文件版本号*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_PREVIEW_NUM
=
"previewNum"
;
/* 预览次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 记录创建名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 记录创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 记录修改者*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 记录修改名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 0-未删除,1-已删除*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 公司编码*/
public
static
final
String
COL_COMPANY_NAME
=
"COMPANY_NAME"
;
/* 公司名称*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
COL_FILE_ID
=
"FILE_ID"
;
/* 文件ID*/
public
static
final
String
COL_FILE_TYPE
=
"FILE_TYPE"
;
/* 文件类型*/
public
static
final
String
COL_FILE_NAME
=
"FILE_NAME"
;
/* 文件名称*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 文件号*/
public
static
final
String
COL_DOC_NAME
=
"DOC_NAME"
;
/* 文件附件名称*/
public
static
final
String
COL_DOC_VERSION
=
"DOC_VERSION"
;
/* 文件版本号*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
COL_RELEASE_DATE
=
"RELEASE_DATE"
;
/* 发布时间*/
public
static
final
String
COL_PREVIEW_NUM
=
"PREVIEW_NUM"
;
/* 预览次数*/
public
static
final
String
COL_DOWNLOAD_NUM
=
"DOWNLOAD_NUM"
;
/* 下载次数*/
public
static
final
String
QUERY
=
"HGWD002.query"
;
public
static
final
String
COUNT
=
"HGWD002.count"
;
public
static
final
String
INSERT
=
"HGWD002.insert"
;
public
static
final
String
UPDATE
=
"HGWD002.update"
;
public
static
final
String
DELETE
=
"HGWD002.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdName
=
" "
;
/* 记录创建名称*/
private
String
createdTime
=
" "
;
/* 记录创建时间*/
private
String
updatedBy
=
" "
;
/* 记录修改者*/
private
String
updatedName
=
" "
;
/* 记录修改名称*/
private
String
updatedTime
=
" "
;
/* 记录修改时间*/
private
Integer
deleteFlag
=
0
;
/* 0-未删除,1-已删除*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
fileId
=
" "
;
/* 文件ID*/
private
String
fileType
=
" "
;
/* 文件类型*/
private
String
fileName
=
" "
;
/* 文件名称*/
private
String
docId
=
" "
;
/* 文件号*/
private
String
docName
=
" "
;
/* 文件附件名称*/
private
Integer
docVersion
=
new
Integer
(
0
);
/* 文件版本号*/
private
Integer
status
=
0
;
/* 状态*/
private
String
remark
=
" "
;
/* 备注*/
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
Integer
previewNum
=
new
Integer
(
0
);
/* 预览次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"记录创建者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"记录创建名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"记录创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"记录修改者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"记录修改名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"记录修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"0-未删除,1-已删除"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"公司编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_NAME
);
eiColumn
.
setDescName
(
"公司名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_ID
);
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_TYPE
);
eiColumn
.
setDescName
(
"文件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_NAME
);
eiColumn
.
setDescName
(
"文件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"文件号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_NAME
);
eiColumn
.
setDescName
(
"文件附件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_VERSION
);
eiColumn
.
setDescName
(
"文件版本号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RELEASE_DATE
);
eiColumn
.
setDescName
(
"发布时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PREVIEW_NUM
);
eiColumn
.
setDescName
(
"预览次数"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOWNLOAD_NUM
);
eiColumn
.
setDescName
(
"下载次数"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HGWD002
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public
String
getAccountCode
()
{
return
this
.
accountCode
;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public
void
setAccountCode
(
String
accountCode
)
{
this
.
accountCode
=
accountCode
;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param 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-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public
String
getCompanyName
()
{
return
this
.
companyName
;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public
String
getProjCode
()
{
return
this
.
projCode
;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public
String
getProjName
()
{
return
this
.
projName
;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
* get the fileId - 文件ID.
* @return the fileId
*/
public
String
getFileId
()
{
return
this
.
fileId
;
}
/**
* set the fileId - 文件ID.
*
* @param fileId - 文件ID
*/
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
/**
* get the fileType - 文件类型.
* @return the fileType
*/
public
String
getFileType
()
{
return
this
.
fileType
;
}
/**
* set the fileType - 文件类型.
*
* @param fileType - 文件类型
*/
public
void
setFileType
(
String
fileType
)
{
this
.
fileType
=
fileType
;
}
/**
* get the fileName - 文件名称.
* @return the fileName
*/
public
String
getFileName
()
{
return
this
.
fileName
;
}
/**
* set the fileName - 文件名称.
*
* @param fileName - 文件名称
*/
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
/**
* get the docId - 文件号.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件号.
*
* @param docId - 文件号
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the docName - 文件附件名称.
* @return the docName
*/
public
String
getDocName
()
{
return
this
.
docName
;
}
/**
* set the docName - 文件附件名称.
*
* @param docName - 文件附件名称
*/
public
void
setDocName
(
String
docName
)
{
this
.
docName
=
docName
;
}
/**
* get the docVersion - 文件版本号.
* @return the docVersion
*/
public
Integer
getDocVersion
()
{
return
this
.
docVersion
;
}
/**
* set the docVersion - 文件版本号.
*
* @param docVersion - 文件版本号
*/
public
void
setDocVersion
(
Integer
docVersion
)
{
this
.
docVersion
=
docVersion
;
}
/**
* get the status - 状态.
* @return the status
*/
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态.
*
* @param status - 状态
*/
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
* get the remark - 备注.
* @return the remark
*/
public
String
getRemark
()
{
return
this
.
remark
;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* get the releaseDate - 发布时间.
* @return the releaseDate
*/
public
String
getReleaseDate
()
{
return
this
.
releaseDate
;
}
/**
* set the releaseDate - 发布时间.
*
* @param releaseDate - 发布时间
*/
public
void
setReleaseDate
(
String
releaseDate
)
{
this
.
releaseDate
=
releaseDate
;
}
/**
* get the previewNum - 预览次数.
* @return the previewNum
*/
public
Integer
getPreviewNum
()
{
return
this
.
previewNum
;
}
/**
* set the previewNum - 预览次数.
*
* @param previewNum - 预览次数
*/
public
void
setPreviewNum
(
Integer
previewNum
)
{
this
.
previewNum
=
previewNum
;
}
/**
* get the downloadNum - 下载次数.
* @return the downloadNum
*/
public
Integer
getDownloadNum
()
{
return
this
.
downloadNum
;
}
/**
* set the downloadNum - 下载次数.
*
* @param downloadNum - 下载次数
*/
public
void
setDownloadNum
(
Integer
downloadNum
)
{
this
.
downloadNum
=
downloadNum
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setFileId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_ID
)),
fileId
));
setFileType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_TYPE
)),
fileType
));
setFileName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_NAME
)),
fileName
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
setDocName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_NAME
)),
docName
));
setDocVersion
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_VERSION
)),
docVersion
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setPreviewNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PREVIEW_NUM
)),
previewNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_FILE_ID
,
StringUtils
.
toString
(
fileId
,
eiMetadata
.
getMeta
(
FIELD_FILE_ID
)));
map
.
put
(
FIELD_FILE_TYPE
,
StringUtils
.
toString
(
fileType
,
eiMetadata
.
getMeta
(
FIELD_FILE_TYPE
)));
map
.
put
(
FIELD_FILE_NAME
,
StringUtils
.
toString
(
fileName
,
eiMetadata
.
getMeta
(
FIELD_FILE_NAME
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
map
.
put
(
FIELD_DOC_NAME
,
StringUtils
.
toString
(
docName
,
eiMetadata
.
getMeta
(
FIELD_DOC_NAME
)));
map
.
put
(
FIELD_DOC_VERSION
,
StringUtils
.
toString
(
docVersion
,
eiMetadata
.
getMeta
(
FIELD_DOC_VERSION
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
map
.
put
(
FIELD_PREVIEW_NUM
,
StringUtils
.
toString
(
previewNum
,
eiMetadata
.
getMeta
(
FIELD_PREVIEW_NUM
)));
map
.
put
(
FIELD_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
View file @
60422ff2
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001B
;
...
...
@@ -92,7 +93,7 @@ public class ServiceHGWD001B extends ServiceBase {
List
<
HGWD001B
>
fWd001bs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001B
.
class
);
for
(
HGWD001B
fWd001b
:
fWd001bs
)
{
// 预览记录+1
HG
WDTools
.
HgWd001
.
previewIncr
(
fWd001b
.
getFile
Id
());
HG
CWTools
.
HgCw999
.
previewIncr
(
fWd001b
.
getDoc
Id
());
// 新增
DaoUtils
.
insert
(
HGWD001B
.
INSERT
,
fWd001b
);
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
View file @
60422ff2
...
...
@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001B
;
import
com.baosight.hggp.hg.wd.domain.HGWD001C
;
...
...
@@ -89,7 +90,7 @@ public class ServiceHGWD001C extends ServiceBase {
List
<
HGWD001C
>
fWd001cs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001C
.
class
);
for
(
HGWD001C
fWd001c
:
fWd001cs
)
{
// 下载记录+1
HG
WDTools
.
HgWd001
.
downloadIncr
(
fWd001c
.
getFile
Id
());
HG
CWTools
.
HgCw999
.
downloadIncr
(
fWd001c
.
getDoc
Id
());
// 新增
DaoUtils
.
insert
(
HGWD001C
.
INSERT
,
fWd001c
);
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
View file @
60422ff2
...
...
@@ -13,6 +13,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD002
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
...
...
@@ -48,7 +49,7 @@ public class ServiceHGWD002 extends ServiceBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
));
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGWD00
1
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGWD00
2
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -68,7 +69,7 @@ public class ServiceHGWD002 extends ServiceBase {
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 仅查询已发布的文件
queryRow
.
put
(
HGWD001
.
FIELD_STATUS
,
HgWdConstant
.
FileStatus
.
S_1
);
inInfo
=
super
.
query
(
inInfo
,
HGWD00
1
.
QUERY
,
new
HGWD001
());
inInfo
=
super
.
query
(
inInfo
,
HGWD00
2
.
QUERY
,
new
HGWD002
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
60422ff2
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.S3Constant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
...
...
@@ -60,8 +61,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
FileLocation
.
S3
.
equalsIgnoreCase
(
S3Constant
.
FILE_LOCATION
))
{
inInfo
=
super
.
query
(
inInfo
,
"HGCW999.queryRun"
,
new
HGCW999
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HGCW999.queryDev"
,
new
HGCW999
());
...
...
@@ -80,8 +80,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"docId"
,
docId
);
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
FileLocation
.
S3
.
equalsIgnoreCase
(
S3Constant
.
FILE_LOCATION
))
{
list
=
this
.
dao
.
query
(
"HGCW999.queryRun"
,
map
);
}
else
{
list
=
this
.
dao
.
query
(
"HGCW999.queryDev"
,
map
);
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001B.xml
View file @
60422ff2
...
...
@@ -13,7 +13,8 @@
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
FILE_ID as "fileId"
<!-- 文件ID -->
FILE_ID as "fileId",
<!-- 文件ID -->
DOC_ID as "docId"
<!-- 附件ID -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -86,10 +87,11 @@
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
FILE_ID
<!-- 文件ID -->
FILE_ID,
<!-- 文件ID -->
DOC_ID
<!-- 附件ID -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #fileId#
#deleteFlag#, #fileId#
, #docId#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001C.xml
View file @
60422ff2
...
...
@@ -13,7 +13,8 @@
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
FILE_ID as "fileId"
<!-- 文件ID -->
FILE_ID as "fileId",
<!-- 文件ID -->
DOC_ID as "docId"
<!-- 附件ID -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -86,10 +87,11 @@
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
FILE_ID
<!-- 文件ID -->
FILE_ID,
<!-- 文件ID -->
DOC_ID
<!-- 附件ID -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #fileId#
#deleteFlag#, #fileId#
, #docId#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
0 → 100644
View file @
60422ff2
<?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">
<sqlMap
namespace=
"HGWD002"
>
<sql
id=
"column"
>
A.ID as "id",
A.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
A.DEP_CODE as "depCode",
<!-- 部门编码 -->
A.DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
A.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
A.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
A.PROJ_CODE as "projCode",
<!-- 项目编码 -->
A.PROJ_NAME as "projName",
<!-- 项目名称 -->
A.FILE_ID as "fileId",
<!-- 文件ID -->
A.FILE_TYPE as "fileType",
<!-- 文件类型 -->
A.FILE_NAME as "fileName",
<!-- 文件名称 -->
A.DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
A.RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
B.DOC_ID as "docId",
<!-- 文件号 -->
B.DOC_NAME as "docName",
<!-- 文件附件名称 -->
B.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
B.DOWNLOAD_NUM as "downloadNum"
<!-- 下载次数 -->
</sql>
<sql
id=
"condition"
>
AND A.DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
A.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
A.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileId"
>
A.FILE_ID = #fileId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileType"
>
A.FILE_TYPE = #fileType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileName"
>
A.FILE_NAME LIKE CONCAT('%', #fileName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
A.STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
B.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
A.ID DESC, B.ID DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.wd.domain.HGWD002"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HGCW999 B ON A.ID = B.MAT_ID
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*)
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HGCW999 B ON A.ID = B.MAT_ID
WHERE 1=1
<include
refid=
"condition"
/>
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
60422ff2
...
...
@@ -48,30 +48,6 @@ public class HGWDTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 预览记录自增
*
* @param fileId
*/
public
static
void
previewIncr
(
String
fileId
)
{
AssertUtils
.
isEmpty
(
fileId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
PREVIEW_INCR
,
queryMap
);
}
/**
* 下载记录自增
*
* @param fileId
*/
public
static
void
downloadIncr
(
String
fileId
)
{
AssertUtils
.
isEmpty
(
fileId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
DOWNLOAD_INCR
,
queryMap
);
}
public
static
void
add
(
HGWD001A
hgwd001a
)
{
AssertUtils
.
isNull
(
hgwd001a
,
"文档对象不能为空"
);
DaoUtils
.
insert
(
HGWD001A
.
INSERT
,
hgwd001a
);
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
60422ff2
...
...
@@ -77,6 +77,7 @@
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW015.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW016.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW017.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW999.xml"
/>
<!--配置-->
<sqlMap
resource=
"com/baosight/hggp/hg/pz/sql/HGPZ005.xml"
/>
...
...
src/main/webapp/HG/CW/HGCW099.js
View file @
60422ff2
...
...
@@ -17,6 +17,7 @@ $(function () {
console
.
log
(
$
(
"#inqu_status-0-bizType"
).
val
())
var
data
=
{
docId
:
docId
,
docName
:
e
.
response
.
docName
,
matId
:
matId
,
bizType
:
bizType
}
...
...
src/main/webapp/HG/CW/HGCW999.js
View file @
60422ff2
...
...
@@ -66,6 +66,7 @@ function uploadFileCallback(data) {
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-matId"
,
data
.
matId
);
inEiInfo
.
set
(
"result-0-docId"
,
data
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
data
.
docName
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
EiCommunicator
.
send
(
'HGCW999'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
...
...
src/main/webapp/HG/WD/HGWD002.jsp
View file @
60422ff2
...
...
@@ -32,8 +32,8 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"fileName"
cname=
"文件名"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"docId"
cname=
"
文件号
"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docName"
cname=
"
文件
附件名称"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"docId"
cname=
"
附件ID
"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docName"
cname=
"附件名称"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
/>
</EF:EFGrid>
...
...
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