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
89b7313f
Commit
89b7313f
authored
Sep 05, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-sx' of
http://git.pseer.com:8800/platform/hg-smart
into dev
parents
aaac300d
cac8cdc4
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
218 additions
and
113 deletions
+218
-113
HGKCUtils.java
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
+1
-1
ServiceHGPZ009.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
+1
-2
HGWD003.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD003.java
+17
-0
ServiceHGWD001B.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
+2
-0
ServiceHGWD001C.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
+2
-0
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+119
-4
ServiceHGWD003.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD003.java
+0
-80
ServiceHGWD003A.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD003A.java
+1
-1
HGWD003.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD003.xml
+6
-4
HGWD003A.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD003A.xml
+2
-1
User.java
src/main/java/com/baosight/hggp/hg/xs/domain/User.java
+17
-0
ServiceHGXSUser.java
...java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
+2
-1
HGXSUser.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
+3
-1
HGXSTools.java
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
+15
-1
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+1
-1
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+10
-6
HGWD002.js
src/main/webapp/HG/WD/HGWD002.js
+1
-7
HGWD003.jsp
src/main/webapp/HG/WD/HGWD003.jsp
+1
-1
common.js
src/main/webapp/common/js/common.js
+17
-2
No files found.
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
View file @
89b7313f
...
...
@@ -316,7 +316,7 @@ public class HGKCUtils {
newKc010
.
setWhCode
(
whCode
);
newKc010
.
setInventCode
(
inventCode
);
newKc010
.
setInvQty
(
qty
);
newKc010
.
setInvUnitWeight
(
unitWeight
);
newKc010
.
setInvUnitWeight
(
unitWeight
==
null
?
weight
.
divide
(
qty
,
3
,
RoundingMode
.
HALF_UP
)
:
unitWeight
);
newKc010
.
setInvWeight
(
weight
);
return
newKc010
;
}
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
View file @
89b7313f
...
...
@@ -138,8 +138,7 @@ public class ServiceHGPZ009 extends ServiceBase {
dao
.
insert
(
HGPZ009
.
INSERT
,
fPz009
);
// 默认新增企业管理员账号
String
userId
=
fPz009
.
getLoginPrefix
()
+
"0000"
;
HGXSTools
.
XsUser
.
addUser
(
fPz009
.
getAccountCode
(),
userId
,
fPz009
.
getAccountName
(),
null
,
null
,
null
,
"1"
);
HGXSTools
.
XsUser
.
addUser
(
fPz009
.
getAccountCode
(),
userId
,
fPz009
.
getAccountName
());
// 关联企业管理员角色
this
.
insertGroupMember
(
fPz009
,
userId
);
// 新增组织机构顶级
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD003.java
View file @
89b7313f
...
...
@@ -37,6 +37,7 @@ public class HGWD003 extends DaoEPBase {
public
static
final
String
FIELD_USER_NAME
=
"userName"
;
/* 用户姓名*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_IS_PROJECT_MANAGER
=
"isProjectManager"
;
/* 是否项目经理,0=否,1=是*/
public
static
final
String
FIELD_EXT_ID
=
"extId"
;
/* 外部系统主键ID*/
public
static
final
String
FIELD_ORG_ID
=
"orgId"
;
/* 部门编码*/
public
static
final
String
FIELD_ORG_CNAME
=
"orgCname"
;
/* 部门名称*/
...
...
@@ -55,6 +56,7 @@ public class HGWD003 extends DaoEPBase {
public
static
final
String
COL_USER_NAME
=
"USER_NAME"
;
/* 用户姓名*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
COL_IS_PROJECT_MANAGER
=
"IS_PROJECT_MANAGER"
;
/* 是否项目经理,0=否,1=是*/
public
static
final
String
COL_EXT_ID
=
"EXT_ID"
;
/* 外部系统主键ID*/
public
static
final
String
COL_ORG_ID
=
"ORG_ID"
;
/* 部门编码*/
public
static
final
String
COL_ORG_CNAME
=
"ORG_CNAME"
;
/* 部门名称*/
...
...
@@ -79,6 +81,7 @@ public class HGWD003 extends DaoEPBase {
private
String
userName
=
" "
;
/* 用户姓名*/
private
String
remark
=
" "
;
/* 备注*/
private
Integer
isProjectManager
=
0
;
/* 是否项目经理,0=否,1=是*/
private
String
extId
=
" "
;
/* 外部系统主键ID*/
private
String
orgId
=
" "
;
/* 部门编码*/
private
String
orgCname
=
" "
;
/* 部门名称*/
...
...
@@ -149,6 +152,10 @@ public class HGWD003 extends DaoEPBase {
eiColumn
.
setDescName
(
"是否项目经理"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_EXT_ID
);
eiColumn
.
setDescName
(
"外部系统主键ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ORG_ID
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -392,6 +399,14 @@ public class HGWD003 extends DaoEPBase {
this
.
isProjectManager
=
isProjectManager
;
}
public
String
getExtId
()
{
return
extId
;
}
public
void
setExtId
(
String
extId
)
{
this
.
extId
=
extId
;
}
public
String
getOrgId
()
{
return
orgId
;
}
...
...
@@ -431,6 +446,7 @@ public class HGWD003 extends DaoEPBase {
setUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_NAME
)),
userName
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setIsProjectManager
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_PROJECT_MANAGER
)),
isProjectManager
));
setExtId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_EXT_ID
)),
extId
));
setOrgId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ID
)),
orgId
));
setOrgCname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_CNAME
)),
orgCname
));
}
...
...
@@ -457,6 +473,7 @@ public class HGWD003 extends DaoEPBase {
map
.
put
(
FIELD_USER_NAME
,
StringUtils
.
toString
(
userName
,
eiMetadata
.
getMeta
(
FIELD_USER_NAME
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_IS_PROJECT_MANAGER
,
StringUtils
.
toString
(
isProjectManager
,
eiMetadata
.
getMeta
(
FIELD_IS_PROJECT_MANAGER
)));
map
.
put
(
FIELD_EXT_ID
,
StringUtils
.
toString
(
extId
,
eiMetadata
.
getMeta
(
FIELD_EXT_ID
)));
map
.
put
(
FIELD_ORG_ID
,
StringUtils
.
toString
(
orgId
,
eiMetadata
.
getMeta
(
FIELD_ORG_ID
)));
map
.
put
(
FIELD_ORG_CNAME
,
StringUtils
.
toString
(
orgCname
,
eiMetadata
.
getMeta
(
FIELD_ORG_CNAME
)));
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
View file @
89b7313f
...
...
@@ -19,6 +19,8 @@ import java.util.List;
import
java.util.Map
;
/**
* 文档预览
*
* @author:songx
* @date:2024/5/9,11:04
*/
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
View file @
89b7313f
...
...
@@ -19,6 +19,8 @@ import java.util.List;
import
java.util.Map
;
/**
* 文档下载
*
* @author:songx
* @date:2024/5/9,11:04
*/
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
89b7313f
...
...
@@ -5,8 +5,15 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.*
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.ef.ui.tree.TreeService
;
...
...
@@ -169,17 +176,17 @@ public class ServiceHGWD001D extends TreeService {
}
public
EiInfo
searchNodePath
(
EiInfo
inInfo
)
{
String
leafName
=
(
String
)
inInfo
.
get
(
"leafName"
);
String
leafName
=
(
String
)
inInfo
.
get
(
"leafName"
);
Map
map
=
new
HashMap
();
List
queryNodeList
=
this
.
dao
.
query
(
"XSOG01.queryOrganiation"
,
map
);
List
nodeList
=
new
ArrayList
();
Iterator
var6
=
queryNodeList
.
iterator
();
while
(
var6
.
hasNext
())
{
while
(
var6
.
hasNext
())
{
Object
node
=
var6
.
next
();
String
parentId
=
(
String
)((
HashMap
)
node
).
get
(
"parentOrgId"
);
String
parentId
=
(
String
)
((
HashMap
)
node
).
get
(
"parentOrgId"
);
if
(!
""
.
equals
(
parentId
.
trim
()))
{
((
HashMap
)
node
).
put
(
"parentId"
,
parentId
);
((
HashMap
)
node
).
put
(
"parentId"
,
parentId
);
nodeList
.
add
(
node
);
}
}
...
...
@@ -189,4 +196,112 @@ public class ServiceHGWD001D extends TreeService {
inInfo
.
set
(
"allPath"
,
allPath
);
return
inInfo
;
}
/**
* 树节点查询
*
* @param inInfo
* @return
*/
public
EiInfo
queryTree
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
node
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
NODE
);
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
node
)
||
CommonConstant
.
Field
.
ROOT2
.
equals
(
node
))
{
inInfo
.
addBlock
(
node
).
setRows
(
queryTopNode
(
node
));
}
else
{
inInfo
.
addBlock
(
node
).
setRows
(
queryChildNode
(
node
));
}
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询节点失败"
);
}
return
inInfo
;
}
/**
* 查询树根
*
* @return
*/
public
List
queryTopNode
(
String
parentId
)
{
List
<
Map
>
results
=
new
ArrayList
();
List
<
HGSC001
>
dbSc001s
=
dao
.
query
(
HGSC001
.
QUERY
,
new
HashMap
<>());
if
(
CollectionUtils
.
isEmpty
(
dbSc001s
))
{
return
results
;
}
for
(
HGSC001
dbSc001
:
dbSc001s
)
{
String
text
=
"["
+
dbSc001
.
getProjCode
()
+
"]"
+
dbSc001
.
getProjName
();
Map
leafMap
=
buildLeaf
(
parentId
,
dbSc001
.
getProjCode
(),
text
,
HgWdConstant
.
LeafType
.
P
);
leafMap
.
put
(
"projCode"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"projName"
,
dbSc001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
results
.
add
(
leafMap
);
}
// 设置叶子节点
setTreeNodeLeaf
(
results
);
return
results
;
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public
List
queryChildNode
(
String
parentId
)
{
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
results
;
}
for
(
HGWD001
dbWd001
:
dbWd001s
)
{
Map
leafMap
=
buildLeaf
(
parentId
,
dbWd001
.
getFileId
(),
dbWd001
.
getFileName
(),
HgWdConstant
.
LeafType
.
C
);
leafMap
.
put
(
"projCode"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"projName"
,
dbWd001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"type"
,
dbWd001
.
getFileType
());
leafMap
.
put
(
"leafLevel"
,
dbWd001
.
getLeafLevel
());
results
.
add
(
leafMap
);
}
// 设置叶子节点
setTreeNodeLeaf
(
results
);
return
results
;
}
/**
* 设置叶子节点是否可以展开
*
* @param nodes
*/
private
void
setTreeNodeLeaf
(
List
<
Map
>
nodes
)
{
if
(
CollectionUtils
.
isEmpty
(
nodes
))
{
return
;
}
List
<
String
>
labels
=
ObjectUtils
.
listKey
(
nodes
,
"label"
);
Map
<
String
,
Integer
>
resultMap
=
HGWDTools
.
HgWd001
.
countByParent
(
labels
);
for
(
Map
node
:
nodes
)
{
Integer
cnt
=
resultMap
==
null
?
null
:
resultMap
.
get
(
node
.
get
(
"label"
));
node
.
put
(
"leaf"
,
cnt
==
null
||
cnt
==
0
?
1
:
0
);
}
}
/**
* 构建叶子节点
*
* @param parentId
* @param label
* @param text
*/
private
HashMap
buildLeaf
(
String
parentId
,
String
label
,
String
text
,
String
leafType
)
{
HashMap
<
String
,
String
>
leafMap
=
new
HashMap
();
leafMap
.
put
(
"parentId"
,
parentId
);
leafMap
.
put
(
"label"
,
label
);
leafMap
.
put
(
"text"
,
text
);
leafMap
.
put
(
"leafType"
,
leafType
);
return
leafMap
;
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD003.java
View file @
89b7313f
...
...
@@ -73,69 +73,6 @@ public class ServiceHGWD003 extends ServiceEPBase {
}
/**
* 树节点查询
*
* @param inInfo
* @return
*/
public
EiInfo
queryTree
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
node
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
NODE
);
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
node
)
||
CommonConstant
.
Field
.
ROOT2
.
equals
(
node
))
{
inInfo
.
addBlock
(
node
).
setRows
(
queryTopNode
(
node
));
}
else
{
inInfo
.
addBlock
(
node
).
setRows
(
queryChildNode
(
node
));
}
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询节点失败"
);
}
return
inInfo
;
}
/**
* 查询树根
*
* @return
*/
public
List
queryTopNode
(
String
parentLabel
)
{
List
<
Map
>
results
=
new
ArrayList
();
List
<
HGSC001
>
dbSc001s
=
dao
.
query
(
HGSC001
.
QUERY
,
new
HashMap
<>());
if
(
CollectionUtils
.
isEmpty
(
dbSc001s
))
{
return
results
;
}
for
(
HGSC001
dbSc001
:
dbSc001s
)
{
String
text
=
"["
+
dbSc001
.
getProjCode
()
+
"]"
+
dbSc001
.
getProjName
();
results
.
add
(
buildLeaf
(
parentLabel
,
dbSc001
.
getProjCode
(),
text
,
HgWdConstant
.
LeafType
.
P
));
}
// 设置叶子节点
setTreeNodeLeaf
(
results
);
return
results
;
}
/**
* 查询叶子节点
*
* @param parentLabel
* @return
*/
public
List
queryChildNode
(
String
parentLabel
)
{
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentLabel
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
results
;
}
for
(
HGWD001
dbWd001
:
dbWd001s
)
{
results
.
add
(
buildLeaf
(
parentLabel
,
dbWd001
.
getFileId
(),
dbWd001
.
getFileName
(),
HgWdConstant
.
LeafType
.
C
));
}
// 设置叶子节点
setTreeNodeLeaf
(
results
);
return
results
;
}
/**
* 搜索树节点
*
* @param inInfo
...
...
@@ -247,21 +184,4 @@ public class ServiceHGWD003 extends ServiceEPBase {
return
inInfo
;
}
/**
* 设置叶子节点是否可以展开
*
* @param nodes
*/
private
void
setTreeNodeLeaf
(
List
<
Map
>
nodes
)
{
if
(
CollectionUtils
.
isEmpty
(
nodes
))
{
return
;
}
List
<
String
>
labels
=
ObjectUtils
.
listKey
(
nodes
,
"label"
);
Map
<
String
,
Integer
>
resultMap
=
HGWDTools
.
HgWd001
.
countByParent
(
labels
);
for
(
Map
node
:
nodes
)
{
Integer
cnt
=
resultMap
==
null
?
null
:
resultMap
.
get
(
node
.
get
(
"label"
));
node
.
put
(
"leaf"
,
cnt
==
null
||
cnt
==
0
?
1
:
0
);
}
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD003A.java
View file @
89b7313f
...
...
@@ -51,7 +51,7 @@ public class ServiceHGWD003A extends ServiceEPBase {
}
/**
*
树节点
查询
* 查询
*
* @param inInfo
* @return
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD003.xml
View file @
89b7313f
...
...
@@ -16,7 +16,8 @@
A.FILE_ID as "fileId",
<!-- 文件ID -->
A.USER_ID as "userId",
<!-- 用户ID -->
A.REMARK as "remark",
<!-- 备注 -->
A.IS_PROJECT_MANAGER as "isProjectManager"
<!-- 是否项目经理,0=否,1=是 -->
A.IS_PROJECT_MANAGER as "isProjectManager",
<!-- 是否项目经理,0=否,1=是 -->
A.EXT_ID as "extId"
<!-- 外部系统ID -->
</sql>
<sql
id=
"columnB"
>
...
...
@@ -106,11 +107,12 @@
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
FILE_ID,
<!-- 文件ID -->
USER_ID,
<!-- 文件ID -->
REMARK
<!-- 备注 -->
USER_ID,
<!-- 用户ID -->
REMARK,
<!-- 备注 -->
EXT_ID
<!-- 外部系统ID -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#fileId#, #userId#, #remark#
#fileId#, #userId#, #remark#
, #extId#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD003A.xml
View file @
89b7313f
...
...
@@ -9,7 +9,8 @@
A.GENDER as "gender",
<!-- 性别 -->
A.MOBILE as "mobile",
<!-- 手机号 -->
A.EMAIL as "email",
<!-- 邮箱 -->
A.ACCOUNT_CODE as "accountCode"
<!-- 企业编码 -->
A.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
A.EXT_ID as "extId"
<!-- 外部系统主键ID -->
</sql>
<sql
id=
"columnB"
>
...
...
src/main/java/com/baosight/hggp/hg/xs/domain/User.java
View file @
89b7313f
...
...
@@ -47,6 +47,7 @@ public class User extends DaoEPBase {
public
static
final
String
FIELD_DEP_NAME
=
"depName"
;
/* 部门名称*/
public
static
final
String
FIELD_ID_CODE
=
"idCode"
;
public
static
final
String
FIELD_ID_CARD
=
"idCard"
;
public
static
final
String
FIELD_EXT_ID
=
"extId"
;
public
static
final
String
COL_USER_ID
=
"USER_ID"
;
/* 用户ID*/
public
static
final
String
COL_LOGIN_NAME
=
"LOGIN_NAME"
;
...
...
@@ -101,6 +102,7 @@ public class User extends DaoEPBase {
private
String
depName
=
""
;
/* 部门名称*/
private
String
idCode
=
""
;
private
String
idCard
=
""
;
private
String
extId
=
""
;
/**
* initialize the metadata.
*/
...
...
@@ -207,6 +209,11 @@ public class User extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_ID_CARD
);
eiColumn
.
setDescName
(
"身份证号码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_EXT_ID
);
eiColumn
.
setDescName
(
"外部系统ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -589,6 +596,14 @@ public class User extends DaoEPBase {
this
.
idCard
=
idCard
;
}
public
String
getExtId
()
{
return
extId
;
}
public
void
setExtId
(
String
extId
)
{
this
.
extId
=
extId
;
}
/**
* get the value from Map.
*
...
...
@@ -622,6 +637,7 @@ public class User extends DaoEPBase {
setDepName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_NAME
)),
depName
));
setIdCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID_CODE
)),
idCode
));
setIdCard
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID_CARD
)),
idCard
));
setExtId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_EXT_ID
)),
extId
));
}
/**
...
...
@@ -656,6 +672,7 @@ public class User extends DaoEPBase {
map
.
put
(
FIELD_DEP_NAME
,
StringUtils
.
toString
(
depName
,
eiMetadata
.
getMeta
(
FIELD_DEP_NAME
)));
map
.
put
(
FIELD_ID_CODE
,
StringUtils
.
toString
(
idCode
,
eiMetadata
.
getMeta
(
FIELD_ID_CODE
)));
map
.
put
(
FIELD_ID_CARD
,
StringUtils
.
toString
(
idCard
,
eiMetadata
.
getMeta
(
FIELD_ID_CARD
)));
map
.
put
(
FIELD_EXT_ID
,
StringUtils
.
toString
(
extId
,
eiMetadata
.
getMeta
(
FIELD_EXT_ID
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
View file @
89b7313f
...
...
@@ -304,7 +304,7 @@ public class ServiceHGXSUser extends ServiceBase {
String
isLock
=
HGXSUtils
.
XsUser
.
convertIsLock
(
dcUserList
.
getStatus
());
// 新增用户
HGXSTools
.
XsUser
.
addUser
(
dbPz009
.
getAccountCode
(),
userId
,
dcUser
.
getName
(),
dcUser
.
getSex
(),
dcUser
.
getEmail
(),
dcUser
.
getCardid
(),
isLock
);
dcUser
.
getCardid
(),
isLock
,
dcUserList
.
getOrd
().
toString
()
);
// 新增用户和组织机构关系
Map
addMap
=
new
HashMap
();
addMap
.
put
(
"orgId"
,
dbPz009
.
getLoginPrefix
()
+
dcUser
.
getOrgsid
());
...
...
@@ -329,6 +329,7 @@ public class ServiceHGXSUser extends ServiceBase {
// -1:冻结用户,1:正常
String
isLock
=
HGXSUtils
.
XsUser
.
convertIsLock
(
dcUserList
.
getStatus
());
updateMap
.
put
(
User
.
FIELD_IS_LOCKED
,
isLock
);
updateMap
.
put
(
User
.
FIELD_EXT_ID
,
dcUserList
.
getOrd
());
updateMap
.
put
(
User
.
FIELD_REC_REVISOR
,
"System"
);
updateMap
.
put
(
User
.
FIELD_REC_REVISE_TIME
,
DateUtils
.
shortDateTime
());
dao
.
update
(
HgXsSqlConstant
.
HgXsUser
.
UPDATE_DC_USER
,
updateMap
);
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
View file @
89b7313f
...
...
@@ -9,7 +9,8 @@
GENDER as "gender",
<!-- 性别 -->
MOBILE as "mobile",
<!-- 手机号 -->
EMAIL as "email",
<!-- 邮箱 -->
ACCOUNT_CODE as "accountCode"
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
EXT_ID as extId
<!-- 外部系统主键ID -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -124,6 +125,7 @@
EMAIL = #email#,
ID_CARD = #idCard#,
IS_LOCKED = #isLocked#,
EXT_ID = #extId#,
REC_REVISOR = #recRevisor#,
REC_REVISE_TIME = #recReviseTime#
WHERE LOGIN_NAME = #loginName#
...
...
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
View file @
89b7313f
...
...
@@ -204,13 +204,25 @@ public class HGXSTools {
* @param accountCode
* @param userId
* @param userName
* @throws Exception
*/
public
static
void
addUser
(
String
accountCode
,
String
userId
,
String
userName
)
throws
Exception
{
addUser
(
accountCode
,
userId
,
userName
,
null
,
null
,
null
,
null
,
null
);
}
/**
* 初始化新增用户
*
* @param accountCode
* @param userId
* @param userName
* @param gender
* @param mobile
* @param idCard
* @param isLock
*/
public
static
void
addUser
(
String
accountCode
,
String
userId
,
String
userName
,
String
gender
,
String
mobile
,
String
idCard
,
String
isLock
)
throws
Exception
{
String
idCard
,
String
isLock
,
String
extId
)
throws
Exception
{
Map
inInfoRowMap
=
new
HashMap
();
inInfoRowMap
.
put
(
"userId"
,
userId
);
inInfoRowMap
.
put
(
"loginName"
,
userId
);
...
...
@@ -223,6 +235,8 @@ public class HGXSTools {
inInfoRowMap
.
put
(
"idCard"
,
StringUtils
.
isBlank
(
idCard
)
?
" "
:
idCard
);
inInfoRowMap
.
put
(
"gender"
,
HGXSUtils
.
XsUser
.
convertGender
(
gender
));
inInfoRowMap
.
put
(
"mobile"
,
StringUtils
.
isBlank
(
mobile
)
?
" "
:
mobile
);
inInfoRowMap
.
put
(
"isLock"
,
isLock
);
inInfoRowMap
.
put
(
"extId"
,
extId
);
inInfoRowMap
.
put
(
"accountCode"
,
accountCode
);
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
addBlock
(
"details"
).
addRow
(
inInfoRowMap
);
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
89b7313f
...
...
@@ -918,7 +918,7 @@ function uploadFileCallback(data) {
inEiInfo
.
set
(
"result-0-bizId"
,
data
.
bizId
);
inEiInfo
.
set
(
"result-0-docId"
,
data
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
data
.
docName
);
inEiInfo
.
set
(
"result-0-docType"
,
data
.
docType
);
inEiInfo
.
set
(
"result-0-docType"
,
isBlank
(
data
.
docType
)
?
""
:
data
.
docType
.
substring
(
1
)
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
inEiInfo
.
set
(
"result-0-ndocId"
,
data
.
ndocId
);
let
serviceName
=
data
.
operType
==
"add"
?
"HGWD099"
:
"HGWD001"
;
...
...
src/main/webapp/HG/WD/HGWD001.jsp
View file @
89b7313f
...
...
@@ -31,7 +31,7 @@
<div
id=
"menu"
style=
"margin-top: 12px; margin-bottom: 8px"
>
<EF:EFTree
bindId=
"categoryTree"
ename=
"tree_name"
textField=
"text"
valueField=
"label"
hasChildren=
"leaf"
pid=
"parentId"
serviceName=
"HGWD001D"
methodName=
"query"
>
serviceName=
"HGWD001D"
methodName=
"query
Tree
"
>
</EF:EFTree>
</div>
...
...
@@ -65,16 +65,20 @@
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"附件详情"
fitHeight=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
personal=
"true"
serviceName=
"HGWD099"
queryMethod=
"query"
deleteMethod=
"delete"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
personal=
"true"
serviceName=
"HGWD099"
queryMethod=
"query"
deleteMethod=
"delete"
>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"180"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
<EF:EFColumn
ename=
"docType"
cname=
"文件类型"
enable=
"false"
width=
"110"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"140"
align=
"center
"
/>
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss
"
/>
</EF:EFGrid>
</EF:EFRegion>
</div>
...
...
src/main/webapp/HG/WD/HGWD002.js
View file @
89b7313f
...
...
@@ -268,13 +268,7 @@ let preview = function () {
if
(
res
.
status
>
-
1
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
row
=
rows
[
i
];
let
docType
=
row
[
'docType'
];
if
(
!
isBlank
(
docType
)
&&
docType
.
toLowerCase
()
==
".docx"
)
{
let
url
=
"HGWD098?inqu_status-0-docId="
+
row
[
'docId'
];
window
.
open
(
url
,
'_blank'
);
}
else
{
window
.
open
(
downloadHref
(
rows
[
i
][
'docId'
],
true
),
'_blank'
);
}
previewDoc
(
row
[
'docType'
],
row
[
'docId'
]);
}
}
else
{
message
(
res
.
msg
);
...
...
src/main/webapp/HG/WD/HGWD003.jsp
View file @
89b7313f
...
...
@@ -18,7 +18,7 @@
<div
id=
"menu"
style=
"margin-top: 12px; margin-bottom: 8px"
>
<EF:EFTree
bindId=
"docTree"
ename=
"node"
textField=
"text"
valueField=
"label"
hasChildren=
"leaf"
serviceName=
"HGWD00
3
"
methodName=
"queryTree"
>
serviceName=
"HGWD00
1D
"
methodName=
"queryTree"
>
</EF:EFTree>
</div>
</EF:EFRegion>
...
...
src/main/webapp/common/js/common.js
View file @
89b7313f
...
...
@@ -36,7 +36,7 @@ function isInteger(obj) {
* @returns {boolean}
*/
function
isPositiveInteger
(
input
)
{
var
pattern
=
/^
[
1-9
]\d
*$/
;
// 只能包含非零开头的数字
let
pattern
=
/^
[
1-9
]\d
*$/
;
// 只能包含非零开头的数字
if
(
pattern
.
test
(
input
))
{
return
true
;
}
else
{
...
...
@@ -85,7 +85,7 @@ function message(msg) {
* @param title
* @param msg
*/
function
message2
(
title
,
msg
)
{
function
message2
(
title
,
msg
)
{
WindowUtil
({
title
:
title
,
content
:
"<div class='kendo-del-message'>"
+
msg
+
"</div>"
...
...
@@ -109,6 +109,21 @@ function downloadHref(docId, isPreview) {
}
/**
* 预览
*
* @param 文件类型,例如:jpg/docx/pdf
* @param 文件ID
*/
function
previewDoc
(
fileType
,
docId
)
{
if
(
!
isBlank
(
fileType
)
&&
fileType
.
toLowerCase
()
==
"docx"
)
{
let
url
=
"HGWD098?inqu_status-0-docId="
+
docId
;
window
.
open
(
url
,
'_blank'
);
}
else
{
window
.
open
(
downloadHref
(
docId
,
true
),
'_blank'
);
}
}
/**
* 获取窗口宽度
*
* @returns {number}
...
...
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