Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
scm_wms_outstore_service
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
90081602
authored
Jun 04, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
提交代码
parent
9fb86b7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
app/Http/Model/Logic/PalletLogic.php
app/Http/Model/Logic/PalletLogic.php
View file @
90081602
...
...
@@ -258,21 +258,29 @@ class PalletLogic
throw
new
\Exception
(
'装箱型号不能为空'
);
}
//查找出所有的拣货详情
$outStoreDetailIdArr
=
PickTaskDetailModel
::
whereIn
(
'pick_task_detail_id'
,
$pickTaskDetailIdArr
)
->
pluck
(
'out_store_detail_id'
)
->
toArray
();
if
(
empty
(
$outStoreDetailIdArr
)){
throw
new
\Exception
(
'查找不到拣货详情'
);
}
//如果是新箱子就生成一个下架箱子
if
(
$data
[
'pack_type'
]
!=
2
){
$data
[
'pack_val'
]
=
$boxSn
=
BoxModel
::
getBoxSn
();
$isInsp
=
OutStoreDetailModel
::
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
where
(
'is_insp'
,
1
)
->
value
(
'out_store_detail_id'
);
if
(
empty
(
$isInsp
)){
$isInsp
=
2
;
}
else
{
$isInsp
=
1
;
}
BoxModel
::
insertGetId
([
'box_sn'
=>
$boxSn
,
'weight'
=>
$data
[
'weigh_val'
],
'status'
=>
3
,
'add_time'
=>
time
(),
'admin_id'
=>
CommonLogic
::
getAdminInfo
()[
'admin_id'
],
'admin_name'
=>
CommonLogic
::
getAdminInfo
()[
'admin_name'
],
'box_sn'
=>
$boxSn
,
'weight'
=>
$data
[
'weigh_val'
],
'status'
=>
3
,
'is_insp'
=>
$isInsp
,
'add_time'
=>
time
(),
'
last_update_time'
=>
time
(),
'
admin_id'
=>
CommonLogic
::
getAdminInfo
()[
'admin_id'
],
'admin_name'
=>
CommonLogic
::
getAdminInfo
()[
'admin_name'
],
'store_id'
=>
CommonLogic
::
getAdminInfo
()[
'store_id'
],
'customer_id'
=>
OutStoreModel
::
where
(
'out_store_id'
,
PickTaskDetailModel
::
where
(
'pick_task_detail_id'
,
$pickTaskDetailIdArr
[
0
])
->
value
(
'out_store_id'
))
->
value
(
'customer_id'
)
]);
}
//查找出所有的拣货详情
$outStoreDetailIdArr
=
PickTaskDetailModel
::
whereIn
(
'pick_task_detail_id'
,
$pickTaskDetailIdArr
)
->
pluck
(
'out_store_detail_id'
)
->
toArray
();
if
(
empty
(
$outStoreDetailIdArr
)){
throw
new
\Exception
(
'查找不到拣货详情'
);
}
//查找出当前箱子信息
if
(
empty
(
$boxId
=
BoxModel
::
where
(
'box_sn'
,
$data
[
'pack_val'
])
->
value
(
'box_id'
))){
...
...
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