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
45307280
Commit
45307280
authored
May 20, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-20 优化设备预警
parent
ce891bcb
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
81 additions
and
21 deletions
+81
-21
HGSB004.java
src/main/java/com/baosight/hggp/hg/sb/domain/HGSB004.java
+1
-0
ServiceHGSB002A.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
+14
-7
ServiceHGSB006.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
+3
-2
HGSB006.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
+4
-4
HGSB007.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
+2
-2
HGSBTools.java
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
+10
-0
HGSB002.js
src/main/webapp/HG/SB/HGSB002.js
+8
-1
HGSB002.jsp
src/main/webapp/HG/SB/HGSB002.jsp
+2
-2
HGSB003.js
src/main/webapp/HG/SB/HGSB003.js
+7
-0
HGSB004.js
src/main/webapp/HG/SB/HGSB004.js
+8
-1
HGSB004A.js
src/main/webapp/HG/SB/HGSB004A.js
+6
-0
HGSB005.js
src/main/webapp/HG/SB/HGSB005.js
+8
-1
HGSB006.js
src/main/webapp/HG/SB/HGSB006.js
+7
-0
HGSB007.js
src/main/webapp/HG/SB/HGSB007.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sb/domain/HGSB004.java
View file @
45307280
...
...
@@ -43,6 +43,7 @@ public class HGSB004 extends DaoEPBase {
public
static
final
String
FIELD_INSPEC_USER_ID
=
"inspecUserId"
;
/* 点检人编码*/
public
static
final
String
FIELD_INSPEC_USER_NAME
=
"inspecUserName"
;
/* 点检人名称*/
public
static
final
String
FIELD_CHECK_STATUS
=
"checkStatus"
;
/* 审核状态 0-停止 1-启用*/
public
static
final
String
FIELD_INIT_CHECK_STATUS
=
"initCheckStatus"
;
/* 审核状态 0-停止 1-启用*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 账套*/
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
View file @
45307280
...
...
@@ -5,7 +5,10 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB001
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB002A
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
...
...
@@ -18,10 +21,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @author LiuYang
...
...
@@ -81,11 +81,18 @@ public class ServiceHGSB002A extends ServiceEPBase {
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGSB002A
hgsb002a
=
new
HGSB002A
();
hgsb002a
.
fromMap
(
resultRows
.
get
(
i
));
hgsb002a
.
fromMap
(
resultRow
);
Long
parentId
=
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_PARENT_ID
));
HGSB002
hgsb002
=
HGSBTools
.
Hgsb002
.
get
(
parentId
);
// 任务状态==1抛出异常
if
(
hgsb002
.
getTaskStatus
()==
1
)
{
String
str
=
hgsb002
.
getPlanType
()
==
1
?
"设备计划已生成点检任务,添加失败"
:
"设备计划已生成保养任务,添加失败"
;
throw
new
PlatException
(
str
);
}
if
(
hgsb002a
.
getId
()
==
null
||
hgsb002a
.
getId
()
==
0
)
{
hgsb002a
.
setParentId
(
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_PARENT_ID
))
);
hgsb002a
.
setParentId
(
parentId
);
this
.
add
(
hgsb002a
);
}
else
{
this
.
modify
(
hgsb002a
);
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB006.java
View file @
45307280
...
...
@@ -22,18 +22,19 @@ public class ServiceHGSB006 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB006
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_
INIT_
CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
inInfo
=
super
.
query
(
inInfo
,
HGSB006
.
QUERY
,
new
HGSB006
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
DEVICE_CODE_BOX_BLOCK_ID
),
null
);
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
removeCol
(
HGSB004
.
FIELD_CHECK_STATUS
);
return
inInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB006
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB004
.
FIELD_
INIT_
CHECK_STATUS
,
CommonConstant
.
YesNo
.
YES_1
);
return
super
.
query
(
inInfo
,
HGSB006
.
QUERY
,
new
HGSB006
());
}
}
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
View file @
45307280
...
...
@@ -128,15 +128,15 @@
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
c
heckStatus"
>
B.CHECK_STATUS = #
c
heckStatus#
<isNotEmpty
prepend=
" AND "
property=
"
initC
heckStatus"
>
B.CHECK_STATUS = #
initC
heckStatus#
</isNotEmpty>
<
!--<
isEqual prepend=" AND " property="checkStatus" compareValue="1">
<isEqual
prepend=
" AND "
property=
"checkStatus"
compareValue=
"1"
>
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual
prepend=
" AND "
property=
"checkStatus"
compareValue=
"2"
>
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
-->
</isEqual>
</sql>
<select
id=
"query"
parameterClass=
"HashMap"
resultClass=
"HGSB006"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
View file @
45307280
...
...
@@ -137,12 +137,12 @@
<isNotEmpty
prepend=
" AND "
property=
"checkStatus"
>
B.CHECK_STATUS = #checkStatus#
</isNotEmpty>
<
!--<
isEqual prepend=" AND " property="upkeepStatus" compareValue="1">
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"1"
>
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"2"
>
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
-->
</isEqual>
</sql>
<select
id=
"query"
parameterClass=
"HashMap"
resultClass=
"HGSB007"
>
...
...
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
View file @
45307280
...
...
@@ -25,6 +25,16 @@ public class HGSBTools {
*/
public
static
class
Hgsb002
{
public
static
HGSB002
get
(
Long
id
){
AssertUtils
.
isNull
(
id
,
"设备计划不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGSB002
.
FIELD_ID
,
id
);
queryMap
.
put
(
HGSB002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
HGSB002
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB002
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
"设备计划不存在"
);
return
results
.
get
(
0
);
}
/**
* 查询设备计划详情
*
...
...
src/main/webapp/HG/SB/HGSB002.js
View file @
45307280
...
...
@@ -8,12 +8,19 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
query
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFAutoComplete
=
{
"inqu_status-0-deviceName"
:
{
minLength
:
1
,
dataSource
:
{
pageSize
:
1
0
,
pageSize
:
0
,
serverPaging
:
true
,
serverFiltering
:
true
}
...
...
src/main/webapp/HG/SB/HGSB002.jsp
View file @
45307280
...
...
@@ -58,9 +58,9 @@
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="groupCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="planDate" cname="计划日期" width="1
2
0" enable="true" readonly="true" align="center" editType="date"
<EF:EFColumn ename="planDate" cname="计划日期" width="1
0
0" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="1
00" enable="false" readonly="true" align="center" required="true
"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="1
20" enable="false" readonly="true" align="center
"/>
<EF:EFComboColumn ename="planType" cname="计划类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
...
...
src/main/webapp/HG/SB/HGSB003.js
View file @
45307280
...
...
@@ -8,6 +8,13 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
query
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
...
...
src/main/webapp/HG/SB/HGSB004.js
View file @
45307280
...
...
@@ -7,7 +7,14 @@ $(function () {
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#BUE_PLAN"
).
on
(
"click"
,
taskResult
)
$
(
"#BUE_PLAN"
).
on
(
"click"
,
taskResult
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
...
...
src/main/webapp/HG/SB/HGSB004A.js
View file @
45307280
...
...
@@ -7,6 +7,12 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
query
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
...
...
src/main/webapp/HG/SB/HGSB005.js
View file @
45307280
...
...
@@ -7,7 +7,14 @@ $(function () {
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#BUE_PLAN"
).
on
(
"click"
,
taskResult
)
$
(
"#BUE_PLAN"
).
on
(
"click"
,
taskResult
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
...
...
src/main/webapp/HG/SB/HGSB006.js
View file @
45307280
...
...
@@ -4,6 +4,13 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
query
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
...
...
src/main/webapp/HG/SB/HGSB007.js
View file @
45307280
...
...
@@ -123,7 +123,7 @@ $(function () {
template
:
function
(
item
)
{
let
earlyStatus
;
if
(
!
isBlank
(
item
.
checkResult
.
trim
())
||
!
isBlank
(
item
.
docId
.
trim
())){
earlyStatus
=
"<span>已完成</span>"
;
;
earlyStatus
=
"<span>已完成</span>"
;
}
else
if
(
item
.
remainderDays
==
0
){
earlyStatus
=
"<span style='color: #67c20b'>保养期</span>"
;
}
else
if
(
item
.
remainderDays
<
0
){
...
...
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