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
02fe9ad0
Commit
02fe9ad0
authored
Oct 07, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-08 委外出库单
parent
8a017efa
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
92 additions
and
53 deletions
+92
-53
ServiceHGKC014B.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC014B.java
+5
-1
ServiceHGKC015B.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC015B.java
+5
-1
HGKC014.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014.xml
+2
-2
HGKC015.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC015.xml
+2
-2
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+4
-4
HGKC014.js
src/main/webapp/HG/KC/HGKC014.js
+26
-17
HGKC014B.js
src/main/webapp/HG/KC/HGKC014B.js
+11
-5
HGKC014B.jsp
src/main/webapp/HG/KC/HGKC014B.jsp
+2
-1
HGKC015.js
src/main/webapp/HG/KC/HGKC015.js
+25
-15
HGKC015B.js
src/main/webapp/HG/KC/HGKC015B.js
+10
-5
No files found.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC014B.java
View file @
02fe9ad0
...
...
@@ -76,7 +76,11 @@ public class ServiceHGKC014B extends ServiceEPBase {
//List<String> contractCodes = ObjectUtils.listKey(resultMaps, HGKC014A.FIELD_CONTRACT_CODE);
List
<
HGKC014A
>
hgkc014AList
=
HGKCTools
.
HgKc014a
.
getByParentId
((
Arrays
.
asList
(
Long
.
parseLong
(
paramMap
.
get
(
"parentId"
).
toString
()))));
for
(
Map
resultMap:
resultMaps
)
{
DaoUtils
.
update
(
HGSC010A
.
UPDATE
,
resultMap
);
HGSC010A
hgsc010a
=
new
HGSC010A
();
hgsc010a
.
fromMap
(
resultMap
);
hgsc010a
.
setRemainingQty
(
hgsc010a
.
getRemainingQty
().
subtract
(
hgsc010a
.
getDepositQty
()));
hgsc010a
.
setRemainingWeight
(
hgsc010a
.
getRemainingWeight
().
subtract
(
hgsc010a
.
getDepositWeight
()));
DaoUtils
.
update
(
HGSC010A
.
UPDATE
,
hgsc010a
);
HGKC014A
hgkc014a
=
new
HGKC014A
();
hgkc014a
.
fromMap
(
resultMap
);
List
<
HGKC014A
>
hgkc014As
=
new
ArrayList
<>();
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC015B.java
View file @
02fe9ad0
...
...
@@ -72,7 +72,11 @@ public class ServiceHGKC015B extends ServiceEPBase {
//List<String> contractCodes = ObjectUtils.listKey(resultMaps, HGKC014A.FIELD_CONTRACT_CODE);
List
<
HGKC015A
>
hgkc015AList
=
HGKCTools
.
HgKc015a
.
getByParentId
((
Arrays
.
asList
(
Long
.
parseLong
(
paramMap
.
get
(
"parentId"
).
toString
()))));
for
(
Map
resultMap:
resultMaps
)
{
DaoUtils
.
update
(
HGSC010B
.
UPDATE
,
resultMap
);
HGSC010B
hgsc010B
=
new
HGSC010B
();
hgsc010B
.
fromMap
(
resultMap
);
hgsc010B
.
setRemainingQty
(
hgsc010B
.
getRemainingQty
().
subtract
(
hgsc010B
.
getOutQty
()));
hgsc010B
.
setRemainingWeight
(
hgsc010B
.
getRemainingWeight
().
subtract
(
hgsc010B
.
getOutWeight
()));
DaoUtils
.
update
(
HGSC010B
.
UPDATE
,
hgsc010B
);
HGKC015A
hgkc015a
=
new
HGKC015A
();
hgkc015a
.
fromMap
(
resultMap
);
List
<
HGKC015A
>
hgkc015As
=
new
ArrayList
<>();
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014.xml
View file @
02fe9ad0
...
...
@@ -81,8 +81,8 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
parentI
ds"
>
PARENT_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"parentIds"
>
#parentI
ds[]#
</iterate>
<isNotEmpty
prepend=
" AND "
property=
"
i
ds"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#i
ds[]#
</iterate>
</isNotEmpty>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC015.xml
View file @
02fe9ad0
...
...
@@ -81,8 +81,8 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
parentI
ds"
>
PARENT_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"parentIds"
>
#parentI
ds[]#
</iterate>
<isNotEmpty
prepend=
" AND "
property=
"
i
ds"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#i
ds[]#
</iterate>
</isNotEmpty>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
02fe9ad0
...
...
@@ -1200,12 +1200,12 @@ public class HGKCTools {
public
static
class
HgKc014
{
public
static
List
<
HGKC014
>
getByParentId
(
List
<
Long
>
parentI
ds
)
{
if
(
Objects
.
isNull
(
parentI
ds
)){
public
static
List
<
HGKC014
>
getByParentId
(
List
<
Long
>
i
ds
)
{
if
(
Objects
.
isNull
(
i
ds
)){
return
new
ArrayList
<>();
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"
parentIds"
,
parentI
ds
);
paramMap
.
put
(
"
ids"
,
i
ds
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC014
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC014
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
list
)?
null
:
list
;
...
...
@@ -1263,7 +1263,7 @@ public class HGKCTools {
return
new
ArrayList
<>();
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"
parentI
ds"
,
parentIds
);
paramMap
.
put
(
"
i
ds"
,
parentIds
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC015
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC015
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
list
)?
null
:
list
;
...
...
src/main/webapp/HG/KC/HGKC014.js
View file @
02fe9ad0
...
...
@@ -131,22 +131,33 @@ function selectFunc() {
message
(
"请选择一条委外入库单"
);
return
;
}
JSColorbox
.
open
({
href
:
"HGKC014B?methodName=initLoad"
+
"&inqu_status-0-companyCode="
+
rows
[
0
].
companyCode
+
"&inqu_status-0-companyName="
+
rows
[
0
].
companyName
+
"&inqu_status-0-whCode="
+
rows
[
0
].
whCode
+
"&inqu_status-0-whName="
+
rows
[
0
].
whName
+
"&inqu_status-0-depositCode="
+
rows
[
0
].
depositCode
+
"&inqu_status-0-parentId="
+
rows
[
0
].
id
,
title
:
"<div style='text-align: center;'>委外入库详情</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
function
(){
// 关闭弹窗
JSColorbox
.
close
();
let
flag
=
true
;
rows
.
forEach
(
function
(
item
,
index
){
if
(
item
.
status
==
'1'
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
状态
\"
为
\"
已提交
\"
,不能进行操作!"
);
flag
=
false
;
return
;
}
});
})
if
(
flag
){
JSColorbox
.
open
({
href
:
"HGKC014B?methodName=initLoad"
+
"&inqu_status-0-companyCode="
+
rows
[
0
].
companyCode
+
"&inqu_status-0-companyName="
+
rows
[
0
].
companyName
+
"&inqu_status-0-whCode="
+
rows
[
0
].
whCode
+
"&inqu_status-0-whName="
+
rows
[
0
].
whName
+
"&inqu_status-0-depositCode="
+
rows
[
0
].
depositCode
+
"&inqu_status-0-parentId="
+
rows
[
0
].
id
,
title
:
"<div style='text-align: center;'>委外入库详情</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
function
(){
// 关闭弹窗
JSColorbox
.
close
();
}
});
}
}
let
save
=
function
(
btnNode
)
{
...
...
@@ -217,5 +228,3 @@ function updateStatus() {
});
}
}
src/main/webapp/HG/KC/HGKC014B.js
View file @
02fe9ad0
...
...
@@ -26,8 +26,8 @@ $(function () {
remainingQty
=
remainingQty
-
depositQty
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"depositUnitWeight"
,
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"depositWeight"
,
depositQty
*
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingQty"
,
remainingQty
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingWeight"
,
remainingQty
*
remainingUnitWeight
);
//
resultGrid.setCellValue(e.items[0],"remainingQty",remainingQty);
//
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingQty * remainingUnitWeight);
}
else
if
(
e
.
field
==
"depositWeight"
){
let
depositWeight
=
e
.
items
[
0
][
'depositWeight'
];
let
remainingWeight
=
e
.
items
[
0
][
'remainingWeight'
];
...
...
@@ -38,9 +38,9 @@ $(function () {
}
remainingWeight
=
remainingWeight
-
depositWeight
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"depositUnitWeight"
,
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"depositQty"
,
depositWeight
/
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingQty"
,
remainingWeight
/
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingWeight"
,
remainingWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"depositQty"
,
(
depositWeight
/
remainingUnitWeight
).
toFixed
(
0
)
);
//
resultGrid.setCellValue(e.items[0],"remainingQty",remainingWeight / remainingUnitWeight);
//
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingWeight);
}
});
...
...
@@ -106,6 +106,7 @@ let saveResult = function () {
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
depositQty
=
item
.
get
(
"depositQty"
);
let
depositWeight
=
item
.
get
(
"depositWeight"
);
let
remainingQty
=
item
.
get
(
"remainingQty"
);
if
(
isBlank
(
depositQty
)
||
!
isNumber
(
depositQty
)
||
depositQty
<=
0
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
入库数量
\"
,不能为空并且不能为0!"
);
flag
=
false
;
...
...
@@ -116,6 +117,11 @@ let saveResult = function () {
flag
=
false
;
return
false
;
}
if
(
depositQty
>
remainingQty
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
入库数量
\"
,不能大于
\"
剩余数量
\"
!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/KC/HGKC014B.jsp
View file @
02fe9ad0
<%
@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%
--
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/30
...
...
@@ -6,6 +6,7 @@
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
...
...
src/main/webapp/HG/KC/HGKC015.js
View file @
02fe9ad0
...
...
@@ -138,22 +138,32 @@ function selectFunc() {
message
(
"请选择一条委外入库单"
);
return
;
}
JSColorbox
.
open
({
href
:
"HGKC015B?methodName=initLoad"
+
"&inqu_status-0-companyCode="
+
rows
[
0
].
companyCode
+
"&inqu_status-0-companyName="
+
rows
[
0
].
companyName
+
"&inqu_status-0-whCode="
+
rows
[
0
].
whCode
+
"&inqu_status-0-whName="
+
rows
[
0
].
whName
+
"&inqu_status-0-outCode="
+
rows
[
0
].
outCode
+
"&inqu_status-0-parentId="
+
rows
[
0
].
id
,
title
:
"<div style='text-align: center;'>委外出库详情</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
function
(){
// 关闭弹窗
JSColorbox
.
close
();
let
flag
=
true
;
rows
.
forEach
(
function
(
item
,
index
){
if
(
item
.
status
==
'1'
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
状态
\"
为
\"
已提交
\"
,不能进行操作!"
);
flag
=
false
;
return
;
}
});
})
if
(
flag
){
JSColorbox
.
open
({
href
:
"HGKC015B?methodName=initLoad"
+
"&inqu_status-0-companyCode="
+
rows
[
0
].
companyCode
+
"&inqu_status-0-companyName="
+
rows
[
0
].
companyName
+
"&inqu_status-0-whCode="
+
rows
[
0
].
whCode
+
"&inqu_status-0-whName="
+
rows
[
0
].
whName
+
"&inqu_status-0-outCode="
+
rows
[
0
].
outCode
+
"&inqu_status-0-parentId="
+
rows
[
0
].
id
,
title
:
"<div style='text-align: center;'>委外出库详情</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
function
(){
// 关闭弹窗
JSColorbox
.
close
();
}
});
}
}
let
save
=
function
(
btnNode
)
{
...
...
src/main/webapp/HG/KC/HGKC015B.js
View file @
02fe9ad0
...
...
@@ -26,8 +26,8 @@ $(function () {
remainingQty
=
remainingQty
-
outQty
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"outUnitWeight"
,
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"outWeight"
,
outQty
*
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingQty"
,
remainingQty
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingWeight"
,
remainingQty
*
remainingUnitWeight
);
//
resultGrid.setCellValue(e.items[0],"remainingQty",remainingQty);
//
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingQty * remainingUnitWeight);
}
else
if
(
e
.
field
==
"outWeight"
){
let
outWeight
=
e
.
items
[
0
][
'outWeight'
];
let
remainingWeight
=
e
.
items
[
0
][
'remainingWeight'
];
...
...
@@ -38,9 +38,9 @@ $(function () {
}
remainingWeight
=
remainingWeight
-
outWeight
;
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"outUnitWeight"
,
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"outQty"
,
outWeight
/
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingQty"
,
remainingWeight
/
remainingUnitWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"remainingWeight"
,
remainingWeight
);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"outQty"
,
(
outWeight
/
remainingUnitWeight
).
toFixed
(
0
)
);
//
resultGrid.setCellValue(e.items[0],"remainingQty",remainingWeight / remainingUnitWeight);
//
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingWeight);
}
});
...
...
@@ -116,6 +116,11 @@ let saveResult = function () {
flag
=
false
;
return
false
;
}
if
(
outQty
>
outWeight
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
出库数量
\"
,不能大于
\"
剩余数量
\"
!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
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