Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
郑小冰
/
orthopedics
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9a275157
authored
Dec 06, 2019
by
ice
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
采购申请下推采购订单,采购订单审核查询库存现有量代码判断修改
parent
57f9610e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
src/main/java/orthopedics/controller/bookcity/PurOrderHeaderController.java
src/main/java/orthopedics/dao/InvTransactionMapper.java
src/main/java/orthopedics/service/TransactionServer.java
src/main/java/orthopedics/controller/bookcity/PurOrderHeaderController.java
View file @
9a275157
...
@@ -81,7 +81,7 @@ public class PurOrderHeaderController {
...
@@ -81,7 +81,7 @@ public class PurOrderHeaderController {
purOrderLine
.
setItemId
(
invItem
.
getId
());
purOrderLine
.
setItemId
(
invItem
.
getId
());
}
}
if
(
"000000006c60dba1016c60f588e00002"
.
equals
(
purOrderHeaderPage
.
getOrderType
()))
{
if
(
"000000006c60dba1016c60f588e00002"
.
equals
(
purOrderHeaderPage
.
getOrderType
()))
{
Integer
sumItemIdQuantity
=
transactionServer
.
findByOrgIdAndItemId
(
"2c9007626dde3f4f016deda2151f1a42"
,
purOrderLine
.
getItemId
());
Integer
sumItemIdQuantity
=
transactionServer
.
findByOrgIdAndItemId
(
purOrderLine
.
getItemId
());
purOrderLine
.
setAttribute1
(
String
.
valueOf
(
sumItemIdQuantity
));
purOrderLine
.
setAttribute1
(
String
.
valueOf
(
sumItemIdQuantity
));
}
}
}
}
...
@@ -140,7 +140,7 @@ public class PurOrderHeaderController {
...
@@ -140,7 +140,7 @@ public class PurOrderHeaderController {
List
<
PurOrderLine
>
purOrderLineList
=
purOrderLineService
.
findOrderLineByHeaderId
(
purOrderHeader
.
getId
());
List
<
PurOrderLine
>
purOrderLineList
=
purOrderLineService
.
findOrderLineByHeaderId
(
purOrderHeader
.
getId
());
for
(
PurOrderLine
purOrderLine
:
purOrderLineList
)
{
for
(
PurOrderLine
purOrderLine
:
purOrderLineList
)
{
Integer
quantity
=
Integer
.
valueOf
(
purOrderLine
.
getQuantity
());
Integer
quantity
=
Integer
.
valueOf
(
purOrderLine
.
getQuantity
());
Integer
newSumQuantity
=
transactionServer
.
findByOrgIdAndItemId
(
"2c9007626dde3f4f016deda2151f1a42"
,
purOrderLine
.
getItemId
());
Integer
newSumQuantity
=
transactionServer
.
findByOrgIdAndItemId
(
purOrderLine
.
getItemId
());
if
(
null
==
purOrderLine
.
getAttribute1
()
||
""
.
equals
(
purOrderLine
.
getAttribute1
())){
if
(
null
==
purOrderLine
.
getAttribute1
()
||
""
.
equals
(
purOrderLine
.
getAttribute1
())){
purOrderLineService
.
updateOrderLineSumQuantity
(
String
.
valueOf
(
newSumQuantity
),
purOrderLine
.
getId
());
purOrderLineService
.
updateOrderLineSumQuantity
(
String
.
valueOf
(
newSumQuantity
),
purOrderLine
.
getId
());
}
else
{
}
else
{
...
...
src/main/java/orthopedics/dao/InvTransactionMapper.java
View file @
9a275157
...
@@ -111,17 +111,22 @@ public interface InvTransactionMapper{
...
@@ -111,17 +111,22 @@ public interface InvTransactionMapper{
@ResultMap
(
"invtransaction"
)
@ResultMap
(
"invtransaction"
)
List
<
InvTransaction
>
findInInvTran
(
@Param
(
"headerId"
)
String
headerId
,
@Param
(
"lineId"
)
String
lineId
);
List
<
InvTransaction
>
findInInvTran
(
@Param
(
"headerId"
)
String
headerId
,
@Param
(
"lineId"
)
String
lineId
);
//查询该组织下的商品库存现有量
// //查询该组织下的商品库存现有量
@Select
(
"SELECT ifnull(sum(i.tx_quantity),0) FROM inv_transaction i ,"
+
// @Select("SELECT ifnull(sum(i.tx_quantity),0) FROM inv_transaction i ," +
"(SELECT inv_id,default_shipping_subinv_id,default_shipping_locator_id "
+
// "(SELECT inv_id,default_shipping_subinv_id,default_shipping_locator_id " +
"FROM wsh_parameter "
+
// "FROM wsh_parameter " +
"WHERE org_id = ("
+
// "WHERE org_id = (" +
"SELECT org_code FROM hr_organization "
+
// "SELECT org_code FROM hr_organization " +
"WHERE id = #{orgId} )) w "
+
// "WHERE id = #{orgId} )) w " +
"WHERE "
+
// "WHERE " +
"i.inv_id = w.inv_id AND i.subinv_id = w.default_shipping_subinv_id AND i.locator_id = w.default_shipping_locator_id "
+
// "i.inv_id = w.inv_id AND i.subinv_id = w.default_shipping_subinv_id AND i.locator_id = w.default_shipping_locator_id " +
"and item_id = #{itemId}"
)
// "and item_id = #{itemId}")
Integer
selectByOrgIdAndItemId
(
@Param
(
"orgId"
)
String
orgId
,
@Param
(
"itemId"
)
String
itemId
);
// Integer selectByOrgIdAndItemId(@Param("orgId")String orgId,@Param("itemId")String itemId);
//查询物流二号仓的商品库存现有量
@Select
(
"SELECT ifnull(sum(tx_quantity),0) FROM inv_transaction where inv_id = ( "
+
"select id from inv_inventory where inv_code = '2') and item_id =#{itemId}"
)
Integer
selectByOrgIdAndItemId
(
@Param
(
"itemId"
)
String
itemId
);
@Select
(
"select id from inv_transaction where item_id=#{itemId}"
)
@Select
(
"select id from inv_transaction where item_id=#{itemId}"
)
public
String
findIdByItemId
(
@Param
(
"itemId"
)
String
itemId
);
public
String
findIdByItemId
(
@Param
(
"itemId"
)
String
itemId
);
...
...
src/main/java/orthopedics/service/TransactionServer.java
View file @
9a275157
...
@@ -320,7 +320,7 @@ public class TransactionServer {
...
@@ -320,7 +320,7 @@ public class TransactionServer {
return
invTransactionMapper
.
selectQuantity
(
source_header_id
,
source_line_id
);
return
invTransactionMapper
.
selectQuantity
(
source_header_id
,
source_line_id
);
}
}
public
Integer
findByOrgIdAndItemId
(
String
orgId
,
String
itemId
){
public
Integer
findByOrgIdAndItemId
(
String
itemId
){
return
invTransactionMapper
.
selectByOrgIdAndItemId
(
orgId
,
itemId
);
return
invTransactionMapper
.
selectByOrgIdAndItemId
(
itemId
);
}
}
}
}
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