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
a8a4c433
Commit
a8a4c433
authored
Jun 12, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过生产任务ID查询工序质检单
parent
8ef74d24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
3 deletions
+49
-3
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-1
ServiceHGZL002.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
+18
-0
HGZLTools.java
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
+2
-2
EiInfoUtils.java
src/main/java/com/baosight/hggp/util/EiInfoUtils.java
+28
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
a8a4c433
...
...
@@ -877,7 +877,7 @@ public class HGSCTools {
}
private
static
void
checkDeleteDate
(
List
<
Long
>
ids
){
List
<
HGZL002
>
hgzl002s
=
HGZLTools
.
THGZL002
.
list
(
ids
);
List
<
HGZL002
>
hgzl002s
=
HGZLTools
.
THGZL002
.
list
ByWorkIds
(
ids
);
List
<
String
>
workCodes
=
hgzl002s
.
stream
().
filter
(
o
->
o
.
getCheckStatus
().
compareTo
(
CheckStatusEnum
.
CHECKED
.
getCode
())==
0
).
map
(
HGZL002:
:
getWorkCode
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
workCodes
)){
AssertUtils
.
isNotEmpty
(
workCodes
,
String
.
format
(
"生产报工单[%s]已经质检完成,无法删除!"
,
String
.
join
(
","
,
workCodes
)));
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
View file @
a8a4c433
...
...
@@ -5,6 +5,9 @@ import com.baosight.hggp.common.CheckStatusEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
...
...
@@ -12,8 +15,10 @@ import com.baosight.hggp.util.*;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -32,6 +37,7 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"初始化查询"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
handleQueryParam
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
EiInfoUtils
.
addBlock
(
inInfo
,
"userBlockId"
,
UserSessionUtils
.
getUser
(),
User
.
class
);
}
catch
(
Exception
e
)
{
...
...
@@ -40,6 +46,17 @@ public class ServiceHGZL002 extends ServiceBase {
return
inInfo
;
}
private
void
handleQueryParam
(
EiInfo
inInfo
){
Long
taskId
=
MapUtils
.
getLong
(
EiInfoUtils
.
getFirstRow
(
inInfo
),
HGSC008
.
FIELD_task_id
);
if
(
Objects
.
nonNull
(
taskId
)&&
taskId
>
0
){
List
<
HGSC008
>
hgsc008s
=
HGSCTools
.
THGSC008
.
getByTaskId
(
taskId
);
List
<
Long
>
workIds
=
Optional
.
ofNullable
(
hgsc008s
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
HGSC008:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
workIds
)){
EiInfoUtils
.
setFirstRow
(
inInfo
,
"workIds"
,
workIds
);
}
}
}
/**
* 查询操作
*
...
...
@@ -50,6 +67,7 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
handleQueryParam
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
View file @
a8a4c433
...
...
@@ -125,7 +125,7 @@ public class HGZLTools {
hgzl002
.
setId
(
null
);
}
public
static
List
<
HGZL002
>
list
(
List
<
Long
>
workIds
)
{
public
static
List
<
HGZL002
>
list
ByWorkIds
(
List
<
Long
>
workIds
)
{
if
(
CollectionUtils
.
isEmpty
(
workIds
))
{
return
null
;
}
...
...
@@ -135,7 +135,7 @@ public class HGZLTools {
}
public
static
void
deleteByWorkIds
(
List
<
Long
>
workIds
)
{
List
<
HGZL002
>
hgzl002s
=
list
(
workIds
);
List
<
HGZL002
>
hgzl002s
=
list
ByWorkIds
(
workIds
);
THGZL004
.
deleteByCheckIds
(
hgzl002s
.
stream
().
map
(
HGZL002:
:
getId
).
collect
(
Collectors
.
toList
()),
CheckTypeEnum
.
PROCESS_CHECK
);
DaoUtils
.
update
(
HGZL002
.
DELETE_BY_WORKS
,
new
HashMap
<
String
,
Object
>()
{{
put
(
"workIds"
,
workIds
);
...
...
src/main/java/com/baosight/hggp/util/EiInfoUtils.java
View file @
a8a4c433
...
...
@@ -97,6 +97,17 @@ public class EiInfoUtils {
* inqu_status 填充值
*
* @param eiInfo
* @param key
* @param value
*/
public
static
void
setFirstRow
(
EiInfo
eiInfo
,
String
key
,
Object
value
)
{
setFirstRow
(
eiInfo
,
EiConstant
.
queryBlock
,
key
,
value
);
}
/**
* inqu_status 填充值
*
* @param eiInfo
* @param blockId
* @param key
* @param value
...
...
@@ -111,6 +122,23 @@ public class EiInfoUtils {
}
/**
* inqu_status 填充值
*
* @param eiInfo
* @param blockId
* @param key
* @param value
*/
public
static
void
setFirstRow
(
EiInfo
eiInfo
,
String
blockId
,
String
key
,
Object
value
)
{
Map
rowMap
=
eiInfo
.
getRow
(
blockId
,
0
);
if
(
rowMap
==
null
)
{
rowMap
=
new
HashMap
();
eiInfo
.
addRow
(
blockId
,
rowMap
);
}
rowMap
.
put
(
key
,
value
);
}
/**
* eiinfo中新增block
*
* @param inInfo
...
...
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