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
9d0386d7
Commit
9d0386d7
authored
May 24, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
cfc47693
5db22179
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
132 additions
and
71 deletions
+132
-71
CommonConstant.java
.../java/com/baosight/hggp/core/constant/CommonConstant.java
+15
-0
ServiceHGSB002.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
+19
-17
ServiceHGSB002A.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
+8
-6
ServiceHGSB003.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
+6
-15
ServiceHGSB004.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
+13
-10
ServiceHGSB004A.java
...java/com/baosight/hggp/hg/sb/service/ServiceHGSB004A.java
+10
-10
HGSB002.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB002.xml
+2
-2
HGSBTools.java
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
+41
-3
HGSB002.js
src/main/webapp/HG/SB/HGSB002.js
+5
-0
HGSB002.jsp
src/main/webapp/HG/SB/HGSB002.jsp
+7
-2
HGSB002A.jsp
src/main/webapp/HG/SB/HGSB002A.jsp
+4
-4
HGSB004.jsp
src/main/webapp/HG/SB/HGSB004.jsp
+2
-2
No files found.
src/main/java/com/baosight/hggp/core/constant/CommonConstant.java
View file @
9d0386d7
package
com
.
baosight
.
hggp
.
core
.
constant
;
package
com
.
baosight
.
hggp
.
core
.
constant
;
import
com.baosight.iplat4j.core.security.user.User
;
/**
/**
* @author:songx
* @author:songx
* @date:2022/11/1,17:08
* @date:2022/11/1,17:08
...
@@ -53,6 +55,19 @@ public class CommonConstant {
...
@@ -53,6 +55,19 @@ public class CommonConstant {
}
}
/**
/**
* 设备计划状态
*
* @author:songx
* @date:2024/1/20,15:04
*/
public
static
class
PlanStatus
{
// 审核通过
public
static
final
Integer
UN_PLAN
=
1
;
// 待审核
public
static
final
Integer
ON_PLAN
=
0
;
}
/**
* 常用字段常量
* 常用字段常量
*
*
* @author:songx
* @author:songx
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002.java
View file @
9d0386d7
...
@@ -6,13 +6,11 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,13 +6,11 @@ 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.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
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
@@ -62,13 +60,17 @@ public class ServiceHGSB002 extends ServiceEPBase {
...
@@ -62,13 +60,17 @@ public class ServiceHGSB002 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
block
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
block
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
String
startDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
);
String
planDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_DATE
);
String
endDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
);
String
planStartDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_START_DATE
);
if
(!
startDate
.
isEmpty
())
{
String
planEndDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_END_DATE
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_START_DATE
,
StringUtil
.
removeHorizontalLine
(
startDate
));
if
(!
planDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_DATE
,
StringUtil
.
removeHorizontalLine
(
planDate
));
}
}
if
(!
endDate
.
isEmpty
()){
if
(!
planStartDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
ACConstants
.
SQL_END_DATE
,
StringUtil
.
removeHorizontalLine
(
endDate
));
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_START_DATE
,
StringUtil
.
removeHorizontalLine
(
planStartDate
));
}
if
(!
planEndDate
.
isEmpty
()){
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002
.
FIELD_PLAN_END_DATE
,
StringUtil
.
removeHorizontalLine
(
planEndDate
));
}
}
return
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
return
super
.
query
(
inInfo
,
HGSB002
.
QUERY
,
new
HGSB002
());
}
}
...
@@ -93,9 +95,9 @@ public class ServiceHGSB002 extends ServiceEPBase {
...
@@ -93,9 +95,9 @@ public class ServiceHGSB002 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
(
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
//
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError
(
"删除失败"
,
e
.
getMessage
());
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
return
inInfo
;
}
}
...
@@ -147,20 +149,20 @@ public class ServiceHGSB002 extends ServiceEPBase {
...
@@ -147,20 +149,20 @@ public class ServiceHGSB002 extends ServiceEPBase {
public
EiInfo
updateStatus
(
EiInfo
inInfo
){
public
EiInfo
updateStatus
(
EiInfo
inInfo
){
int
i
=
0
;
int
i
=
0
;
try
{
try
{
HGSB002
hgsb002
=
new
HGSB002
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HGSB002
hgsb002
=
new
HGSB002
();
hgsb002
.
fromMap
(
map
);
hgsb002
.
fromMap
(
map
);
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
List
list
=
HGSBTools
.
Hgsb002
.
getDetails
(
hgsb002
.
getId
());
AssertUtils
.
isEmpty
(
list
,
"设备计划详情不能为空,无法审批完成!"
);
DaoUtils
.
update
(
HGSB002
.
UPDATE_STATUS
,
hgsb002
);
DaoUtils
.
update
(
HGSB002
.
UPDATE_STATUS
,
hgsb002
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"审批失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB002A.java
View file @
9d0386d7
...
@@ -63,6 +63,11 @@ public class ServiceHGSB002A extends ServiceEPBase {
...
@@ -63,6 +63,11 @@ public class ServiceHGSB002A extends ServiceEPBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
int
i
=
0
;
int
i
=
0
;
try
{
try
{
Long
parentId
=
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_PARENT_ID
));
HGSB002
hgsb002
=
HGSBTools
.
Hgsb002
.
get
(
parentId
);
if
(
hgsb002
.
getPlanStatus
().
equals
(
CommonConstant
.
PlanStatus
.
UN_PLAN
)){
throw
new
PlatException
(
"设备计划审批已完成,无法删除"
);
}
HGSB002A
hgsb002a
=
new
HGSB002A
();
HGSB002A
hgsb002a
=
new
HGSB002A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
...
@@ -74,10 +79,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
...
@@ -74,10 +79,7 @@ public class ServiceHGSB002A extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
...
@@ -96,12 +98,12 @@ public class ServiceHGSB002A extends ServiceEPBase {
...
@@ -96,12 +98,12 @@ public class ServiceHGSB002A extends ServiceEPBase {
hgsb002a
.
fromMap
(
resultRow
);
hgsb002a
.
fromMap
(
resultRow
);
// 状态==1抛出异常
// 状态==1抛出异常
if
(
hgsb002
.
getPlanStatus
()==
1
)
{
if
(
hgsb002
.
getPlanStatus
()==
1
)
{
String
str
=
"设备计划已审批完成,
添加
失败!"
;
String
str
=
"设备计划已审批完成,
保存
失败!"
;
throw
new
PlatException
(
str
);
throw
new
PlatException
(
str
);
}
}
for
(
HGSB002A
hgsb002a1:
hgsb002AList
)
{
for
(
HGSB002A
hgsb002a1:
hgsb002AList
)
{
if
(
hgsb002a1
.
getDeviceCode
().
equals
(
hgsb002a
.
getDeviceCode
()))
{
if
(
hgsb002a1
.
getDeviceCode
().
equals
(
hgsb002a
.
getDeviceCode
()))
{
String
str
=
String
.
format
(
"
设备计划详情[%s]设备已添加,无法重复添加失败!"
,
hgsb002a
.
getDeviceName
()
);
String
str
=
String
.
format
(
"
无法重复添加!"
);
throw
new
PlatException
(
str
);
throw
new
PlatException
(
str
);
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB003.java
View file @
9d0386d7
...
@@ -80,16 +80,15 @@ public class ServiceHGSB003 extends ServiceEPBase {
...
@@ -80,16 +80,15 @@ public class ServiceHGSB003 extends ServiceEPBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsb003
.
fromMap
(
map
);
hgsb003
.
fromMap
(
map
);
hgsb003
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
hgsb003
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hgsb003
.
getStatus
().
equals
(
CommonConstant
.
PlanStatus
.
UN_PLAN
)){
throw
new
PlatException
(
"维保申请审批完成,无法删除"
);
}
DaoUtils
.
update
(
HGSB003
.
DELETE_FLAG
,
hgsb003
.
toMap
());
DaoUtils
.
update
(
HGSB003
.
DELETE_FLAG
,
hgsb003
.
toMap
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
@@ -149,11 +148,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
...
@@ -149,11 +148,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
@@ -172,11 +167,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
...
@@ -172,11 +167,7 @@ public class ServiceHGSB003 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"上传失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004.java
View file @
9d0386d7
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.sb.service;
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.sb.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
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
;
...
@@ -85,16 +86,22 @@ public class ServiceHGSB004 extends ServiceEPBase {
...
@@ -85,16 +86,22 @@ public class ServiceHGSB004 extends ServiceEPBase {
String
str
=
"设备点检已审批完成,无法删除!"
;
String
str
=
"设备点检已审批完成,无法删除!"
;
throw
new
PlatException
(
str
);
throw
new
PlatException
(
str
);
}
}
Map
map1
=
new
HashMap
<>();
map1
.
put
(
HGSB002
.
FIELD_COMPANY_CODE
,
hgsb004
.
getCompanyCode
());
map1
.
put
(
HGSB002
.
FIELD_PLAN_CODE
,
hgsb004
.
getPlanCode
());
map1
.
put
(
HGSB002
.
FIELD_PLAN_START_DATE
,
hgsb004
.
getPlanStartDate
());
map1
.
put
(
HGSB002
.
FIELD_PLAN_END_DATE
,
hgsb004
.
getPlanEndDate
());
List
<
HGSB002
>
list
=
DaoBase
.
getInstance
().
query
(
HGSB002
.
QUERY
,
map1
);
for
(
HGSB002
hgsb002
:
list
){
hgsb002
.
setTaskStatus
(
0
);
DaoUtils
.
update
(
HGSB002
.
UPDATE
,
hgsb002
);
}
DaoUtils
.
update
(
HGSB004
.
DELETE_FLAG
,
hgsb004
.
toMap
());
DaoUtils
.
update
(
HGSB004
.
DELETE_FLAG
,
hgsb004
.
toMap
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
@@ -155,11 +162,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
...
@@ -155,11 +162,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB004A.java
View file @
9d0386d7
...
@@ -4,8 +4,11 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,8 +4,11 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
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.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.domain.HGSB002A
;
import
com.baosight.hggp.hg.sb.domain.HGSB004
;
import
com.baosight.hggp.hg.sb.domain.HGSB004
;
import
com.baosight.hggp.hg.sb.domain.HGSB004A
;
import
com.baosight.hggp.hg.sb.domain.HGSB004A
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
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
;
...
@@ -55,6 +58,11 @@ public class ServiceHGSB004A extends ServiceEPBase {
...
@@ -55,6 +58,11 @@ public class ServiceHGSB004A extends ServiceEPBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
int
i
=
0
;
int
i
=
0
;
try
{
try
{
Long
parentId
=
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSB002A
.
FIELD_PARENT_ID
));
HGSB004
hgsb004
=
HGSBTools
.
Hgsb004
.
getId
(
parentId
);
if
(
hgsb004
.
getCheckStatus
().
equals
(
CommonConstant
.
PlanStatus
.
UN_PLAN
)){
throw
new
PlatException
(
"设备点检审批完成,无法删除"
);
}
HGSB004A
hgsb004a
=
new
HGSB004A
();
HGSB004A
hgsb004a
=
new
HGSB004A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
...
@@ -66,11 +74,7 @@ public class ServiceHGSB004A extends ServiceEPBase {
...
@@ -66,11 +74,7 @@ public class ServiceHGSB004A extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
@@ -126,11 +130,7 @@ public class ServiceHGSB004A extends ServiceEPBase {
...
@@ -126,11 +130,7 @@ public class ServiceHGSB004A extends ServiceEPBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"上传失败"
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
}
return
inInfo
;
return
inInfo
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB002.xml
View file @
9d0386d7
...
@@ -139,10 +139,10 @@
...
@@ -139,10 +139,10 @@
PLAN_TYPE = #planType#
PLAN_TYPE = #planType#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planStartDate"
>
<isNotEmpty
prepend=
" AND "
property=
"planStartDate"
>
PLAN_START_DATE = #planStartDate#
PLAN_START_DATE
>
= #planStartDate#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planEndDate"
>
<isNotEmpty
prepend=
" AND "
property=
"planEndDate"
>
PLAN_END_DATE = #planEndDate#
PLAN_END_DATE
<
= #planEndDate#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planUserId"
>
<isNotEmpty
prepend=
" AND "
property=
"planUserId"
>
PLAN_USER_ID = #planUserId#
PLAN_USER_ID = #planUserId#
...
...
src/main/java/com/baosight/hggp/hg/sb/tools/HGSBTools.java
View file @
9d0386d7
...
@@ -23,7 +23,9 @@ import java.util.*;
...
@@ -23,7 +23,9 @@ import java.util.*;
*/
*/
public
class
HGSBTools
{
public
class
HGSBTools
{
/*查询当前用户是否拥有全部权限*/
/**
* 查询当前用户是否拥有全部权限
*/
public
static
Boolean
getRoleDataAuth
(){
public
static
Boolean
getRoleDataAuth
(){
boolean
onlyPeople
=
false
;
boolean
onlyPeople
=
false
;
// 当前用户所有角色
// 当前用户所有角色
...
@@ -37,7 +39,8 @@ public class HGSBTools {
...
@@ -37,7 +39,8 @@ public class HGSBTools {
return
onlyPeople
;
return
onlyPeople
;
}
}
/*查询用户所属公司
/**
* 查询用户所属公司
*/
*/
public
static
Map
<
String
,
Object
>
getUserCompany
(){
public
static
Map
<
String
,
Object
>
getUserCompany
(){
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
...
@@ -55,7 +58,8 @@ public class HGSBTools {
...
@@ -55,7 +58,8 @@ public class HGSBTools {
return
orgMap
;
return
orgMap
;
}
}
/*查询用户所属公司用户
/**
* 查询用户所属公司用户
*/
*/
public
static
List
<
String
>
getOrgId
(){
public
static
List
<
String
>
getOrgId
(){
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
Map
<
String
,
Object
>
orgMap
=
new
HashMap
();
...
@@ -97,6 +101,11 @@ public class HGSBTools {
...
@@ -97,6 +101,11 @@ public class HGSBTools {
return
results
.
get
(
0
);
return
results
.
get
(
0
);
}
}
public
static
List
<
HGSB002
>
getList
(
Map
queryMap
)
{
List
<
HGSB002
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB002
.
QUERY
,
queryMap
);
return
results
;
}
/**
/**
* 查询设备计划详情
* 查询设备计划详情
*
*
...
@@ -122,6 +131,21 @@ public class HGSBTools {
...
@@ -122,6 +131,21 @@ public class HGSBTools {
/**
/**
* 查询
* 查询
*
*
* @param id
*/
public
static
HGSB004
getId
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"设备点检不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGSB004
.
FIELD_ID
,
id
);
queryMap
.
put
(
HGSB004
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
HGSB004
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB004
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
"设备点检不存在"
);
return
results
.
get
(
0
);
}
/**
* 查询
*
* @param hgsb004
* @param hgsb004
*/
*/
public
static
List
<
HGSB004
>
get
(
HGSB004
hgsb004
)
{
public
static
List
<
HGSB004
>
get
(
HGSB004
hgsb004
)
{
...
@@ -129,5 +153,19 @@ public class HGSBTools {
...
@@ -129,5 +153,19 @@ public class HGSBTools {
List
<
HGSB004
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB004
.
QUERY
,
hgsb004
);
List
<
HGSB004
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB004
.
QUERY
,
hgsb004
);
return
results
;
return
results
;
}
}
/**
* 查询设备点检详情
*
* @param parentId
*/
public
static
List
<
HGSB004A
>
getDetails
(
Long
parentId
)
{
AssertUtils
.
isNull
(
parentId
,
"设备点检不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGSB004A
.
FIELD_PARENT_ID
,
parentId
);
queryMap
.
put
(
HGSB004A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
List
<
HGSB004A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSB004A
.
QUERY
,
queryMap
);
return
results
;
}
}
}
}
}
src/main/webapp/HG/SB/HGSB002.js
View file @
9d0386d7
...
@@ -320,8 +320,13 @@ function updateStatus(id,deviceStatus) {
...
@@ -320,8 +320,13 @@ function updateStatus(id,deviceStatus) {
inEiInfo
.
set
(
"result-0-planStatus"
,
deviceStatus
);
inEiInfo
.
set
(
"result-0-planStatus"
,
deviceStatus
);
EiCommunicator
.
send
(
'HGSB002'
,
'updateStatus'
,
inEiInfo
,
{
EiCommunicator
.
send
(
'HGSB002'
,
'updateStatus'
,
inEiInfo
,
{
onSuccess
(
response
)
{
onSuccess
(
response
)
{
if
(
response
.
status
==
1
){
NotificationUtil
(
response
.
msg
);
NotificationUtil
(
response
.
msg
);
query
();
query
();
}
else
{
NotificationUtil
(
response
.
msg
,
"error"
);
}
},
},
onFail
(
errorMessage
,
status
,
e
)
{
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
NotificationUtil
(
"执行失败!"
,
"error"
);
...
...
src/main/webapp/HG/SB/HGSB002.jsp
View file @
9d0386d7
...
@@ -33,9 +33,14 @@
...
@@ -33,9 +33,14 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsb.planType"/>
<EF:EFCodeOption codeName="hggp.hgsb.planType"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planDate" cname="计划日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planUserName" cname="计划人" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="planUserName" cname="计划人" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="startDate" cname="计划开始日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDateSpan startCname="计划开始日期" endCname="计划结束日期" blockId="inqu_status"
<EF:EFDatePicker blockId="inqu_status" row="0" ename="endDate" cname="计划结束日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<%--<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"/>--%>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HG/SB/HGSB002A.jsp
View file @
9d0386d7
...
@@ -39,25 +39,25 @@
...
@@ -39,25 +39,25 @@
<EF:EFComboColumn ename="groupCode" cname="设备区域" enable="false"
<EF:EFComboColumn ename="groupCode" cname="设备区域" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="
tru
e" width="120" required="true"
maxLength="16" readonly="
fals
e" width="120" 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="80" readonly="
tru
e" required="true"
maxLength="16" width="80" readonly="
fals
e" 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>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
maxLength="16" readonly="
tru
e" width="120" required="true"
maxLength="16" readonly="
fals
e" width="120" required="true"
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="checkItem" cname="检查项" width="100" enable="true"
readonly="true"
align="center" required="true"/>
<EF:EFColumn ename="checkItem" cname="检查项" width="100" enable="true" align="center" required="true"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" type="textarea" width="160" align="center"/>
<EF:EFColumn ename="checkDescrip" cname="检查描述" type="textarea" width="160" align="center"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
enable="false"/>
...
...
src/main/webapp/HG/SB/HGSB004.jsp
View file @
9d0386d7
...
@@ -46,8 +46,8 @@
...
@@ -46,8 +46,8 @@
</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"/>
<EF:EFColumn ename="inspecCode" cname="点检单号" width="1
0
0" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inspecCode" cname="点检单号" width="1
2
0" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="1
0
0" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="planCode" cname="计划单号" width="1
2
0" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="planStartDate" cname="计划开始日期" width="120" align="center" editType="date"
<EF:EFColumn ename="planStartDate" cname="计划开始日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划结束日期" width="120" align="center" editType="date"
<EF:EFColumn ename="planEndDate" cname="计划结束日期" width="120" align="center" editType="date"
...
...
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