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
cd84a3e2
Commit
cd84a3e2
authored
Sep 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-14 优化批量派工
parent
8746e620
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
8 deletions
+35
-8
ServiceHGSC006A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC006A.java
+6
-4
HGSC006A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
+3
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+26
-4
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC006A.java
View file @
cd84a3e2
...
@@ -69,11 +69,13 @@ public class ServiceHGSC006A extends ServiceBase {
...
@@ -69,11 +69,13 @@ public class ServiceHGSC006A extends ServiceBase {
String
groupName
=
inInfo
.
getString
(
"groupName"
);
String
groupName
=
inInfo
.
getString
(
"groupName"
);
HGSC006
hgsc006
=
HGSCTools
.
THGSC006
.
getByOrderCode
(
orderCode
);
HGSC006
hgsc006
=
HGSCTools
.
THGSC006
.
getByOrderCode
(
orderCode
);
List
<
HGPZ005
>
hgpz005List
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
new
HashMap
<>());
List
<
HGPZ005
>
hgpz005List
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
new
HashMap
<>());
for
(
String
orderDetailId
:
orderDetailIds
)
{
// 校验主订单是否已分派
List
<
HGSC006A
>
hgsc006As
=
HGSCTools
.
THGSC006A
.
listByIds
(
Arrays
.
asList
(
orderDetailIds
));
// 锁主单号
HGSCTools
.
THGSC006A
.
lock
(
Arrays
.
asList
(
orderDetailIds
));
for
(
HGSC006A
hgsc006A
:
hgsc006As
)
{
// 校验主订单是否已分派
// 校验主订单是否已分派
HGSC006A
hgsc006A
=
HGSCTools
.
THGSC006A
.
getById
(
Long
.
parseLong
(
orderDetailId
));
//HGSC006A hgsc006A = HGSCTools.THGSC006A.getById(Long.parseLong(orderDetailId));
// 锁主单号
HGSCTools
.
THGSC006A
.
lock
(
hgsc006A
.
getId
());
AssignStatusEnum
assignStatusEnum
=
AssignStatusEnum
.
getEnumByCode
(
hgsc006A
.
getAssignStatus
());
AssignStatusEnum
assignStatusEnum
=
AssignStatusEnum
.
getEnumByCode
(
hgsc006A
.
getAssignStatus
());
Integer
assignQuantity
=
new
Integer
(
0
);
Integer
assignQuantity
=
new
Integer
(
0
);
switch
(
assignStatusEnum
){
switch
(
assignStatusEnum
){
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
View file @
cd84a3e2
...
@@ -153,6 +153,9 @@
...
@@ -153,6 +153,9 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query_other"
parameterClass=
"java.util.HashMap"
<select
id=
"query_other"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
cd84a3e2
...
@@ -1434,12 +1434,34 @@ public class HGSCTools {
...
@@ -1434,12 +1434,34 @@ public class HGSCTools {
queryMap
.
put
(
HGSC006A
.
FIELD_id
,
orderDetailId
);
queryMap
.
put
(
HGSC006A
.
FIELD_id
,
orderDetailId
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HGSC006A
.
LOCK
,
queryMap
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HGSC006A
.
LOCK
,
queryMap
);
}
}
/**
* 锁
*
* @param orderDetailIds
* @return
*/
public
static
void
lock
(
List
<
String
>
orderDetailIds
)
{
if
(
orderDetailIds
.
size
()
<=
0
)
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"ids"
,
orderDetailIds
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HGSC006A
.
LOCK
,
queryMap
);
}
public
static
HGSC006A
getById
(
Long
orderDetailId
)
{
public
static
HGSC006A
getById
(
Long
orderDetailId
)
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
orderDetailId
)
||
orderDetailId
<=
0
,
"订单明细ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
orderDetailId
)
||
orderDetailId
<=
0
,
"订单明细ID不能为空!"
);
HGSC006A
results
=
(
HGSC006A
)
DaoBase
.
getInstance
().
get
(
HGSC006A
.
QUERY
,
HGSC006A
.
FIELD_id
,
orderDetailId
);
HGSC006A
results
=
(
HGSC006A
)
DaoBase
.
getInstance
().
get
(
HGSC006A
.
QUERY
,
HGSC006A
.
FIELD_id
,
orderDetailId
);
return
results
;
return
results
;
}
}
public
static
List
<
HGSC006A
>
listByIds
(
List
<
String
>
orderDetailIds
)
{
AssertUtils
.
isEmpty
(
orderDetailIds
,
"订单明细ID不能为空!"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"ids"
,
orderDetailIds
);
List
<
HGSC006A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC006A
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)?
null
:
results
;
}
public
static
List
<
HGSC006A
>
constructObj
(
HGSC006
hgsc006
,
List
<
HGSC005A
>
hgsc005AList
)
{
public
static
List
<
HGSC006A
>
constructObj
(
HGSC006
hgsc006
,
List
<
HGSC005A
>
hgsc005AList
)
{
List
<
HGSC006A
>
result
=
new
ArrayList
<>();
List
<
HGSC006A
>
result
=
new
ArrayList
<>();
...
...
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