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
37d89ea1
Commit
37d89ea1
authored
Nov 21, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划添加提交过滤,材料计划排序调整,设备驾驶舱调整
parent
1a925e7f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
17 deletions
+34
-17
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+8
-10
ServiceHGSB010.java
.../java/com/baosight/hggp/hg/sb/service/ServiceHGSB010.java
+4
-4
ServiceHGSC005.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC005.java
+1
-0
HGSC009.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009.xml
+1
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+9
-0
HGSC005.js
src/main/webapp/HG/SC/HGSC005.js
+11
-2
No files found.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
37d89ea1
...
@@ -11,15 +11,13 @@ import com.baosight.hggp.hg.pz.domain.HGPZ004;
...
@@ -11,15 +11,13 @@ import com.baosight.hggp.hg.pz.domain.HGPZ004;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC005A
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002A
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -27,11 +25,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -27,11 +25,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 存货档案
* 存货档案
...
@@ -228,6 +222,8 @@ public class ServiceHGPZ005 extends ServiceBase {
...
@@ -228,6 +222,8 @@ public class ServiceHGPZ005 extends ServiceBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
inventCodes
=
ObjectUtils
.
listKey
(
resultRows
,
HGPZ005
.
FIELD_INVENT_CODE
);
List
<
HGSC005A
>
hgsc005AList
=
HGSCTools
.
THGSC005A
.
queryByProductCodes
(
inventCodes
);
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGPZ005
hgpz005
=
new
HGPZ005
();
HGPZ005
hgpz005
=
new
HGPZ005
();
hgpz005
.
fromMap
(
resultRow
);
hgpz005
.
fromMap
(
resultRow
);
...
@@ -236,6 +232,8 @@ public class ServiceHGPZ005 extends ServiceBase {
...
@@ -236,6 +232,8 @@ public class ServiceHGPZ005 extends ServiceBase {
if
(
count
>
0
)
{
if
(
count
>
0
)
{
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz005.getAccountName()));
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz005.getAccountName()));
}
}
Long
num
=
Optional
.
ofNullable
(
hgsc005AList
).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
hgsc005A
->
hgsc005A
.
getProductCode
().
equals
(
hgpz005
.
getInventCode
())).
count
();
AssertUtils
.
isTrue
(
num
>
0
,
String
.
format
(
"存货[%s]已关联生产任务,无法删除"
,
hgpz005
.
getInventName
()));
DaoUtils
.
update
(
HGPZ005
.
DELETE
,
hgpz005
);
DaoUtils
.
update
(
HGPZ005
.
DELETE
,
hgpz005
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB010.java
View file @
37d89ea1
...
@@ -70,7 +70,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
...
@@ -70,7 +70,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
if
(
params
.
containsKey
(
"date"
)){
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
}
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"1"
,
"2"
,
"4"
));
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"1"
,
"2"
,
"
3"
,
"
4"
));
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -103,7 +103,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
...
@@ -103,7 +103,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
if
(
params
.
containsKey
(
"date"
)){
if
(
params
.
containsKey
(
"date"
)){
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
params
.
put
(
"date"
,
DateUtils
.
formatShort
(
params
.
get
(
"date"
)));
}
}
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"
3"
,
"
5"
,
"6"
));
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"5"
,
"6"
));
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
result
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -127,7 +127,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
...
@@ -127,7 +127,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
}
}
public
void
sbYes
(
EiInfo
inInfo
,
Map
params
){
public
void
sbYes
(
EiInfo
inInfo
,
Map
params
){
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"1"
,
"2"
,
"4"
));
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"1"
,
"2"
,
"
3"
,
"
4"
));
List
<
Map
>
result
=
(
List
<
Map
>)
inInfo
.
get
(
EiConstant
.
resultBlock
);
List
<
Map
>
result
=
(
List
<
Map
>)
inInfo
.
get
(
EiConstant
.
resultBlock
);
List
<
Map
>
list
=
new
ArrayList
<>();
List
<
Map
>
list
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
...
@@ -152,7 +152,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
...
@@ -152,7 +152,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
}
}
public
void
sbNo
(
EiInfo
inInfo
,
Map
params
){
public
void
sbNo
(
EiInfo
inInfo
,
Map
params
){
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"
3"
,
"
5"
,
"6"
));
params
.
put
(
"logValues"
,
Arrays
.
asList
(
"5"
,
"6"
));
List
<
Map
>
result
=
(
List
<
Map
>)
inInfo
.
get
(
EiConstant
.
resultBlock
);
List
<
Map
>
result
=
(
List
<
Map
>)
inInfo
.
get
(
EiConstant
.
resultBlock
);
List
<
Map
>
list
=
new
ArrayList
<>();
List
<
Map
>
list
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC005.java
View file @
37d89ea1
...
@@ -67,6 +67,7 @@ public class ServiceHGSC005 extends ServiceBase {
...
@@ -67,6 +67,7 @@ public class ServiceHGSC005 extends ServiceBase {
List
<
HGSC005A
>
hgsc005AList
=
HGSCTools
.
THGSC005A
.
queryByPlanCodes
(
planCodes
);
List
<
HGSC005A
>
hgsc005AList
=
HGSCTools
.
THGSC005A
.
queryByPlanCodes
(
planCodes
);
this
.
checkCommitDate
(
hgsc005AList
);
this
.
checkCommitDate
(
hgsc005AList
);
List
<
Long
>
ids
=
MapUtils
.
toDaoEPBases
(
resultRows
,
HGSC005
.
class
).
stream
().
filter
(
o
->
o
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
0
).
map
(
HGSC005:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
MapUtils
.
toDaoEPBases
(
resultRows
,
HGSC005
.
class
).
stream
().
filter
(
o
->
o
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
0
).
map
(
HGSC005:
:
getId
).
collect
(
Collectors
.
toList
());
AssertUtils
.
isEmpty
(
ids
,
"没有找到未提交生产计划,无法提交!"
);
DaoUtils
.
update
(
HGSC005
.
BATCH_COMMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGSC005
.
BATCH_COMMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
//生成生产订单
//生成生产订单
HGSCTools
.
THGSC006
.
generatorOrder
(
MapUtils
.
toDaoEPBases
(
inInfo
,
HGSC005
.
class
),
hgsc005AList
);
HGSCTools
.
THGSC006
.
generatorOrder
(
MapUtils
.
toDaoEPBases
(
inInfo
,
HGSC005
.
class
),
hgsc005AList
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009.xml
View file @
37d89ea1
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
$orderBy$
$orderBy$
</isNotEmpty>
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
CREATED_TIM
E desc
PLAN_MATERIAL_DAT
E desc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
37d89ea1
...
@@ -789,6 +789,15 @@ public class HGSCTools {
...
@@ -789,6 +789,15 @@ public class HGSCTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
}
public
static
List
<
HGSC005A
>
queryByProductCodes
(
List
<
String
>
ProductCodes
){
AssertUtils
.
isEmpty
(
ProductCodes
,
"产品编码不能为空!"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"productCodes"
,
ProductCodes
);
List
<
HGSC005A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC005A
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
/**
/**
* 根据工序查询
* 根据工序查询
*
*
...
...
src/main/webapp/HG/SC/HGSC005.js
View file @
37d89ea1
...
@@ -105,9 +105,16 @@ function commit() {
...
@@ -105,9 +105,16 @@ function commit() {
message2
(
"提交"
,
"没有选中的行"
);
message2
(
"提交"
,
"没有选中的行"
);
return
;
return
;
}
}
var
flag
=
true
;
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
commitStatus
==
"2"
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行数据已提交,无法重复提交!"
);
flag
=
false
;
}
})
if
(
flag
){
IPLAT
.
confirm
({
IPLAT
.
confirm
({
title
:
'提交'
,
title
:
'提交'
,
message
:
'确认提交此数据么?'
,
message
:
'确认提交此数据么?'
,
okFn
:
function
()
{
okFn
:
function
()
{
var
post
=
new
EiInfo
();
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
...
@@ -128,4 +135,6 @@ function commit() {
...
@@ -128,4 +135,6 @@ function commit() {
});
});
}
}
})
})
}
}
}
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