Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dsyerp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
dsyerp
Commits
f1ef55b5
Commit
f1ef55b5
authored
Nov 13, 2023
by
wxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库带入编号
parent
66eaa9a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
module/Stock/src/Controller/IndexController.php
module/Stock/src/Controller/IndexController.php
+1
-1
module/Store/src/Entity/AllWarehouseOrderGoods.php
module/Store/src/Entity/AllWarehouseOrderGoods.php
+21
-0
module/Store/src/Service/AllWarehouseOrderGoodsManager.php
module/Store/src/Service/AllWarehouseOrderGoodsManager.php
+3
-1
No files found.
module/Stock/src/Controller/IndexController.php
View file @
f1ef55b5
...
...
@@ -98,7 +98,7 @@ class IndexController extends AbstractActionController
try
{
$otherWarehouseOrder
=
$this
->
otherWarehouseOrderManager
->
addOtherWarehouseOrder
(
$data
,
$goodsData
,
$this
->
adminSession
(
'admin_id'
));
$this
->
otherWarehouseOrderGoodsManager
->
addOtherWarehouseOrderGoods
(
$goodsData
,
$data
[
'warehouseId'
],
$otherWarehouseOrder
->
getOtherWarehouseOrderId
());
$allWarehouseOrderGoodsManager
->
addAllWarehouseOrderGoods
(
$goodsData
,
$data
[
'warehouseId'
],
$otherWarehouseOrder
->
getOtherWarehouseOrderId
());
$allWarehouseOrderGoodsManager
->
addAllWarehouseOrderGoods
(
$goodsData
,
$data
[
'warehouseId'
],
$otherWarehouseOrder
->
getOtherWarehouseOrderId
()
,
$otherWarehouseOrder
->
getWarehouseOrderSn
()
);
$this
->
getEventManager
()
->
trigger
(
'other-warehouse-order.insert.post'
,
$this
,
$otherWarehouseOrder
);
...
...
module/Store/src/Entity/AllWarehouseOrderGoods.php
View file @
f1ef55b5
...
...
@@ -43,6 +43,12 @@ class AllWarehouseOrderGoods extends BaseEntity
*/
private
$purchaseWarehouseOrderId
;
/**
* 其他入库采购入库对应表入库单号
* @ORM\Column(name="warehouse_order_sn", type="string", length=100)
*/
private
$warehouseOrderSn
;
/**
* 仓库id
* @ORM\Column(name="warehouse_id", type="integer", length=11)
...
...
@@ -163,6 +169,21 @@ class AllWarehouseOrderGoods extends BaseEntity
$this
->
purchaseWarehouseOrderId
=
$purchaseWarehouseOrderId
;
}
/**
* @return mixed
*/
public
function
getWarehouseOrderSn
()
{
return
$this
->
warehouseOrderSn
;
}
/**
* @param mixed $warehouseOrderSn
*/
public
function
setWarehouseOrderSn
(
$warehouseOrderSn
)
:
void
{
$this
->
warehouseOrderSn
=
$warehouseOrderSn
;
}
/**
* @return mixed
*/
...
...
module/Store/src/Service/AllWarehouseOrderGoodsManager.php
View file @
f1ef55b5
...
...
@@ -40,7 +40,7 @@ class AllWarehouseOrderGoodsManager
* @throws \Doctrine\ORM\OptimisticLockException
* @throws \Doctrine\Persistence\Mapping\MappingException
*/
public
function
addAllWarehouseOrderGoods
(
array
$data
,
$warehouseId
,
$otherWarehouseOrderId
)
public
function
addAllWarehouseOrderGoods
(
array
$data
,
$warehouseId
,
$otherWarehouseOrderId
,
$warehouseOrderSn
)
{
foreach
(
$data
[
'goodsId'
]
as
$key
=>
$value
)
{
$goodsInfo
=
$this
->
entityManager
->
getRepository
(
Goods
::
class
)
->
findOneBy
([
'goodsId'
=>
$value
]);
...
...
@@ -48,6 +48,7 @@ class AllWarehouseOrderGoodsManager
$allWarehouseGoods
=
new
AllWarehouseOrderGoods
();
$allWarehouseGoods
->
setAllWarehouseOrderGoodsId
(
null
);
$allWarehouseGoods
->
setOtherWarehouseOrderId
(
$otherWarehouseOrderId
);
$allWarehouseGoods
->
setWarehouseOrderSn
(
$warehouseOrderSn
);
$allWarehouseGoods
->
setWarehouseId
(
$warehouseId
);
$allWarehouseGoods
->
setWarehouseGoodsBuyNum
(
$data
[
'goodsBuyNum'
][
$key
]);
$allWarehouseGoods
->
setWarehouseGoodsPrice
(
$data
[
'goodsPrice'
][
$key
]);
...
...
@@ -81,6 +82,7 @@ class AllWarehouseOrderGoodsManager
$allWarehouseGoods
=
new
AllWarehouseOrderGoods
();
$allWarehouseGoods
->
setAllWarehouseOrderGoodsId
(
null
);
$allWarehouseGoods
->
setPurchaseWarehouseOrderId
(
$warehouseOrder
->
getWarehouseOrderId
());
$allWarehouseGoods
->
setWarehouseOrderSn
(
$warehouseOrder
->
getWarehouseOrderSn
());
$allWarehouseGoods
->
setWarehouseId
(
$warehouseOrder
->
getWarehouseId
());
$allWarehouseGoods
->
setWarehouseGoodsBuyNum
(
$goodsValue
->
getPGoodsBuyNum
());
$allWarehouseGoods
->
setWarehouseGoodsPrice
(
$goodsValue
->
getPGoodsPrice
());
...
...
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