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
0717d4f9
Commit
0717d4f9
authored
Jun 26, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-26 设备管理根据角色查询公司
parent
4caab276
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
415 additions
and
320 deletions
+415
-320
HGSB001.java
src/main/java/com/baosight/hggp/hg/sb/domain/HGSB001.java
+1
-0
ServiceHGSB001.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB001.java
+13
-19
ServiceHGSB002.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
+16
-19
ServiceHGSB003.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
+16
-34
ServiceHGSB004.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
+16
-24
ServiceHGSB004B.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB004B.java
+14
-13
ServiceHGSB005.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB005.java
+17
-22
ServiceHGSB006.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
+15
-11
ServiceHGSB007.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB007.java
+14
-13
ServiceHGSB008.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB008.java
+15
-8
HGSB001.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
+4
-2
HGSB002.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB002.xml
+4
-2
HGSB003.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB003.xml
+3
-0
HGSB004.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB004.xml
+3
-0
HGSB005.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB005.xml
+3
-0
HGSB006.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
+16
-10
HGSB007.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
+15
-12
HGSB008.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB008.xml
+3
-0
HGSBTools.java
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
+10
-22
ServiceHGSC009.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
+1
-1
ServiceHGSJ001.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
+15
-5
ServiceHGSJ002.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002.java
+16
-17
ServiceHGSJ003.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
+13
-24
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+3
-0
HGSJ002.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ002.xml
+3
-0
HGSJ003.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
+3
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+5
-0
HGSB001.js
src/main/webapp/HG/SB/HGSB001.js
+11
-4
HGSB001.jsp
src/main/webapp/HG/SB/HGSB001.jsp
+2
-2
HGSB002.js
src/main/webapp/HG/SB/HGSB002.js
+11
-4
HGSB002.jsp
src/main/webapp/HG/SB/HGSB002.jsp
+3
-4
HGSB003.js
src/main/webapp/HG/SB/HGSB003.js
+12
-4
HGSB003.jsp
src/main/webapp/HG/SB/HGSB003.jsp
+2
-2
HGSB004.js
src/main/webapp/HG/SB/HGSB004.js
+12
-4
HGSB004.jsp
src/main/webapp/HG/SB/HGSB004.jsp
+2
-2
HGSB004B.js
src/main/webapp/HG/SB/HGSB004B.js
+8
-0
HGSB004B.jsp
src/main/webapp/HG/SB/HGSB004B.jsp
+2
-2
HGSB005.js
src/main/webapp/HG/SB/HGSB005.js
+12
-4
HGSB005.jsp
src/main/webapp/HG/SB/HGSB005.jsp
+2
-2
HGSB006.js
src/main/webapp/HG/SB/HGSB006.js
+9
-0
HGSB006.jsp
src/main/webapp/HG/SB/HGSB006.jsp
+2
-2
HGSB007.js
src/main/webapp/HG/SB/HGSB007.js
+10
-0
HGSB007.jsp
src/main/webapp/HG/SB/HGSB007.jsp
+2
-2
HGSB008.js
src/main/webapp/HG/SB/HGSB008.js
+13
-0
HGSB008.jsp
src/main/webapp/HG/SB/HGSB008.jsp
+2
-2
HGSJ001.js
src/main/webapp/HG/SJ/HGSJ001.js
+13
-6
HGSJ001.jsp
src/main/webapp/HG/SJ/HGSJ001.jsp
+2
-2
HGSJ002.js
src/main/webapp/HG/SJ/HGSJ002.js
+11
-5
HGSJ002.jsp
src/main/webapp/HG/SJ/HGSJ002.jsp
+2
-2
HGSJ003.js
src/main/webapp/HG/SJ/HGSJ003.js
+11
-5
HGSJ003.jsp
src/main/webapp/HG/SJ/HGSJ003.jsp
+2
-2
No files found.
src/main/java/com/baosight/hggp/hg/sb/domain/HGSB001.java
View file @
0717d4f9
...
...
@@ -44,6 +44,7 @@ public class HGSB001 extends DaoEPBase {
public
static
final
String
FIELD_MAINTAIN_DATE
=
"maintainDate"
;
/* 保养日期*/
public
static
final
String
FIELD_DEVICE_USER_ID
=
"deviceUserId"
;
/* 设备负责人*/
public
static
final
String
FIELD_DEVICE_STATUS
=
"deviceStatus"
;
/* 设备状态 0-停止 1-启用*/
public
static
final
String
FIELD_COMPANY_CODES
=
"companyCodes"
;
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 账套*/
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB001.java
View file @
0717d4f9
...
...
@@ -9,6 +9,7 @@ import com.baosight.hggp.hg.constant.HGConstant;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -36,29 +37,18 @@ public class ServiceHGSB001 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB001
());
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
outInfo
=
super
.
query
(
inInfo
,
HGSB001
.
QUERY
,
new
HGSB001
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
roleCompanyCode
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_FACTORY_CODE
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败!"
);
}
return
outInfo
;
}
...
...
@@ -71,6 +61,10 @@ public class ServiceHGSB001 extends ServiceEPBase {
if
(!
purchaseDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_PURCHASE_DATE
,
StringUtil
.
removeHorizontalLine
(
purchaseDate
));
}
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB001
.
QUERY
,
new
HGSB001
());
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
View file @
0717d4f9
...
...
@@ -9,6 +9,7 @@ import com.baosight.hggp.hg.constant.HGConstant;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002A
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -37,28 +38,18 @@ public class ServiceHGSB002 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB002
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
outInfo
=
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
qarma
.
put
(
HGSB002
.
FIELD_COMPANY_CODE
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
try
{
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
roleCompanyCode
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"companyStr"
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -78,6 +69,12 @@ public class ServiceHGSB002 extends ServiceEPBase {
if
(!
planEndDate
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_END_DATE
,
StringUtil
.
removeHorizontalLine
(
planEndDate
));
}
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
View file @
0717d4f9
...
...
@@ -6,17 +6,16 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB003
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -41,39 +40,17 @@ public class ServiceHGSB003 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB003
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
outInfo
=
super
.
query
(
inInfo
,
HGSB003
.
QUERY
,
new
HGSB003
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
try
{
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
roleCompanyCode
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
qarma
.
clear
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
)){
Org
org
=
orgList
.
get
(
0
);
if
(!
"company"
.
equals
(
org
.
getOrgType
()))
{
//如果不是公司公司,则找到上一级
List
<
Org
>
orgList1
=
HGXSTools
.
XsOrg
.
queryParent
(
org
.
getOrgId
());
for
(
Org
org1:
orgList1
)
{
if
(
"company"
.
equals
(
org1
.
getOrgType
())
&&
!
"root"
.
equals
(
org1
.
getParentOrgId
()))
{
qarma
.
put
(
HGSB003
.
FIELD_COMPANY_CODE
,
org1
.
getOrgId
());
}
}
}
else
{
qarma
.
put
(
HGSB003
.
FIELD_COMPANY_CODE
,
org
.
getOrgId
());
}
}
qarma
.
put
(
HGSB003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
));
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"companyStr"
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -86,6 +63,11 @@ public class ServiceHGSB003 extends ServiceEPBase {
if
(!
applyDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB003
.
FIELD_APPLY_DATE
,
StringUtil
.
removeHorizontalLine
(
applyDate
));
}
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB003
.
QUERY
,
new
HGSB003
());
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
View file @
0717d4f9
...
...
@@ -7,16 +7,15 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB004
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -40,28 +39,16 @@ public class ServiceHGSB004 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB004
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
outInfo
=
super
.
query
(
inInfo
,
HGSB004
.
QUERY
,
new
HGSB004
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
/*Map userCompany = HGSBTools.getUserCompany();
if (!userCompany.isEmpty()) {
qarma.put(Org.FIELD_PARENT_ORG_ID,userCompany.get(HGSB002.FIELD_COMPANY_CODE));
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID),qarma);
qarma.clear();*/
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
try
{
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
roleCompanyCode
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"companyStr"
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -73,6 +60,11 @@ public class ServiceHGSB004 extends ServiceEPBase {
if
(!
planDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_INSPEC_DATE
,
StringUtil
.
removeHorizontalLine
(
planDate
));
}
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB004
.
QUERY
,
new
HGSB004
());
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004B.java
View file @
0717d4f9
...
...
@@ -8,6 +8,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.*
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -36,22 +37,17 @@ public class ServiceHGSB004B extends ServiceEPBase {
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_TASK_STATUS
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
inInfo
=
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
try
{
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
(
);
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
List
<
String
>
orgIds
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
...
...
@@ -63,6 +59,11 @@ public class ServiceHGSB004B extends ServiceEPBase {
if
(!
planDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_DATE
,
StringUtil
.
removeHorizontalLine
(
planDate
));
}
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB005.java
View file @
0717d4f9
...
...
@@ -7,9 +7,11 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB005
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -37,29 +39,17 @@ public class ServiceHGSB005 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB005
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB005
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
outInfo
=
super
.
query
(
inInfo
,
HGSB005
.
QUERY
,
new
HGSB005
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
try
{
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
//角色公司
List
<
String
>
orgIds
=
HGSBTools
.
getRoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
/*CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.USER_BLOCK_ID,DdynamicEnum.GROUP_CODE_BOX_BLOCK_ID),null
);*/
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -71,6 +61,11 @@ public class ServiceHGSB005 extends ServiceEPBase {
if
(!
upkeepDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB005
.
FIELD_UPKEEP_DATE
,
StringUtil
.
removeHorizontalLine
(
upkeepDate
));
}
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB005
.
QUERY
,
new
HGSB005
());
}
...
...
@@ -117,9 +112,9 @@ public class ServiceHGSB005 extends ServiceEPBase {
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGSB005
hgsb005
=
new
HGSB005
();
hgsb005
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgsb005
.
fromMap
(
resultRow
);
if
(
hgsb005
.
getId
()
==
null
||
hgsb005
.
getId
()
==
0
)
{
this
.
add
(
hgsb005
);
}
else
{
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
View file @
0717d4f9
...
...
@@ -3,14 +3,18 @@ package com.baosight.hggp.hg.sb.service;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB004
;
import
com.baosight.hggp.hg.sb.domain.HGSB006
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.LangUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
...
...
@@ -29,17 +33,12 @@ public class ServiceHGSB006 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB006
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB006
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_INIT_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
outInfo
=
super
.
query
(
inInfo
,
HGSB006
.
QUERY
,
new
HGSB006
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
try
{
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
//outInfo.getBlock(EiConstant.queryBlock).removeCol(HGSB004.FIELD_CHECK_STATUS);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -47,6 +46,11 @@ public class ServiceHGSB006 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB006
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_INIT_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB006
.
QUERY
,
new
HGSB006
());
}
}
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB007.java
View file @
0717d4f9
...
...
@@ -3,15 +3,15 @@ package com.baosight.hggp.hg.sb.service;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB004
;
import
com.baosight.hggp.hg.sb.domain.HGSB005
;
import
com.baosight.hggp.hg.sb.domain.HGSB007
;
import
com.baosight.hggp.hg.sb.domain.*
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlockMeta
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -32,16 +32,12 @@ public class ServiceHGSB007 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
new
HGSB007
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB007
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB005
.
FIELD_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
outInfo
=
super
.
query
(
inInfo
,
HGSB007
.
QUERY
,
new
HGSB007
(),
false
,
new
HGSB007
().
eiMetadata
,
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
try
{
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -49,6 +45,11 @@ public class ServiceHGSB007 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB007
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB005
.
FIELD_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB007
.
QUERY
,
new
HGSB007
(),
false
,
new
EiBlockMeta
(),
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
}
}
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB008.java
View file @
0717d4f9
...
...
@@ -4,11 +4,15 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.common.RunStatusEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB008
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
@@ -17,6 +21,7 @@ import org.apache.commons.lang3.StringUtils;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -27,16 +32,13 @@ public class ServiceHGSB008 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB008
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
=
super
.
query
(
inInfo
,
HGSB008
.
QUERY
,
new
HGSB008
());
Map
qarma
=
new
HashMap
();
if
(!
HGSBTools
.
getRoleDataAuth
()){
String
userId
=
"admin"
.
equals
(
UserSessionUtils
.
getUserId
())?
""
:
UserSessionUtils
.
getUserId
();
qarma
.
put
(
User
.
FIELD_USER_ID
,
userId
);
}
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
qarma
);
try
{
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
inInfo
.
setBlock
(
RunStatusEnum
.
generatorEiBlock
());
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
...
...
@@ -47,6 +49,11 @@ public class ServiceHGSB008 extends ServiceEPBase {
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB008
.
FIELD_LOG_DATE
,
DateUtils
.
formatShort
(
logDate
));
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB008
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
//角色公司
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
return
super
.
query
(
inInfo
,
HGSB008
.
QUERY
,
new
HGSB008
());
}
}
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
View file @
0717d4f9
...
...
@@ -155,6 +155,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deviceStatus"
>
DEVICE_STATUS = #deviceStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
@@ -284,8 +287,7 @@
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGSB001 WHERE
ID = #id#
DELETE FROM ${hggpSchema}.HGSB001 WHERE ID = #id#
</delete>
<update
id=
"deleteFlag"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB002.xml
View file @
0717d4f9
...
...
@@ -162,6 +162,9 @@
<isNotEmpty
prepend=
" AND "
property=
"endDate"
>
PLAN_DATE
<
= #endDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
@@ -292,8 +295,7 @@
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGSB002 WHERE
ID = #id#
DELETE FROM ${hggpSchema}.HGSB002 WHERE ID = #id#
</delete>
<update
id=
"deleteFlag"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB003.xml
View file @
0717d4f9
...
...
@@ -144,6 +144,9 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB004.xml
View file @
0717d4f9
...
...
@@ -143,6 +143,9 @@
<isNotEmpty
prepend=
" AND "
property=
"checkStatus"
>
CHECK_STATUS = #checkStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB005.xml
View file @
0717d4f9
...
...
@@ -142,6 +142,9 @@
<isNotEmpty
prepend=
" AND "
property=
"checkStatus"
>
CHECK_STATUS LIKE CONCAT('%', #checkStatus#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
View file @
0717d4f9
...
...
@@ -153,26 +153,29 @@
<isEqual
prepend=
" AND "
property=
"checkStatus"
compareValue=
"2"
>
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"HashMap"
resultClass=
"HGSB006"
>
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
from (
SELECT
<include
refid=
"column001"
/>
SELECT
<include
refid=
"column001"
/>
FROM ${hggpSchema}.HGSB004A A
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
UNION ALL
SELECT
<include
refid=
"column002"
/>
SELECT
<include
refid=
"column002"
/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND B.PLAN_STATUS = '1' and B.TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
@@ -207,8 +210,8 @@
SELECT
<include
refid=
"column001"
/>
FROM ${hggpSchema}.HGSB004A A
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID
WHERE 1=1
<include
refid=
"condition"
/>
UNION ALL
SELECT
<include
refid=
"column002"
/>
...
...
@@ -226,6 +229,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deviceName"
>
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
) A
where 1=1
<isEqual
prepend=
" AND "
property=
"checkStatus"
compareValue=
"1"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
View file @
0717d4f9
...
...
@@ -159,21 +159,21 @@
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"2"
>
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"HashMap"
resultClass=
"HGSB007"
>
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
FROM (
SELECT
<include
refid=
"column001"
/>
SELECT
<include
refid=
"column001"
/>
FROM ${hggpSchema}.HGSB005A A
JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
<include
refid=
"authCondition"
/>
<include
refid=
"condition"
/>
UNION ALL
SELECT
<include
refid=
"column002"
/>
SELECT
<include
refid=
"column002"
/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
...
...
@@ -189,6 +189,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deviceName"
>
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
) A
WHERE 1=1
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"1"
>
...
...
@@ -208,18 +211,15 @@
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT
COUNT(*)
SELECT COUNT(*)
FROM (
SELECT
<include
refid=
"column001"
/>
SELECT
<include
refid=
"column001"
/>
FROM ${hggpSchema}.HGSB005A A
JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
<include
refid=
"authCondition"
/>
<include
refid=
"condition"
/>
UNION ALL
SELECT
<include
refid=
"column002"
/>
SELECT
<include
refid=
"column002"
/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
...
...
@@ -235,6 +235,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deviceName"
>
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
B.COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
) A
WHERE 1=1
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"1"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB008.xml
View file @
0717d4f9
...
...
@@ -115,6 +115,9 @@
<isNotEmpty
prepend=
" AND "
property=
"endDura"
>
END_DURA = #endDura#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"HashMap"
resultClass=
"HGSB008"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
View file @
0717d4f9
...
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.*
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.UserGroup
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -37,10 +38,10 @@ public class HGSBTools {
}
/**
* 查询用户所属公司
* 查询
组织机构
用户所属公司
*/
public
static
Map
<
String
,
Object
>
getUserCompany
(){
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
Map
<
String
,
Object
>
orgMap
=
new
HashMap
<>
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
)){
Org
org
=
orgList
.
get
(
0
);
...
...
@@ -56,28 +57,15 @@ public class HGSBTools {
}
/**
* 查询用户所属公司用户
* 查询用户所属
所属角色所属
公司用户
*/
public
static
List
<
String
>
getOrgId
(){
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
)){
Org
org
=
orgList
.
get
(
0
);
if
(!
org
.
getOrgType
().
equals
(
"company"
))
{
//如果不是公司公司,则找到上一级
Org
org1
=
HGXSTools
.
XsOrg
.
queryCompany
(
org
.
getOrgId
());
orgMap
.
put
(
"orgId"
,
org1
.
getParentOrgId
());
}
else
{
orgMap
.
put
(
"orgId"
,
org
.
getParentOrgId
());
}
}
List
<
HashMap
<
String
,
Object
>>
orgIdChildList
=
DaoBase
.
getInstance
().
query
(
"XSOG01.queryOrgChild"
,
orgMap
);
List
<
String
>
strList
=
new
ArrayList
();
Iterator
var6
=
orgIdChildList
.
iterator
();
public
static
List
<
String
>
getRoleCompanyCode
(){
//角色公司
List
<
Company
>
companyList
=
UserSessionUtils
.
getRoleCompany
();
List
<
String
>
strList
=
new
ArrayList
<>();
while
(
var6
.
hasNext
())
{
HashMap
map
=
(
HashMap
)
var6
.
next
();
strList
.
add
(
map
.
get
(
"ORG_ID"
).
toString
());
for
(
Company
company
:
companyList
)
{
strList
.
add
(
company
.
getCompanyCode
());
}
return
strList
;
}
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
View file @
0717d4f9
...
...
@@ -43,7 +43,7 @@ public class ServiceHGSC009 extends ServiceEPBase {
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
qarma
);
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
get
OrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
get
RoleCompanyCode
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
return
outInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
View file @
0717d4f9
...
...
@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.sb.domain.HGSB001;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -34,21 +35,24 @@ public class ServiceHGSJ001 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ001
.
QUERY
,
new
HGSJ001
());
outInfo
=
super
.
initLoad
(
inInfo
,
EiConstant
.
resultBlock
,
new
HGSJ001
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
));
//COMPANY_RECORD_BOX_BLOCK_ID
//CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID));
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
qarma
.
clear
();
List
orgIds
=
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODE
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
...
...
@@ -56,6 +60,12 @@ public class ServiceHGSJ001 extends ServiceEPBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
Company
>
roleCompany
=
UserSessionUtils
.
getRoleCompany
();
List
<
String
>
companys
=
new
ArrayList
<>();
for
(
Company
company:
roleCompany
)
{
companys
.
add
(
company
.
getCompanyCode
());
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"factoryCodes"
,
companys
);
return
super
.
query
(
inInfo
,
HGSJ001
.
QUERY
);
}
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002.java
View file @
0717d4f9
...
...
@@ -9,13 +9,11 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -25,10 +23,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @author LiuYang
...
...
@@ -38,24 +33,28 @@ public class ServiceHGSJ002 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ002
.
QUERY
,
new
HGSJ002
());
Map
qarma
=
new
HashMap
();
outInfo
=
super
.
initLoad
(
inInfo
,
EiConstant
.
resultBlock
,
new
HGSJ002
());
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
/*if (orgList.size()>0) {
qarma.put(Org.FIELD_ORG_ID,orgList.get(0).getOrgId());
}*/
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODE
,
companyCode
);
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
Company
>
roleCompany
=
UserSessionUtils
.
getRoleCompany
();
List
<
String
>
companys
=
new
ArrayList
<>();
for
(
Company
company:
roleCompany
)
{
companys
.
add
(
company
.
getCompanyCode
());
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"factoryCodes"
,
companys
);
return
super
.
query
(
inInfo
,
HGSJ002
.
QUERY
,
new
HGSJ002
());
}
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
View file @
0717d4f9
...
...
@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.sj.domain.HGSJ002;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -38,41 +39,29 @@ public class ServiceHGSJ003 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ003
.
QUERY
,
new
HGSJ003
());
outInfo
=
super
.
initLoad
(
inInfo
,
EiConstant
.
resultBlock
,
new
HGSJ003
());
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
/*if (orgList.size()>0) {
qarma.put(Org.FIELD_ORG_ID,orgList.get(0).getOrgId());
}*/
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
qarma
);
qarma
.
clear
();
/*if (CollectionUtils.isNotEmpty(orgList)){
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
List<Org> orgList1 = HGXSTools.XsOrg.queryParent(org.getOrgId());
for (Org org1:orgList1) {
if ("company".equals(org1.getOrgType()) && !"root".equals(org1.getParentOrgId())) {
qarma.put(HGSJ002A.FIELD_FACTORY_CODE,org1.getOrgId());
}
}
}else {
qarma.put(HGSJ002A.FIELD_FACTORY_CODE,org.getOrgId());
}
}*/
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
qarma
);
if
(
orgList
.
size
()
>
0
)
{
String
companyCode
=
com
.
baosight
.
hggp
.
util
.
StringUtils
.
isEmpty
(
orgList
.
get
(
0
).
getCompanyCode
())?
orgList
.
get
(
0
).
getOrgId
():
orgList
.
get
(
0
).
getCompanyCode
();
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODE
,
companyCode
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
outInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
Company
>
roleCompany
=
UserSessionUtils
.
getRoleCompany
();
List
<
String
>
companys
=
new
ArrayList
<>();
for
(
Company
company:
roleCompany
)
{
companys
.
add
(
company
.
getCompanyCode
());
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"factoryCodes"
,
companys
);
return
super
.
query
(
inInfo
,
HGSJ003
.
QUERY
,
new
HGSJ003
());
}
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
0717d4f9
...
...
@@ -118,6 +118,9 @@
<isNotEmpty
prepend=
" AND "
property=
"processCodes"
>
PROCESS_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"processCodes"
>
#processCodes[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCodes"
>
FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"computeType"
>
COMPUTE_TYPE = #computeType#
</isNotEmpty>
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ002.xml
View file @
0717d4f9
...
...
@@ -88,6 +88,9 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCodes"
>
FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"authCondition"
>
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
View file @
0717d4f9
...
...
@@ -133,6 +133,9 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCodes"
>
FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"authCondition"
>
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
0717d4f9
...
...
@@ -12,6 +12,11 @@
<!-- 数据权限 -->
<sqlMap
resource=
"com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"
/>
<!--成本-->
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB003.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB004.xml"
/>
<!-- 采购 -->
<sqlMap
resource=
"com/baosight/hggp/hg/cg/sql/HGCG001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cg/sql/HGCG002.xml"
/>
...
...
src/main/webapp/HG/SB/HGSB001.js
View file @
0717d4f9
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -77,9 +77,9 @@ $(function () {
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'
valueField
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
textField
'
]
return
companyCodeBox
[
i
][
'
textField
'
];
if
(
companyCodeBox
[
i
][
'
companyCode
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
companyName
'
]
return
companyCodeBox
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -221,6 +221,13 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
...
...
src/main/webapp/HG/SB/HGSB001.jsp
View file @
0717d4f9
...
...
@@ -21,7 +21,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
...
...
@@ -49,7 +49,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="210" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
...
...
src/main/webapp/HG/SB/HGSB002.js
View file @
0717d4f9
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
...
@@ -93,9 +93,9 @@ $(function () {
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'
valueField
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
textField
'
]
return
companyCodeBox
[
i
][
'
textField
'
];
if
(
companyCodeBox
[
i
][
'
companyCode
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
companyName
'
]
return
companyCodeBox
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -247,6 +247,13 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
...
...
src/main/webapp/HG/SB/HGSB002.jsp
View file @
0717d4f9
...
...
@@ -22,7 +22,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
...
...
@@ -55,7 +55,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
...
...
@@ -88,8 +88,7 @@
<EF:EFComboColumn ename="planStatus" cname="审批状态" width="80" align="center" enable="false" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="150" readonly="true" required="false"
enable="false"/>
...
...
src/main/webapp/HG/SB/HGSB003.js
View file @
0717d4f9
$
(
function
()
{
var
deviceCodeBox
=
__eiInfo
.
getBlock
(
"deviceCodeBox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -68,9 +68,9 @@ $(function () {
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'
valueField
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
textField
'
]
return
companyCodeBox
[
i
][
'
textField
'
];
if
(
companyCodeBox
[
i
][
'
companyCode
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
companyName
'
]
return
companyCodeBox
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -190,6 +190,14 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SB/HGSB003.jsp
View file @
0717d4f9
...
...
@@ -21,7 +21,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="applyDate" cname="申请日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
...
@@ -42,7 +42,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="applyDate" cname="申请日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB004.js
View file @
0717d4f9
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
//var groupCodeBox = __eiInfo.getBlock("groupCodeBox_block_id").getMappedRows();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
...
@@ -83,9 +83,9 @@ $(function () {
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'
valueField
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
textField
'
]
return
companyCodeBox
[
i
][
'
textField
'
];
if
(
companyCodeBox
[
i
][
'
companyCode
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
companyName
'
]
return
companyCodeBox
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -172,6 +172,14 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SB/HGSB004.jsp
View file @
0717d4f9
...
...
@@ -22,7 +22,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="inspecDate" cname="点检日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
...
@@ -43,7 +43,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inspecDate" cname="点检日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB004B.js
View file @
0717d4f9
...
...
@@ -71,6 +71,14 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SB/HGSB004B.jsp
View file @
0717d4f9
...
...
@@ -25,7 +25,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planDate" cname="计划日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
...
@@ -47,7 +47,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
...
...
src/main/webapp/HG/SB/HGSB005.js
View file @
0717d4f9
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
//var groupCodeBox = __eiInfo.getBlock("group_record_block_id").getMappedRows();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
...
@@ -74,9 +74,9 @@ $(function () {
title
:
"公司名称"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'
valueField
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
textField
'
]
return
companyCodeBox
[
i
][
'
textField
'
];
if
(
companyCodeBox
[
i
][
'
companyCode
'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodeBox
[
i
][
'
companyName
'
]
return
companyCodeBox
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -163,6 +163,14 @@ $(function () {
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SB/HGSB005.jsp
View file @
0717d4f9
...
...
@@ -22,7 +22,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="upkeepDate" cname="保养日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
...
@@ -41,7 +41,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="upkeepDate" cname="保养日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB006.js
View file @
0717d4f9
...
...
@@ -116,6 +116,14 @@ $(function () {
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
\ No newline at end of file
src/main/webapp/HG/SB/HGSB006.jsp
View file @
0717d4f9
...
...
@@ -17,7 +17,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="checkStatus" cname="点检状态" colWidth="3" filter="contains">
...
...
@@ -37,7 +37,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="planCode" cname="计划单号" width="100" enable="false" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
...
...
src/main/webapp/HG/SB/HGSB007.js
View file @
0717d4f9
...
...
@@ -173,6 +173,16 @@ $(function () {
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/*
let deepblue = false;
window.onload = () => {
...
...
src/main/webapp/HG/SB/HGSB007.jsp
View file @
0717d4f9
...
...
@@ -18,7 +18,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="upkeepStatus" cname="保养状态" colWidth="3" filter="contains">
...
...
@@ -37,7 +37,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" align="center" readonly="true" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
...
...
src/main/webapp/HG/SB/HGSB008.js
View file @
0717d4f9
...
...
@@ -47,3 +47,15 @@ $(function () {
}
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
\ No newline at end of file
src/main/webapp/HG/SB/HGSB008.jsp
View file @
0717d4f9
...
...
@@ -18,7 +18,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="logDate" cname="日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
...
@@ -39,7 +39,7 @@
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="logDate" cname="日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
...
...
src/main/webapp/HG/SJ/HGSJ001.js
View file @
0717d4f9
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
//company_record_box_block_id
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
//company_record_box_block_id
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -44,16 +44,16 @@ $(function (){
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"
valueField
"
]
==
companyCode
;
return
item
[
"
companyCode
"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'
valueField
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
textField
'
];
return
factoryCodes
[
i
][
'
textField
'
];
if
(
factoryCodes
[
i
][
'
companyCode
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
companyName
'
];
return
factoryCodes
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
'factoryCode'
];
...
...
@@ -159,7 +159,14 @@ $(function (){
}
downKeyUp
();
})
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
...
...
src/main/webapp/HG/SJ/HGSJ001.jsp
View file @
0717d4f9
...
...
@@ -22,7 +22,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="princName" cname="负责人" placeholder="模糊查询" colWidth="3"/>
...
...
@@ -44,7 +44,7 @@
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="processCode" cname="工序编码" enable="false" width="100" align="center"/>
...
...
src/main/webapp/HG/SJ/HGSJ002.js
View file @
0717d4f9
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -52,9 +52,9 @@ $(function (){
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'
valueField
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
textField
'
];
return
factoryCodes
[
i
][
'
textField
'
];
if
(
factoryCodes
[
i
][
'
companyCode
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
companyName
'
];
return
factoryCodes
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
'factoryCode'
];
...
...
@@ -112,7 +112,13 @@ $(function (){
downKeyUp
();
})
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SJ/HGSJ002.jsp
View file @
0717d4f9
...
...
@@ -17,7 +17,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
...
...
@@ -38,7 +38,7 @@
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>
...
...
src/main/webapp/HG/SJ/HGSJ003.js
View file @
0717d4f9
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
factoryCodes
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
var
processCodes
=
__eiInfo
.
getBlock
(
"processCode_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -51,9 +51,9 @@ $(function (){
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'
valueField
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
textField
'
];
return
factoryCodes
[
i
][
'
textField
'
];
if
(
factoryCodes
[
i
][
'
companyCode
'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryCodes
[
i
][
'
companyName
'
];
return
factoryCodes
[
i
][
'
companyName
'
];
}
}
return
dataItem
[
'factoryCode'
];
...
...
@@ -267,7 +267,13 @@ $(function (){
//grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`);
})
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
...
...
src/main/webapp/HG/SJ/HGSJ003.jsp
View file @
0717d4f9
...
...
@@ -17,7 +17,7 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
...
...
@@ -42,7 +42,7 @@
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="
companyBox_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="
roleCompany" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
...
...
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