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
194755d1
Commit
194755d1
authored
Jan 25, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理数组下标越界
parent
06ec3643
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+8
-5
ServiceHPSC002B.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
+9
-5
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
194755d1
...
@@ -18,6 +18,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -18,6 +18,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -40,11 +41,13 @@ public class ServiceHPSC002A extends ServiceEPBase {
...
@@ -40,11 +41,13 @@ public class ServiceHPSC002A extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称
// 查询物料ID所对应的项目名称和产品名称
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
HPSC002
>
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
List
<
HPSC002
>
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
dbSc002s
))
{
inInfo
.
set
(
"inqu_status-0-matId"
,
queryMap
.
get
(
"id"
));
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
set
(
"inqu_status-0-matId"
,
queryMap
.
get
(
"id"
));
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002A
().
eiMetadata
);
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002A
().
eiMetadata
);
}
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
View file @
194755d1
...
@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
...
@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002B
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002B
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
...
@@ -9,6 +10,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
...
@@ -9,6 +10,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -30,11 +32,13 @@ public class ServiceHPSC002B extends ServiceEPBase {
...
@@ -30,11 +32,13 @@ public class ServiceHPSC002B extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称
// 查询物料ID所对应的项目名称和产品名称
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
HPSC002
>
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
List
<
HPSC002
>
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
dbSc002s
))
{
inInfo
.
set
(
"inqu_status-0-matId"
,
queryMap
.
get
(
"id"
));
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
set
(
"inqu_status-0-matId"
,
queryMap
.
get
(
"id"
));
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002B
().
eiMetadata
);
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002A
().
eiMetadata
);
}
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
...
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