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
ddab0317
Commit
ddab0317
authored
Jun 28, 2024
by
江和松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
cd55601a
b291ee03
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
12 deletions
+54
-12
ServiceHGZL002.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
+5
-0
HGZLTools.java
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
+23
-0
HGZL002.js
src/main/webapp/HG/ZL/HGZL002.js
+14
-6
HGZL003.js
src/main/webapp/HG/ZL/HGZL003.js
+12
-6
No files found.
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
View file @
ddab0317
...
...
@@ -84,6 +84,11 @@ public class ServiceHGZL002 extends ServiceBase {
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
HGZL002
>
hgzl002List
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGZL002
.
class
);
List
<
Long
>
ids
=
Optional
.
ofNullable
(
hgzl002List
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
HGZL002:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
HGZL002
>
dbList
=
HGZLTools
.
THGZL002
.
list
(
ids
);
Optional
.
ofNullable
(
dbList
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
o
->
{
AssertUtils
.
isTrue
(
o
.
getCheckStatus
().
compareTo
(
CheckStatusEnum
.
CHECKED
.
getCode
())==
0
,
String
.
format
(
"质检单号[%s]已经质检完成不能修改!"
,
o
.
getCheckCode
()));
});
hgzl002List
.
forEach
(
o
->
{
o
.
setCheckStatus
(
CheckStatusEnum
.
CHECKED
.
getCode
());
DaoUtils
.
update
(
HGZL002
.
UPDATE
,
o
);
...
...
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
View file @
ddab0317
...
...
@@ -99,6 +99,17 @@ public class HGZLTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* @param ids
*/
public
static
List
<
HGZL002
>
list
(
List
<
Long
>
ids
)
{
AssertUtils
.
isEmpty
(
ids
,
"ID不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
List
<
HGZL002
>
results
=
DaoBase
.
getInstance
().
query
(
HGZL002
.
QUERY
,
paramMap
);
return
results
;
}
public
static
HGZL002
add
(
HGSC008
hgsc008
)
{
HGZL002
hgzl002
=
new
HGZL002
();
BeanUtils
.
copyProperties
(
hgsc008
,
hgzl002
);
...
...
@@ -144,6 +155,18 @@ public class HGZLTools {
}
public
static
class
THGZL003
{
/**
* @param ids
*/
public
static
List
<
HGZL002
>
list
(
List
<
Long
>
ids
)
{
AssertUtils
.
isEmpty
(
ids
,
"ID不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
List
<
HGZL002
>
results
=
DaoBase
.
getInstance
().
query
(
HGZL002
.
QUERY
,
paramMap
);
return
results
;
}
public
static
HGZL003
add
(
HGZL003
hgzl003
)
{
HGSC007
hgsc007
=
HGSCTools
.
THGSC007
.
getById
(
hgzl003
.
getTaskId
());
BeanUtils
.
copyProperties
(
hgsc007
,
hgzl003
);
...
...
src/main/webapp/HG/ZL/HGZL002.js
View file @
ddab0317
...
...
@@ -9,7 +9,7 @@ $(function () {
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
columns
:
[{
columns
:
[
/*
{
field: "unpassQuantity",
template: function (item) {
let template = "";
...
...
@@ -27,7 +27,7 @@ $(function () {
}
return item.passQuantity;
}
}],
}
*/
],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
...
...
@@ -38,11 +38,16 @@ $(function () {
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
==
"unpassQuantity"
)
{
loadChange
(
grid
,
e
,
"passQuantity"
);
// loadChange(grid,e,"passQuantity");
var
passQuantity
=
e
.
items
[
0
][
'quantity'
]
-
e
.
items
[
0
][
'unpassQuantity'
];
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"passQuantity"
,
passQuantity
);
}
// 判断父级节点是否发生变化
if
(
e
.
field
==
"passQuantity"
)
{
loadChange
(
grid
,
e
,
"unpassQuantity"
);
// loadChange(grid,e,"unpassQuantity");
var
unpassQuantity
=
e
.
items
[
0
][
'quantity'
]
-
e
.
items
[
0
][
'passQuantity'
];
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"unpassQuantity"
,
unpassQuantity
);
}
});
},
...
...
@@ -110,7 +115,7 @@ let save = function () {
let
quantity
=
rows
[
i
][
'quantity'
];
let
checkBy
=
rows
[
i
][
'checkBy'
];
let
checkCode
=
rows
[
i
][
'checkCode'
];
let
checkStatus
=
rows
[
i
][
'checkStatus'
];
if
(
!
isNumber
(
passQuantity
)
||!
isNumber
(
unpassQuantity
))
{
message
(
"质检单号["
+
checkCode
+
"]合格数量与不合格数量必须是大于等于0的数字!"
);
...
...
@@ -128,7 +133,10 @@ let save = function () {
message
(
"质检单号["
+
checkCode
+
"]质检人员不能为空!"
);
return
;
}
if
(
checkStatus
===
'1'
){
message
(
"质检单号["
+
checkCode
+
"]已经质检完成不能修改!"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做质检完成操作吗? "
,
{
ok
:
function
()
{
...
...
src/main/webapp/HG/ZL/HGZL003.js
View file @
ddab0317
...
...
@@ -11,7 +11,7 @@ $(function () {
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
columns
:
[{
columns
:
[
/*
{
field: "unpassQuantity",
template: function (item) {
let template = "";
...
...
@@ -29,7 +29,7 @@ $(function () {
}
return item.passQuantity;
}
},{
},
*/
{
field
:
"workBy"
,
template
:
function
(
item
)
{
let
template
=
""
;
...
...
@@ -86,11 +86,12 @@ $(function () {
$
(
"#BNT_SELECT"
).
on
(
"click"
,
selectTask
);
// 此 grid 对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
==
"unpassQuantity"
)
{
loadChange
(
grid
,
e
,
"passQuantity"
);
}
if
(
e
.
field
==
"passQuantity"
)
{
loadChange
(
grid
,
e
,
"unpassQuantity"
);
//
loadChange(grid,e,"passQuantity");
var
passQuantity
=
e
.
items
[
0
][
'quantity'
]
-
e
.
items
[
0
][
'unpassQuantity'
];
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"passQuantity"
,
passQuantity
);
}
if
(
e
.
field
==
"workBy"
)
{
loadChange
(
grid
,
e
,
"workName"
);
...
...
@@ -158,6 +159,7 @@ let save = function () {
let
quantity
=
rows
[
i
][
'quantity'
];
let
checkDate
=
rows
[
i
][
'checkDate'
];
let
workBy
=
rows
[
i
][
'workBy'
];
let
checkStatus
=
rows
[
i
][
'checkStatus'
];
if
(
!
workBy
){
message
(
"第"
+
(
i
+
1
)
+
"行请选择生产人员!"
);
...
...
@@ -183,6 +185,10 @@ let save = function () {
message
(
"第"
+
(
i
+
1
)
+
"行请选择质检日期!"
);
return
;
}
if
(
checkStatus
===
'1'
){
message
(
"第"
+
(
i
+
1
)
+
"行已经质检完成不能修改!"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做保存操作吗? "
,
{
ok
:
function
()
{
...
...
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