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
6676c729
Commit
6676c729
authored
Jul 29, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-26 定时添加设备计划
parent
3ae5eda1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
18 deletions
+35
-18
ServiceHGSB002A.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
+2
-2
HGSB001.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
+1
-1
HGSB002.js
src/main/webapp/HG/SB/HGSB002.js
+8
-9
HGSB002.jsp
src/main/webapp/HG/SB/HGSB002.jsp
+2
-2
HGSB002A.js
src/main/webapp/HG/SB/HGSB002A.js
+20
-3
HGSB002A.jsp
src/main/webapp/HG/SB/HGSB002A.jsp
+2
-1
No files found.
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
View file @
6676c729
...
@@ -34,7 +34,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
...
@@ -34,7 +34,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
String
companyCode
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODE
);
String
companyCode
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB001
.
FIELD_COMPANY_CODE
);
String
groupCode
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_GROUP_CODE
);
//
String groupCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB002A.FIELD_GROUP_CODE);
inInfo
=
super
.
query
(
inInfo
,
HGSB002A
.
QUERY
,
new
HGSB002A
());
inInfo
=
super
.
query
(
inInfo
,
HGSB002A
.
QUERY
,
new
HGSB002A
());
/*Map qarma = new HashMap();
/*Map qarma = new HashMap();
Map userCompany = HGSBTools.getUserCompany();
Map userCompany = HGSBTools.getUserCompany();
...
@@ -46,7 +46,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
...
@@ -46,7 +46,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
new
HashMap
<
String
,
Object
>(){{
put
(
HGSB001
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HGSB001
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HGSB002A
.
FIELD_GROUP_CODE
,
groupCode
);
/*put(HGSB002A.FIELD_GROUP_CODE,groupCode);*/
put
(
HGSB002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
put
(
HGSB002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
);
);
return
inInfo
;
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB001.xml
View file @
6676c729
...
@@ -409,7 +409,7 @@
...
@@ -409,7 +409,7 @@
<select
id=
"queryDeviceCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryDeviceCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT distinct
SELECT distinct
DEVICE_CODE as "deviceCode",
<!-- 设备编码 -->
DEVICE_CODE as "deviceCode",
<!-- 设备编码 -->
CONCAT(DEVICE_NAME,'
-',DEVICE_CODE,'-
',DEVICE_MODEL) as "deviceName",
<!-- 设备名称 -->
CONCAT(DEVICE_NAME,'
[',DEVICE_CODE,']
',DEVICE_MODEL) as "deviceName",
<!-- 设备名称 -->
DEVICE_TYPE as "deviceType",
<!-- 设备类型 -->
DEVICE_TYPE as "deviceType",
<!-- 设备类型 -->
COMPANY_CODE as "companyCode",
COMPANY_CODE as "companyCode",
DEVICE_STATUS as "deviceStatus"
DEVICE_STATUS as "deviceStatus"
...
...
src/main/webapp/HG/SB/HGSB002.js
View file @
6676c729
...
@@ -43,7 +43,7 @@ $(function () {
...
@@ -43,7 +43,7 @@ $(function () {
let
template
=
''
;
let
template
=
''
;
if
(
item
.
companyCode
&&
item
.
groupCode
)
{
if
(
item
.
companyCode
&&
item
.
groupCode
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
companyCode
+
'
\'
,
\'
'
+
item
.
companyName
+
'
\'
,
\'
'
+
item
.
groupCode
+
'
\'
,
\'
'
+
item
.
groupName
+
'
\'
)" >计划详情</a>'
;
+
'onclick="showDetail('
+
item
.
id
+
',
\'
'
+
item
.
companyCode
+
'
\'
,
\'
'
+
item
.
companyName
+
'
\'
)" >计划详情</a>'
;
if
(
auditStatus
==
0
)
{
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateStatus('
+
item
.
id
+
',1)" >审批完成</a>'
;
'onclick="updateStatus('
+
item
.
id
+
',1)" >审批完成</a>'
;
...
@@ -101,7 +101,7 @@ $(function () {
...
@@ -101,7 +101,7 @@ $(function () {
}
}
return
dataItem
[
"companyCode"
];
return
dataItem
[
"companyCode"
];
}
}
},
{
}
/*
, {
field: "groupCode",
field: "groupCode",
title: "设备区域",
title: "设备区域",
filter: function (options) {
filter: function (options) {
...
@@ -126,7 +126,7 @@ $(function () {
...
@@ -126,7 +126,7 @@ $(function () {
}
}
return dataItem["groupCode"]
return dataItem["groupCode"]
}
}
},
{
}
*/
,
{
field
:
"planUserId"
,
field
:
"planUserId"
,
title
:
"计划人"
,
title
:
"计划人"
,
filter
:
function
(
option
)
{
filter
:
function
(
option
)
{
...
@@ -281,7 +281,7 @@ let save = function (btnNode) {
...
@@ -281,7 +281,7 @@ let save = function (btnNode) {
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
companyCode
=
item
.
get
(
"companyCode"
);
let
companyCode
=
item
.
get
(
"companyCode"
);
let
groupCode
=
item
.
get
(
"groupCode"
);
//
let groupCode= item.get("groupCode");
let
planDate
=
item
.
get
(
"planDate"
);
let
planDate
=
item
.
get
(
"planDate"
);
let
planType
=
item
.
get
(
"planType"
);
let
planType
=
item
.
get
(
"planType"
);
let
planStartDate
=
item
.
get
(
"planStartDate"
);
let
planStartDate
=
item
.
get
(
"planStartDate"
);
...
@@ -293,11 +293,11 @@ let save = function (btnNode) {
...
@@ -293,11 +293,11 @@ let save = function (btnNode) {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isBlank
(
groupCode
)){
/*
if(isBlank(groupCode)){
message("选中的第"+(index+1)+"行\"设备区域\",不能为空!");
message("选中的第"+(index+1)+"行\"设备区域\",不能为空!");
flag = false;
flag = false;
return false;
return false;
}
}
*/
if
(
isBlank
(
planDate
)){
if
(
isBlank
(
planDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划日期
\"
,不能为空!"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划日期
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
...
@@ -369,10 +369,9 @@ function updateStatus(id,deviceStatus) {
...
@@ -369,10 +369,9 @@ function updateStatus(id,deviceStatus) {
/**
/**
* 显示详情
* 显示详情
*/
*/
function
showDetail
(
id
,
companyCode
,
companyName
,
groupCode
,
groupName
)
{
function
showDetail
(
id
,
companyCode
,
companyName
)
{
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGSB002A?methodName=initLoad&inqu_status-0-parentId="
+
id
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-companyName="
+
companyName
+
href
:
"HGSB002A?methodName=initLoad&inqu_status-0-parentId="
+
id
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-companyName="
+
companyName
,
"&inqu_status-0-groupCode="
+
groupCode
+
"&inqu_status-0-groupName="
+
groupName
,
title
:
"<div style='text-align: center;'>设备计划详情</div>"
,
title
:
"<div style='text-align: center;'>设备计划详情</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/SB/HGSB002.jsp
View file @
6676c729
...
@@ -57,13 +57,13 @@
...
@@ -57,13 +57,13 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</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="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="group_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
--%>
<EF:EFColumn ename="planDate" cname="计划日期" width="120" enable="true" readonly="false" align="center" editType="date"
<EF:EFColumn ename="planDate" 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"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" enable="false" readonly="true" align="center"/>
...
...
src/main/webapp/HG/SB/HGSB002A.js
View file @
6676c729
...
@@ -31,8 +31,13 @@ $(function () {
...
@@ -31,8 +31,13 @@ $(function () {
attributes
:
{
attributes
:
{
class
:
"i-input-readonly"
class
:
"i-input-readonly"
},
},
defaultValue
:
function
()
{
/*
defaultValue: function () {
return __eiInfo.getBlock("inqu_status").getMappedRows()[0]["groupCode"];
return __eiInfo.getBlock("inqu_status").getMappedRows()[0]["groupCode"];
},*/
filter
:
function
(
options
)
{
return
_
.
filter
(
groupCodeBox
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
__eiInfo
.
getBlock
(
"inqu_status"
).
getMappedRows
()[
0
][
"companyCode"
]
;
})
},
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
groupCodeBox
.
length
;
i
++
)
{
...
@@ -58,8 +63,9 @@ $(function () {
...
@@ -58,8 +63,9 @@ $(function () {
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
deviceCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
deviceCodeBox
.
length
;
i
++
)
{
if
(
deviceCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'deviceCode'
])
{
if
(
deviceCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'deviceCode'
])
{
dataItem
[
'deviceName'
]
=
deviceCodeBox
[
i
][
'textField'
].
split
(
"-"
)[
0
]
//dataItem['deviceName'] = deviceCodeBox[i]['textField'].split("[","]")[1]
return
deviceCodeBox
[
i
][
'textField'
].
split
(
"-"
)[
0
];
//let deviceName = deviceCodeBox[i]['textField'].split("[")[0];
return
deviceCodeBox
[
i
][
'textField'
].
split
(
"["
)[
0
]
}
}
}
}
return
dataItem
[
"deviceCode"
]
return
dataItem
[
"deviceCode"
]
...
@@ -83,6 +89,17 @@ $(function () {
...
@@ -83,6 +89,17 @@ $(function () {
if
(
e
.
field
===
"deviceType"
)
{
if
(
e
.
field
===
"deviceType"
)
{
loadChange
(
grid
,
e
,
"deviceCode"
);
loadChange
(
grid
,
e
,
"deviceCode"
);
}
else
if
(
e
.
field
===
"deviceCode"
)
{
}
else
if
(
e
.
field
===
"deviceCode"
)
{
let
item
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
deviceCodeBox
.
length
;
i
++
)
{
let
deviceName
=
deviceCodeBox
[
i
][
'textField'
].
split
(
"["
)[
0
];
let
deviceModel
=
deviceCodeBox
[
i
][
'textField'
].
split
(
"]"
)[
1
]
if
(
deviceCodeBox
[
i
][
'valueField'
]
===
item
[
'deviceCode'
])
{
resultGrid
.
setCellValue
(
item
,
"deviceName"
,
deviceName
);
resultGrid
.
setCellValue
(
item
,
"deviceModel"
,
deviceModel
);
loadChange
(
grid
,
e
,
"checkItem"
);
break
;
}
}
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
loadChange
(
grid
,
e
,
"deviceType"
);
loadChange
(
grid
,
e
,
"deviceType"
);
}
}
...
...
src/main/webapp/HG/SB/HGSB002A.jsp
View file @
6676c729
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<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" enable="fals
e"
<EF:EFComboColumn ename="groupCode" cname="设备区域" readonly="
false" enable="tru
e"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" width="220" required="true"
maxLength="16" width="220" required="true"
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="deviceModel" cname="设备型号" width="120" enable="false" readonly="false" align="center"/>
<EF:EFColumn ename="checkItem" cname="检查项" width="150" enable="true" align="center" required="true"/>
<EF:EFColumn ename="checkItem" cname="检查项" width="150" enable="true" align="center" required="true"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" type="textarea" width="200" align="center"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" type="textarea" width="200" align="center"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
...
...
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