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
3a408c03
Commit
3a408c03
authored
May 07, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.企业管理
parent
750bcb2f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
851 additions
and
56 deletions
+851
-56
OperationLogAspect.java
...ain/java/com/baosight/hggp/aspect/OperationLogAspect.java
+5
-5
DaoUtils.java
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
+6
-6
OrgTypeEnum.java
src/main/java/com/baosight/hggp/core/enums/OrgTypeEnum.java
+1
-0
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+8
-8
Hgpz009.java
src/main/java/com/baosight/hggp/hg/pz/domain/Hgpz009.java
+0
-0
ServiceHGPZ009.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
+256
-0
HGPZ009.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ009.xml
+120
-0
User.java
src/main/java/com/baosight/hggp/hg/xs/domain/User.java
+6
-6
ServiceHGXSUser.java
...java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
+2
-2
HGXSUser.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
+8
-8
HGXSTools.java
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
+3
-3
ServiceXS3001.java
...java/com/baosight/xservices/xs/service/ServiceXS3001.java
+6
-6
ServiceXS3201.java
...java/com/baosight/xservices/xs/service/ServiceXS3201.java
+1
-1
XS01.xml
src/main/java/com/baosight/xservices/xs/sql/XS01.xml
+11
-11
HGPZ009.js
src/main/webapp/HG/PZ/HGPZ009.js
+302
-0
HGPZ009.jsp
src/main/webapp/HG/PZ/HGPZ009.jsp
+116
-0
No files found.
src/main/java/com/baosight/hggp/aspect/OperationLogAspect.java
View file @
3a408c03
...
...
@@ -68,11 +68,11 @@ public class OperationLogAspect {
OperationLogAnnotation
opLog
=
method
.
getAnnotation
(
OperationLogAnnotation
.
class
);
if
(
opLog
!=
null
)
{
try
{
String
company
Code
;
String
account
Code
;
try
{
companyCode
=
UserSessionUtils
.
getCompany
Code
();
accountCode
=
UserSessionUtils
.
getAccount
Code
();
}
catch
(
Exception
e
)
{
company
Code
=
""
;
account
Code
=
""
;
}
String
userId
=
UserSession
.
getLoginName
();
String
loginName
=
UserSession
.
getLoginCName
();
...
...
@@ -80,7 +80,7 @@ public class OperationLogAspect {
String
operType
=
opLog
.
operType
();
String
operDesc
=
opLog
.
operDesc
();
boolean
saveContet
=
opLog
.
saveContent
();
String
sql
=
"INSERT INTO
${metaSchema}
.SYS_OPERATION_LOG (OPER_MODUL,OPER_TYPE,OPER_DESC,"
+
String
sql
=
"INSERT INTO
HGGP
.SYS_OPERATION_LOG (OPER_MODUL,OPER_TYPE,OPER_DESC,"
+
"OPER_CONTENT,COMPANY_CODE,CREATED_BY,CREATED_NAME,CREATED_TIME)"
+
" VALUES (?,?,?,?,?,?,?,?)"
;
PreparedStatement
ps
=
((
SqlMapDaoLogProxy
)
dao
).
getSqlMapClient
().
getDataSource
().
getConnection
()
...
...
@@ -96,7 +96,7 @@ public class OperationLogAspect {
}
else
{
ps
.
setString
(
4
,
""
);
}
ps
.
setString
(
5
,
company
Code
);
ps
.
setString
(
5
,
account
Code
);
ps
.
setString
(
6
,
userId
);
ps
.
setString
(
7
,
loginName
);
ps
.
setString
(
8
,
DateUtils
.
shortDateTime
());
...
...
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
View file @
3a408c03
...
...
@@ -105,10 +105,10 @@ public class DaoUtils {
log
.
warn
(
"写入创建人姓名失败"
,
e
);
}
// 创建人企业编码
String
companyCode
=
UserSessionUtils
.
getCompany
Code
();
AssertUtils
.
isEmpty
(
company
Code
,
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
String
accountCode
=
UserSessionUtils
.
getAccount
Code
();
AssertUtils
.
isEmpty
(
account
Code
,
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
try
{
BeanUtils
.
setProperty
(
bean
,
"
companyCode"
,
company
Code
);
BeanUtils
.
setProperty
(
bean
,
"
accountCode"
,
account
Code
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
...
...
@@ -159,10 +159,10 @@ public class DaoUtils {
map
.
put
(
"createdName"
,
userName
);
map
.
put
(
"updatedName"
,
""
);
// 创建人企业编码
String
companyCode
=
UserSessionUtils
.
getCompany
Code
();
AssertUtils
.
isEmpty
(
company
Code
,
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
String
accountCode
=
UserSessionUtils
.
getAccount
Code
();
AssertUtils
.
isEmpty
(
account
Code
,
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
try
{
map
.
put
(
"
companyCode"
,
company
Code
);
map
.
put
(
"
accountCode"
,
account
Code
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
...
...
src/main/java/com/baosight/hggp/core/enums/OrgTypeEnum.java
View file @
3a408c03
...
...
@@ -8,6 +8,7 @@ public enum OrgTypeEnum {
FACTORY
(
"factory"
,
"厂区"
),
DEPT
(
"dept"
,
"部门"
),
COMPANY
(
"dept"
,
"公司"
),
PROD_GROUP
(
"prodGroup"
,
"生产组"
),
CUT_GROUP
(
"cutGroup"
,
"下料组"
),
SYN_GROUP
(
"synGroup"
,
"综合组"
),
...
...
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
3a408c03
...
...
@@ -22,7 +22,7 @@ import java.util.concurrent.ConcurrentMap;
*/
public
class
UserSessionUtils
extends
UserSession
{
private
static
ConcurrentMap
companyMap
=
new
ConcurrentHashMap
();
private
static
ConcurrentMap
ACCOUNT_MAP
=
new
ConcurrentHashMap
();
/**
* 获取用户信息
...
...
@@ -52,22 +52,22 @@ public class UserSessionUtils extends UserSession {
}
/**
* 获取登录用户的
公司
编码
* 获取登录用户的
企业
编码
*
* @return
*/
public
static
String
get
Company
Code
()
{
public
static
String
get
Account
Code
()
{
String
loginName
=
getLoginName
();
if
(
loginName
==
null
)
{
return
null
;
}
String
companyCode
=
MapUtils
.
getString
(
companyMap
,
loginName
);
if
(
company
Code
==
null
)
{
String
accountCode
=
MapUtils
.
getString
(
ACCOUNT_MAP
,
loginName
);
if
(
account
Code
==
null
)
{
User
user
=
getUser
();
companyCode
=
user
==
null
||
user
.
getCompanyCode
()
==
null
?
""
:
user
.
getCompany
Code
();
companyMap
.
put
(
loginName
,
company
Code
);
accountCode
=
user
==
null
||
user
.
getAccountCode
()
==
null
?
""
:
user
.
getAccount
Code
();
ACCOUNT_MAP
.
put
(
loginName
,
account
Code
);
}
return
company
Code
;
return
account
Code
;
}
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/domain/Hgpz009.java
0 → 100644
View file @
3a408c03
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
0 → 100644
View file @
3a408c03
package
com
.
baosight
.
hggp
.
hg
.
pz
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.Hgpz009
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 企业管理
*
* @author:songx
* @date:2024/1/15,11:20
*/
public
class
ServiceHGPZ009
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
Hgpz009
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
Hgpz009
.
QUERY
,
new
Hgpz009
());
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
"projectEnv"
,
projectEnv
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"插入"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
Hgpz009
fPz009
=
new
Hgpz009
();
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
if
(
fPz009
.
getId
()
==
null
||
fPz009
.
getId
()
==
0
)
{
this
.
add
(
fPz009
);
}
else
{
this
.
modify
(
fPz009
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
// 数据校验
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
Hgpz009
fPz009
=
new
Hgpz009
();
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isEmpty
(
fPz009
.
getAccountName
(),
"企业名称不能为空"
);
AssertUtils
.
isEmpty
(
fPz009
.
getLoginPrefix
(),
"登录前缀不能为空"
);
AssertUtils
.
isNull
(
fPz009
.
getValidFlag
(),
"是否启用不能为空"
);
}
}
/**
* 新增企业信息
*
* @param fPz009
* @throws Exception
*/
private
void
add
(
Hgpz009
fPz009
)
throws
Exception
{
// 生成企业编码
fPz009
.
setAccountCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
COMPANY_CODE
));
fPz009
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
fPz009
.
setCreatedBy
(
UserSession
.
getLoginName
());
fPz009
.
setCreatedName
(
UserSession
.
getLoginCName
());
fPz009
.
setCreatedTime
(
DateUtils
.
shortDateTime
());
// 此处不能使用DaoUtils方法insert
dao
.
insert
(
Hgpz009
.
INSERT
,
fPz009
);
// 默认新增企业管理员账号
String
userId
=
fPz009
.
getLoginPrefix
()
+
"0000"
;
HGXSTools
.
XsUser
.
addUser
(
fPz009
.
getAccountCode
(),
userId
,
fPz009
.
getAccountName
(),
null
,
null
);
// 关联企业管理员角色
this
.
insertGroupMember
(
fPz009
,
userId
);
}
/**
* 修改数据
*
* @param fPz009
*/
private
void
modify
(
Hgpz009
fPz009
)
{
DaoUtils
.
update
(
Hgpz009
.
UPDATE
,
fPz009
);
}
/**
* 新增操作.
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"配置管理"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 数据写入
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
Hgpz009
fPz009
=
new
Hgpz009
();
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
this
.
add
(
fPz009
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
/**
* 用户关联角色
*
* @param hgpz009
* @param userId
*/
private
void
insertGroupMember
(
Hgpz009
hgpz009
,
String
userId
)
{
Map
inInfoRowMap
=
new
HashMap
();
inInfoRowMap
.
put
(
"memberId"
,
userId
);
inInfoRowMap
.
put
(
"memberName"
,
hgpz009
.
getAccountName
());
// TODO 该用户组固定不能修改,代码中其他地方有写死的地方
inInfoRowMap
.
put
(
"parentId"
,
"companyManage"
);
inInfoRowMap
.
put
(
"parentName"
,
"企业管理员"
);
inInfoRowMap
.
put
(
"memberType"
,
"USER"
);
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
inInfoRowMap
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"XS03"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
outInfo
.
getMsg
());
}
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"修改"
,
operDesc
=
"修改操作"
)
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
Hgpz009
hppz009
=
new
Hgpz009
();
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
Hgpz009
.
UPDATE
,
hppz009
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据修改成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
Hgpz009
fPz009
=
new
Hgpz009
();
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
// 校验企业下是否存在用户
int
count
=
HGXSTools
.
XsUser
.
countByCompany
(
fPz009
.
getAccountCode
());
if
(
count
>
0
)
{
throw
new
PlatException
(
String
.
format
(
"企业[%s]已关联用户,请先解除用户"
,
fPz009
.
getAccountName
()));
}
DaoUtils
.
update
(
Hgpz009
.
DELETE
,
fPz009
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ009.xml
0 → 100644
View file @
3a408c03
<?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=
"HGPZ009"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
ACCOUNT_NAME as "accountName",
<!-- 企业名称 -->
VALID_FLAG as "validFlag",
<!-- 是否启用:1.启用,0.停用 -->
LOGIN_PREFIX as "loginPrefix",
<!-- 登录前缀 -->
DOC_ID_PC as "docIdPc",
DOC_ID_APP as "docIdApp",
REMARK as "remark",
<!-- 备注 -->
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"
<!-- 是否删除:1.是,0.否 -->
</sql>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<isNotEmpty
prepend=
" "
property=
"dataAuthCondition"
>
$dataAuthCondition$
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"validFlag"
>
VALID_FLAG = #validFlag#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"accountName"
>
ACCOUNT_NAME LIKE CONCAT('%', #accountName#, '%')
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME DESC
</isEmpty>
</dynamic>
</sql>
<!-- 查询品种大类配置 -->
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.pz.domain.Hgpz009"
>
SELECT
<include
refid=
"column"
/>
FROM ${metaSchema}.HGPZ009
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"orderBy"
/>
</select>
<!-- 查询记录数 -->
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(1)
FROM ${metaSchema}.HGPZ009
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${metaSchema}.HGPZ009 (
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_NAME,
<!-- 企业名称 -->
VALID_FLAG,
<!-- 是否启用:1.启用,0.停用 -->
LOGIN_PREFIX,
<!-- 登录前缀 -->
DOC_ID_PC,
DOC_ID_APP,
REMARK,
<!-- 备注 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
) VALUES (
#accountCode#, #accountName#, #validFlag#, #loginPrefix#, #docIdPc#,
#docIdApp#, #remark#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<!-- 修改 -->
<update
id=
"update"
>
UPDATE ${metaSchema}.HGPZ009
SET
ACCOUNT_NAME = #accountName#,
DOC_ID_PC = #docIdPc#,
DOC_ID_APP = #docIdApp#,
VALID_FLAG = #validFlag#,
REMARK = #remark#,
<include
refid=
"updateRevise"
/>
WHERE ACCOUNT_CODE = #accountCode#
</update>
<!-- 删除 -->
<update
id=
"delete"
>
UPDATE ${metaSchema}.HGPZ009
SET
DELETE_FLAG = 1,
<include
refid=
"updateRevise"
/>
WHERE ACCOUNT_CODE = #accountCode#
</update>
</sqlMap>
src/main/java/com/baosight/hggp/hg/xs/domain/User.java
View file @
3a408c03
...
...
@@ -14,7 +14,7 @@ public class User implements Serializable {
public
static
final
String
FIELD_GENDER
=
"gender"
;
/* 性别*/
public
static
final
String
FIELD_MOBILE
=
"mobile"
;
/* 手机号*/
public
static
final
String
FIELD_EMAIL
=
"email"
;
/* 邮箱*/
public
static
final
String
FIELD_
COMPANY_CODE
=
"companyCode"
;
/* 企业
代码*/
public
static
final
String
FIELD_
ACCOUNT_CODE
=
"accountCode"
;
/* 帐套
代码*/
/**
* 用户ID
...
...
@@ -49,7 +49,7 @@ public class User implements Serializable {
/**
* 企业代码
*/
private
String
company
Code
;
private
String
account
Code
;
public
String
getUserId
()
{
return
userId
;
...
...
@@ -91,12 +91,12 @@ public class User implements Serializable {
this
.
email
=
email
;
}
public
String
get
Company
Code
()
{
return
company
Code
;
public
String
get
Account
Code
()
{
return
account
Code
;
}
public
void
set
CompanyCode
(
String
company
Code
)
{
this
.
companyCode
=
company
Code
;
public
void
set
AccountCode
(
String
account
Code
)
{
this
.
accountCode
=
account
Code
;
}
public
String
getGender
()
{
...
...
src/main/java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
View file @
3a408c03
...
...
@@ -67,7 +67,7 @@ public class ServiceHGXSUser extends ServiceBase {
public
EiInfo
queryComboBox
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
"companyCode"
,
UserSessionUtils
.
get
Company
Code
());
queryMap
.
put
(
"companyCode"
,
UserSessionUtils
.
get
Account
Code
());
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
USER_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
);
...
...
@@ -91,7 +91,7 @@ public class ServiceHGXSUser extends ServiceBase {
}
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
COMPANY_RECORD_BLOCK_ID
);
queryMap
.
put
(
"companyCode"
,
UserSessionUtils
.
get
Company
Code
());
queryMap
.
put
(
"companyCode"
,
UserSessionUtils
.
get
Account
Code
());
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
,
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询企业失败"
);
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
View file @
3a408c03
...
...
@@ -15,8 +15,8 @@
<isNotEmpty
prepend=
" AND "
property=
"userIds"
>
USER_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"userIds"
>
#userIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</sql>
...
...
@@ -29,7 +29,7 @@
GENDER as "gender",
<!-- 性别 -->
MOBILE as "mobile",
<!-- 手机号 -->
EMAIL as "email",
<!-- 邮箱 -->
COMPANY_CODE as "company
Code"
<!-- 企业编码 -->
ACCOUNT_CODE as "account
Code"
<!-- 企业编码 -->
FROM ${platSchema}.XS_USER
WHERE 1=1
<include
refid=
"condition"
/>
...
...
@@ -47,13 +47,13 @@
</select>
<!-- 查询用户企业 -->
<select
id=
"query
Company
ComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"query
Account
ComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
A.
COMPANY_CODE as "company
Code",
<!-- 企业编码 -->
B.
COMPANY_NAME as "company
Name"
<!-- 企业名称 -->
FROM ${platSchema}.XS_USER A, ${metaSchema}.
T_HP
PZ009 B
A.
ACCOUNT_CODE as "account
Code",
<!-- 企业编码 -->
B.
ACCOUNT_NAME as "account
Name"
<!-- 企业名称 -->
FROM ${platSchema}.XS_USER A, ${metaSchema}.
HG
PZ009 B
WHERE 1=1
AND A.
COMPANY_CODE = B.COMPANY
_CODE
AND A.
ACCOUNT_CODE = B.ACCOUNT
_CODE
AND A.LOGIN_NAME = #loginName#
</select>
...
...
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
View file @
3a408c03
...
...
@@ -234,12 +234,12 @@ public class HGXSTools {
* @return
*/
public
static
Map
<
String
,
List
<
Org
>>
queryAllFactoryMap
()
{
String
companyCode
=
UserSessionUtils
.
getCompany
Code
();
if
(
StringUtils
.
isBlank
(
company
Code
))
{
String
accountCode
=
UserSessionUtils
.
getAccount
Code
();
if
(
StringUtils
.
isBlank
(
account
Code
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"
companyCode"
,
company
Code
);
queryMap
.
put
(
"
accountCode"
,
account
Code
);
List
<
Org
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_ALL
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS3001.java
View file @
3a408c03
...
...
@@ -43,7 +43,7 @@ public class ServiceXS3001 extends ServiceEPBase {
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-15
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS01.query"
,
new
XS01
());
return
outInfo
;
...
...
@@ -143,7 +143,7 @@ public class ServiceXS3001 extends ServiceEPBase {
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-companyCode"
,
UserSessionUtils
.
get
Company
Code
());
inInfo
.
set
(
"inqu_status-0-companyCode"
,
UserSessionUtils
.
get
Account
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS3001.queryGroupOutOfUser"
,
new
XS02
());
EiBlock
eiBlock
=
new
EiBlock
(
"result3"
);
...
...
@@ -172,7 +172,7 @@ public class ServiceXS3001 extends ServiceEPBase {
}
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS01.queryUserParentGroups"
,
new
XS02
());
EiBlock
eiBlock
=
new
EiBlock
(
"result1"
);
...
...
@@ -201,7 +201,7 @@ public class ServiceXS3001 extends ServiceEPBase {
inInfo
.
set
(
"inqu_status-0-userName"
,
authCopyUserName
);
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
resultInfo
=
super
.
query
(
inInfo
,
"XS03.queryForMemberUsers"
,
new
XS01
());
EiBlock
resultBBlock
=
new
EiBlock
(
"result4"
);
...
...
@@ -293,7 +293,7 @@ public class ServiceXS3001 extends ServiceEPBase {
}
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS01.query"
,
new
XS01
());
EiBlock
eiBlock
=
new
EiBlock
(
"result8"
);
...
...
@@ -360,7 +360,7 @@ public class ServiceXS3001 extends ServiceEPBase {
}
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS01.query"
,
new
XS01
());
EiBlock
eiBlock
=
new
EiBlock
(
"result9"
);
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS3201.java
View file @
3a408c03
...
...
@@ -199,7 +199,7 @@ public class ServiceXS3201 extends ServiceEPBase {
}
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
companyCode"
,
UserSessionUtils
.
getCompany
Code
());
inInfo
.
set
(
"inqu_status-0-
accountCode"
,
UserSessionUtils
.
getAccount
Code
());
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS3002.queryUserOutOfUserGroup"
,
new
XS01
());
EiBlock
eiBlock
=
new
EiBlock
(
"result6"
);
...
...
src/main/java/com/baosight/xservices/xs/sql/XS01.xml
View file @
3a408c03
...
...
@@ -25,7 +25,7 @@
PWD_REVISOR,
ARCHIVE_FLAG,
USER_GROUP_ENAME,
COMPANY
_CODE
ACCOUNT
_CODE
) VALUES (
#userId#,
#loginName#,
...
...
@@ -48,7 +48,7 @@
#pwdRevisor#,
#archiveFlag#,
#userGroupEname#,
#
company
Code#
#
account
Code#
)
</insert>
<select
id=
"query"
resultClass=
"java.util.HashMap"
>
...
...
@@ -73,7 +73,7 @@
t1.pwd_revisor as "pwdRevisor",
t1.archive_flag as "archiveFlag",
t1.USER_GROUP_ENAME as "userGroupEname",
t1.
COMPANY_CODE as "company
Code",
t1.
ACCOUNT_CODE as "account
Code",
t2.group_cname as "userGroupCname"
FROM ${platSchema}.XS_USER t1
left join ${platSchema}.XS_USER_GROUP t2 on t2.group_ename=t1.USER_GROUP_ENAME
...
...
@@ -99,8 +99,8 @@
<isNotEmpty
prepend=
" AND "
property=
"isLocked"
>
t1.is_locked = #isLocked#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
t1.
company_code = #company
Code#
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
t1.
account_code = #account
Code#
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
...
...
@@ -254,8 +254,8 @@
SELECT DISTINCT PARENT_ID from ${platSchema}.XS_USER_GROUP_MEMBER
where MEMBER_TYPE = 'USER' and MEMBER_ID = #userIdForParentGroups#
)
<isNotEmpty
prepend=
"AND"
property=
"
company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
"AND"
property=
"
account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</select>
...
...
@@ -266,8 +266,8 @@
SELECT DISTINCT PARENT_ID from ${platSchema}.XS_USER_GROUP_MEMBER
where MEMBER_TYPE = 'USER' and MEMBER_ID = #userIdForParentGroups#
)
<isNotEmpty
prepend=
"AND"
property=
"
company
Code"
>
COMPANY_CODE = #company
Code#
<isNotEmpty
prepend=
"AND"
property=
"
account
Code"
>
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</select>
...
...
@@ -332,7 +332,7 @@
JOB_ID,
JOB_NAME,
EHR_ORG_ID,
COMPANY
_CODE
ACCOUNT
_CODE
) VALUES (
#userId#,
#loginName#,
...
...
@@ -358,7 +358,7 @@
#jobId#,
#jobName#,
#ehrOrgId#,
#
company
Code#
#
account
Code#
)
</insert>
...
...
src/main/webapp/HG/PZ/HGPZ009.js
0 → 100644
View file @
3a408c03
$
(
function
()
{
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
// EFGrid: {
// height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
// }
});
IPLATUI
.
EFGrid
.
result
=
{
copyToAdd
:
false
,
pageable
:
{
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[{
field
:
"docIdPc"
,
title
:
"PC端log"
,
template
:
function
(
item
)
{
let
docId
=
item
.
docIdPc
;
let
template
=
''
;
if
(
docId
!=
null
&&
docId
.
trim
().
length
>
0
)
{
let
src
=
downloadHref
(
docId
);
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+
'href="'
+
src
+
'" target="_blank"><img src="'
+
src
+
'" style="width:200px;height:50px;background-image: none;" alt="PC端log"/></a>'
;
}
return
template
;
}
},
{
field
:
"docIdApp"
,
title
:
"APP端log"
,
template
:
function
(
item
)
{
let
docId
=
item
.
docIdApp
;
let
template
=
''
;
if
(
docId
!=
null
&&
docId
.
trim
().
length
>
0
)
{
let
src
=
downloadHref
(
docId
);
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+
'href="'
+
src
+
'" target="_blank"><img src="'
+
src
+
'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>'
;
}
return
template
;
}
}],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
)
{
query
();
}
},
onAdd
:
function
(
e
)
{
e
.
preventDefault
();
$
(
"#type"
).
val
(
"insert"
)
$
(
"#accountName"
).
val
(
""
);
$
(
"#loginPrefix"
).
val
(
""
);
$
(
"#loginPrefix"
).
removeAttr
(
"readonly"
);
$
(
"#validFlag"
).
val
(
1
);
$
(
"#PCfileDocId"
).
val
(
""
);
$
(
"#APPfileDocId"
).
val
(
""
);
$
(
"#remark"
).
val
(
""
);
$
(
"#id"
).
val
(
""
);
$
(
"#accountCode"
).
val
(
""
);
$
(
"#insertGroup_wnd_title"
).
text
(
"新增企业管理"
);
clealImgLabel
(
$
(
"#app-img"
));
clealImgLabel
(
$
(
"#pc-img"
));
addCompany
(
$
(
"#insertGroup"
));
},
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
updateCompany
();
},
onDelete
:
function
(
e
)
{
// 阻止后台删除请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
/**
*
* @param e
* e.sender kendoGridresultGrid
* e.model kendo.data.Model
* e.row
* e.tr tr, jquery
*/
onRowClick
:
function
(
e
)
{
/*WindowUtil({
"title": "",
"content": "<div class='kendo-del-message'>" + e.row + "</div>"
})*/
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 保存
//$("#BTN_SAVE").on("click", save);
// 删除
$
(
"#BTN_DELETE"
).
on
(
"click"
,
deleteFunc
);
IPLATUI
.
EFUpload
=
{
docIdApp
:
{
showFileList
:
false
,
validation
:
{
allowedExtensions
:
[
".jpg"
,
".png"
,
".gif"
],
//
maxFileSize
:
900000
,
minFileSize
:
300
},
// 不支持格式提示信息
localization
:
{
invalidFileExtension
:
"文件格式不支持, 上传失败"
},
loadComplete
:
function
(
e
)
{
var
uploader
=
e
.
sender
.
uploader
;
uploader
.
clearAllFiles
();
// 清空所有历史上传文件
},
success
:
function
(
e
)
{
let
docId
=
e
.
response
.
docId
;
if
(
isBlank
(
docId
))
{
return
;
}
$
(
"#APPfileDocId"
).
val
(
docId
);
addImgLabel
(
$
(
"#app-img"
),
docId
);
//$("#app-img").attr("src",downloadHref(docId));
NotificationUtil
(
"附件上传成功"
);
},
},
docIdPc
:
{
showFileList
:
false
,
validation
:
{
allowedExtensions
:
[
".jpg"
,
".png"
,
".gif"
],
//
maxFileSize
:
900000
,
minFileSize
:
300
},
// 不支持格式提示信息
localization
:
{
invalidFileExtension
:
"文件格式不支持, 上传失败"
},
loadComplete
:
function
(
e
)
{
var
uploader
=
e
.
sender
.
uploader
;
uploader
.
clearAllFiles
();
// 清空所有历史上传文件
},
success
:
function
(
e
)
{
let
docId
=
e
.
response
.
docId
;
if
(
isBlank
(
docId
))
{
return
;
}
$
(
"#PCfileDocId"
).
val
(
docId
);
addImgLabel
(
$
(
"#pc-img"
),
docId
);
/*$("#pc-img").attr("src",downloadHref(docId));*/
NotificationUtil
(
"附件上传成功"
);
},
}
};
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
};
let
save
=
function
(){
var
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
var
ei
=
new
EiInfo
();
let
type
=
$
(
"#type"
).
val
();
if
(
type
===
"update"
)
{
ei
.
set
(
"result-0-accountCode"
,
$
(
"#accountCode"
).
val
());
}
ei
.
set
(
"result-0-accountName"
,
$
(
"#accountName"
).
val
());
ei
.
set
(
"result-0-loginPrefix"
,
$
(
"#loginPrefix"
).
val
());
ei
.
set
(
"result-0-validFlag"
,
$
(
"#validFlag"
).
val
());
ei
.
set
(
"result-0-docIdPc"
,
$
(
"#PCfileDocId"
).
val
());
ei
.
set
(
"result-0-docIdApp"
,
$
(
"#APPfileDocId"
).
val
());
ei
.
set
(
"result-0-remark"
,
$
(
"#remark"
).
val
());
ei
.
set
(
"result-0-id"
,
$
(
"#id"
).
val
());
// 调用请求 onSuccess 成功回掉函数
EiCommunicator
.
send
(
"HGPZ009"
,
"save"
,
ei
,
{
onSuccess
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
$
(
"#insertGroup"
).
data
(
"kendoWindow"
).
close
();
// 清除上传队列
resultGrid
.
dataSource
.
page
(
1
);
// onFail 表示失败回掉函数
},
onFail
:
function
(
ei
)
{
// 发生异常
btnNode
.
attr
(
"disabled"
,
false
);
NotificationUtil
(
ei
);
}
});
};
/**
* 删除
*/
let
deleteFunc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGPZ009"
,
"delete"
,
true
);
}
});
}
/**
* 点击添加
*
* @param id
*/
function
addCompany
(
id
)
{
$
(
".k-upload-status-total"
).
remove
();
id
.
data
(
"kendoWindow"
).
open
().
center
();
}
function
updateCompany
()
{
//获取grid选中数据
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
app
=
$
(
"#app-img"
),
pc
=
$
(
"#pc-img"
);
$
(
"#type"
).
val
(
"update"
);
$
(
"#accountCode"
).
val
(
rows
[
0
][
"accountCode"
]);
$
(
"#accountName"
).
val
(
rows
[
0
][
"accountName"
]);
$
(
"#loginPrefix"
).
val
(
rows
[
0
][
"loginPrefix"
]);
$
(
"#loginPrefix"
).
attr
(
"readonly"
,
"true"
);
$
(
"#validFlag"
).
val
(
rows
[
0
][
"validFlag"
]);
$
(
"#PCfileDocId"
).
val
(
rows
[
0
][
"docIdPc"
]);
$
(
"#APPfileDocId"
).
val
(
rows
[
0
][
"docIdApp"
]);
$
(
"#remark"
).
val
(
rows
[
0
][
"remark"
]);
$
(
"#id"
).
val
(
rows
[
0
][
"id"
]);
addImgLabel
(
app
,
rows
[
0
][
"docIdApp"
]);
addImgLabel
(
pc
,
rows
[
0
][
"docIdPc"
]);
$
(
"#insertGroup_wnd_title"
).
text
(
"修改企业管理"
);
addCompany
(
$
(
"#insertGroup"
));
}
$
(
"#update"
).
click
(
function
()
{
var
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
// 创建 EiInfo
var
ei
=
new
EiInfo
();
ei
.
setByNodeObject
(
document
.
body
);
// 获取 数据
// 调用请求 onSuccess 成功回掉函数
EiCommunicator
.
send
(
"HGPZ009"
,
"update"
,
ei
,
{
onSuccess
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
resultGrid
.
dataSource
.
page
(
1
);
// onFail 表示失败回掉函数
},
onFail
:
function
(
ei
)
{
// 发生异常
btnNode
.
attr
(
"disabled"
,
false
);
NotificationUtil
(
ei
);
}
});
});
/**
* 附件上传回调
*
* @param e
*/
function
addCompanyCallback
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
}
function
addImgLabel
(
id
,
docId
)
{
clealImgLabel
(
id
);
if
(
isBlank
(
docId
)){
return
;
}
let
src
=
downloadHref
(
docId
)
let
img
=
`<img src="
${
src
}
" style='width:200px;height:55px;background-image: none;'/>`
;
id
.
html
(
img
);
}
function
clealImgLabel
(
id
)
{
id
.
html
(
""
);
}
src/main/webapp/HG/PZ/HGPZ009.jsp
0 → 100644
View file @
3a408c03
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"企业管理"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
cname=
"企业编码:"
ename=
"accountCode"
blockId=
"inqu_status"
row=
"0"
/>
<EF:EFInput
cname=
"企业名称:"
ename=
"accountName"
blockId=
"inqu_status"
row=
"0"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"single"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"企业编码"
ename=
"accountCode"
enable=
"false"
width=
"120"
height=
"50"
align=
"center"
/>
<EF:EFColumn
cname=
"企业名称"
ename=
"accountName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFColumn
cname=
"登录前缀"
ename=
"loginPrefix"
width=
"80"
align=
"center"
readonly=
"true"
/>
<EF:EFColumn
cname=
"PC端log"
ename=
"docIdPc"
align=
"center"
width=
"200"
readonly=
"true"
enable=
"false"
/>
<EF:EFColumn
cname=
"APP端log"
ename=
"docIdApp"
align=
"center"
width=
"200"
readonly=
"true"
enable=
"false"
/>
<EF:EFComboColumn
cname=
"是否启用"
ename=
"validFlag"
width=
"90"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hppz.validFlag"
/>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"备注"
ename=
"remark"
width=
"150"
editType=
"textarea"
/>
<EF:EFColumn
cname=
"创建人"
ename=
"createdName"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
<EF:EFColumn
cname=
"修改人"
ename=
"updatedName"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
cname=
"修改时间"
ename=
"updatedTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
</EF:EFGrid>
<br/>
<span
style=
'color: red;font-size: 13px;'
>
说明:新增企业时会同步新增企业管理员账户,账号和密码与企业编码相同
</span>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow
id=
"insertGroup"
title=
"企业管理"
top=
"100px"
left=
"280px"
width=
"40%"
height=
"70%"
>
<form>
<div
class=
"row"
>
<label
for=
"accountName"
class=
"col-sm-2 col-form-label col-form-label-sm"
>
企业名称
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"accountName"
placeholder=
"企业名称"
aria-label=
"企业名称"
required=
"required"
>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"loginPrefix"
class=
"col-sm-2 col-form-label col-form-label-sm"
>
登录前缀
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"loginPrefix"
placeholder=
"登录前缀"
aria-label=
"登录前缀"
>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"validFlag"
class=
"col-sm-2 col-form-label col-form-label-sm"
>
是否启用
</label>
<div
class=
"col-sm-6"
>
<select
class=
"form-control"
id=
"validFlag"
>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"docIdPc"
class=
"col-sm-2 col-form-label"
>
PC端log
</label>
<div
class=
"col-sm-6"
>
<EF:EFUpload
ename=
"docIdPc"
cname=
"PC上传"
docTag=
"hk_filePc"
path=
"A"
/>
<div
class=
"side-header"
id=
"pc-img"
style=
"background-color: whitesmoke"
>
<img
src=
"${ctx}/hpjx-logo.png"
style=
"width:200px;height:55px;background-image: none;"
alt=
"pc端log"
/>
</div>
</div>
<input
type=
"hidden"
id=
"PCfileDocId"
value=
""
>
</div>
<div
class=
"form-group row"
>
<label
for=
"docIdApp"
class=
"col-sm-2 col-form-label"
>
APP端log
</label>
<div
class=
"col-sm-6"
>
<EF:EFUpload
ename=
"docIdApp"
cname=
"APP上传"
docTag=
"hk_fileApp"
path=
"A"
/>
<div
class=
"side-header"
id=
"app-img"
style=
"background-color: whitesmoke"
>
<img
src=
"${ctx}/hpjx-logo.png"
style=
"width:200px;height:55px;background-image: none;"
alt=
"app端log"
/>
</div>
</div>
<input
type=
"hidden"
id=
"APPfileDocId"
value=
""
>
</div>
<div
class=
"form-group row"
>
<label
for=
"remark"
class=
"col-sm-2 col-form-label col-form-label-sm"
>
备注
</label>
<div
class=
"col-sm-6"
>
<textarea
id=
"remark"
class=
"form-control"
placeholder=
"备注"
aria-label=
"备注"
></textarea>
</div>
</div>
<input
type=
"hidden"
id=
"type"
value=
"insert"
>
<input
type=
"hidden"
id=
"id"
value=
""
>
<input
type=
"hidden"
id=
"accountCode"
value=
""
>
<div
class=
"form-group col-md-6 col-sm-6 col-sm-offset-9"
>
<button
type=
"button"
onclick=
"save()"
class=
"btn btn-primary"
>
确认
</button>
</div>
</form>
</EF:EFWindow>
<EF:EFWindow
id=
"updateGroup"
top=
"100px"
left=
"280px"
width=
"58%"
height=
"80%"
>
<EF:EFRegion
id=
"updateResult"
>
<EF:EFInput
ename=
"accountName"
colWidth=
"6"
cname=
"企业名称"
/>
<EF:EFInput
ename=
"loginPrefix"
colWidth=
"6"
cname=
"登录前缀"
/>
<EF:EFSelect
ename=
"validFlag"
cname=
"是否启动"
template=
"#=valueField#-#=textField#"
valueTemplate=
"#=valueField#-#=textField#"
required=
"true"
defaultValue=
"China"
>
<
%
--enable=
"false"
:
不可下拉
--
%
>
<EF:EFOptions
blockId=
"made_country_block_id"
textField=
"country_ch_name"
valueField=
"country"
/>
</EF:EFSelect>
<EF:EFUpload
ename=
"uploadFilePc"
cname=
"PC上传"
docTag=
"hk_filePc"
path=
"A"
/>
<EF:EFUpload
ename=
"uploadFileApp"
cname=
"APP上传"
docTag=
"hk_fileApp"
path=
"A"
/>
<EF:EFInput
ename=
"remark"
colWidth=
"6"
cname=
"备注"
/>
<EF:EFInput
ename=
"PCfileDocId"
cname=
""
hidden=
"true"
/>
<EF:EFInput
ename=
"APPfileDocId"
cname=
""
hidden=
"true"
/>
<EF:EFButton
ename=
"update"
cname=
"确认"
layout=
"1"
class=
"k-button"
/>
</EF:EFRegion>
</EF:EFWindow>
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