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
b5fbc749
Commit
b5fbc749
authored
Jun 20, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
0702b624
43e668a3
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
3579 additions
and
95 deletions
+3579
-95
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+1
-1
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+23
-1
HGBI001.java
src/main/java/com/baosight/hggp/hg/bi/domain/HGBI001.java
+467
-0
ServiceHGBI001.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI001.java
+589
-0
ServiceHGBI002.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
+853
-0
ServiceHGBI003.java
.../java/com/baosight/hggp/hg/bi/service/ServiceHGBI003.java
+579
-0
HGBI001.xml
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI001.xml
+783
-0
HGBI003.xml
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI003.xml
+36
-0
ServiceHGSB001.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB001.java
+6
-2
ServiceHGSB002.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
+7
-2
ServiceHGSB003.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
+6
-2
ServiceHGSB004.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
+5
-1
ServiceHGSB004B.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB004B.java
+2
-2
ServiceHGSB005.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB005.java
+2
-2
ServiceHGSB006.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
+1
-1
ServiceHGSB007.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB007.java
+1
-1
HGSB001.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
+2
-2
ServiceHGSJ001.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
+6
-1
ServiceHGSJ002.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002.java
+8
-2
ServiceHGSJ003.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
+11
-5
HGXSOrg.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
+3
-2
HGSB001.js
src/main/webapp/HG/SB/HGSB001.js
+26
-4
HGSB001.jsp
src/main/webapp/HG/SB/HGSB001.jsp
+6
-5
HGSB002.js
src/main/webapp/HG/SB/HGSB002.js
+22
-12
HGSB002.jsp
src/main/webapp/HG/SB/HGSB002.jsp
+4
-3
HGSB002A.js
src/main/webapp/HG/SB/HGSB002A.js
+2
-2
HGSB002A.jsp
src/main/webapp/HG/SB/HGSB002A.jsp
+2
-2
HGSB003.js
src/main/webapp/HG/SB/HGSB003.js
+10
-1
HGSB003.jsp
src/main/webapp/HG/SB/HGSB003.jsp
+3
-2
HGSB004.js
src/main/webapp/HG/SB/HGSB004.js
+10
-1
HGSB004.jsp
src/main/webapp/HG/SB/HGSB004.jsp
+3
-2
HGSB004B.js
src/main/webapp/HG/SB/HGSB004B.js
+2
-2
HGSB004B.jsp
src/main/webapp/HG/SB/HGSB004B.jsp
+3
-3
HGSB005.js
src/main/webapp/HG/SB/HGSB005.js
+1
-1
HGSB005.jsp
src/main/webapp/HG/SB/HGSB005.jsp
+2
-2
HGSB006.jsp
src/main/webapp/HG/SB/HGSB006.jsp
+2
-2
HGSB007.jsp
src/main/webapp/HG/SB/HGSB007.jsp
+2
-2
HGSJ001.js
src/main/webapp/HG/SJ/HGSJ001.js
+27
-1
HGSJ001.jsp
src/main/webapp/HG/SJ/HGSJ001.jsp
+8
-7
HGSJ002.js
src/main/webapp/HG/SJ/HGSJ002.js
+19
-1
HGSJ002.jsp
src/main/webapp/HG/SJ/HGSJ002.jsp
+5
-4
HGSJ002A.jsp
src/main/webapp/HG/SJ/HGSJ002A.jsp
+1
-1
HGSJ003.js
src/main/webapp/HG/SJ/HGSJ003.js
+22
-3
HGSJ003.jsp
src/main/webapp/HG/SJ/HGSJ003.jsp
+6
-5
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
b5fbc749
...
@@ -205,7 +205,7 @@ public enum DdynamicEnum {
...
@@ -205,7 +205,7 @@ public enum DdynamicEnum {
* 用途:组管理下拉框
* 用途:组管理下拉框
* 编写:songx
* 编写:songx
*/
*/
GROUP_RECORD_BLOCK_ID
(
"group_record_block_id"
,
"orgId"
,
"orgCname"
,
"HGXSOrg.queryGroupComboBox"
),
GROUP_RECORD_BLOCK_ID
(
"group_record_block_id"
,
"orgId"
,
"orgCname"
,
"
companyCode"
,
"companyName"
,
"
HGXSOrg.queryGroupComboBox"
),
/**
/**
* 模块:组管理
* 模块:组管理
...
...
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
b5fbc749
package
com
.
baosight
.
hggp
.
core
.
security
;
package
com
.
baosight
.
hggp
.
core
.
security
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Dept
;
import
com.baosight.hggp.hg.xs.domain.Dept
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
...
@@ -75,7 +76,28 @@ public class UserSessionUtils extends UserSession {
...
@@ -75,7 +76,28 @@ public class UserSessionUtils extends UserSession {
}
}
return
accountCode
;
return
accountCode
;
}
}
/**
获取用户所属公司 *
* @return
*/
public
static
UserVO
getUserCompany
()
{
UserVO
userVO
=
new
UserVO
();
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
());
userVO
.
setUsercode
(
org1
.
getOrgId
());
userVO
.
setUsername
(
org1
.
getOrgCname
());
}
else
{
userVO
.
setUsercode
(
org
.
getOrgId
());
userVO
.
setUsername
(
org
.
getOrgCname
());
}
}
return
userVO
;
}
/**
/**
* 获取登录用户的组织机构
* 获取登录用户的组织机构
*
*
...
...
src/main/java/com/baosight/hggp/hg/bi/domain/HGBI001.java
0 → 100644
View file @
b5fbc749
package
com
.
baosight
.
hggp
.
hg
.
bi
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Project: <br>
* Title:THPBI001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 13:46:10 create
*/
public
class
HGBI001
extends
DaoEPBase
{
private
static
final
long
serialVersionUoctValue
=
1L
;
public
static
final
String
INDNAME
=
"indNmae"
;
/* 企业编码 预留*/
public
static
final
String
DAYVALUE
=
"dayValue"
;
/* 部门编码*/
public
static
final
String
MONVALUE
=
"monValue"
;
/* 供应商类型 1 国企 : 2 民营*/
public
static
final
String
YEARVALUE
=
"yearValue"
;
/* 供应商编码*/
public
static
final
String
JANVALUE
=
"janValue"
;
/* 供应商名称*/
public
static
final
String
FEBVALUE
=
"febValue"
;
/* 地址*/
public
static
final
String
MARVLAUE
=
"marValue"
;
/* 状态 0禁用 1启用*/
public
static
final
String
APRVALUE
=
"aprValue"
;
/* 创建人*/
public
static
final
String
MAYVALUE
=
"mayValue"
;
/* 创建人名称*/
public
static
final
String
JUNVALUE
=
"junValue"
;
/* 创建时间*/
public
static
final
String
JULVALUE
=
"julValue"
;
/* 更新人*/
public
static
final
String
AUGVALUE
=
"augValue"
;
/* 更新人名称*/
public
static
final
String
SEPVALUE
=
"sepValue"
;
/* 更新时间*/
public
static
final
String
OCTVALUE
=
"octValue"
;
public
static
final
String
NOVVALUE
=
"novValue"
;
/* 企业编码 预留*/
public
static
final
String
DECVALUE
=
"decValue"
;
/* 部门编码*/
public
static
final
String
COL_febValue
=
"febValue"
;
/* 地址*/
public
static
final
String
COL_marValue
=
"marValue"
;
/* 状态 0禁用 1启用*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 更新人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
QUERY
=
"HPBI001.query"
;
public
static
final
String
COUNT
=
"HPBI001.count"
;
public
static
final
String
INSERT
=
"HPBI001.insert"
;
public
static
final
String
UPDATE
=
"HPBI001.update"
;
public
static
final
String
DELETE
=
"HPBI001.delete"
;
private
String
indNmae
=
" "
;
/* 企业编码 预留*/
private
String
dayValue
=
" "
;
/* 部门编码*/
private
String
monValue
=
" "
;
/* 供应商类型 1 国企 : 2 民营*/
private
String
yearValue
=
" "
;
/* 供应商编码*/
private
String
janValue
=
" "
;
/* 供应商名称*/
private
String
febValue
=
" "
;
/* 地址*/
private
String
marValue
=
" "
;
/* 状态 0禁用 1启用*/
private
String
aprValue
=
" "
;
/* 创建人*/
private
String
mayValue
=
" "
;
/* 创建人名称*/
private
String
junValue
=
" "
;
/* 创建时间*/
private
String
julValue
=
" "
;
/* 更新人*/
private
String
augValue
=
" "
;
/* 更新人名称*/
private
String
sepValue
=
" "
;
/* 更新时间*/
private
String
octValue
=
" "
;
private
String
novValue
=
" "
;
private
String
decValue
=
" "
;
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
INDNAME
);
eiColumn
.
setDescName
(
"指标名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
DAYVALUE
);
eiColumn
.
setDescName
(
"日"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
MONVALUE
);
eiColumn
.
setDescName
(
"月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
YEARVALUE
);
eiColumn
.
setDescName
(
"年"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
JANVALUE
);
eiColumn
.
setDescName
(
"1月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FEBVALUE
);
eiColumn
.
setDescName
(
"2月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
MARVLAUE
);
eiColumn
.
setDescName
(
"3月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
APRVALUE
);
eiColumn
.
setDescName
(
"4月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
MAYVALUE
);
eiColumn
.
setDescName
(
"5月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
JUNVALUE
);
eiColumn
.
setDescName
(
"6月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
JULVALUE
);
eiColumn
.
setDescName
(
"7月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
AUGVALUE
);
eiColumn
.
setDescName
(
"8月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
SEPVALUE
);
eiColumn
.
setDescName
(
"9月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
OCTVALUE
);
eiColumn
.
setDescName
(
"10月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
NOVVALUE
);
eiColumn
.
setDescName
(
"11月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
DECVALUE
);
eiColumn
.
setDescName
(
"12月"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HGBI001
()
{
initMetaData
();
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getindNmae
()
{
return
this
.
indNmae
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setindNmae
(
String
companyCode
)
{
this
.
indNmae
=
companyCode
;
}
/**
* get the dayValue - 部门编码.
* @return the dayValue
*/
public
String
getdayValue
()
{
return
this
.
dayValue
;
}
/**
* set the dayValue - 部门编码.
*
* @param dayValue - 部门编码
*/
public
void
setdayValue
(
String
dayValue
)
{
this
.
dayValue
=
dayValue
;
}
/**
* get the monValue - 供应商类型 1 国企 : 2 民营.
* @return the monValue
*/
public
String
getmonValue
()
{
return
this
.
monValue
;
}
/**
* set the monValue - 供应商类型 1 国企 : 2 民营.
*
* @param monValue - 供应商类型 1 国企 : 2 民营
*/
public
void
setmonValue
(
String
monValue
)
{
this
.
monValue
=
monValue
;
}
/**
* get the yearValue - 供应商编码.
* @return the yearValue
*/
public
String
getyearValue
()
{
return
this
.
yearValue
;
}
/**
* set the yearValue - 供应商编码.
*
* @param yearValue - 供应商编码
*/
public
void
setyearValue
(
String
yearValue
)
{
this
.
yearValue
=
yearValue
;
}
/**
* get the janValue - 供应商名称.
* @return the janValue
*/
public
String
getjanValue
()
{
return
this
.
janValue
;
}
/**
* set the janValue - 供应商名称.
*
* @param janValue - 供应商名称
*/
public
void
setjanValue
(
String
janValue
)
{
this
.
janValue
=
janValue
;
}
/**
* get the febValue - 地址.
* @return the febValue
*/
public
String
getfebValue
()
{
return
this
.
febValue
;
}
/**
* set the febValue - 地址.
*
* @param febValue - 地址
*/
public
void
setfebValue
(
String
febValue
)
{
this
.
febValue
=
febValue
;
}
/**
* get the marValue - 状态 0禁用 1启用.
* @return the marValue
*/
public
String
getmarValue
()
{
return
this
.
marValue
;
}
/**
* set the marValue - 状态 0禁用 1启用.
*
* @param marValue - 状态 0禁用 1启用
*/
public
void
setmarValue
(
String
marValue
)
{
this
.
marValue
=
marValue
;
}
/**
* get the aprValue - 创建人.
* @return the aprValue
*/
public
String
getaprValue
()
{
return
this
.
aprValue
;
}
/**
* set the aprValue - 创建人.
*
* @param aprValue - 创建人
*/
public
void
setaprValue
(
String
aprValue
)
{
this
.
aprValue
=
aprValue
;
}
/**
* get the mayValue - 创建人名称.
* @return the mayValue
*/
public
String
getmayValue
()
{
return
this
.
mayValue
;
}
/**
* set the mayValue - 创建人名称.
*
* @param mayValue - 创建人名称
*/
public
void
setmayValue
(
String
mayValue
)
{
this
.
mayValue
=
mayValue
;
}
/**
* get the junValue - 创建时间.
* @return the junValue
*/
public
String
getjunValue
()
{
return
this
.
junValue
;
}
/**
* set the junValue - 创建时间.
*
* @param junValue - 创建时间
*/
public
void
setjunValue
(
String
junValue
)
{
this
.
junValue
=
junValue
;
}
/**
* get the julValue - 更新人.
* @return the julValue
*/
public
String
getjulValue
()
{
return
this
.
julValue
;
}
/**
* set the julValue - 更新人.
*
* @param julValue - 更新人
*/
public
void
setjulValue
(
String
julValue
)
{
this
.
julValue
=
julValue
;
}
/**
* get the augValue - 更新人名称.
* @return the augValue
*/
public
String
getaugValue
()
{
return
this
.
augValue
;
}
/**
* set the augValue - 更新人名称.
*
* @param augValue - 更新人名称
*/
public
void
setaugValue
(
String
augValue
)
{
this
.
augValue
=
augValue
;
}
/**
* get the sepValue - 更新时间.
* @return the sepValue
*/
public
String
getsepValue
()
{
return
this
.
sepValue
;
}
/**
* set the sepValue - 更新时间.
*
* @param sepValue - 更新时间
*/
public
void
setsepValue
(
String
sepValue
)
{
this
.
sepValue
=
sepValue
;
}
/**
* get the octValue .
* @return the octValue
*/
public
String
getoctValue
()
{
return
this
.
octValue
;
}
/**
* set the octValue .
*
* @param octValue
*/
public
void
setoctValue
(
String
octValue
)
{
this
.
octValue
=
octValue
;
}
/**
* get the novValue .
* @return the novValue
*/
public
String
getnovValue
()
{
return
this
.
novValue
;
}
/**
* set the octValue .
*
* @param novValue
*/
public
void
setnovValue
(
String
novValue
)
{
this
.
novValue
=
novValue
;
}
/**
* get the decValue .
* @return the decValue
*/
public
String
getdecValue
()
{
return
this
.
decValue
;
}
/**
* set the octValue .
*
* @param decValue
*/
public
void
setdecValue
(
String
decValue
)
{
this
.
decValue
=
decValue
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setindNmae
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
INDNAME
)),
indNmae
));
setdayValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
DAYVALUE
)),
dayValue
));
setmonValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
MONVALUE
)),
monValue
));
setyearValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
YEARVALUE
)),
yearValue
));
setjanValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
JANVALUE
)),
janValue
));
setfebValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FEBVALUE
)),
febValue
));
setmarValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
MARVLAUE
)),
marValue
));
setaprValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
APRVALUE
)),
aprValue
));
setmayValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
MAYVALUE
)),
mayValue
));
setjunValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
JUNVALUE
)),
junValue
));
setjulValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
JULVALUE
)),
julValue
));
setaugValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
AUGVALUE
)),
augValue
));
setsepValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
SEPVALUE
)),
sepValue
));
setoctValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
OCTVALUE
)),
octValue
));
setnovValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
NOVVALUE
)),
novValue
));
setdecValue
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
DECVALUE
)),
decValue
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
INDNAME
,
StringUtils
.
toString
(
indNmae
,
eiMetadata
.
getMeta
(
INDNAME
)));
map
.
put
(
DAYVALUE
,
StringUtils
.
toString
(
dayValue
,
eiMetadata
.
getMeta
(
DAYVALUE
)));
map
.
put
(
MONVALUE
,
StringUtils
.
toString
(
monValue
,
eiMetadata
.
getMeta
(
MONVALUE
)));
map
.
put
(
YEARVALUE
,
StringUtils
.
toString
(
yearValue
,
eiMetadata
.
getMeta
(
YEARVALUE
)));
map
.
put
(
JANVALUE
,
StringUtils
.
toString
(
janValue
,
eiMetadata
.
getMeta
(
JANVALUE
)));
map
.
put
(
FEBVALUE
,
StringUtils
.
toString
(
febValue
,
eiMetadata
.
getMeta
(
FEBVALUE
)));
map
.
put
(
MARVLAUE
,
StringUtils
.
toString
(
marValue
,
eiMetadata
.
getMeta
(
MARVLAUE
)));
map
.
put
(
APRVALUE
,
StringUtils
.
toString
(
aprValue
,
eiMetadata
.
getMeta
(
APRVALUE
)));
map
.
put
(
MAYVALUE
,
StringUtils
.
toString
(
mayValue
,
eiMetadata
.
getMeta
(
MAYVALUE
)));
map
.
put
(
JUNVALUE
,
StringUtils
.
toString
(
junValue
,
eiMetadata
.
getMeta
(
JUNVALUE
)));
map
.
put
(
JULVALUE
,
StringUtils
.
toString
(
julValue
,
eiMetadata
.
getMeta
(
JULVALUE
)));
map
.
put
(
AUGVALUE
,
StringUtils
.
toString
(
augValue
,
eiMetadata
.
getMeta
(
AUGVALUE
)));
map
.
put
(
SEPVALUE
,
StringUtils
.
toString
(
sepValue
,
eiMetadata
.
getMeta
(
SEPVALUE
)));
map
.
put
(
OCTVALUE
,
StringUtils
.
toString
(
octValue
,
eiMetadata
.
getMeta
(
OCTVALUE
)));
map
.
put
(
NOVVALUE
,
StringUtils
.
toString
(
novValue
,
eiMetadata
.
getMeta
(
NOVVALUE
)));
map
.
put
(
DECVALUE
,
StringUtils
.
toString
(
decValue
,
eiMetadata
.
getMeta
(
DECVALUE
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI001.java
0 → 100644
View file @
b5fbc749
package
com
.
baosight
.
hggp
.
hg
.
bi
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baosight.eplat.be.dz.constants.BEDZConstants
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeEnum
;
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.bi.domain.HGBI001
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.MapUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
static
com
.
baosight
.
eplat
.
be
.
dz
.
service
.
ServiceBEDZ04
.
PARAMS_KEY_STR
;
/**
* @author wancheng
* @date 2024年02月01日 17:18
*/
public
class
ServiceHGBI001
extends
ServiceBase
{
// 指定存货类型
private
static
final
Integer
[]
DEFAULT_INVENT_CODE
=
{
InventTypeEnum
.
RAW
.
getCode
(),
InventTypeEnum
.
CONSUMABLE
.
getCode
()};
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
queryMap
);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new hgKC007().eiMetadata);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
params
.
put
(
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
params
.
put
(
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
//汇总数据
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据
String
pro_code
=
"***"
;
List
<
Map
>
mrsj
=
dao
.
query
(
"hgBI001.queryDay"
,
params
);
if
(
mrsj
!=
null
){
for
(
Map
obj:
mrsj
)
{
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
pro_code
=
(
String
)
obj
.
get
(
"PROJ_CODE"
);
}
}
}
params
.
put
(
"pro_name"
,
pro_code
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_code
);
outInfo
=
super
.
query
(
inInfo
,
"hgBI001.querySum"
,
new
HGBI001
());
//生产月报
List
scyb
=
dao
.
query
(
"hgBI001.queryMon"
,
params
);
outInfo
.
set
(
"mrsj"
,
mrsj
);
outInfo
.
set
(
"scyb"
,
scyb
);
// }
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询CompanyCode
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询CompanyCode"
)
public
EiInfo
queryCompanyCode
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
//params.put("loginName", "QY000019");
//汇总数据
List
company_code
=
super
.
dao
.
query
(
"hgBI001.queryCompanyCode"
,
params
);
outInfo
.
set
(
"company_code"
,
company_code
.
get
(
0
));
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询报屏模块show14
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show14"
)
public
EiInfo
queryZLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"22f02674b4b9448782b019686ce9c780"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"22f02674b4b9448782b019686ce9c780"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"DATE"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show14"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show17
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show17"
)
public
EiInfo
queryXMinfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"903f232398d44b8da7c5492434ce746f"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
/* Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("hgBI001.queryCompanyCode",user_params);
String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString();
}*/
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"903f232398d44b8da7c5492434ce746f"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"项目名称,计划完成时间,计划产量,实际产量,进度"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"项目名称"
));
datalist
.
add
(
obj
.
get
(
"计划完成时间"
));
datalist
.
add
(
obj
.
get
(
"计划产量"
));
datalist
.
add
(
obj
.
get
(
"实际产量"
));
datalist
.
add
(
obj
.
get
(
"进度"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show17"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show21
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show21"
)
public
EiInfo
queryRJCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"d5008eb93eac4d63b2fc0f1323683078"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"d5008eb93eac4d63b2fc0f1323683078"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show21"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show7
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show7"
)
public
EiInfo
queryYCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"05e22350db614c95b0e254aa38c81db2"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"05e22350db614c95b0e254aa38c81db2"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show7"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show6
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show6"
)
public
EiInfo
queryHAPlanInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"HA_PLAN_WT,hg_PLAN_WT,HA_FACT_WT,hg_FACT_WT,HA_VOLUME_UP,hg_VOLUME_UP,BFB"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"HA_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"hg_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"BFB"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show9
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show9"
)
public
EiInfo
queryMonWtInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"530ad899d9f64c4383da7c61a6fb1562"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"530ad899d9f64c4383da7c61a6fb1562"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"MON_PLAN_WT,MON_FACT_WT,VOLUME_UP"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"MON_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"MON_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"VOLUME_UP"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 微服务测试方法(柱形图、折线图、饼图)
* 微服务号:S_BE_DZ_04
*
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"微服务测试方法(柱形图、折线图、饼图)"
)
public
EiInfo
queryMicroServiceBarData
(
EiInfo
eiInfo
)
{
EiInfo
returnInfo
=
new
EiInfo
();
String
paramsStr
=
eiInfo
.
getString
(
PARAMS_KEY_STR
);
if
(
StringUtils
.
isEmpty
(
paramsStr
))
{
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_FAILURE
);
returnInfo
.
setMsg
(
"获取测试数据失败,原因为:参数不能为空!"
);
return
returnInfo
;
}
String
[]
jsonStrs
=
new
String
[]{
"appEname,date,unitCover&"
+
"xdata-show,1月,50&dataworks-admin,1月,100&dataworks-market,1月,160&*"
+
"xdata-show,2月,60&dataworks-admin,2月,150&dataworks-market,2月,80&*"
+
"xdata-show,3月,80&dataworks-admin,3月,50&dataworks-market,3月,60&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,100&*"
+
"xdata-show,5月,30&dataworks-admin,5月,80&dataworks-market,5月,60&*"
+
"xdata-show,6月,20&dataworks-admin,6月,30&dataworks-market,6月,50"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,90&dataworks-admin,1月,20&dataworks-market,1月,60&*"
+
"xdata-show,2月,70&dataworks-admin,2月,50&dataworks-market,2月,70&*"
+
"xdata-show,3月,60&dataworks-admin,3月,60&dataworks-market,3月,65&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,90&*"
+
"xdata-show,5月,20&dataworks-admin,5月,80&dataworks-market,5月,80&*"
+
"xdata-show,6月,50&dataworks-admin,6月,90&dataworks-market,6月,70"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,80&dataworks-admin,1月,30&dataworks-market,1月,90&*"
+
"xdata-show,2月,10&dataworks-admin,2月,100&dataworks-market,2月,10&*"
+
"xdata-show,3月,180&dataworks-admin,3月,150&dataworks-market,3月,45&*"
+
"xdata-show,4月,100&dataworks-admin,4月,170&dataworks-market,4月,40&*"
+
"xdata-show,5月,66&dataworks-admin,5月,80&dataworks-market,5月,180&*"
+
"xdata-show,6月,80&dataworks-admin,6月,90&dataworks-market,6月,40"
,
"appEname,date,unitCover&"
,
""
};
JSONArray
jsonArr
=
JSONArray
.
parseArray
(
paramsStr
);
List
items
=
new
ArrayList
<>();
for
(
int
index
=
0
;
index
<
jsonArr
.
size
();
index
++)
{
JSONObject
jsonObject
=
jsonArr
.
getJSONObject
(
index
);
JSONObject
testDataObj
=
jsonObject
.
getJSONObject
(
"params"
);
JSONObject
item
=
new
JSONObject
();
if
(
testDataObj
.
size
()
==
0
||
!
testDataObj
.
containsKey
(
"month"
))
{
item
.
put
(
"data"
,
new
JSONArray
());
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
items
.
add
(
item
);
continue
;
}
String
monthStr
=
testDataObj
.
getString
(
"month"
);
if
(
StringUtils
.
isNotEmpty
(
monthStr
))
{
int
month
=
Integer
.
parseInt
(
monthStr
);
Random
ran
=
new
Random
();
int
x
=
ran
.
nextInt
(
4
);
String
contentStr
=
jsonStrs
[
x
];
String
[]
monthDataStr
=
contentStr
.
split
(
"\\*"
);
if
(
month
>
monthDataStr
.
length
)
{
month
=
monthDataStr
.
length
;
}
StringBuilder
resultStr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
month
;
i
++)
{
resultStr
.
append
(
monthDataStr
[
i
]);
}
JSONArray
tempArr
=
new
JSONArray
();
String
[]
contentStrArray
=
resultStr
.
toString
().
split
(
"&"
);
for
(
int
i
=
0
;
i
<
contentStrArray
.
length
;
i
++)
{
String
tempContentStr
=
contentStrArray
[
i
];
List
tempContentList
=
Arrays
.
asList
(
tempContentStr
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
}
item
.
put
(
"data"
,
tempArr
);
}
else
{
String
json
=
"appEname,date,unitCover"
;
JSONArray
tempArr
=
new
JSONArray
();
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
item
.
put
(
"data"
,
tempArr
);
}
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
item
.
put
(
"component"
,
jsonObject
.
get
(
"component"
));
items
.
add
(
item
);
}
returnInfo
.
set
(
"result"
,
items
);
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_SUCCESS
);
returnInfo
.
setMsg
(
"获取测试数据成功!"
);
return
returnInfo
;
}
}
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI002.java
0 → 100644
View file @
b5fbc749
package
com
.
baosight
.
hggp
.
hg
.
bi
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baosight.eplat.be.dz.constants.BEDZConstants
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.bi.domain.HGBI001
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.util.*
;
import
static
com
.
baosight
.
eplat
.
be
.
dz
.
service
.
ServiceBEDZ04
.
PARAMS_KEY_STR
;
/**
* @author wancheng
* @date 2024年02月01日 17:18
*/
public
class
ServiceHGBI002
extends
ServiceBase
{
// 指定存货类型
private
static
final
Integer
[]
DEFAULT_INVENT_CODE
=
{
InventTypeEnum
.
RAW
.
getCode
(),
InventTypeEnum
.
CONSUMABLE
.
getCode
()};
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
queryMap
);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new hgKC007().eiMetadata);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
params
.
put
(
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
params
.
put
(
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
//汇总数据
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据
String
pro_code
=
"***"
;
List
<
Map
>
mrsj
=
dao
.
query
(
"hgBI001.queryDay"
,
params
);
if
(
mrsj
!=
null
){
for
(
Map
obj:
mrsj
)
{
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
pro_code
=
(
String
)
obj
.
get
(
"PROJ_CODE"
);
}
}
}
params
.
put
(
"pro_name"
,
pro_code
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_code
);
outInfo
=
super
.
query
(
inInfo
,
"hgBI001.querySum"
,
new
HGBI001
());
//生产月报
List
scyb
=
dao
.
query
(
"hgBI001.queryMon"
,
params
);
outInfo
.
set
(
"mrsj"
,
mrsj
);
outInfo
.
set
(
"scyb"
,
scyb
);
// }
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询CompanyCode
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询CompanyCode"
)
public
EiInfo
queryCompanyCode
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
//params.put("loginName", "QY000019");
//汇总数据
List
company_code
=
super
.
dao
.
query
(
"hgBI001.queryCompanyCode"
,
params
);
outInfo
.
set
(
"company_code"
,
company_code
.
get
(
0
));
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询报屏模块日产量 038e2e3b41854a67be4797781a89fbf3
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块日产量"
)
public
EiInfo
queryRCLInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
JSONObject
paramsObj
=
null
;
if
(
jsonObject
.
get
(
"params"
)
instanceof
String
)
{
paramsObj
=
JSON
.
parseObject
((
String
)
jsonObject
.
get
(
"params"
));
}
else
{
paramsObj
=
(
JSONObject
)
jsonObject
.
get
(
"params"
);
}
String
factStr
=
paramsObj
.
getString
(
"factorycode"
);
String
dateStr
=
paramsObj
.
getString
(
"date"
).
replace
(
"-"
,
""
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"038e2e3b41854a67be4797781a89fbf3"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"factorycode"
,
factStr
);
params
.
put
(
"date"
,
dateStr
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"038e2e3b41854a67be4797781a89fbf3"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"RCL"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"RCL"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块月累计产量 89b407236129422488b4979d9042bc44
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块月累计产量"
)
public
EiInfo
queryYCLinfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
JSONObject
paramsObj
=
null
;
if
(
jsonObject
.
get
(
"params"
)
instanceof
String
)
{
paramsObj
=
JSON
.
parseObject
((
String
)
jsonObject
.
get
(
"params"
));
}
else
{
paramsObj
=
(
JSONObject
)
jsonObject
.
get
(
"params"
);
}
String
factStr
=
paramsObj
.
getString
(
"factorycode"
);
String
dateStr
=
paramsObj
.
getString
(
"date"
).
replace
(
"-"
,
""
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"89b407236129422488b4979d9042bc44"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"factorycode"
,
factStr
);
params
.
put
(
"date"
,
dateStr
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"89b407236129422488b4979d9042bc44"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"YCL"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"YCL"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块年累计产量 c3f97faf7b1540efb15d02462a8ac0dc
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块年累计产量"
)
public
EiInfo
queryNCLinfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
JSONObject
paramsObj
=
null
;
if
(
jsonObject
.
get
(
"params"
)
instanceof
String
)
{
paramsObj
=
JSON
.
parseObject
((
String
)
jsonObject
.
get
(
"params"
));
}
else
{
paramsObj
=
(
JSONObject
)
jsonObject
.
get
(
"params"
);
}
String
factStr
=
paramsObj
.
getString
(
"factorycode"
);
String
dateStr
=
paramsObj
.
getString
(
"date"
).
replace
(
"-"
,
""
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"c3f97faf7b1540efb15d02462a8ac0dc"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"factorycode"
,
factStr
);
params
.
put
(
"date"
,
dateStr
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"c3f97faf7b1540efb15d02462a8ac0dc"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"NCL"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"NCL"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 厂区 9b6a259be7c24e65adb6b91cd2d1cdfc
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱1"
,
operType
=
"查询"
,
operDesc
=
"厂区"
)
public
EiInfo
queryCompanyInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"9b6a259be7c24e65adb6b91cd2d1cdfc"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"9b6a259be7c24e65adb6b91cd2d1cdfc"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"ORG_ID,ORG_CNAME"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"ORG_ID"
));
datalist
.
add
(
obj
.
get
(
"ORG_CNAME"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show14
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show14"
)
public
EiInfo
queryZLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"22f02674b4b9448782b019686ce9c780"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"22f02674b4b9448782b019686ce9c780"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"DATE"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show14"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 主要项目进度 a02eed6a3e3f4dd39dbd0851e6a7572a
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"主要项目进度"
)
public
EiInfo
queryXMinfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
JSONObject
paramsObj
=
null
;
if
(
jsonObject
.
get
(
"params"
)
instanceof
String
)
{
paramsObj
=
JSON
.
parseObject
((
String
)
jsonObject
.
get
(
"params"
));
}
else
{
paramsObj
=
(
JSONObject
)
jsonObject
.
get
(
"params"
);
}
String
dateStr
=
paramsObj
.
getString
(
"date"
).
replace
(
"-"
,
""
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"b865eed291984d3f9acf305da87046a5"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
companycode
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
companycode
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"companycode"
,
companycode
);
params
.
put
(
"date"
,
dateStr
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"b865eed291984d3f9acf305da87046a5"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"XMMC,JHSJ,JHCL,SJCL,JD"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"XMMC"
));
datalist
.
add
(
obj
.
get
(
"JHSJ"
));
datalist
.
add
(
obj
.
get
(
"JHCL"
));
datalist
.
add
(
obj
.
get
(
"SJCL"
));
datalist
.
add
(
obj
.
get
(
"JD"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show21
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show21"
)
public
EiInfo
queryRJCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"d5008eb93eac4d63b2fc0f1323683078"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"d5008eb93eac4d63b2fc0f1323683078"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show21"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show7
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show7"
)
public
EiInfo
queryYCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"05e22350db614c95b0e254aa38c81db2"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"05e22350db614c95b0e254aa38c81db2"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show7"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show6
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show6"
)
public
EiInfo
queryHAPlanInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"HA_PLAN_WT,hg_PLAN_WT,HA_FACT_WT,hg_FACT_WT,HA_VOLUME_UP,hg_VOLUME_UP,BFB"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"HA_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"hg_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"BFB"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show9
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show9"
)
public
EiInfo
queryMonWtInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"530ad899d9f64c4383da7c61a6fb1562"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"530ad899d9f64c4383da7c61a6fb1562"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"MON_PLAN_WT,MON_FACT_WT,VOLUME_UP"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"MON_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"MON_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"VOLUME_UP"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 微服务测试方法(柱形图、折线图、饼图)
* 微服务号:S_BE_DZ_04
*
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"微服务测试方法(柱形图、折线图、饼图)"
)
public
EiInfo
queryMicroServiceBarData
(
EiInfo
eiInfo
)
{
EiInfo
returnInfo
=
new
EiInfo
();
String
paramsStr
=
eiInfo
.
getString
(
PARAMS_KEY_STR
);
if
(
StringUtils
.
isEmpty
(
paramsStr
))
{
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_FAILURE
);
returnInfo
.
setMsg
(
"获取测试数据失败,原因为:参数不能为空!"
);
return
returnInfo
;
}
String
[]
jsonStrs
=
new
String
[]{
"appEname,date,unitCover&"
+
"xdata-show,1月,50&dataworks-admin,1月,100&dataworks-market,1月,160&*"
+
"xdata-show,2月,60&dataworks-admin,2月,150&dataworks-market,2月,80&*"
+
"xdata-show,3月,80&dataworks-admin,3月,50&dataworks-market,3月,60&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,100&*"
+
"xdata-show,5月,30&dataworks-admin,5月,80&dataworks-market,5月,60&*"
+
"xdata-show,6月,20&dataworks-admin,6月,30&dataworks-market,6月,50"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,90&dataworks-admin,1月,20&dataworks-market,1月,60&*"
+
"xdata-show,2月,70&dataworks-admin,2月,50&dataworks-market,2月,70&*"
+
"xdata-show,3月,60&dataworks-admin,3月,60&dataworks-market,3月,65&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,90&*"
+
"xdata-show,5月,20&dataworks-admin,5月,80&dataworks-market,5月,80&*"
+
"xdata-show,6月,50&dataworks-admin,6月,90&dataworks-market,6月,70"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,80&dataworks-admin,1月,30&dataworks-market,1月,90&*"
+
"xdata-show,2月,10&dataworks-admin,2月,100&dataworks-market,2月,10&*"
+
"xdata-show,3月,180&dataworks-admin,3月,150&dataworks-market,3月,45&*"
+
"xdata-show,4月,100&dataworks-admin,4月,170&dataworks-market,4月,40&*"
+
"xdata-show,5月,66&dataworks-admin,5月,80&dataworks-market,5月,180&*"
+
"xdata-show,6月,80&dataworks-admin,6月,90&dataworks-market,6月,40"
,
"appEname,date,unitCover&"
,
""
};
JSONArray
jsonArr
=
JSONArray
.
parseArray
(
paramsStr
);
List
items
=
new
ArrayList
<>();
for
(
int
index
=
0
;
index
<
jsonArr
.
size
();
index
++)
{
JSONObject
jsonObject
=
jsonArr
.
getJSONObject
(
index
);
JSONObject
testDataObj
=
jsonObject
.
getJSONObject
(
"params"
);
JSONObject
item
=
new
JSONObject
();
if
(
testDataObj
.
size
()
==
0
||
!
testDataObj
.
containsKey
(
"month"
))
{
item
.
put
(
"data"
,
new
JSONArray
());
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
items
.
add
(
item
);
continue
;
}
String
monthStr
=
testDataObj
.
getString
(
"month"
);
if
(
StringUtils
.
isNotEmpty
(
monthStr
))
{
int
month
=
Integer
.
parseInt
(
monthStr
);
Random
ran
=
new
Random
();
int
x
=
ran
.
nextInt
(
4
);
String
contentStr
=
jsonStrs
[
x
];
String
[]
monthDataStr
=
contentStr
.
split
(
"\\*"
);
if
(
month
>
monthDataStr
.
length
)
{
month
=
monthDataStr
.
length
;
}
StringBuilder
resultStr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
month
;
i
++)
{
resultStr
.
append
(
monthDataStr
[
i
]);
}
JSONArray
tempArr
=
new
JSONArray
();
String
[]
contentStrArray
=
resultStr
.
toString
().
split
(
"&"
);
for
(
int
i
=
0
;
i
<
contentStrArray
.
length
;
i
++)
{
String
tempContentStr
=
contentStrArray
[
i
];
List
tempContentList
=
Arrays
.
asList
(
tempContentStr
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
}
item
.
put
(
"data"
,
tempArr
);
}
else
{
String
json
=
"appEname,date,unitCover"
;
JSONArray
tempArr
=
new
JSONArray
();
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
item
.
put
(
"data"
,
tempArr
);
}
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
item
.
put
(
"component"
,
jsonObject
.
get
(
"component"
));
items
.
add
(
item
);
}
returnInfo
.
set
(
"result"
,
items
);
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_SUCCESS
);
returnInfo
.
setMsg
(
"获取测试数据成功!"
);
return
returnInfo
;
}
}
src/main/java/com/baosight/hggp/hg/bi/service/ServiceHGBI003.java
0 → 100644
View file @
b5fbc749
package
com
.
baosight
.
hggp
.
hg
.
bi
.
service
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baosight.eplat.be.dz.constants.BEDZConstants
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.bi.domain.HGBI001
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.util.*
;
import
static
com
.
baosight
.
eplat
.
be
.
dz
.
service
.
ServiceBEDZ04
.
PARAMS_KEY_STR
;
/**
* @author wancheng
* @date 2024年02月01日 17:18
*/
public
class
ServiceHGBI003
extends
ServiceBase
{
// 指定存货类型
private
static
final
Integer
[]
DEFAULT_INVENT_CODE
=
{
InventTypeEnum
.
RAW
.
getCode
(),
InventTypeEnum
.
CONSUMABLE
.
getCode
()};
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
queryMap
);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new hgKC007().eiMetadata);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
params
.
put
(
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
params
.
put
(
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"company_code"
,
UserSessionUtils
.
getUserCompany
().
getUsercode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"factory"
,
inInfo
.
get
(
"factory"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"factory"
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"date"
,
inInfo
.
get
(
"date"
)==
null
?
"xxxx"
:
inInfo
.
get
(
"date"
));
//汇总数据
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据
String
pro_code
=
"***"
;
List
<
Map
>
mrsj
=
dao
.
query
(
"hgBI001.queryDay"
,
params
);
if
(
mrsj
!=
null
){
for
(
Map
obj:
mrsj
)
{
if
((
Long
)
obj
.
get
(
"SORT"
)
==
2
){
pro_code
=
(
String
)
obj
.
get
(
"PROJ_CODE"
);
}
}
}
params
.
put
(
"pro_name"
,
pro_code
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
0
,
"pro_name"
,
pro_code
);
outInfo
=
super
.
query
(
inInfo
,
"hgBI001.querySum"
,
new
HGBI001
());
//生产月报
List
scyb
=
dao
.
query
(
"hgBI001.queryMon"
,
params
);
outInfo
.
set
(
"mrsj"
,
mrsj
);
outInfo
.
set
(
"scyb"
,
scyb
);
// }
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询CompanyCode
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产日报"
,
operType
=
"查询"
,
operDesc
=
"查询CompanyCode"
)
public
EiInfo
queryCompanyCode
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
try
{
Map
params
=
new
HashMap
();
params
.
put
(
"loginName"
,
UserSession
.
getUserId
());
//params.put("loginName", "QY000019");
//汇总数据
List
company_code
=
super
.
dao
.
query
(
"hgBI001.queryCompanyCode"
,
params
);
outInfo
.
set
(
"company_code"
,
company_code
.
get
(
0
));
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
outInfo
;
}
/**
* 查询报屏模块show14
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show14"
)
public
EiInfo
queryZLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"22f02674b4b9448782b019686ce9c780"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"22f02674b4b9448782b019686ce9c780"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"DATE"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show14"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show17
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show17"
)
public
EiInfo
queryXMinfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"903f232398d44b8da7c5492434ce746f"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
/* Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("hgBI001.queryCompanyCode",user_params);
String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString();
}*/
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"903f232398d44b8da7c5492434ce746f"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"项目名称,计划完成时间,计划产量,实际产量,进度"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"项目名称"
));
datalist
.
add
(
obj
.
get
(
"计划完成时间"
));
datalist
.
add
(
obj
.
get
(
"计划产量"
));
datalist
.
add
(
obj
.
get
(
"实际产量"
));
datalist
.
add
(
obj
.
get
(
"进度"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show17"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show21
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show21"
)
public
EiInfo
queryRJCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"d5008eb93eac4d63b2fc0f1323683078"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"d5008eb93eac4d63b2fc0f1323683078"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show21"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show7
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show7"
)
public
EiInfo
queryYCLInfo
(
EiInfo
inInfo
)
{
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"05e22350db614c95b0e254aa38c81db2"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"05e22350db614c95b0e254aa38c81db2"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"appEname,date,unitCover"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"SERIES"
));
datalist
.
add
(
obj
.
get
(
"X"
));
datalist
.
add
(
obj
.
get
(
"VALUE"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
"show7"
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show6
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show6"
)
public
EiInfo
queryHAPlanInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"bb6f3802bdf64bcbaef5c95ce3241c59"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"HA_PLAN_WT,hg_PLAN_WT,HA_FACT_WT,hg_FACT_WT,HA_VOLUME_UP,hg_VOLUME_UP,BFB"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"HA_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"hg_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"HA_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"hg_VOLUME_UP"
));
datalist
.
add
(
obj
.
get
(
"BFB"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 查询报屏模块show9
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"查询报屏模块show9"
)
public
EiInfo
queryMonWtInfo
(
EiInfo
inInfo
)
{
String
paramsStr
=
inInfo
.
getString
(
PARAMS_KEY_STR
);
JSONArray
jsonArray
=
(
JSONArray
)
JSONArray
.
parse
(
paramsStr
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonArray
.
get
(
0
);
JSONArray
idsArr
=
(
JSONArray
)
jsonObject
.
get
(
"ids"
);
String
idsStr
=
idsArr
.
getString
(
0
);
EiInfo
eiInfo
=
new
EiInfo
();
String
serviceId
=
"S_BE_XP_17"
;
eiInfo
.
set
(
EiConstant
.
serviceId
,
serviceId
);
Map
map
=
new
HashMap
();
map
.
put
(
"uuid"
,
"530ad899d9f64c4383da7c61a6fb1562"
);
map
.
put
(
"offset"
,
0
);
map
.
put
(
"limit"
,
1000
);
//获取公司代码
String
company_code
=
"%"
;
if
(!
StringUtils
.
isEmpty
(
UserSessionUtils
.
getUserCompany
().
getUsercode
())){
company_code
=
UserSessionUtils
.
getUserCompany
().
getUsercode
();
}
//数据集入参
Map
params
=
new
HashMap
();
params
.
put
(
"company_code"
,
company_code
);
map
.
put
(
"params"
,
params
);
List
list
=
new
ArrayList
();
list
.
add
(
map
);
eiInfo
.
set
(
"queryInfo"
,
list
);
//服务接口调用
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
//调用微服务后的结果
Map
result
=
(
Map
)
outInfo
.
get
(
"result"
);
Map
result1
=
(
Map
)
result
.
get
(
"530ad899d9f64c4383da7c61a6fb1562"
);
List
<
Map
>
list1
=
(
List
)
result1
.
get
(
"data"
);
JSONArray
tempArr
=
new
JSONArray
();
String
json
=
"MON_PLAN_WT,MON_FACT_WT,VOLUME_UP"
;
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
JSONObject
item
=
new
JSONObject
();
list1
.
forEach
(
obj
->
{
// 处理obj
List
datalist
=
new
ArrayList
();
datalist
.
add
(
obj
.
get
(
"MON_PLAN_WT"
));
datalist
.
add
(
obj
.
get
(
"MON_FACT_WT"
));
datalist
.
add
(
obj
.
get
(
"VOLUME_UP"
));
tempArr
.
add
(
datalist
);
});
JSONArray
ids
=
new
JSONArray
();
ids
.
add
(
idsStr
);
item
.
put
(
"ids"
,
ids
);
item
.
put
(
"component"
,
null
);
item
.
put
(
"data"
,
tempArr
);
List
list2
=
new
ArrayList
();
list2
.
add
(
item
);
outInfo
.
set
(
"result"
,
list2
);
return
outInfo
;
}
/**
* 微服务测试方法(柱形图、折线图、饼图)
* 微服务号:S_BE_DZ_04
*
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产管理驾驶舱"
,
operType
=
"查询"
,
operDesc
=
"微服务测试方法(柱形图、折线图、饼图)"
)
public
EiInfo
queryMicroServiceBarData
(
EiInfo
eiInfo
)
{
EiInfo
returnInfo
=
new
EiInfo
();
String
paramsStr
=
eiInfo
.
getString
(
PARAMS_KEY_STR
);
if
(
StringUtils
.
isEmpty
(
paramsStr
))
{
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_FAILURE
);
returnInfo
.
setMsg
(
"获取测试数据失败,原因为:参数不能为空!"
);
return
returnInfo
;
}
String
[]
jsonStrs
=
new
String
[]{
"appEname,date,unitCover&"
+
"xdata-show,1月,50&dataworks-admin,1月,100&dataworks-market,1月,160&*"
+
"xdata-show,2月,60&dataworks-admin,2月,150&dataworks-market,2月,80&*"
+
"xdata-show,3月,80&dataworks-admin,3月,50&dataworks-market,3月,60&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,100&*"
+
"xdata-show,5月,30&dataworks-admin,5月,80&dataworks-market,5月,60&*"
+
"xdata-show,6月,20&dataworks-admin,6月,30&dataworks-market,6月,50"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,90&dataworks-admin,1月,20&dataworks-market,1月,60&*"
+
"xdata-show,2月,70&dataworks-admin,2月,50&dataworks-market,2月,70&*"
+
"xdata-show,3月,60&dataworks-admin,3月,60&dataworks-market,3月,65&*"
+
"xdata-show,4月,100&dataworks-admin,4月,70&dataworks-market,4月,90&*"
+
"xdata-show,5月,20&dataworks-admin,5月,80&dataworks-market,5月,80&*"
+
"xdata-show,6月,50&dataworks-admin,6月,90&dataworks-market,6月,70"
,
"appEname,date,unitCover&"
+
"xdata-show,1月,80&dataworks-admin,1月,30&dataworks-market,1月,90&*"
+
"xdata-show,2月,10&dataworks-admin,2月,100&dataworks-market,2月,10&*"
+
"xdata-show,3月,180&dataworks-admin,3月,150&dataworks-market,3月,45&*"
+
"xdata-show,4月,100&dataworks-admin,4月,170&dataworks-market,4月,40&*"
+
"xdata-show,5月,66&dataworks-admin,5月,80&dataworks-market,5月,180&*"
+
"xdata-show,6月,80&dataworks-admin,6月,90&dataworks-market,6月,40"
,
"appEname,date,unitCover&"
,
""
};
JSONArray
jsonArr
=
JSONArray
.
parseArray
(
paramsStr
);
List
items
=
new
ArrayList
<>();
for
(
int
index
=
0
;
index
<
jsonArr
.
size
();
index
++)
{
JSONObject
jsonObject
=
jsonArr
.
getJSONObject
(
index
);
JSONObject
testDataObj
=
jsonObject
.
getJSONObject
(
"params"
);
JSONObject
item
=
new
JSONObject
();
if
(
testDataObj
.
size
()
==
0
||
!
testDataObj
.
containsKey
(
"month"
))
{
item
.
put
(
"data"
,
new
JSONArray
());
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
items
.
add
(
item
);
continue
;
}
String
monthStr
=
testDataObj
.
getString
(
"month"
);
if
(
StringUtils
.
isNotEmpty
(
monthStr
))
{
int
month
=
Integer
.
parseInt
(
monthStr
);
Random
ran
=
new
Random
();
int
x
=
ran
.
nextInt
(
4
);
String
contentStr
=
jsonStrs
[
x
];
String
[]
monthDataStr
=
contentStr
.
split
(
"\\*"
);
if
(
month
>
monthDataStr
.
length
)
{
month
=
monthDataStr
.
length
;
}
StringBuilder
resultStr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
month
;
i
++)
{
resultStr
.
append
(
monthDataStr
[
i
]);
}
JSONArray
tempArr
=
new
JSONArray
();
String
[]
contentStrArray
=
resultStr
.
toString
().
split
(
"&"
);
for
(
int
i
=
0
;
i
<
contentStrArray
.
length
;
i
++)
{
String
tempContentStr
=
contentStrArray
[
i
];
List
tempContentList
=
Arrays
.
asList
(
tempContentStr
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
}
item
.
put
(
"data"
,
tempArr
);
}
else
{
String
json
=
"appEname,date,unitCover"
;
JSONArray
tempArr
=
new
JSONArray
();
List
tempContentList
=
Arrays
.
asList
(
json
.
split
(
","
));
tempArr
.
add
(
tempContentList
);
item
.
put
(
"data"
,
tempArr
);
}
item
.
put
(
"ids"
,
jsonObject
.
get
(
"ids"
));
item
.
put
(
"component"
,
jsonObject
.
get
(
"component"
));
items
.
add
(
item
);
}
returnInfo
.
set
(
"result"
,
items
);
returnInfo
.
setStatus
(
BEDZConstants
.
STATUS_SUCCESS
);
returnInfo
.
setMsg
(
"获取测试数据成功!"
);
return
returnInfo
;
}
}
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI001.xml
0 → 100644
View file @
b5fbc749
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPBI001"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hppz001 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
DATE = #date#
</isNotEmpty>
</select>
<select
id=
"queryDay"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT '工厂' AS SERIES,FACTORY_NAME AS VALUE,PROJ_CODE, 1 AS SORT
FROM (
SELECT
A.COMPANY_CODE, B.FACTORY_CODE,
B.FACTORY_NAME, A.PROJ_NAME,
A.PROJ_CODE, MAX(A.TOTAL_WT) AS TOTAL_WT,
SUM(WEIGHT) AS WEIGHT, MAX(C.NUM) AS NUM
FROM hpjx.t_hpsc005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
JOIN hpjx.t_hpkc003 D ON A.PROD_ORDER_NO = D.PROD_ORDER_NO
WHERE ifnull(D.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"date"
>
D.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
B.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
A.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY A.COMPANY_CODE, A.FACTORY_CODE, A.PLAN_COMPLETION_DATE,
B.FACTORY_NAME, A.PROJ_NAME, A.FACTORY_CODE, A.PROJ_CODE
LIMIT 1 ) A
UNION ALL
SELECT '生产项目' AS SERIES,PROJ_NAME AS VALUE,PROJ_CODE, 2 AS SORT
FROM (
SELECT
A.COMPANY_CODE,B.FACTORY_CODE,
B.FACTORY_NAME,A.PROJ_NAME,
A.PROJ_CODE,MAX(A.TOTAL_WT) AS TOTAL_WT,SUM(WEIGHT) AS WEIGHT,
MAX(C.NUM) AS NUM
FROM hpjx.t_hpsc005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
JOIN hpjx.t_hpkc003 D ON A.PROD_ORDER_NO = D.PROD_ORDER_NO
WHERE ifnull(D.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"date"
>
D.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
B.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
A.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY A.COMPANY_CODE, A.FACTORY_CODE, A.PLAN_COMPLETION_DATE,
B.FACTORY_NAME, A.PROJ_NAME, A.FACTORY_CODE, A.PROJ_CODE
LIMIT 1
) A
UNION ALL
SELECT
'生产产量' AS SERIES,
concat('计划产量:',TOTAL_WT,'吨 , 实际产量',WEIGHT,'吨') as VALUE,
PROJ_CODE, 3 AS SORT
FROM (
SELECT
A.COMPANY_CODE,B.FACTORY_CODE,
B.FACTORY_NAME,A.PROJ_NAME,
A.PROJ_CODE,MAX(A.TOTAL_WT) AS TOTAL_WT,
SUM(WEIGHT) AS WEIGHT,MAX(C.NUM) AS NUM
FROM hpjx.t_hpsc005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
JOIN hpjx.t_hpkc003 D ON A.PROD_ORDER_NO = D.PROD_ORDER_NO
WHERE ifnull(D.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"date"
>
D.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
B.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
A.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY A.COMPANY_CODE, A.FACTORY_CODE, A.PLAN_COMPLETION_DATE,
B.FACTORY_NAME, A.PROJ_NAME, A.FACTORY_CODE, A.PROJ_CODE
LIMIT 1
) A
UNION ALL
SELECT
'生产人数' AS SERIES,
concat(NUM,'人') as VALUE,
PROJ_CODE, 4 AS SORT
FROM (
SELECT
A.COMPANY_CODE,B.FACTORY_CODE,
B.FACTORY_NAME,A.PROJ_NAME,
A.PROJ_CODE,MAX(A.TOTAL_WT) AS TOTAL_WT,
SUM(WEIGHT) AS WEIGHT,MAX(C.NUM) AS NUM
FROM hpjx.t_hpsc005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
JOIN hpjx.t_hpkc003 D ON A.PROD_ORDER_NO = D.PROD_ORDER_NO
WHERE ifnull(D.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"date"
>
D.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
B.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
A.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY A.COMPANY_CODE,A.FACTORY_CODE,A.PLAN_COMPLETION_DATE,
B.FACTORY_NAME,A.PROJ_NAME,A.FACTORY_CODE,A.PROJ_CODE
LIMIT 1
) A
UNION ALL
SELECT
'人均日产' AS SERIES,
concat(ifnull(WEIGHT,0)/NUM,'吨') as VALUE,
PROJ_CODE, 5 AS SORT
FROM (
SELECT
A.COMPANY_CODE, B.FACTORY_CODE,
B.FACTORY_NAME, A.PROJ_NAME,
A.PROJ_CODE, MAX(A.TOTAL_WT) AS TOTAL_WT,
SUM(WEIGHT) AS WEIGHT, MAX(C.NUM) AS NUM
FROM hpjx.t_hpsc005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) C ON C.FACTORY_CODE=B.FACTORY_CODE AND C.GROUP_ID = B.ORG_NO
JOIN hpjx.t_hpkc003 D ON A.PROD_ORDER_NO = D.PROD_ORDER_NO
WHERE ifnull(D.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"date"
>
D.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
B.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
A.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY A.COMPANY_CODE,A.FACTORY_CODE,A.PLAN_COMPLETION_DATE,
B.FACTORY_NAME,A.PROJ_NAME,A.FACTORY_CODE,A.PROJ_CODE
LIMIT 1
) A
<dynamic
prepend=
"ORDER BY"
>
<isEmpty
property=
"orderBy"
>
SORT asc
</isEmpty>
</dynamic>
</select>
<select
id=
"querySum"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.bi.domain.HPBI001"
>
select
'生产人数(人)' AS indNmae,
(select
NUM as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY DOCUMENT_DATE,C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS dayValue,
(select
NUM as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,6) = left(replace(#date#,'-',''),6)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS monValue,
(select
NUM as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS yearValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '01' THEN NUM ELSE 0 END) as janValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '02' THEN NUM ELSE 0 END) as febValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '03' THEN NUM ELSE 0 END) as marValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '04' THEN NUM ELSE 0 END) as aprValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '05' THEN NUM ELSE 0 END) as mayValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '06' THEN NUM ELSE 0 END) as junValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '07' THEN NUM ELSE 0 END) as julValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '08' THEN NUM ELSE 0 END) as augValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '09' THEN NUM ELSE 0 END) as sepValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '10' THEN NUM ELSE 0 END) as octValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '11' THEN NUM ELSE 0 END) as novValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '12' THEN NUM ELSE 0 END) as decValue
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
UNION ALL
select
'生产产量(吨)' AS indNmae,
(select
VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS dayValue,
(select
VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,6) = left(replace(#date#,'-',''),6)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS monValue,
(select
VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS yearValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '01' THEN VALUE ELSE 0 END) as janValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '02' THEN VALUE ELSE 0 END) as febValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '03' THEN VALUE ELSE 0 END) as marValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '04' THEN VALUE ELSE 0 END) as aprValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '05' THEN VALUE ELSE 0 END) as mayValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '06' THEN VALUE ELSE 0 END) as junValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '07' THEN VALUE ELSE 0 END) as julValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '08' THEN VALUE ELSE 0 END) as augValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '09' THEN VALUE ELSE 0 END) as sepValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '10' THEN VALUE ELSE 0 END) as octValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '11' THEN VALUE ELSE 0 END) as novValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '12' THEN VALUE ELSE 0 END) as decValue
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
UNION ALL
select
'人均产量(kg)' AS indNmae,
(select
VALUE/NUM AS VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS dayValue,
(select
VALUE/NUM AS VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,6) = left(replace(#date#,'-',''),6)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS monValue,
(select
VALUE/NUM AS VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
) AS yearValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '01' THEN VALUE/NUM ELSE 0 END) as janValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '02' THEN VALUE/NUM ELSE 0 END) as febValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '03' THEN VALUE/NUM ELSE 0 END) as marValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '04' THEN VALUE/NUM ELSE 0 END) as aprValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '05' THEN VALUE/NUM ELSE 0 END) as mayValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '06' THEN VALUE/NUM ELSE 0 END) as junValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '07' THEN VALUE/NUM ELSE 0 END) as julValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '08' THEN VALUE/NUM ELSE 0 END) as augValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '09' THEN VALUE/NUM ELSE 0 END) as sepValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '10' THEN VALUE/NUM ELSE 0 END) as octValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '11' THEN VALUE/NUM ELSE 0 END) as novValue,
MAX(case when substring(DOCUMENT_DATE,5,2) = '12' THEN VALUE/NUM ELSE 0 END) as decValue
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VALUE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE
<![CDATA[<=]]>
replace(#date#,'-','')
AND left(DOCUMENT_DATE,4) = left(replace(#date#,'-',''),4)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
<dynamic
prepend=
"ORDER BY"
>
<isEmpty
property=
"orderBy"
>
indNmae desc
</isEmpty>
</dynamic>
</select>
<select
id=
"queryMon"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
'sccl' as INDCODE,
'生产产量(吨)' as SERIES,
case when substring(DOCUMENT_DATE,5,1) = 0
then concat(substring(DOCUMENT_DATE,6,1),'月')
else concat(substring(DOCUMENT_DATE,5,2),'月')
end as X,
VAULE as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
UNION ALL
select
'scrs' as INDCODE,
'生产人数(个)' as SERIES,
case when substring(DOCUMENT_DATE,5,1) = 0
then concat(substring(DOCUMENT_DATE,6,1),'月')
else concat(substring(DOCUMENT_DATE,5,2),'月')
end as X,
NUM as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
UNION ALL
select
'rjcl' as INDCODE,
'人均产量(kg)' as SERIES,
case when substring(DOCUMENT_DATE,5,1) = 0
then concat(substring(DOCUMENT_DATE,6,1),'月')
else concat(substring(DOCUMENT_DATE,5,2),'月')
end as X,
VAULE/NUM as VALUE
FROM (select C.FACTORY_CODE,C.ORG_NO,DOCUMENT_DATE,sum(ifnull(WEIGHT,0)) as VAULE
FROM hpjx.t_hpkc003 A
JOIN hpjx.t_hpsc005 B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
INNER JOIN HPJX.T_HPSC005A C ON B.PROD_ORDER_NO = C.PROD_ORDER_NO
where ifnull(A.DOCUMENT_DATE,'')
<![CDATA[<>]]>
''
<isNotEmpty
prepend=
" AND "
property=
"pro_code"
>
A.PROJ_CODE = #pro_code#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
A.DOCUMENT_DATE = replace(#date#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factory"
>
C.FACTORY_CODE LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"company_code"
>
B.COMPANY_CODE LIKE CONCAT('%',CONCAT( #company_code#,'%'))
</isNotEmpty>
GROUP BY left(DOCUMENT_DATE,6),C.FACTORY_CODE,C.ORG_NO) A
JOIN (
SELECT
A.ORG_ID AS FACTORY_CODE, C.ORG_ID AS GROUP_ID,COUNT(*) AS NUM
FROM iplat.TXSOG01 A
JOIN iplat.TXSOG01 B ON A.ORG_ID = B.PARENT_ORG_ID
JOIN iplat.TXSOG02 C ON B.ORG_ID = C.ORG_ID
JOIN iplat.XS_USER D ON C.USER_ID = D.USER_ID
WHERE A.ORG_TYPE = 'factory' AND B.ORG_TYPE = 'prodGroup'
GROUP BY A.ORG_ID ,C.ORG_ID
) B ON B.FACTORY_CODE=B.FACTORY_CODE AND B.GROUP_ID = A.ORG_NO
<dynamic
prepend=
"ORDER BY"
>
<isEmpty
property=
"orderBy"
>
X asc
</isEmpty>
</dynamic>
</select>
<select
id=
"queryCompanyCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select COMPANY_CODE from iplat.XS_USER where 1=1
<isNotEmpty
prepend=
" AND "
property=
"loginName"
>
LOGIN_NAME = #loginName#
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
src/main/java/com/baosight/hggp/hg/bi/sql/HGBI003.xml
0 → 100644
View file @
b5fbc749
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPBI003"
>
<select
id=
"querySbStatus"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
a.DEVICE_CODE,b.ORG_CNAME,a.DEVICE_NAME,a.DEVICE_MODEL,
case when c.LOG_VALUE = 2 then 1 else 0 end as DEVICE_STATUS,
case when c.LOG_VALUE = 2 then '运行状态'
when c.LOG_VALUE = 1 then '默认状态'
when c.LOG_VALUE = 3 then '暂停状态'
when c.LOG_VALUE = 4 then '复位状态'
when c.LOG_VALUE = 5 then '一级报警状态'
when c.LOG_VALUE = 6 then '二级报警状态'
else '异常状态' end as STATUS_DESC
from hpjx.t_hpsb003 a
join iplat.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0
join hpjx.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
and a.COMPANY_CODE = #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deviceCode"
>
a.DEVICE_CODE = #deviceCode#
</isNotEmpty>
order by c.CREATED_TIME desc
limit 1
</select>
</sqlMap>
\ No newline at end of file
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB001.java
View file @
b5fbc749
...
@@ -43,19 +43,23 @@ public class ServiceHGSB001 extends ServiceEPBase {
...
@@ -43,19 +43,23 @@ public class ServiceHGSB001 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
)
,
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
View file @
b5fbc749
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,6 +6,7 @@ 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.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
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.domain.HGSB002A
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
...
@@ -43,17 +44,21 @@ public class ServiceHGSB002 extends ServiceEPBase {
...
@@ -43,17 +44,21 @@ public class ServiceHGSB002 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
qarma
.
put
(
HGSB002
.
FIELD_COMPANY_CODE
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
qarma
.
put
(
HGSB002
.
FIELD_COMPANY_CODE
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
)
,
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
View file @
b5fbc749
...
@@ -48,7 +48,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
...
@@ -48,7 +48,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
...
@@ -70,7 +70,11 @@ public class ServiceHGSB003 extends ServiceEPBase {
...
@@ -70,7 +70,11 @@ public class ServiceHGSB003 extends ServiceEPBase {
}
}
}
}
qarma
.
put
(
HGSB003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
qarma
.
put
(
HGSB003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
View file @
b5fbc749
...
@@ -47,7 +47,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
...
@@ -47,7 +47,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
/*Map userCompany = HGSBTools.getUserCompany();
/*Map userCompany = HGSBTools.getUserCompany();
if (!userCompany.isEmpty()) {
if (!userCompany.isEmpty()) {
...
@@ -58,6 +58,10 @@ public class ServiceHGSB004 extends ServiceEPBase {
...
@@ -58,6 +58,10 @@ public class ServiceHGSB004 extends ServiceEPBase {
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004B.java
View file @
b5fbc749
...
@@ -41,13 +41,13 @@ public class ServiceHGSB004B extends ServiceEPBase {
...
@@ -41,13 +41,13 @@ public class ServiceHGSB004B extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
}
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
)
,
qarma
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB005.java
View file @
b5fbc749
...
@@ -44,14 +44,14 @@ public class ServiceHGSB005 extends ServiceEPBase {
...
@@ -44,14 +44,14 @@ public class ServiceHGSB005 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
qarma
.
clear
();
qarma
.
clear
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
if
(!
userCompany
.
isEmpty
())
{
if
(!
userCompany
.
isEmpty
())
{
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
qarma
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
userCompany
.
get
(
HGSB002
.
FIELD_COMPANY_CODE
));
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
)
,
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
));
qarma
.
clear
();
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
List
<
String
>
orgIds
=
HGSBTools
.
getOrgId
();
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
View file @
b5fbc749
...
@@ -37,7 +37,7 @@ public class ServiceHGSB006 extends ServiceEPBase {
...
@@ -37,7 +37,7 @@ public class ServiceHGSB006 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
//outInfo.getBlock(EiConstant.queryBlock).removeCol(HGSB004.FIELD_CHECK_STATUS);
//outInfo.getBlock(EiConstant.queryBlock).removeCol(HGSB004.FIELD_CHECK_STATUS);
return
outInfo
;
return
outInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB007.java
View file @
b5fbc749
...
@@ -40,7 +40,7 @@ public class ServiceHGSB007 extends ServiceEPBase {
...
@@ -40,7 +40,7 @@ public class ServiceHGSB007 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
)
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
View file @
b5fbc749
...
@@ -116,9 +116,9 @@
...
@@ -116,9 +116,9 @@
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
<
!--<
isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
FACTORY_CODE = #factoryCode#
</isNotEmpty>
</isNotEmpty>
-->
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
</isNotEmpty>
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
View file @
b5fbc749
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,6 +6,7 @@ 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.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
...
@@ -40,11 +41,15 @@ public class ServiceHGSJ001 extends ServiceEPBase {
...
@@ -40,11 +41,15 @@ public class ServiceHGSJ001 extends ServiceEPBase {
if
(
orgList
.
size
()>
0
)
{
if
(
orgList
.
size
()>
0
)
{
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgList
.
get
(
0
).
getOrgId
());
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
BOX_BLOCK_ID
));
//COMPANY_RECORD_BOX_BLOCK_ID
qarma
.
clear
();
qarma
.
clear
();
List
orgIds
=
getOrgId
();
List
orgIds
=
getOrgId
();
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
qarma
.
put
(
Org
.
FIELD_ORG_ID
,
orgIds
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BOX_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002.java
View file @
b5fbc749
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
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.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
...
@@ -14,6 +15,7 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools;
...
@@ -14,6 +15,7 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -40,10 +42,14 @@ public class ServiceHGSJ002 extends ServiceEPBase {
...
@@ -40,10 +42,14 @@ public class ServiceHGSJ002 extends ServiceEPBase {
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ002
.
QUERY
,
new
HGSJ002
());
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ002
.
QUERY
,
new
HGSJ002
());
Map
qarma
=
new
HashMap
();
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
/*
if (orgList.size()>0) {
qarma.put(Org.FIELD_ORG_ID,orgList.get(0).getOrgId());
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
);
}
}
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_RECORD_BOX_BLOCK_ID
),
qarma
);
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
View file @
b5fbc749
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,6 +6,7 @@ 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.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
import
com.baosight.hggp.hg.sj.domain.HGSJ003
;
...
@@ -41,12 +42,12 @@ public class ServiceHGSJ003 extends ServiceEPBase {
...
@@ -41,12 +42,12 @@ public class ServiceHGSJ003 extends ServiceEPBase {
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ003
.
QUERY
,
new
HGSJ003
());
EiInfo
outInfo
=
super
.
query
(
inInfo
,
HGSJ003
.
QUERY
,
new
HGSJ003
());
Map
qarma
=
new
HashMap
();
Map
qarma
=
new
HashMap
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
orgList
.
size
()>
0
)
{
/*
if (orgList.size()>0) {
qarma.put(Org.FIELD_ORG_ID,orgList.get(0).getOrgId());
qarma.put(Org.FIELD_ORG_ID,orgList.get(0).getOrgId());
}
}
*/
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_
RECORD_
BOX_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
qarma
);
qarma
.
clear
();
qarma
.
clear
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
)){
/*
if (CollectionUtils.isNotEmpty(orgList)){
Org org = orgList.get(0);
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
//如果不是公司公司,则找到上一级
...
@@ -59,8 +60,13 @@ public class ServiceHGSJ003 extends ServiceEPBase {
...
@@ -59,8 +60,13 @@ public class ServiceHGSJ003 extends ServiceEPBase {
}else {
}else {
qarma.put(HGSJ002A.FIELD_FACTORY_CODE,org.getOrgId());
qarma.put(HGSJ002A.FIELD_FACTORY_CODE,org.getOrgId());
}
}
}
}
*/
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
qarma
);
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
);
}
return
outInfo
;
return
outInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
View file @
b5fbc749
...
@@ -165,8 +165,9 @@
...
@@ -165,8 +165,9 @@
<!-- 查询子集组信息,仅包括生产组和下料组(递归) -->
<!-- 查询子集组信息,仅包括生产组和下料组(递归) -->
<select
id=
"queryGroupComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryGroupComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
T2.LEVEL AS "level", T3.ORG_ID AS "orgId", CONCAT('[',T5.FACTORY_NAME,']',T3.ORG_CNAME) AS "orgCname",
T2.LEVEL AS "level", T3.ORG_ID AS "orgId", CONCAT(T3.ORG_CNAME,'[',T3.COMPANY_NAME,']') AS "orgCname",
T3.FACTORY_CODE AS "factoryCode", T5.FACTORY_NAME AS "factoryName"
T3.FACTORY_CODE AS "factoryCode", T5.FACTORY_NAME AS "factoryName",T3.COMPANY_CODE AS "companyCode",
T3.COMPANY_NAME AS "companyName"
FROM (
FROM (
SELECT
SELECT
@CODES AS CODES,
@CODES AS CODES,
...
...
src/main/webapp/HG/SB/HGSB001.js
View file @
b5fbc749
$
(
function
()
{
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
@@ -66,6 +66,15 @@ $(function () {
...
@@ -66,6 +66,15 @@ $(function () {
},
{
},
{
field
:
"companyCode"
,
field
:
"companyCode"
,
title
:
"公司名称"
,
title
:
"公司名称"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
...
@@ -78,11 +87,24 @@ $(function () {
...
@@ -78,11 +87,24 @@ $(function () {
},{
},{
field
:
"groupCode"
,
field
:
"groupCode"
,
title
:
"设备区域"
,
title
:
"设备区域"
,
filter
:
function
(
option
)
{
let
companyCode
=
option
.
model
[
'companyCode'
];
if
(
companyCode
){
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
companyCode
;
})
}
else
{
companyCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
companyCode
;
})
}
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
]
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
]
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
];
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
];
}
}
}
}
return
dataItem
[
"groupCode"
]
return
dataItem
[
"groupCode"
]
...
@@ -105,7 +127,7 @@ $(function () {
...
@@ -105,7 +127,7 @@ $(function () {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
// 判断父级节点是否发生变化
if
(
e
.
field
===
"groupCode"
)
{
if
(
e
.
field
===
"groupCode"
)
{
if
(
e
.
items
[
0
].
companyCode
.
length
===
0
){
if
(
e
.
items
[
0
].
companyCode
.
length
===
0
){
...
...
src/main/webapp/HG/SB/HGSB001.jsp
View file @
b5fbc749
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<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">
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<EF:EFDatePicker blockId="inqu_status" row="0" ename="purchaseDate" cname="购置日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="purchaseDate" cname="购置日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceCode" cname="设备编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceCode" cname="设备编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -46,21 +47,21 @@
...
@@ -46,21 +47,21 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="
120" required="fals
e"
maxLength="16" readonly="false" width="
210" required="tru
e"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="
12
0" required="true"
maxLength="16" readonly="false" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
<EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
8
0" readonly="false" required="true"
maxLength="16" width="
10
0" readonly="false" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType" />
<EF:EFCodeOption codeName="hpjx.hpsb.deviceType" />
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/SB/HGSB002.js
View file @
b5fbc749
$
(
function
()
{
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
@@ -82,6 +82,15 @@ $(function () {
...
@@ -82,6 +82,15 @@ $(function () {
},
{
},
{
field
:
"companyCode"
,
field
:
"companyCode"
,
title
:
"公司名称"
,
title
:
"公司名称"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyStr"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
...
@@ -94,23 +103,24 @@ $(function () {
...
@@ -94,23 +103,24 @@ $(function () {
},
{
},
{
field
:
"groupCode"
,
field
:
"groupCode"
,
title
:
"设备区域"
,
title
:
"设备区域"
,
/*filter: function (options) {
filter
:
function
(
options
)
{
var companyCode = options.model['companyCode'];
let
companyCode
=
options
.
model
[
'companyCode'
];
if(companyCode) {
if
(
companyCode
){
// 返回我们过滤后的数据集
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return item["param3Field"] === companyCode;
return
item
[
"param1Field"
]
==
companyCode
;
})
}
else
{
companyCode
=
$
(
"#inqu_status-0-companyStr"
).
val
();
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
companyCode
;
})
})
}
}
return groupCodeBox;
},
},*/
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"]"
)[
1
]
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"["
)[
0
]
//dataItem['factoryCode'] = groupCodeBox[i]['param1Field']
return
groupCodeBox
[
i
][
'textField'
].
split
(
"["
)[
0
];
//dataItem['factoryName'] = groupCodeBox[i]['param2Field']
return
groupCodeBox
[
i
][
'textField'
].
split
(
"]"
)[
1
];
}
}
}
}
return
dataItem
[
"groupCode"
]
return
dataItem
[
"groupCode"
]
...
...
src/main/webapp/HG/SB/HGSB002.jsp
View file @
b5fbc749
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<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">
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="groupCode" cname="设备区域" colWidth="3" filter="contains">
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
startName="planStartDate" endName="planEndDate" row="0" role="date"
startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
</EF:EFDateSpan>
<EF:EFInput blockId="inqu_status" row="0" ename="companyStr" cname="公司名称" type="hidden" colWidth="3"/>
<%--<EF:EFDatePicker blockId="inqu_status" row="0" ename="planStartDate" cname="计划开始日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<%--<EF:EFDatePicker blockId="inqu_status" row="0" ename="planStartDate" cname="计划开始日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planEndDate" cname="计划结束日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>--%>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planEndDate" cname="计划结束日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>--%>
</div>
</div>
...
@@ -54,12 +55,12 @@
...
@@ -54,12 +55,12 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="
12
0" required="true"
maxLength="16" readonly="false" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/SB/HGSB002A.js
View file @
b5fbc749
...
@@ -37,8 +37,8 @@ $(function () {
...
@@ -37,8 +37,8 @@ $(function () {
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
]
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
]
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
];
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
];
}
}
}
}
return
dataItem
[
"groupCode"
]
return
dataItem
[
"groupCode"
]
...
...
src/main/webapp/HG/SB/HGSB002A.jsp
View file @
b5fbc749
...
@@ -36,10 +36,10 @@
...
@@ -36,10 +36,10 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFComboColumn ename="groupCode" cname="设备区域" readonly="true"
<EF:EFComboColumn ename="groupCode" cname="设备区域" readonly="true"
enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
1
20" required="true"
maxLength="16" width="
2
20" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/SB/HGSB003.js
View file @
b5fbc749
$
(
function
()
{
$
(
function
()
{
var
deviceCodeBox
=
__eiInfo
.
getBlock
(
"deviceCodeBox_block_id"
).
getMappedRows
();
var
deviceCodeBox
=
__eiInfo
.
getBlock
(
"deviceCodeBox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
@@ -57,6 +57,15 @@ $(function () {
...
@@ -57,6 +57,15 @@ $(function () {
},
{
},
{
field
:
"companyCode"
,
field
:
"companyCode"
,
title
:
"公司名称"
,
title
:
"公司名称"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyStr"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
...
...
src/main/webapp/HG/SB/HGSB003.jsp
View file @
b5fbc749
...
@@ -21,13 +21,14 @@
...
@@ -21,13 +21,14 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="applyDate" cname="申请日期" role="date"
<EF:EFDatePicker blockId="inqu_status" row="0" ename="applyDate" cname="申请日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkItem" cname="检查项" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkItem" cname="检查项" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="applyUserName" cname="申请人" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="applyUserName" cname="申请人" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyStr" cname="公司名称" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -41,7 +42,7 @@
...
@@ -41,7 +42,7 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="applyDate" cname="申请日期" width="120" enable="true" readonly="false" align="center" editType="date"
<EF:EFColumn ename="applyDate" cname="申请日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB004.js
View file @
b5fbc749
$
(
function
()
{
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
//var groupCodeBox = __eiInfo.getBlock("groupCodeBox_block_id").getMappedRows();
//var groupCodeBox = __eiInfo.getBlock("groupCodeBox_block_id").getMappedRows();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
@@ -72,6 +72,15 @@ $(function () {
...
@@ -72,6 +72,15 @@ $(function () {
},
{
},
{
field
:
"companyCode"
,
field
:
"companyCode"
,
title
:
"公司名称"
,
title
:
"公司名称"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyStr"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
if
(
companyCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
...
...
src/main/webapp/HG/SB/HGSB004.jsp
View file @
b5fbc749
...
@@ -22,12 +22,13 @@
...
@@ -22,12 +22,13 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="inspecDate" cname="点检日期" role="date"
<EF:EFDatePicker blockId="inqu_status" row="0" ename="inspecDate" cname="点检日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planCode" cname="计划单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planCode" cname="计划单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inspecUserName" cname="点检人" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inspecUserName" cname="点检人" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyStr" cname="公司名称" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -42,7 +43,7 @@
...
@@ -42,7 +43,7 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true"
maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="inspecDate" cname="点检日期" width="120" enable="true" align="center" editType="date"
<EF:EFColumn ename="inspecDate" cname="点检日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB004B.js
View file @
b5fbc749
...
@@ -16,8 +16,8 @@ $(function () {
...
@@ -16,8 +16,8 @@ $(function () {
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
if
(
groupCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
]
dataItem
[
'groupName'
]
=
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
]
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
]"
)[
1
];
return
groupCodeBox
[
i
][
'textField'
].
split
(
"
["
)[
0
];
}
}
}
}
return
dataItem
[
"groupCode"
]
return
dataItem
[
"groupCode"
]
...
...
src/main/webapp/HG/SB/HGSB004B.jsp
View file @
b5fbc749
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="设备区域" placeholder="模糊查询" colWidth="3"/>
<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"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planDate" cname="计划日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
@@ -45,9 +45,9 @@
...
@@ -45,9 +45,9 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="
12
0" required="true"
maxLength="16" readonly="true" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="设备区域"
<EF:EFComboColumn ename="groupCode" cname="设备区域"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
...
...
src/main/webapp/HG/SB/HGSB005.js
View file @
b5fbc749
$
(
function
()
{
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
//var groupCodeBox = __eiInfo.getBlock("group_record_block_id").getMappedRows();
//var groupCodeBox = __eiInfo.getBlock("group_record_block_id").getMappedRows();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
...
...
src/main/webapp/HG/SB/HGSB005.jsp
View file @
b5fbc749
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="upkeepDate" cname="保养日期" role="date"
<EF:EFDatePicker blockId="inqu_status" row="0" ename="upkeepDate" cname="保养日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true"
maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="upkeepDate" cname="保养日期" width="120" enable="true" readonly="false" align="center" editType="date"
<EF:EFColumn ename="upkeepDate" cname="保养日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
src/main/webapp/HG/SB/HGSB006.jsp
View file @
b5fbc749
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<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">
<EF:EFSelect blockId="inqu_status" row="0" ename="checkStatus" cname="点检状态" colWidth="3" filter="contains">
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="planCode" cname="计划单号" width="100" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="100" enable="false" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
...
...
src/main/webapp/HG/SB/HGSB007.jsp
View file @
b5fbc749
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<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">
<EF:EFSelect blockId="inqu_status" row="0" ename="upkeepStatus" cname="保养状态" colWidth="3" filter="contains">
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" align="center" readonly="true" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
...
...
src/main/webapp/HG/SJ/HGSJ001.js
View file @
b5fbc749
$
(
function
(){
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
_record_box_block_id"
).
getMappedRows
();
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
Box_block_id"
).
getMappedRows
();
//company_record_box_block_id
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
var
userIdBox
=
__eiInfo
.
getBlock
(
"user_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
@@ -40,6 +40,15 @@ $(function (){
...
@@ -40,6 +40,15 @@ $(function (){
}
}
},
{
},
{
field
:
"factoryCode"
,
field
:
"factoryCode"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
...
@@ -101,6 +110,23 @@ $(function (){
...
@@ -101,6 +110,23 @@ $(function (){
}
}
}*/
}*/
},
},
/**
* EFGridtr
* @param e
* e.sender Grid
* e.preventDefault dataBoundtr
* e.index
* e.items ([Model,Model, ...])
*/
onAdd
:
function
(
e
)
{
let
factoryCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
$
.
each
(
e
.
items
,
function
(
index
,
item
){
if
(
factoryCode
!=
item
[
'factoryCode'
]){
item
[
'factoryCode'
]
=
''
;
}
item
[
"processCode"
]
=
''
});
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
e
.
preventDefault
();
...
...
src/main/webapp/HG/SJ/HGSJ001.jsp
View file @
b5fbc749
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" placeholder="模糊查询" colWidth="3"/>
<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"/>
<EF:EFInput blockId="inqu_status" row="0" ename="princName" cname="负责人" placeholder="模糊查询" colWidth="3"/>
...
@@ -30,34 +30,35 @@
...
@@ -30,34 +30,35 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="
company
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="
account
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
12
0" required="true"
maxLength="16" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="processCode" cname="工序编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="processCode" cname="工序编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="processName" cname="工序名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="processName" cname="工序名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="standardJob" cname="标准作业" width="1
2
0" enable="true" format="{0:N0}" editType="number"
<EF:EFColumn ename="standardJob" cname="标准作业" width="1
0
0" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="right" required="true"
displayType="0" sort="true" align="right" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="standardDays" cname="标准人天" width="1
2
0" enable="true" format="{0:N0}" editType="number"
<EF:EFColumn ename="standardDays" cname="标准人天" width="1
0
0" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="right"
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="standardNum" cname="标准工序人数" width="1
2
0" enable="true" format="{0:N0}" editType="number"
<EF:EFColumn ename="standardNum" cname="标准工序人数" width="1
0
0" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="right"
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
...
...
src/main/webapp/HG/SJ/HGSJ002.js
View file @
b5fbc749
$
(
function
(){
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
@@ -41,6 +41,15 @@ $(function (){
...
@@ -41,6 +41,15 @@ $(function (){
}
}
},{
},{
field
:
"factoryCode"
,
field
:
"factoryCode"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
...
@@ -61,6 +70,15 @@ $(function (){
...
@@ -61,6 +70,15 @@ $(function (){
},
},
afterEdit
:
function
(
e
)
{
afterEdit
:
function
(
e
)
{
},
},
onAdd
:
function
(
e
)
{
let
factoryCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
$
.
each
(
e
.
items
,
function
(
index
,
item
){
if
(
factoryCode
!=
item
[
'factoryCode'
]){
item
[
'factoryCode'
]
=
''
;
}
item
[
"flowCode"
]
=
''
});
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
e
.
preventDefault
();
...
...
src/main/webapp/HG/SJ/HGSJ002.jsp
View file @
b5fbc749
...
@@ -17,27 +17,28 @@
...
@@ -17,27 +17,28 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" placeholder="模糊查询" colWidth="3"/>
<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">
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="
company
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="
account
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
12
0" required="true"
maxLength="16" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<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"/>
<EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>
...
...
src/main/webapp/HG/SJ/HGSJ002A.jsp
View file @
b5fbc749
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="parendId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="parendId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="
company
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="
account
Code" cname="企业编码" hidden="true"/>
<%--<EF:EFComboColumn ename="factoryCode" cname="工厂"
<%--<EF:EFComboColumn ename="factoryCode" cname="工厂"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
...
...
src/main/webapp/HG/SJ/HGSJ003.js
View file @
b5fbc749
$
(
function
(){
$
(
function
(){
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
_record_b
ox_block_id"
).
getMappedRows
();
var
factoryCodes
=
__eiInfo
.
getBlock
(
"company
B
ox_block_id"
).
getMappedRows
();
var
processCodes
=
__eiInfo
.
getBlock
(
"processCode_block_id"
).
getMappedRows
();
var
processCodes
=
__eiInfo
.
getBlock
(
"processCode_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
@@ -40,6 +40,15 @@ $(function (){
...
@@ -40,6 +40,15 @@ $(function (){
}
}
},
{
},
{
field
:
"factoryCode"
,
field
:
"factoryCode"
,
filter
:
function
(
option
)
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
){
return
_
.
filter
(
option
.
values
,
function
(
item
)
{
return
item
[
"valueField"
]
==
companyCode
;
})
}
return
option
.
values
;
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
...
@@ -52,7 +61,7 @@ $(function (){
...
@@ -52,7 +61,7 @@ $(function (){
},
{
},
{
field
:
"processCode"
,
field
:
"processCode"
,
filter
:
function
(
options
)
{
filter
:
function
(
options
)
{
var
factoryCode
=
options
.
model
[
'factoryCode'
];
let
factoryCode
=
options
.
model
[
'factoryCode'
];
if
(
factoryCode
)
{
if
(
factoryCode
)
{
// 返回我们过滤后的数据集
// 返回我们过滤后的数据集
/*return options.values[0][province];*/
/*return options.values[0][province];*/
...
@@ -60,8 +69,9 @@ $(function (){
...
@@ -60,8 +69,9 @@ $(function (){
return
item
[
"param1Field"
]
==
factoryCode
&&
item
[
"param4Field"
]
==
"true"
&&
item
[
"param5Field"
]
==
"false"
;
return
item
[
"param1Field"
]
==
factoryCode
&&
item
[
"param4Field"
]
==
"true"
&&
item
[
"param5Field"
]
==
"false"
;
})
})
}
else
{
}
else
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
return
_
.
filter
(
processCodes
,
function
(
item
)
{
return
_
.
filter
(
processCodes
,
function
(
item
)
{
return
item
[
"param4Field"
]
==
"true"
&&
item
[
"param5Field"
]
==
"false"
;
return
item
[
"param
1Field"
]
==
companyCode
&&
item
[
"param
4Field"
]
==
"true"
&&
item
[
"param5Field"
]
==
"false"
;
})
})
}
}
},
},
...
@@ -131,6 +141,15 @@ $(function (){
...
@@ -131,6 +141,15 @@ $(function (){
}
}
}
}
},
},
onAdd
:
function
(
e
)
{
let
factoryCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
$
.
each
(
e
.
items
,
function
(
index
,
item
){
if
(
factoryCode
!=
item
[
'factoryCode'
]){
item
[
'factoryCode'
]
=
''
;
}
item
[
'spec'
]
=
''
;
});
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
e
.
preventDefault
();
...
...
src/main/webapp/HG/SJ/HGSJ003.jsp
View file @
b5fbc749
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
...
@@ -28,25 +28,26 @@
...
@@ -28,25 +28,26 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="
company
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="
account
Code" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
12
0" required="true"
maxLength="16" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
_record_b
ox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company
B
ox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="processCode" cname="工序名称"
<EF:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="
12
0" required="true"
maxLength="16" width="
20
0" required="true"
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
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