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
79527944
Commit
79527944
authored
May 24, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
e1673518
51e5fcfd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
7 deletions
+47
-7
HGSC005.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005.java
+2
-0
HGSC005A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
+1
-0
HGSC005.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005.xml
+5
-0
HGSC005A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
+6
-1
HGSC006A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
+1
-1
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+1
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+23
-2
HGSC005A.jsp
src/main/webapp/HG/SC/HGSC005A.jsp
+4
-0
HGSC006A.jsp
src/main/webapp/HG/SC/HGSC006A.jsp
+4
-2
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005.java
View file @
79527944
...
...
@@ -71,6 +71,8 @@ public class HGSC005 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGSC005.update"
;
public
static
final
String
DELETE
=
"HGSC005.delete"
;
public
static
final
String
BATCH_COMMIT
=
"HGSC005.batch_commit"
;
public
static
final
String
DELETE_BY_MAT_ID
=
"HGSC005.delete_by_mat_id"
;
private
Long
id
=
new
Long
(
0
);
private
Long
matId
=
new
Long
(
0
);
/* 物料清单ID*/
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
View file @
79527944
...
...
@@ -102,6 +102,7 @@ public class HGSC005A extends DaoEPBase {
public
static
final
String
INSERT
=
"HGSC005A.insert"
;
public
static
final
String
UPDATE
=
"HGSC005A.update"
;
public
static
final
String
DELETE
=
"HGSC005A.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC005.batch_delete"
;
public
static
final
String
UPDATE_PLAN_DATE
=
"HGSC005A.update_plan_date"
;
private
Long
id
=
new
Long
(
0
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005.xml
View file @
79527944
...
...
@@ -213,6 +213,11 @@
id = #id#
</delete>
<delete
id=
"delete_by_mat_id"
>
DELETE FROM ${hggpSchema}.HGSC005 WHERE
mat_id = #matId#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGSC005
SET
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
View file @
79527944
...
...
@@ -199,7 +199,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
id a
sc
product_type asc ,process_order de
sc
</isEmpty>
</dynamic>
...
...
@@ -367,6 +367,11 @@
id = #id#
</delete>
<delete
id=
"batch_delete"
>
DELETE FROM ${hggpSchema}.HGSC005A WHERE
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGSC005A
SET
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
View file @
79527944
...
...
@@ -245,7 +245,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
id a
sc
product_type asc ,process_order de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
79527944
...
...
@@ -224,7 +224,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
id
a
sc
id
desc, product_type asc ,process_order de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
79527944
...
...
@@ -294,6 +294,14 @@ public class HGSCTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
public
static
List
<
HGSC005A
>
queryByMatId
(
Long
matId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
matId
)||
matId
<=
0
,
"物料清单ID不能为空!"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGSC005A
.
FIELD_mat_id
,
matId
);
List
<
HGSC005A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC005A
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
private
static
List
<
HGSC005A
>
generatorNewPlanDetail
(
HGSC005A
hgsc005a
){
//通过存货档案编码查询存货档案工序
...
...
@@ -392,16 +400,29 @@ public class HGSCTools {
public
static
void
delete
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
Map
<
Long
,
Optional
<
HGSC005A
>>
oldObjMap
=
queryOldPlanDetail
(
hgsc005a
);
List
<
Long
>
deleteIds
=
new
ArrayList
<>();
List
<
HGSC005A
>
updateList
=
new
ArrayList
<>();
oldObjMap
.
forEach
((
k
,
v
)->{
HGSC005A
oldObj
=
v
.
get
();
if
(
oldObj
.
getQuantity
()-
hgsc005a
.
getQuantity
()<=
0
){
DaoUtils
.
update
(
HGSC005A
.
DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGSC005A
.
FIELD_id
,
oldObj
.
getId
());}}
);
deleteIds
.
add
(
oldObj
.
getId
()
);
}
else
{
oldObj
.
setQuantity
(
oldObj
.
getQuantity
()-
hgsc005a
.
getQuantity
());
oldObj
.
setUnfinishQuantity
(
oldObj
.
getQuantity
()-
oldObj
.
getFinishQuantity
());
DaoUtils
.
update
(
HGSC005A
.
UPDATE
,
oldObj
);
updateList
.
add
(
oldObj
);
}
});
if
(
CollectionUtils
.
isNotEmpty
(
deleteIds
)){
List
<
HGSC005A
>
dbList
=
queryByMatId
(
hgsc005a
.
getMatId
());
//如果全部删除则删除主表
if
(
deleteIds
.
size
()
==
dbList
.
size
()){
DaoUtils
.
update
(
HGSC005
.
DELETE_BY_MAT_ID
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGSC005
.
FIELD_mat_id
,
hgsc005a
.
getMatId
());}});
}
DaoUtils
.
update
(
HGSC005A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
deleteIds
);}});
}
if
(
CollectionUtils
.
isNotEmpty
(
updateList
)){
DaoUtils
.
updateBatch
(
HGSC005A
.
UPDATE
,
updateList
);
}
}
/**
...
...
src/main/webapp/HG/SC/HGSC005A.jsp
View file @
79527944
...
...
@@ -37,6 +37,10 @@
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"计划重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishWeight"
cname=
"完成重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishWeight"
cname=
"未完成重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"计划数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishQuantity"
cname=
"完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishQuantity"
cname=
"未完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC006A.jsp
View file @
79527944
...
...
@@ -36,9 +36,11 @@
<EF:EFColumn
ename=
"processName"
cname=
"工序"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"订单重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignWeight"
cname=
"派工重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignWeight"
cname=
"待派工重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"订单数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignDate"
cname=
"派工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
/>
<EF:EFColumn
ename=
"assignQuantity"
cname=
"派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignQuantity"
cname=
"待派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFComboColumn
ename=
"assignStatus"
cname=
"派工状态"
width=
"80"
align=
"center"
...
...
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