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
ad8d6013
Commit
ad8d6013
authored
May 07, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.组织机构功能优化
parent
6dfef862
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
165 additions
and
100 deletions
+165
-100
HPConstants.java
src/main/java/com/baosight/hggp/common/HPConstants.java
+1
-1
OrgTypeEnum.java
src/main/java/com/baosight/hggp/core/enums/OrgTypeEnum.java
+1
-1
ValidFlagEnum.java
...main/java/com/baosight/hggp/core/enums/ValidFlagEnum.java
+38
-0
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+2
-0
ServiceHGPZ009.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
+6
-1
HGPZ009.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ009.xml
+3
-0
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+6
-5
Org.java
src/main/java/com/baosight/hggp/hg/xs/domain/Org.java
+9
-9
ServiceHGXSUser.java
...java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
+3
-3
HGXSOrg.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
+13
-40
HGXSTools.java
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
+6
-6
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+2
-2
SqlMapDaoLogProxy.java
...sight/iplat4j/core/data/ibatis/dao/SqlMapDaoLogProxy.java
+2
-2
ServiceXSOG0800.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0800.java
+7
-0
ServiceXSOG0801.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
+5
-10
ServiceXSOG0801A.java
...om/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
+17
-4
XSOG01.xml
src/main/java/com/baosight/xservices/xs/og/sql/XSOG01.xml
+26
-0
XSOG0801.xml
src/main/java/com/baosight/xservices/xs/og/sql/XSOG0801.xml
+2
-2
ServiceXS3001.java
...java/com/baosight/xservices/xs/service/ServiceXS3001.java
+1
-1
ServiceXSOrgManage.java
...com/baosight/xservices/xs/service/ServiceXSOrgManage.java
+1
-1
XS3001.xml
src/main/java/com/baosight/xservices/xs/sql/XS3001.xml
+2
-2
XS3002.xml
src/main/java/com/baosight/xservices/xs/sql/XS3002.xml
+2
-2
iPlatV7-index.js
src/main/resources/META-INF/resources/iPlatV7-index.js
+2
-2
XSOG0801.jsp
src/main/webapp/XS/OG/XSOG0801.jsp
+3
-2
XS3001.jsp
src/main/webapp/XS/XS3001.jsp
+5
-4
No files found.
src/main/java/com/baosight/hggp/common/HPConstants.java
View file @
ad8d6013
...
@@ -10,7 +10,7 @@ public class HPConstants {
...
@@ -10,7 +10,7 @@ public class HPConstants {
public
static
final
String
BLOCK_DETAIL
=
"detail"
;
public
static
final
String
BLOCK_DETAIL
=
"detail"
;
//公司編碼
//公司編碼
public
static
final
String
SQL_FIELD_
COMPANYCODE
=
"company
Code"
;
public
static
final
String
SQL_FIELD_
ACCOUNT_CODE
=
"account
Code"
;
//創建人
//創建人
public
static
final
String
SQL_FIELD_CREATED_BY
=
"createdBy"
;
public
static
final
String
SQL_FIELD_CREATED_BY
=
"createdBy"
;
...
...
src/main/java/com/baosight/hggp/core/enums/OrgTypeEnum.java
View file @
ad8d6013
...
@@ -6,9 +6,9 @@ package com.baosight.hggp.core.enums;
...
@@ -6,9 +6,9 @@ package com.baosight.hggp.core.enums;
*/
*/
public
enum
OrgTypeEnum
{
public
enum
OrgTypeEnum
{
COMPANY
(
"company"
,
"公司"
),
FACTORY
(
"factory"
,
"厂区"
),
FACTORY
(
"factory"
,
"厂区"
),
DEPT
(
"dept"
,
"部门"
),
DEPT
(
"dept"
,
"部门"
),
COMPANY
(
"dept"
,
"公司"
),
PROD_GROUP
(
"prodGroup"
,
"生产组"
),
PROD_GROUP
(
"prodGroup"
,
"生产组"
),
CUT_GROUP
(
"cutGroup"
,
"下料组"
),
CUT_GROUP
(
"cutGroup"
,
"下料组"
),
SYN_GROUP
(
"synGroup"
,
"综合组"
),
SYN_GROUP
(
"synGroup"
,
"综合组"
),
...
...
src/main/java/com/baosight/hggp/core/enums/ValidFlagEnum.java
0 → 100644
View file @
ad8d6013
package
com
.
baosight
.
hggp
.
core
.
enums
;
/**
* @author:songx
* @date:2024/3/1,17:29
*/
public
enum
ValidFlagEnum
{
STOP
(
0
,
"停用"
),
ONLINE
(
1
,
"启用"
),
VIRTUALLY
(
2
,
"虚拟"
),
;
private
Integer
code
;
private
String
name
;
ValidFlagEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
ad8d6013
...
@@ -92,8 +92,10 @@ public class UserSessionUtils extends UserSession {
...
@@ -92,8 +92,10 @@ public class UserSessionUtils extends UserSession {
List
<
String
>
factoryCodes
=
new
ArrayList
<>();
List
<
String
>
factoryCodes
=
new
ArrayList
<>();
for
(
String
orgId
:
orgIds
)
{
for
(
String
orgId
:
orgIds
)
{
Org
org
=
HGXSTools
.
XsOrg
.
queryFactory
(
orgId
);
Org
org
=
HGXSTools
.
XsOrg
.
queryFactory
(
orgId
);
if
(
org
!=
null
)
{
factoryCodes
.
add
(
org
.
getOrgId
());
factoryCodes
.
add
(
org
.
getOrgId
());
}
}
}
return
factoryCodes
;
return
factoryCodes
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ009.java
View file @
ad8d6013
...
@@ -3,11 +3,13 @@ package com.baosight.hggp.hg.pz.service;
...
@@ -3,11 +3,13 @@ package com.baosight.hggp.hg.pz.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.ValidFlagEnum
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ProjectInfo
;
...
@@ -58,6 +60,9 @@ public class ServiceHGPZ009 extends ServiceBase {
...
@@ -58,6 +60,9 @@ public class ServiceHGPZ009 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 排除虚拟企业
queryRow
.
put
(
"exValidFlag"
,
ValidFlagEnum
.
VIRTUALLY
.
getCode
());
inInfo
=
super
.
query
(
inInfo
,
HGPZ009
.
QUERY
,
new
HGPZ009
());
inInfo
=
super
.
query
(
inInfo
,
HGPZ009
.
QUERY
,
new
HGPZ009
());
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
"projectEnv"
,
projectEnv
);
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
"projectEnv"
,
projectEnv
);
...
@@ -238,7 +243,7 @@ public class ServiceHGPZ009 extends ServiceBase {
...
@@ -238,7 +243,7 @@ public class ServiceHGPZ009 extends ServiceBase {
HGPZ009
fPz009
=
new
HGPZ009
();
HGPZ009
fPz009
=
new
HGPZ009
();
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
fPz009
.
fromMap
(
resultRows
.
get
(
i
));
// 校验企业下是否存在用户
// 校验企业下是否存在用户
int
count
=
HGXSTools
.
XsUser
.
countBy
Company
(
fPz009
.
getAccountCode
());
int
count
=
HGXSTools
.
XsUser
.
countBy
Account
(
fPz009
.
getAccountCode
());
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
PlatException
(
String
.
format
(
"企业[%s]已关联用户,请先解除用户"
,
fPz009
.
getAccountName
()));
throw
new
PlatException
(
String
.
format
(
"企业[%s]已关联用户,请先解除用户"
,
fPz009
.
getAccountName
()));
}
}
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ009.xml
View file @
ad8d6013
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
<isNotEmpty
prepend=
" AND "
property=
"validFlag"
>
<isNotEmpty
prepend=
" AND "
property=
"validFlag"
>
VALID_FLAG = #validFlag#
VALID_FLAG = #validFlag#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"exValidFlag"
>
VALID_FLAG != #exValidFlag#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<sql
id=
"customCondition"
>
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
ad8d6013
...
@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.pz.tools;
...
@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.pz.tools;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.enums.ValidFlagEnum
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -30,13 +31,13 @@ public class HGPZTools {
...
@@ -30,13 +31,13 @@ public class HGPZTools {
/**
/**
* 查询企业信息
* 查询企业信息
*
*
* @param
company
Code
* @param
account
Code
* @return
* @return
*/
*/
public
static
HGPZ009
getByCode
(
String
company
Code
)
{
public
static
HGPZ009
getByCode
(
String
account
Code
)
{
AssertUtils
.
isEmpty
(
company
Code
,
"企业编码不能为空"
);
AssertUtils
.
isEmpty
(
account
Code
,
"企业编码不能为空"
);
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"
companyCode"
,
company
Code
);
queryMap
.
put
(
"
accountCode"
,
account
Code
);
List
<
HGPZ009
>
pz009s
=
DaoBase
.
getInstance
().
query
(
HGPZ009
.
QUERY
,
queryMap
);
List
<
HGPZ009
>
pz009s
=
DaoBase
.
getInstance
().
query
(
HGPZ009
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
pz009s
)
?
null
:
pz009s
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
pz009s
)
?
null
:
pz009s
.
get
(
0
);
}
}
...
@@ -52,7 +53,7 @@ public class HGPZTools {
...
@@ -52,7 +53,7 @@ public class HGPZTools {
if
(
pz009
==
null
)
{
if
(
pz009
==
null
)
{
return
false
;
return
false
;
}
}
return
CommonConstant
.
YesNo
.
YES_1
.
equals
(
pz009
.
getValidFlag
());
return
!
ValidFlagEnum
.
STOP
.
getCode
()
.
equals
(
pz009
.
getValidFlag
());
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/xs/domain/Org.java
View file @
ad8d6013
...
@@ -13,7 +13,7 @@ import java.util.Map;
...
@@ -13,7 +13,7 @@ import java.util.Map;
*/
*/
public
class
Org
extends
DaoEPBase
{
public
class
Org
extends
DaoEPBase
{
public
static
final
String
FIELD_
COMPANY_CODE
=
"company
Code"
;
/* 企业编码*/
public
static
final
String
FIELD_
ACCOUNT_CODE
=
"account
Code"
;
/* 企业编码*/
public
static
final
String
FIELD_ORG_ID
=
"orgId"
;
/* 组织机构ID*/
public
static
final
String
FIELD_ORG_ID
=
"orgId"
;
/* 组织机构ID*/
public
static
final
String
FIELD_ORG_ENAME
=
"orgEname"
;
/* 组织机构名称*/
public
static
final
String
FIELD_ORG_ENAME
=
"orgEname"
;
/* 组织机构名称*/
public
static
final
String
FIELD_ORG_CNAME
=
"orgCname"
;
/* 组织机构名称*/
public
static
final
String
FIELD_ORG_CNAME
=
"orgCname"
;
/* 组织机构名称*/
...
@@ -23,7 +23,7 @@ public class Org extends DaoEPBase {
...
@@ -23,7 +23,7 @@ public class Org extends DaoEPBase {
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 手机号*/
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 手机号*/
public
static
final
String
FIELD_LEVEL
=
"level"
;
/* 邮箱*/
public
static
final
String
FIELD_LEVEL
=
"level"
;
/* 邮箱*/
private
String
company
Code
=
""
;
/* 企业编码 */
private
String
account
Code
=
""
;
/* 企业编码 */
private
String
orgId
=
""
;
/* 组织ID */
private
String
orgId
=
""
;
/* 组织ID */
private
String
orgEname
=
""
;
/* 组织英文名 */
private
String
orgEname
=
""
;
/* 组织英文名 */
private
String
orgCname
=
""
;
/* 组织中文名 */
private
String
orgCname
=
""
;
/* 组织中文名 */
...
@@ -39,7 +39,7 @@ public class Org extends DaoEPBase {
...
@@ -39,7 +39,7 @@ public class Org extends DaoEPBase {
public
void
initMetaData
()
{
public
void
initMetaData
()
{
EiColumn
eiColumn
;
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_
COMPANY
_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_
ACCOUNT
_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -84,12 +84,12 @@ public class Org extends DaoEPBase {
...
@@ -84,12 +84,12 @@ public class Org extends DaoEPBase {
initMetaData
();
initMetaData
();
}
}
public
String
get
Company
Code
()
{
public
String
get
Account
Code
()
{
return
company
Code
;
return
account
Code
;
}
}
public
void
set
CompanyCode
(
String
company
Code
)
{
public
void
set
AccountCode
(
String
account
Code
)
{
this
.
companyCode
=
company
Code
;
this
.
accountCode
=
account
Code
;
}
}
public
String
getOrgId
()
{
public
String
getOrgId
()
{
...
@@ -164,7 +164,7 @@ public class Org extends DaoEPBase {
...
@@ -164,7 +164,7 @@ public class Org extends DaoEPBase {
@Override
@Override
public
void
fromMap
(
Map
map
)
{
public
void
fromMap
(
Map
map
)
{
set
CompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
company
Code
));
set
AccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
account
Code
));
setOrgId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ID
)),
orgId
));
setOrgId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ID
)),
orgId
));
setOrgEname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ENAME
)),
orgEname
));
setOrgEname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ENAME
)),
orgEname
));
setOrgCname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_CNAME
)),
orgCname
));
setOrgCname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_CNAME
)),
orgCname
));
...
@@ -182,7 +182,7 @@ public class Org extends DaoEPBase {
...
@@ -182,7 +182,7 @@ public class Org extends DaoEPBase {
public
Map
toMap
()
{
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_
COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY
_CODE
)));
map
.
put
(
FIELD_
ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT
_CODE
)));
map
.
put
(
FIELD_ORG_ID
,
StringUtils
.
toString
(
orgId
,
eiMetadata
.
getMeta
(
FIELD_ORG_ID
)));
map
.
put
(
FIELD_ORG_ID
,
StringUtils
.
toString
(
orgId
,
eiMetadata
.
getMeta
(
FIELD_ORG_ID
)));
map
.
put
(
FIELD_ORG_ENAME
,
StringUtils
.
toString
(
orgEname
,
eiMetadata
.
getMeta
(
FIELD_ORG_ENAME
)));
map
.
put
(
FIELD_ORG_ENAME
,
StringUtils
.
toString
(
orgEname
,
eiMetadata
.
getMeta
(
FIELD_ORG_ENAME
)));
map
.
put
(
FIELD_ORG_CNAME
,
StringUtils
.
toString
(
orgCname
,
eiMetadata
.
getMeta
(
FIELD_ORG_CNAME
)));
map
.
put
(
FIELD_ORG_CNAME
,
StringUtils
.
toString
(
orgCname
,
eiMetadata
.
getMeta
(
FIELD_ORG_CNAME
)));
...
...
src/main/java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
View file @
ad8d6013
...
@@ -67,7 +67,7 @@ public class ServiceHGXSUser extends ServiceBase {
...
@@ -67,7 +67,7 @@ public class ServiceHGXSUser extends ServiceBase {
public
EiInfo
queryComboBox
(
EiInfo
inInfo
)
{
public
EiInfo
queryComboBox
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
"
company
Code"
,
UserSessionUtils
.
getAccountCode
());
queryMap
.
put
(
"
account
Code"
,
UserSessionUtils
.
getAccountCode
());
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
USER_BLOCK_ID
);
list
.
add
(
DdynamicEnum
.
USER_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
);
...
@@ -83,7 +83,7 @@ public class ServiceHGXSUser extends ServiceBase {
...
@@ -83,7 +83,7 @@ public class ServiceHGXSUser extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
query
Company
ComboBox
(
EiInfo
inInfo
)
{
public
EiInfo
query
Account
ComboBox
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
ObjectUtils
.
isNullBlank
(
queryMap
.
get
(
"loginName"
)))
{
if
(
ObjectUtils
.
isNullBlank
(
queryMap
.
get
(
"loginName"
)))
{
...
@@ -91,7 +91,7 @@ public class ServiceHGXSUser extends ServiceBase {
...
@@ -91,7 +91,7 @@ public class ServiceHGXSUser extends ServiceBase {
}
}
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
COMPANY_RECORD_BLOCK_ID
);
list
.
add
(
DdynamicEnum
.
COMPANY_RECORD_BLOCK_ID
);
queryMap
.
put
(
"
company
Code"
,
UserSessionUtils
.
getAccountCode
());
queryMap
.
put
(
"
account
Code"
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryMap
,
false
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询企业失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询企业失败"
);
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
View file @
ad8d6013
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND IS_DELETED = '0'
AND IS_DELETED = '0'
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
COMPANY_CODE = #company
Code#
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgEname"
>
<isNotEmpty
prepend=
" AND "
property=
"orgEname"
>
ORG_ENAME = #orgEname#
ORG_ENAME = #orgEname#
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
(SELECT @CODES:=GROUP_CONCAT(ORG_ID)
(SELECT @CODES:=GROUP_CONCAT(ORG_ID)
FROM ${platSchema}.TXSOG01
FROM ${platSchema}.TXSOG01
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
AND
COMPANY_CODE = #company
Code#
AND
ACCOUNT_CODE = #account
Code#
AND IS_DELETED = 0
AND IS_DELETED = 0
) AS T1,
) AS T1,
@LEVEL:=@LEVEL+1 AS LEVEL
@LEVEL:=@LEVEL+1 AS LEVEL
...
@@ -106,22 +106,22 @@
...
@@ -106,22 +106,22 @@
FROM (
FROM (
SELECT
SELECT
@CODES as CODES,
@CODES as CODES,
(SELECT @CODES:=GROUP_CONCAT(PARENT_ORG_ID) FROM
IPLAT
.TXSOG01 WHERE FIND_IN_SET(ORG_ID, @CODES)
(SELECT @CODES:=GROUP_CONCAT(PARENT_ORG_ID) FROM
${platSchema}
.TXSOG01 WHERE FIND_IN_SET(ORG_ID, @CODES)
AND
COMPANY_CODE = #company
Code#
AND
ACCOUNT_CODE = #account
Code#
AND IS_DELETED = 0
AND IS_DELETED = 0
) as T1,
) as T1,
@LEVEL:=@LEVEL+1 as level
@LEVEL:=@LEVEL+1 as level
FROM
IPLAT
.TXSOG01,
FROM
${platSchema}
.TXSOG01,
(select @CODES:=#orgId#, @LEVEL:= 0) T4
(select @CODES:=#orgId#, @LEVEL:= 0) T4
where @CODES is not null
where @CODES is not null
) T2,
) T2,
IPLAT
.TXSOG01 T3
${platSchema}
.TXSOG01 T3
WHERE 1=1
WHERE 1=1
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE = #orgType#
ORG_TYPE = #orgType#
</isNotEmpty>
</isNotEmpty>
AND
COMPANY_CODE = #company
Code#
AND
ACCOUNT_CODE = #account
Code#
ORDER BY T2.LEVEL, T3.ORG_ID
ORDER BY T2.LEVEL, T3.ORG_ID
</select>
</select>
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
(SELECT @CODES:=GROUP_CONCAT(ORG_ID)
(SELECT @CODES:=GROUP_CONCAT(ORG_ID)
FROM ${platSchema}.TXSOG01
FROM ${platSchema}.TXSOG01
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
AND
COMPANY_CODE = #company
Code#
AND
ACCOUNT_CODE = #account
Code#
AND IS_DELETED = 0
AND IS_DELETED = 0
) AS T1,
) AS T1,
@LEVEL:=@LEVEL+1 AS LEVEL
@LEVEL:=@LEVEL+1 AS LEVEL
...
@@ -187,9 +187,9 @@
...
@@ -187,9 +187,9 @@
<select
id=
"queryAppGroup"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryAppGroup"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select c.ORG_ID as "groupCode",c.ORG_CNAME as "groupName",c.FACTORY_CODE as "factoryCode"
select c.ORG_ID as "groupCode",c.ORG_CNAME as "groupName",c.FACTORY_CODE as "factoryCode"
from
iplat
.txsog02 a
from
${platSchema}
.txsog02 a
join
iplat
.xs_user b on a.USER_ID=b.USER_ID
join
${platSchema}
.xs_user b on a.USER_ID=b.USER_ID
join
iplat
.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
join
${platSchema}
.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1 and c.ORG_TYPE = 'prodGroup'
where 1=1 and c.ORG_TYPE = 'prodGroup'
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
b.USER_ID = #userId#
b.USER_ID = #userId#
...
@@ -197,39 +197,12 @@
...
@@ -197,39 +197,12 @@
</select>
</select>
<!-- 查询组织信息 -->
<!-- 查询组织信息 -->
<select
id=
"queryList"
resultClass=
"com.baosight.hggp.hg.pz.domain.HPPZ011"
>
SELECT
A.ORG_ENAME AS "groupCode",
A.ORG_CNAME AS "groupName",
A.PARENT_ORG_ID AS "factoryCode",
B.ORG_CNAME AS "factoryName"
FROM iplat.TXSOG01 A LEFT JOIN (
SELECT
ORG_ENAME,
ORG_CNAME
FROM iplat.TXSOG01 WHERE COMPANY_CODE=#companyCode#
) B ON A.PARENT_ORG_ID=B.ORG_ENAME
WHERE A.ORG_TYPE = 'prodGroup' AND A.COMPANY_CODE=#companyCode#
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
A.PARENT_ORG_ID=#factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
B.ORG_CNAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupName"
>
A.ORG_CNAME LIKE CONCAT('%', #groupName#, '%')
</isNotEmpty>
</select>
<!-- 查询组织信息 -->
<select
id=
"queryTedcm01"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryTedcm01"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
ITEM_CODE AS "itemCode",
ITEM_CODE AS "itemCode",
ITEM_CNAME AS "itemCname"
ITEM_CNAME AS "itemCname"
FROM
iplat
.TEDCM01
FROM
${platSchema}
.TEDCM01
WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
WHERE CODESET_CODE = 'hpjx.hpjx.poorType'
</select>
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
View file @
ad8d6013
...
@@ -17,7 +17,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -17,7 +17,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
import
org.springframework.util.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -82,12 +83,12 @@ public class HGXSTools {
...
@@ -82,12 +83,12 @@ public class HGXSTools {
/**
/**
* 统计企业下的用户数量
* 统计企业下的用户数量
*
*
* @param
company
Code
* @param
account
Code
* @return
* @return
*/
*/
public
static
int
countBy
Company
(
String
company
Code
)
{
public
static
int
countBy
Account
(
String
account
Code
)
{
Map
paramMap
=
new
HashMap
();
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"
companyCode"
,
company
Code
);
paramMap
.
put
(
"
accountCode"
,
account
Code
);
List
<
Integer
>
results
=
DaoBase
.
getInstance
().
query
(
"HGXSUser.count"
,
paramMap
);
List
<
Integer
>
results
=
DaoBase
.
getInstance
().
query
(
"HGXSUser.count"
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
0
:
results
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
results
)
?
0
:
results
.
get
(
0
);
}
}
...
@@ -211,8 +212,7 @@ public class HGXSTools {
...
@@ -211,8 +212,7 @@ public class HGXSTools {
queryMap
.
put
(
"orgId"
,
orgId
);
queryMap
.
put
(
"orgId"
,
orgId
);
queryMap
.
put
(
"orgType"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
queryMap
.
put
(
"orgType"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
List
<
Org
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_PARENT
,
queryMap
);
List
<
Org
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_PARENT
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
String
.
format
(
"组织[%s]不存在厂区信息"
,
orgId
));
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
return
results
.
get
(
0
);
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
ad8d6013
...
@@ -116,7 +116,7 @@ public class CommonMethod {
...
@@ -116,7 +116,7 @@ public class CommonMethod {
String
time
=
DateUtils
.
curDateTimeStr14
();
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
//TODO 公司代码待补充
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_
COMPANY
CODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_
ACCOUNT_
CODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_BY
,
userId
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_BY
,
userId
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_NAME
,
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_NAME
,
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_TIME
,
time
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_CREATED_TIME
,
time
);
...
@@ -135,7 +135,7 @@ public class CommonMethod {
...
@@ -135,7 +135,7 @@ public class CommonMethod {
String
time
=
DateUtils
.
curDateTimeStr14
();
String
time
=
DateUtils
.
curDateTimeStr14
();
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
for
(
int
i
=
0
;
i
<
block
.
getRowCount
();
i
++){
//TODO 公司代码待补充
//TODO 公司代码待补充
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_
COMPANY
CODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_
ACCOUNT_
CODE
,
""
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_BY
,
userId
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_NAME
,
userName
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_TIME
,
time
);
block
.
setCell
(
i
,
HPConstants
.
SQL_FIELD_UPDATED_TIME
,
time
);
...
...
src/main/java/com/baosight/iplat4j/core/data/ibatis/dao/SqlMapDaoLogProxy.java
View file @
ad8d6013
...
@@ -169,7 +169,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
...
@@ -169,7 +169,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
parameters
=
new
HashMap
();
parameters
=
new
HashMap
();
}
}
// 设置企业信息
// 设置企业信息
this
.
set
Company
Code
(
name
,
parameters
);
this
.
set
Account
Code
(
name
,
parameters
);
// 设置数据查询权限
// 设置数据查询权限
this
.
setDataAuth
(
name
,
parameters
);
this
.
setDataAuth
(
name
,
parameters
);
}
}
...
@@ -180,7 +180,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
...
@@ -180,7 +180,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
* @param name
* @param name
* @param parameters
* @param parameters
*/
*/
private
void
set
Company
Code
(
String
name
,
Object
parameters
)
{
private
void
set
Account
Code
(
String
name
,
Object
parameters
)
{
// 需要过滤部分sql name,否则会形成死循环
// 需要过滤部分sql name,否则会形成死循环
String
[]
serviceFilter
=
{
"HGXSUser"
,
"HPPZ009.query"
};
String
[]
serviceFilter
=
{
"HGXSUser"
,
"HPPZ009.query"
};
if
(
StringUtils
.
startsWithAny
(
name
,
serviceFilter
))
{
if
(
StringUtils
.
startsWithAny
(
name
,
serviceFilter
))
{
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0800.java
View file @
ad8d6013
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlockMeta
;
import
com.baosight.iplat4j.core.ei.EiBlockMeta
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
...
@@ -34,7 +35,13 @@ public class ServiceXSOG0800 extends TreeService {
...
@@ -34,7 +35,13 @@ public class ServiceXSOG0800 extends TreeService {
HashMap
<
String
,
String
>
map
=
new
HashMap
();
HashMap
<
String
,
String
>
map
=
new
HashMap
();
List
<
HashMap
>
list
=
new
ArrayList
();
List
<
HashMap
>
list
=
new
ArrayList
();
map
.
put
(
"label"
,
"root"
);
map
.
put
(
"label"
,
"root"
);
//
String
accountCode
=
UserSessionUtils
.
getAccountCode
();
if
(
StringUtils
.
isEmpty
(
accountCode
))
{
map
.
put
(
"text"
,
"组织机构"
);
map
.
put
(
"text"
,
"组织机构"
);
}
else
{
map
.
put
(
"text"
,
HGPZTools
.
HgPz009
.
getByCode
(
accountCode
).
getAccountName
());
}
map
.
put
(
"leaf"
,
"0"
);
map
.
put
(
"leaf"
,
"0"
);
map
.
put
(
"parent"
,
"0"
);
map
.
put
(
"parent"
,
"0"
);
list
.
add
(
map
);
list
.
add
(
map
);
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
View file @
ad8d6013
...
@@ -310,18 +310,13 @@ public class ServiceXSOG0801 extends ServiceBase {
...
@@ -310,18 +310,13 @@ public class ServiceXSOG0801 extends ServiceBase {
List
<
Map
>
rows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
rows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
rows
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
rows
.
size
();
++
i
)
{
Map
row
=
rows
.
get
(
i
);
Map
row
=
rows
.
get
(
i
);
// 厂区工人不能同时存在多个组
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"userId"
,
row
.
get
(
"userId"
));
queryMap
.
put
(
"userId"
,
row
.
get
(
"userId"
));
// List<HPPZ013> dbPz013s = dao.query(HPPZ013.QUERY, queryMap);
List
<
XSOG02
>
userResults
=
dao
.
query
(
"XSOG02.queryByOrgIdAndUserId"
,
queryMap
);
// if (dbPz013s.size() > 0) {
if
(
userResults
.
size
()
>
0
)
{
// 用户是工人时,只能有一个组织
errorMsg
=
errorMsg
+
"\n添加用户["
+
row
.
get
(
"loginName"
)
+
"]失败,用户已为其他组织机构成员"
;
// List<XSOG02> userResults = dao.query("XSOG02.queryByOrgIdAndUserId", queryMap);
continue
;
// if (userResults.size() > 0) {
}
// errorMsg = errorMsg + "\n添加用户[" + row.get("loginName") + "]失败,选择用户已为其他组织机构成员";
// continue;
// }
// }
row
.
put
(
"recCreator"
,
UserSession
.
getLoginName
());
row
.
put
(
"recCreator"
,
UserSession
.
getLoginName
());
insertList
.
add
(
row
);
insertList
.
add
(
row
);
}
}
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801A.java
View file @
ad8d6013
...
@@ -48,10 +48,23 @@ public class ServiceXSOG0801A extends ServiceEPBase {
...
@@ -48,10 +48,23 @@ public class ServiceXSOG0801A extends ServiceEPBase {
String
parentOrgId
=
MapUtils
.
getString
(
queryMap
,
"parentOrgId"
);
String
parentOrgId
=
MapUtils
.
getString
(
queryMap
,
"parentOrgId"
);
String
condition
;
String
condition
;
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
parentOrgId
))
{
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
parentOrgId
))
{
condition
=
String
.
format
(
" ITEM_CODE = '%s'"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s')"
,
OrgTypeEnum
.
COMPANY
.
getCode
(),
OrgTypeEnum
.
DEPT
.
getCode
());
}
else
{
}
else
{
// 查询组织
Org
org
=
HGXSTools
.
XsOrg
.
get
(
parentOrgId
);
if
(
OrgTypeEnum
.
COMPANY
.
getCode
().
equals
(
org
.
getOrgType
()))
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s')"
,
OrgTypeEnum
.
COMPANY
.
getCode
(),
OrgTypeEnum
.
FACTORY
.
getCode
(),
OrgTypeEnum
.
DEPT
.
getCode
());
}
else
if
(
OrgTypeEnum
.
FACTORY
.
getCode
().
equals
(
org
.
getOrgType
()))
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
());
}
else
if
(
OrgTypeEnum
.
DEPT
.
getCode
().
equals
(
org
.
getOrgType
()))
{
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s', '%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
(),
condition
=
String
.
format
(
" ITEM_CODE IN ('%s', '%s', '%s', '%s')"
,
OrgTypeEnum
.
DEPT
.
getCode
(),
OrgTypeEnum
.
PROD_GROUP
.
getCode
(),
OrgTypeEnum
.
CUT_GROUP
.
getCode
(),
OrgTypeEnum
.
SYN_GROUP
.
getCode
());
OrgTypeEnum
.
PROD_GROUP
.
getCode
(),
OrgTypeEnum
.
CUT_GROUP
.
getCode
(),
OrgTypeEnum
.
SYN_GROUP
.
getCode
());
}
else
{
condition
=
" ITEM_CODE = 'NOT CODE'"
;
}
}
}
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
XsOg
.
ORG_TYPE
,
condition
);
List
<
Map
>
orgTypes
=
CodeValueTools
.
getCodeValues
(
CodesetConstant
.
XsOg
.
ORG_TYPE
,
condition
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
inInfo
.
addBlock
(
"orgTypeBlock"
).
addRows
(
orgTypes
);
...
@@ -120,8 +133,8 @@ public class ServiceXSOG0801A extends ServiceEPBase {
...
@@ -120,8 +133,8 @@ public class ServiceXSOG0801A extends ServiceEPBase {
}
else
{
}
else
{
// 查询所属厂
// 查询所属厂
Org
factoryOrg
=
HGXSTools
.
XsOrg
.
queryFactory
(
queryRow
.
get
(
"parentOrgId"
).
toString
());
Org
factoryOrg
=
HGXSTools
.
XsOrg
.
queryFactory
(
queryRow
.
get
(
"parentOrgId"
).
toString
());
row
.
put
(
"factoryCode"
,
factoryOrg
.
getOrgId
());
row
.
put
(
"factoryCode"
,
factoryOrg
==
null
?
""
:
factoryOrg
.
getOrgId
());
row
.
put
(
"factoryName"
,
factoryOrg
.
getOrgCname
());
row
.
put
(
"factoryName"
,
factoryOrg
==
null
?
""
:
factoryOrg
.
getOrgCname
());
}
}
newRows
.
add
(
row
);
newRows
.
add
(
row
);
}
}
...
...
src/main/java/com/baosight/xservices/xs/og/sql/XSOG01.xml
View file @
ad8d6013
...
@@ -167,6 +167,32 @@
...
@@ -167,6 +167,32 @@
ORDER BY SORT_INDEX ASC
ORDER BY SORT_INDEX ASC
</select>
</select>
<!--条件查询组织机构-->
<select
id=
"count"
parameterClass=
"java.util.HashMap"
resultClass=
"int"
>
SELECT COUNT(1)
FROM ${platSchema}.TXSOG01
WHERE 1=1
AND IS_DELETED = '0'
<isNotEmpty
prepend=
" and UPPER(ORG_ENAME) like "
property=
"orgEname"
>
UPPER ('%$orgEname$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentOrgId"
>
PARENT_ORG_ID = #parentOrgId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgId"
>
ORG_ID = #orgId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgCname"
>
ORG_CNAME like ('%$orgCname$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE like ('%$orgType$%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</select>
<!-- 根据id查询组织机构 -->
<!-- 根据id查询组织机构 -->
<select
id=
"queryByOrgId"
parameterClass=
"java.util.HashMap"
<select
id=
"queryByOrgId"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
resultClass=
"java.util.HashMap"
>
...
...
src/main/java/com/baosight/xservices/xs/og/sql/XSOG0801.xml
View file @
ad8d6013
...
@@ -680,8 +680,8 @@
...
@@ -680,8 +680,8 @@
<isNotEmpty
prepend=
" AND "
property=
"orgCname"
>
<isNotEmpty
prepend=
" AND "
property=
"orgCname"
>
ORG_CNAME LIKE ('%$orgCname$%')
ORG_CNAME LIKE ('%$orgCname$%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
COMPANY_CODE = #company
Code#
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</isNotEmpty>
</select>
</select>
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS3001.java
View file @
ad8d6013
...
@@ -143,7 +143,7 @@ public class ServiceXS3001 extends ServiceEPBase {
...
@@ -143,7 +143,7 @@ public class ServiceXS3001 extends ServiceEPBase {
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
// 非超级管理只能看到所属企业的角色 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
inInfo
.
set
(
"inqu_status-0-
company
Code"
,
UserSessionUtils
.
getAccountCode
());
inInfo
.
set
(
"inqu_status-0-
account
Code"
,
UserSessionUtils
.
getAccountCode
());
}
}
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS3001.queryGroupOutOfUser"
,
new
XS02
());
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"XS3001.queryGroupOutOfUser"
,
new
XS02
());
EiBlock
eiBlock
=
new
EiBlock
(
"result3"
);
EiBlock
eiBlock
=
new
EiBlock
(
"result3"
);
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXSOrgManage.java
View file @
ad8d6013
...
@@ -268,7 +268,7 @@ public class ServiceXSOrgManage extends ServiceEPBase {
...
@@ -268,7 +268,7 @@ public class ServiceXSOrgManage extends ServiceEPBase {
insertMap
.
put
(
"recReviseTime"
,
" "
);
insertMap
.
put
(
"recReviseTime"
,
" "
);
insertMap
.
put
(
"archiveFlag"
,
" "
);
insertMap
.
put
(
"archiveFlag"
,
" "
);
insertMap
.
put
(
"isDeleted"
,
"0"
);
insertMap
.
put
(
"isDeleted"
,
"0"
);
insertMap
.
put
(
"
companyCode"
,
inInfoRowMap
.
get
(
"company
Code"
));
insertMap
.
put
(
"
accountCode"
,
inInfoRowMap
.
get
(
"account
Code"
));
insertMap
.
put
(
"factoryCode"
,
inInfoRowMap
.
get
(
"factoryCode"
));
insertMap
.
put
(
"factoryCode"
,
inInfoRowMap
.
get
(
"factoryCode"
));
insertMap
.
put
(
"factoryName"
,
inInfoRowMap
.
get
(
"factoryName"
));
insertMap
.
put
(
"factoryName"
,
inInfoRowMap
.
get
(
"factoryName"
));
if
(
insertFlag
)
{
if
(
insertFlag
)
{
...
...
src/main/java/com/baosight/xservices/xs/sql/XS3001.xml
View file @
ad8d6013
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
and MEMBER_ID = #currentUserId#
and MEMBER_ID = #currentUserId#
)
)
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"
company
Code"
>
<isNotEmpty
prepend=
"AND"
property=
"
account
Code"
>
COMPANY_CODE = #company
Code#
ACCOUNT_CODE = #account
Code#
</isNotEmpty>
</isNotEmpty>
ORDER BY SORT_INDEX,ID
ORDER BY SORT_INDEX,ID
</select>
</select>
...
...
src/main/java/com/baosight/xservices/xs/sql/XS3002.xml
View file @
ad8d6013
...
@@ -98,8 +98,8 @@
...
@@ -98,8 +98,8 @@
<isNotEmpty
prepend=
" AND "
property=
"userName"
>
<isNotEmpty
prepend=
" AND "
property=
"userName"
>
t1.user_name like ('%$userName$%')
t1.user_name like ('%$userName$%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
company
Code"
>
<isNotEmpty
prepend=
" AND "
property=
"
account
Code"
>
t1.
COMPANY_CODE = #company
Code#
t1.
account_code = #account
Code#
</isNotEmpty>
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
...
...
src/main/resources/META-INF/resources/iPlatV7-index.js
View file @
ad8d6013
...
@@ -2446,8 +2446,8 @@ $(function () {
...
@@ -2446,8 +2446,8 @@ $(function () {
try
{
try
{
if
(
loginName
!==
"admin"
){
if
(
loginName
!==
"admin"
){
var
info
=
new
EiInfo
()
var
info
=
new
EiInfo
()
info
.
set
(
"inqu_status-0-companyCode"
,
loginName
)
info
.
set
(
"inqu_status-0-accountCode"
,
loginName
)
EiCommunicator
.
send
(
"HP
PZ009"
,
"query"
,
info
,
{
EiCommunicator
.
send
(
"HG
PZ009"
,
"query"
,
info
,
{
onSuccess
:
function
(
ei
)
{
//返回结果集
onSuccess
:
function
(
ei
)
{
//返回结果集
if
(
ei
.
blocks
.
result
!==
undefined
){
if
(
ei
.
blocks
.
result
!==
undefined
){
let
results
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
let
results
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
...
...
src/main/webapp/XS/OG/XSOG0801.jsp
View file @
ad8d6013
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.baosight.hggp.core.security.UserSessionUtils" %>
<%@ page import="com.baosight.hggp.core.security.UserSessionUtils" %>
<%@ page import="com.baosight.hggp.hg.pz.tools.HGPZTools" %>
<!DOCTYPE html>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
...
@@ -100,8 +101,8 @@
...
@@ -100,8 +101,8 @@
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String loginPublicKey = LoginConstants.loginRsaPublicKey;
String loginPublicKey = LoginConstants.loginRsaPublicKey;
String cryptoPasswordEnable = LoginConstants.cryptoPasswordEnable;
String cryptoPasswordEnable = LoginConstants.cryptoPasswordEnable;
String
companyCode = UserSessionUtils.getCompany
Code();
String
accountCode = UserSessionUtils.getAccount
Code();
String loginPrefix =
"";//StringUtils.isBlank(companyCode) ? "" : HPPZTools.HpPz009.getByCode(company
Code).getLoginPrefix();
String loginPrefix =
StringUtils.isBlank(accountCode) ? "" : HGPZTools.HgPz009.getByCode(account
Code).getLoginPrefix();
%>
%>
<c:set var="pwdRgx" value="<%=passwordRegex%>"/>
<c:set var="pwdRgx" value="<%=passwordRegex%>"/>
<c:set var="pwdDesc" value="<%=passwordDesc%>"/>
<c:set var="pwdDesc" value="<%=passwordDesc%>"/>
...
...
src/main/webapp/XS/XS3001.jsp
View file @
ad8d6013
...
@@ -52,13 +52,14 @@
...
@@ -52,13 +52,14 @@
<div class="col-xs-9" style="text-align: right" id="inqu_inside"></div>
<div class="col-xs-9" style="text-align: right" id="inqu_inside"></div>
</div>
</div>
<hr>
<hr>
<%-- </EF:EFRegion>--%>
<%-- <EF:EFRegion id="result" title="用户信息" fitHeight="true">--%>
<EF:EFGrid blockId="result" autoDraw="no" personal="true">
<EF:EFGrid blockId="result" autoDraw="no" personal="true">
<%-- <EF:EFGrid blockId="result" autoBind="true" personal="true">--%>
<EF:EFColumn ename="loginName" cname="登录账号" readonly="true" style="text-align:left;"/>
<EF:EFColumn ename="loginName" cname="登录账号" readonly="true" style="text-align:left;"/>
<EF:EFColumn ename="userName" cname="用户姓名" style="text-align:left;"/>
<EF:EFColumn ename="userName" cname="用户姓名" style="text-align:left;"/>
<EF:EFColumn ename="companyCode" cname="企业编码" readonly="true" style="text-align:left;"/>
<EF:EFColumn ename="accountCode" cname="企业编码" readonly="true" style="text-align:left;"/>
<EF:EFComboColumn ename="isManager" cname="是否管理员" valueField="valueField" textField="textField"
columnTemplate="#=textField#" align="center">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="gender" cname="性别" valueField="valueField" textField="textField"
<EF:EFComboColumn ename="gender" cname="性别" valueField="valueField" textField="textField"
columnTemplate="#=textField#" align="center">
columnTemplate="#=textField#" align="center">
<EF:EFCodeOption codeName="xservices.xs.sex"/>
<EF:EFCodeOption codeName="xservices.xs.sex"/>
...
...
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