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
7e3db567
Commit
7e3db567
authored
Nov 22, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e5a0154a
dcdc99ce
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
45 deletions
+71
-45
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
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+5
-4
HGSC005.js
src/main/webapp/HG/SC/HGSC005.js
+30
-21
HGSJ003.js
src/main/webapp/HG/SJ/HGSJ003.js
+13
-5
No files found.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
7e3db567
...
...
@@ -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.HGPZ005A
;
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.HGSJ002A
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.AssertUtils
;
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.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
...
@@ -27,11 +25,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 存货档案
...
...
@@ -228,6 +222,8 @@ public class ServiceHGPZ005 extends ServiceBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
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
)
{
HGPZ005
hgpz005
=
new
HGPZ005
();
hgpz005
.
fromMap
(
resultRow
);
...
...
@@ -236,6 +232,8 @@ public class ServiceHGPZ005 extends ServiceBase {
if
(
count
>
0
)
{
// 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
);
}
inInfo
=
this
.
query
(
inInfo
);
...
...
src/main/java/com/baosight/hggp/hg/sb/service/ServiceHGSB010.java
View file @
7e3db567
...
...
@@ -70,7 +70,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
if
(
params
.
containsKey
(
"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
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -103,7 +103,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
if
(
params
.
containsKey
(
"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
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
List
listMap2
=
listMap
.
stream
().
map
(
map
->
map
.
get
(
"date"
)).
sorted
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -127,7 +127,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
}
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
>
list
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
...
...
@@ -152,7 +152,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
}
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
>
list
=
new
ArrayList
<>();
List
<
Map
>
listMap
=
DaoBase
.
getInstance
().
query
(
"HGSB010.queryBySbYes"
,
params
,
0
,
100
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC005.java
View file @
7e3db567
...
...
@@ -67,6 +67,7 @@ public class ServiceHGSC005 extends ServiceBase {
List
<
HGSC005A
>
hgsc005AList
=
HGSCTools
.
THGSC005A
.
queryByPlanCodes
(
planCodes
);
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
());
AssertUtils
.
isEmpty
(
ids
,
"没有找到未提交生产计划,无法提交!"
);
DaoUtils
.
update
(
HGSC005
.
BATCH_COMMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
//生成生产订单
HGSCTools
.
THGSC006
.
generatorOrder
(
MapUtils
.
toDaoEPBases
(
inInfo
,
HGSC005
.
class
),
hgsc005AList
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009.xml
View file @
7e3db567
...
...
@@ -88,7 +88,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIM
E desc
PLAN_MATERIAL_DAT
E desc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
7e3db567
...
...
@@ -789,6 +789,15 @@ public class HGSCTools {
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/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
7e3db567
...
...
@@ -374,13 +374,14 @@ public class ServiceHGWD001D extends TreeService {
leafMap
.
put
(
"filePath"
,
dbWd001
.
getFilePath
());
if
(!
isManager
&&
!
isSpare
)
{
leafMap
.
put
(
"isAuth"
,
"1"
);
}
else
{
leafMap
.
put
(
"isAuth"
,
"0"
);
}
// 从已授权的信息中查找出自己
// 从已授权的信息中查找出自己
HGWD003
dbWd003
=
dbWd003s
==
null
?
null
:
dbWd003s
.
stream
().
filter
(
item
->
item
.
getUserId
().
equals
(
userId
)).
findFirst
().
orElse
(
null
);
leafMap
.
put
(
"downloadFlag"
,
dbWd003
==
null
?
"0"
:
dbWd003
.
getDownloadFlag
());
}
else
{
leafMap
.
put
(
"isAuth"
,
"0"
);
leafMap
.
put
(
"downloadFlag"
,
"1"
);
}
results
.
add
(
leafMap
);
}
// 设置叶子节点
...
...
src/main/webapp/HG/SC/HGSC005.js
View file @
7e3db567
...
...
@@ -105,27 +105,36 @@ function commit() {
message2
(
"提交"
,
"没有选中的行"
);
return
;
}
IPLAT
.
confirm
({
title
:
'提交'
,
message
:
'确认提交此数据么?'
,
okFn
:
function
()
{
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
set
(
"recursion"
,
true
);
EiCommunicator
.
send
(
"HGSC005"
,
"commit"
,
post
,{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
NotificationUtil
(
ei
);
resultGrid
.
dataSource
.
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
var
flag
=
true
;
rows
.
forEach
(
function
(
row
,
index
)
{
if
(
row
.
commitStatus
==
"2"
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行数据已提交,无法重复提交!"
);
flag
=
false
;
}
})
if
(
flag
){
IPLAT
.
confirm
({
title
:
'提交'
,
message
:
'确认提交此数据么?'
,
okFn
:
function
()
{
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
set
(
"recursion"
,
true
);
EiCommunicator
.
send
(
"HGSC005"
,
"commit"
,
post
,{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
NotificationUtil
(
ei
);
resultGrid
.
dataSource
.
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
})
}
}
src/main/webapp/HG/SJ/HGSJ003.js
View file @
7e3db567
...
...
@@ -75,7 +75,7 @@ $(function (){
})
}
},
template
:
function
(
dataItem
)
{
/*
template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
...
...
@@ -84,7 +84,7 @@ $(function (){
}
}
return dataItem['processCode'];
},
},
*/
editor
:
function
(
container
,
options
)
{
this
.
filter
(
options
);
}
...
...
@@ -123,11 +123,19 @@ $(function (){
if
(
e
.
field
==
"factoryCode"
)
{
loadChange
(
grid
,
e
,
"processCode"
);
}
else
if
(
e
.
field
==
"processCode"
)
{
let
dataItem
=
e
.
items
[
0
];
for
(
let
i
=
0
;
i
<
processCodes
.
length
;
i
++
)
{
if
(
processCodes
[
i
][
'valueField'
]
===
dataItem
[
'processCode'
])
{
resultGrid
.
setCellValue
(
dataItem
,
"unit"
,
processCodes
[
i
][
'param3Field'
]);
resultGrid
.
setCellValue
(
dataItem
,
"processName"
,
processCodes
[
i
][
'textField'
].
split
(
"]"
)[
1
])
break
;
}
}
if
(
e
.
items
[
0
].
factoryCode
.
length
===
0
){
loadChange
(
grid
,
e
,
"factoryCode"
);
}
else
{
loadChange
(
grid
,
e
,
"unit"
);
}
loadChange
(
grid
,
e
,
"unit"
);
loadChange
(
grid
,
e
,
"processClass"
);
}
});
},
...
...
@@ -173,7 +181,7 @@ $(function (){
exportGrid
:
{
exportFileName
:
function
(
gridInstance
)
{
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return
"工
艺流程
_"
+
kendo
.
toString
(
new
Date
(),
IPLAT
.
FORMAT
.
DATE_14_PR
);
return
"工
序单价
_"
+
kendo
.
toString
(
new
Date
(),
IPLAT
.
FORMAT
.
DATE_14_PR
);
},
exportFileType
:
"xls"
,
exportBlockId
:
"result"
,
...
...
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