Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
25ffb498
Commit
25ffb498
authored
Mar 02, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.厂区及生产组下拉框调整
parent
4ef2cb27
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
11 deletions
+119
-11
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+3
-2
ServiceHPXSOrg.java
.../java/com/baosight/hpjx/hp/xs/service/ServiceHPXSOrg.java
+59
-0
HPXSOrg.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
+52
-4
HPSC005A.js
src/main/webapp/HP/SC/HPSC005A.js
+5
-5
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
25ffb498
...
@@ -112,14 +112,14 @@ public enum DdynamicEnum {
...
@@ -112,14 +112,14 @@ public enum DdynamicEnum {
* 用途:厂区管理下拉框
* 用途:厂区管理下拉框
* 编写:songx
* 编写:songx
*/
*/
FACTORY_RECORD_BLOCK_ID
(
"factory_record_block_id"
,
"
factoryCode"
,
"factoryName"
,
"HPPZ011.que
ryComboBox"
),
FACTORY_RECORD_BLOCK_ID
(
"factory_record_block_id"
,
"
orgId"
,
"orgCname"
,
"HPXSOrg.queryFacto
ryComboBox"
),
/**
/**
* 模块:组管理
* 模块:组管理
* 用途:组管理下拉框
* 用途:组管理下拉框
* 编写:songx
* 编写:songx
*/
*/
GROUP_RECORD_BLOCK_ID
(
"group_record_block_id"
,
"
groupCode"
,
"groupName"
,
"HPPZ011
.queryGroupComboBox"
),
GROUP_RECORD_BLOCK_ID
(
"group_record_block_id"
,
"
orgId"
,
"orgCname"
,
"HPXSOrg
.queryGroupComboBox"
),
/**
/**
* 分厂与组一起查出,用于生产任务分派
* 分厂与组一起查出,用于生产任务分派
*/
*/
...
@@ -152,6 +152,7 @@ public enum DdynamicEnum {
...
@@ -152,6 +152,7 @@ public enum DdynamicEnum {
* 用途:项目档案下拉框
* 用途:项目档案下拉框
* 编写:wwl
* 编写:wwl
*/
*/
@Deprecated
ORG_PROD_BLOCK_ID
(
"org_prod_block_id"
,
"orgNo"
,
"orgName"
,
"HPSC005.queryOrgComboBox"
),
ORG_PROD_BLOCK_ID
(
"org_prod_block_id"
,
"orgNo"
,
"orgName"
,
"HPSC005.queryOrgComboBox"
),
...
...
src/main/java/com/baosight/hpjx/hp/xs/service/ServiceHPXSOrg.java
0 → 100644
View file @
25ffb498
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author:songx
* @date:2024/1/15,15:08
*/
public
class
ServiceHPXSOrg
extends
ServiceBase
{
/**
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"组织管理"
,
operType
=
"查询"
,
operDesc
=
"厂区下拉框"
)
public
EiInfo
queryFactoryComboBox
(
EiInfo
inInfo
)
{
try
{
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
EiInfoUtils
.
getFirstRow
(
inInfo
),
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询厂区失败"
);
}
return
inInfo
;
}
/**
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"组织管理"
,
operType
=
"查询"
,
operDesc
=
"组下拉框"
)
public
EiInfo
queryGroupComboBox
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
ObjectUtils
.
isEmpty
(
queryRow
.
get
(
"parentOrgId"
)))
{
queryRow
.
put
(
"parentOrgId"
,
CommonConstant
.
Field
.
ROOT
);
}
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
queryRow
,
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询组失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
View file @
25ffb498
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<sqlMap
namespace=
"HPXSOrg"
>
<sqlMap
namespace=
"HPXSOrg"
>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND IS_DELETED = '0'
<isNotEmpty
prepend=
" AND "
property=
"orgEname"
>
<isNotEmpty
prepend=
" AND "
property=
"orgEname"
>
ORG_ENAME = #orgEname#
ORG_ENAME = #orgEname#
</isNotEmpty>
</isNotEmpty>
...
@@ -12,9 +13,6 @@
...
@@ -12,9 +13,6 @@
<isNotEmpty
prepend=
" AND "
property=
"orgId"
>
<isNotEmpty
prepend=
" AND "
property=
"orgId"
>
ORG_ID = #orgId#
ORG_ID = #orgId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgIds"
>
ORG_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"orgIds"
>
#orgIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE = #orgType#
ORG_TYPE = #orgType#
</isNotEmpty>
</isNotEmpty>
...
@@ -26,6 +24,12 @@
...
@@ -26,6 +24,12 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"orgIds"
>
ORG_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"orgIds"
>
#orgIds[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
<isNotEmpty
property=
"order"
>
...
@@ -48,6 +52,7 @@
...
@@ -48,6 +52,7 @@
FROM ${platSchema}.TXSOG01
FROM ${platSchema}.TXSOG01
WHERE 1=1
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
<include
refid=
"order"
/>
</select>
</select>
...
@@ -57,6 +62,7 @@
...
@@ -57,6 +62,7 @@
FROM ${platSchema}.TXSOG01
FROM ${platSchema}.TXSOG01
WHERE 1=1
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<!-- 查询组织信息 -->
<!-- 查询组织信息 -->
...
@@ -66,9 +72,51 @@
...
@@ -66,9 +72,51 @@
ORG_CNAME as "orgCname"
ORG_CNAME as "orgCname"
FROM ${platSchema}.TXSOG01
FROM ${platSchema}.TXSOG01
WHERE 1=1
WHERE 1=1
AND ORG_TYPE
IN ('company', 'dept')
AND ORG_TYPE
!= 'org'
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
<include
refid=
"order"
/>
</select>
</select>
<!-- 查询厂区信息 -->
<select
id=
"queryFactoryComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
ORG_ID as "orgId",
ORG_CNAME as "orgCname"
FROM ${platSchema}.TXSOG01
WHERE 1=1
AND ORG_TYPE = 'factory'
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<!-- 查询组信息(递归) -->
<select
id=
"queryGroupComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
T2.LEVEL AS "level", T3.ORG_ID AS "orgId", T3.ORG_CNAME AS "orgCname"
FROM (
SELECT
@CODES AS CODES,
(SELECT @CODES := GROUP_CONCAT(ORG_ID)
FROM ${platSchema}.TXSOG01
WHERE FIND_IN_SET(PARENT_ORG_ID, @CODES)
) AS T1,
@LEVEL:= @LEVEL+1 AS LEVEL
FROM ${platSchema}.TXSOG01,
(SELECT @CODES:=#parentOrgId#, @LEVEL:= 0) T4
WHERE @CODES IS NOT NULL
) T2,
${platSchema}.TXSOG01 T3
WHERE 1=1
AND FIND_IN_SET(T3.ORG_ID, T2.CODES)
AND ORG_TYPE IN ('prodGroup', 'cutGroup')
<isNotEmpty
prepend=
" AND "
property=
"orgType"
>
ORG_TYPE = #orgType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
ORDER BY T2.LEVEL, T3.ORG_ID
</select>
</sqlMap>
</sqlMap>
src/main/webapp/HP/SC/HPSC005A.js
View file @
25ffb498
...
@@ -24,10 +24,10 @@ $(function () {
...
@@ -24,10 +24,10 @@ $(function () {
},
},
editor
:
function
(
container
,
options
)
{
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-
factoryCode
"
,
options
.
model
[
"factoryCode"
]);
inInfo
.
set
(
"inqu_status-0-
parentOrgId
"
,
options
.
model
[
"factoryCode"
]);
// 1:生产组
// 1:生产组
inInfo
.
set
(
"inqu_status-0-
groupType"
,
1
);
inInfo
.
set
(
"inqu_status-0-
orgType"
,
'prodGroup'
);
inInfo
.
set
(
"serviceName"
,
"HP
PZ011
"
);
inInfo
.
set
(
"serviceName"
,
"HP
XSOrg
"
);
inInfo
.
set
(
"methodName"
,
"queryGroupComboBox"
);
inInfo
.
set
(
"methodName"
,
"queryGroupComboBox"
);
inInfo
.
set
(
"blockId"
,
"group_record_block_id"
);
inInfo
.
set
(
"blockId"
,
"group_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
inInfo
.
set
(
"field"
,
options
.
field
);
...
@@ -64,8 +64,8 @@ $(function () {
...
@@ -64,8 +64,8 @@ $(function () {
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 生产组名称
// 生产组名称
let
inInfo
=
new
EiInfo
();
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-
groupType"
,
1
);
inInfo
.
set
(
"inqu_status-0-
orgType"
,
'prodGroup'
);
EiCommunicator
.
send
(
"HP
PZ011
"
,
"queryGroupComboBox"
,
inInfo
,
{
EiCommunicator
.
send
(
"HP
XSOrg
"
,
"queryGroupComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
onSuccess
:
function
(
ei
)
{
factoryGroupGlobalData
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
factoryGroupGlobalData
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
},
...
...
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