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
03641e6b
authored
May 18, 2020
by
叶明星
Browse files
Options
_('Browse Files')
Download
Plain Diff
合并分支
parents
70d355c1
5d23d9d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
181 additions
and
69 deletions
app/Http/Controllers/AdminOutstoreController.php
app/Http/Controllers/OutstoreController.php
app/Http/Controllers/PicktaskController.php
app/Http/Model/BoxModel.php
app/Http/Model/Logic/CommonLogic.php
app/Http/Model/Logic/OutStoreLogic.php
app/Http/Model/Logic/PackCheckLogic.php
app/Http/Model/Logic/PalletLogic.php
app/Http/Model/Logic/PickTaskLogic.php
storage/laravels.json
storage/laravels.pid
app/Http/Controllers/AdminOutstoreController.php
View file @
03641e6b
...
...
@@ -12,6 +12,7 @@ use App\Http\Model\Logic\PackCheckLogic;
use
App\Http\Model\Logic\PalletLogic
;
use
App\Http\Model\Logic\PickTaskLogic
;
use
App\Http\Model\OutStoreDetailModel
;
use
App\Http\Model\PickTaskDetailModel
;
use
Illuminate\Http\Request
;
class
AdminOutstoreController
extends
Controller
...
...
@@ -44,11 +45,12 @@ class AdminOutstoreController extends Controller
$data
=
$request
->
all
();
try
{
//获取需要修改的货品
if
(
$data
[
'
out_store
_detail_id'
]
==
'all'
){
$data
[
'
out_store_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'out_store
_detail_id'
);
if
(
$data
[
'
pick_task
_detail_id'
]
==
'all'
){
$data
[
'
pick_task_detail_id_arr'
]
=
PickTaskDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
whereIn
(
'pick_status'
,[
1
,
4
])
->
pluck
(
'pick_task
_detail_id'
);
}
else
{
$data
[
'
out_store_detail_id_arr'
]
=
[
$data
[
'out_store
_detail_id'
]];
$data
[
'
pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task
_detail_id'
]];
}
$returnData
=
(
new
PickTaskLogic
())
->
confirmPick
(
$data
);
}
catch
(
\Exception
$exception
){
...
...
@@ -64,10 +66,10 @@ class AdminOutstoreController extends Controller
$data
=
$request
->
all
();
try
{
//获取需要修改的货品
if
(
$data
[
'
out_store
_detail_id'
]
==
'all'
){
$data
[
'
out_store_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'out_store_detail_id'
);
if
(
$data
[
'
pick_task
_detail_id'
]
==
'all'
){
$data
[
'
pick_task_detail_id_arr'
]
=
PickTaskDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
where
(
'pick_status'
,
3
)
->
pluck
(
'pick_task_detail_id'
)
->
toArray
(
);
}
else
{
$data
[
'
out_store_detail_id_arr'
]
=
[
$data
[
'out_store
_detail_id'
]];
$data
[
'
pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task
_detail_id'
]];
}
$returnData
=
(
new
PickTaskLogic
())
->
cancelPick
(
$data
);
}
catch
(
\Exception
$exception
){
...
...
@@ -82,10 +84,10 @@ class AdminOutstoreController extends Controller
$data
=
$request
->
all
();
try
{
//获取需要修改的货品
if
(
$data
[
'
out_store
_detail_id'
]
==
'all'
){
$data
[
'
out_store_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'out_store_detail_id'
);
if
(
$data
[
'
pick_task
_detail_id'
]
==
'all'
){
$data
[
'
pick_task_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'pick_task_detail_id'
)
->
toArray
(
);
}
else
{
$data
[
'
out_store_detail_id_arr'
]
=
[
$data
[
'out_store
_detail_id'
]];
$data
[
'
pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task
_detail_id'
]];
}
$returnData
=
(
new
PalletLogic
())
->
confirmOutStore
(
$data
);
...
...
@@ -102,10 +104,10 @@ class AdminOutstoreController extends Controller
$data
=
$request
->
all
();
try
{
//获取需要修改的货品
if
(
$data
[
'
out_store
_detail_id'
]
==
'all'
){
$data
[
'
out_store_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'out_store_detail_id'
);
if
(
$data
[
'
pick_task
_detail_id'
]
==
'all'
){
$data
[
'
pick_task_detail_id_arr'
]
=
OutStoreDetailModel
::
where
(
'out_store_id'
,
$data
[
'out_store_id'
])
->
pluck
(
'pick_task_detail_id'
)
->
toArray
(
);
}
else
{
$data
[
'
out_store_detail_id_arr'
]
=
[
$data
[
'out_store
_detail_id'
]];
$data
[
'
pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task
_detail_id'
]];
}
$returnData
=
(
new
PalletLogic
())
->
cancelOutStore
(
$data
);
...
...
@@ -141,7 +143,7 @@ class AdminOutstoreController extends Controller
return
$this
->
apiReturn
(
$returnData
);
}
//
装箱
//
复核
public
function
right_pack_check
(
$request
)
{
$data
=
$request
->
all
();
...
...
@@ -153,6 +155,19 @@ class AdminOutstoreController extends Controller
return
$this
->
apiReturn
(
$returnData
);
}
//取消复核
public
function
left_pack_check
(
$request
)
{
$data
=
$request
->
all
();
try
{
$returnData
=
(
new
PackCheckLogic
())
->
left_pack_check
(
$data
);
}
catch
(
\Exception
$exception
){
return
$this
->
apiReturn
(
$exception
->
getMessage
()
.
'|jsondata='
.
json_encode
(
$data
));
}
return
$this
->
apiReturn
(
$returnData
);
}
//装卡板
public
function
palletActive
(
$request
)
{
...
...
@@ -162,6 +177,7 @@ class AdminOutstoreController extends Controller
}
catch
(
\Exception
$exception
){
return
$this
->
apiReturn
(
$exception
->
getMessage
()
.
'|jsondata='
.
json_encode
(
$data
));
}
return
$this
->
apiReturn
(
$returnData
);
}
...
...
@@ -192,6 +208,47 @@ class AdminOutstoreController extends Controller
return
$this
->
apiReturn
(
$returnData
);
}
//获取卡板标签打印信息
public
function
print_pallet_label
(
$request
)
{
$data
=
$request
->
all
();
try
{
$returnData
=
(
new
PalletLogic
())
->
print_pallet_label
(
$data
);
}
catch
(
\Exception
$exception
){
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
}
//获取卡板标签打印信息
public
function
print_box_label
(
$request
)
{
$data
=
$request
->
all
();
try
{
$returnData
=
(
new
PalletLogic
())
->
print_box_label
(
$data
);
}
catch
(
\Exception
$exception
){
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
}
//获取卡板标签打印信息
public
function
print_pick_task_label
(
$request
)
{
$data
=
$request
->
all
();
try
{
$returnData
=
(
new
PalletLogic
())
->
print_pick_task_label
(
$data
);
}
catch
(
\Exception
$exception
){
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
}
//获取拣货任务打印信息
public
function
print_pick_task_info
(
$request
)
{
...
...
app/Http/Controllers/OutstoreController.php
View file @
03641e6b
...
...
@@ -13,7 +13,6 @@ use App\Http\Model\Logic\PickTaskLogic;
use
App\Http\Model\PickTaskDetailModel
;
use
Illuminate\Http\Request
;
use
App\Http\Model\Logic\OutStoreLogic
;
class
OutstoreController
extends
Controller
{
public
function
Entrance
(
Request
$request
,
$id
)
...
...
@@ -27,11 +26,11 @@ class OutstoreController extends Controller
public
function
createOutStore
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
$inserData
=
OutStoreLogic
::
handleInsertData
(
$data
);
$returnData
=
OutStoreLogic
::
insertData
(
$inserData
);
}
catch
(
\Exception
$exception
)
{
return
$this
->
apiReturn
(
$exception
->
getMessage
()
.
'|jsondata='
.
json_encode
(
$data
));
}
catch
(
\Exception
$exception
)
{
return
$this
->
apiReturn
(
$exception
->
getMessage
()
.
'|jsondata='
.
json_encode
(
$data
));
}
return
$this
->
apiReturn
(
$returnData
);
}
...
...
@@ -40,24 +39,26 @@ class OutstoreController extends Controller
public
function
palletBoxList
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
$returnData
=
(
new
PalletLogic
())
->
palletBoxList
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
}
//扫描出库列表
public
function
scan_out_store_list
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
$returnData
=
(
new
PickTaskLogic
())
->
getPickTaskDetailList
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -68,12 +69,11 @@ class OutstoreController extends Controller
public
function
confirm_out_store
(
$request
)
{
$data
=
$request
->
all
();
try
{
$outStoreDetailIdArr
=
PickTaskDetailModel
::
where
(
'pick_task_detail_id'
,
$data
[
'pick_task_detail_id'
])
->
pluck
(
'out_store_detail_id'
);
$data
[
'out_store_detail_id_arr'
]
=
$outStoreDetailIdArr
;
try
{
$data
[
'pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task_detail_id'
]];
$returnData
=
(
new
PalletLogic
())
->
confirmOutStore
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -83,13 +83,12 @@ class OutstoreController extends Controller
public
function
cancel_out_store
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
//获取所有的out_store_detail_id
$outStoreDetailIdArr
=
PickTaskDetailModel
::
where
(
'pick_task_detail_id'
,
$data
[
'pick_task_detail_id'
])
->
pluck
(
'out_store_detail_id'
);
$data
[
'out_store_detail_id_arr'
]
=
$outStoreDetailIdArr
;
$data
[
'pick_task_detail_id_arr'
]
=
[
$data
[
'pick_task_detail_id'
]];
$returnData
=
(
new
PalletLogic
())
->
cancelOutStore
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -99,11 +98,12 @@ class OutstoreController extends Controller
public
function
deliver_goods
(
$request
)
{
$data
=
$request
->
all
();
try
{
$data
[
'pick_task_detail_id_str'
]
=
implode
(
','
,
$data
[
'pick_task_detail_id'
]);
try
{
$data
[
'pick_task_detail_id_str'
]
=
implode
(
','
,
$data
[
'pick_task_detail_id'
]);
$data
[
'is_apply_customs_app'
]
=
'1'
;
$returnData
=
(
new
PalletLogic
())
->
deliverGoods
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -113,10 +113,14 @@ class OutstoreController extends Controller
public
function
palletActive
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
if
(
empty
(
$data
[
'box_id_arr'
])){
throw
new
\Exception
(
'装卡板箱子不能为空'
);
}
$data
[
'box_sn_str'
]
=
implode
(
','
,
$data
[
'box_id_arr'
]);
$returnData
=
(
new
PalletLogic
())
->
palletActive
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -126,10 +130,10 @@ class OutstoreController extends Controller
public
function
get_box_info
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
$returnData
=
(
new
PalletLogic
())
->
getBoxInfo
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
@@ -139,10 +143,10 @@ class OutstoreController extends Controller
public
function
get_pallet_info
(
$request
)
{
$data
=
$request
->
all
();
try
{
try
{
$returnData
=
(
new
PalletLogic
())
->
getPalletInfo
(
$data
);
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
}
catch
(
\Exception
$exception
)
{
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
}
return
$this
->
apiReturn
(
$returnData
);
...
...
app/Http/Controllers/PicktaskController.php
View file @
03641e6b
...
...
@@ -84,8 +84,8 @@ class PicktaskController extends Controller
if
(
empty
(
$outStoreDetailIdArr
)){
throw
new
\Exception
(
'该任务下没有这个型号'
);
}
$
data
[
'out_store_detail_id_arr'
]
=
$outStoreDetailIdArr
;
$returnData
=
(
new
PickTaskLogic
())
->
confirmPick
(
$data
);
$
pickTaskDetailArr
=
PickTaskDetailModel
::
getWhereObj
([])
->
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
whereIn
(
'pick_status'
,[
1
,
4
])
->
pluck
(
'pick_task_detail_id'
)
->
toArray
()
;
$returnData
=
(
new
PickTaskLogic
())
->
confirmPick
(
[
'pick_task_detail_id_arr'
=>
$pickTaskDetailArr
]
);
}
catch
(
\Exception
$exception
){
if
(
empty
(
self
::
$errCode
))
self
::
$errCode
=
101
;
return
$this
->
apiReturn
(
$exception
->
getMessage
());
...
...
@@ -101,12 +101,14 @@ class PicktaskController extends Controller
try
{
//获取所有的out_store_detail_id
$
outStoreDetailIdArr
=
PickTaskDetailModel
::
where
(
'pick_task_detail_id'
,
$data
[
'pick_task_detail_id'
])
->
pluck
(
'out_store
_detail_id'
);
$
pickTaskDetailIdArr
=
PickTaskDetailModel
::
where
(
'pick_task_detail_id'
,
$data
[
'pick_task_detail_id'
])
->
where
(
'pick_status'
,
3
)
->
pluck
(
'pick_task
_detail_id'
);
if
(
empty
(
$
outStore
DetailIdArr
)){
throw
new
\Exception
(
'该任务下
没有这个型号
'
);
if
(
empty
(
$
pickTask
DetailIdArr
)){
throw
new
\Exception
(
'该任务下
不是已拣货状态
'
);
}
$data
[
'out_store_detail_id_arr'
]
=
$outStoreDetailIdArr
;
$pickTaskDetailIdArr
=
$pickTaskDetailIdArr
->
toArray
();
$data
[
'pick_task_detail_id_arr'
]
=
$pickTaskDetailIdArr
;
$returnData
=
(
new
PickTaskLogic
())
->
cancelPick
(
$data
);
}
catch
(
\Exception
$exception
){
...
...
app/Http/Model/BoxModel.php
View file @
03641e6b
...
...
@@ -21,4 +21,6 @@ class BoxModel extends Model
{
return
$obj
=
self
::
where
(
'store_id'
,
'='
,
app
(
'request'
)
->
store_id
);
}
}
\ No newline at end of file
app/Http/Model/Logic/CommonLogic.php
View file @
03641e6b
...
...
@@ -59,7 +59,6 @@ class CommonLogic
case
'delivery_id'
://
发货人员
case
'admin_id'
://
根据id获取人员姓名
case
'pick_user_id'
://
拣货人
case
'confirm_user_id'
://
确认人
$value
=
'暂未录入'
;
break
;
case
'store_id'
://
根据仓库IDid获取名称
$value
=
StoreModel
::
where
(
'store_id'
,
$value
)
->
value
(
"store_name"
);
break
;
...
...
@@ -113,9 +112,9 @@ class CommonLogic
{
$outStoreArr
=
OutStoreDetailModel
::
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
pluck
(
'out_store_id'
)
->
toArray
();
foreach
(
array_
filter
(
$outStoreArr
)
as
$key
=>
$value
){
foreach
(
array_
unique
(
array_filter
(
$outStoreArr
)
)
as
$key
=>
$value
){
$outStoreInfo
=
OutStoreModel
::
getWhereObj
([])
->
where
(
'out_store_id'
,
$value
)
->
first
()
->
toArray
()
;
$outStoreInfo
=
OutStoreModel
::
getWhereObj
([])
->
where
(
'out_store_id'
,
$value
)
->
first
();
$outStoreDetailData
=
OutStoreDetailModel
::
getWhereObj
([])
->
where
(
'out_store_id'
,
$value
)
...
...
@@ -126,14 +125,14 @@ class CommonLogic
$json
=
[
'SyncName'
=>
'out_store'
,
'Data'
=>
[
'erp_store_id'
=>
$outStoreInfo
[
'erp_out_store_id'
]
,
'box_number'
=>
count
(
array_
filter
(
array_column
(
$outStoreDetailData
,
'box_id'
))),
'pallet_number'
=>
count
(
array_
filter
(
array_column
(
$outStoreDetailData
,
'pallet_id'
))),
'erp_store_id'
=>
$outStoreInfo
->
erp_out_store_id
,
'box_number'
=>
count
(
array_
unique
(
array_filter
(
array_column
(
$outStoreDetailData
,
'box_id'
)
))),
'pallet_number'
=>
count
(
array_
unique
(
array_filter
(
array_column
(
$outStoreDetailData
,
'pallet_id'
)
))),
'detail'
=>
$outStoreDetailData
,
]
];
return
Amqp
::
publish
(
's
tore_audit_status'
,
json_encode
(
$json
),[
'queue'
=>
'store_audit_status'
,
'exchange'
=>
'
store'
,
'exchange_type'
=>
'direct'
]);
return
Amqp
::
publish
(
's
cm_store_audit_status'
,
json_encode
(
$json
),[
'queue'
=>
'scm_store_audit_status'
,
'exchange'
=>
'scm_
store'
,
'exchange_type'
=>
'direct'
]);
}
...
...
app/Http/Model/Logic/OutStoreLogic.php
View file @
03641e6b
...
...
@@ -55,7 +55,7 @@ class OutStoreLogic
//判断该入库单号是否拥有
if
(
!
empty
(
OutStoreModel
::
where
(
'warehousing_sn'
,
$data
[
'warehousing_sn'
])
->
value
(
'out_store_id'
))){
Controller
::
$level
=
5
;
Controller
::
$errCode
=
2
;
throw
new
\Exception
(
'该入
库
单号已经存在'
.
$data
[
'warehousing_sn'
]);
throw
new
\Exception
(
'该入
仓
单号已经存在'
.
$data
[
'warehousing_sn'
]);
}
//判断入库详情是否为空
...
...
@@ -174,13 +174,19 @@ class OutStoreLogic
OutStoreModel
::
where
(
'out_store_id'
,
$outStoreId
)
->
update
([
'is_insp'
=>
1
]);
}
$outStoreDetailId
=
OutStoreDetailModel
::
insertGetId
(
array_merge
(
self
::
handleOutStoreDetailInsertData
(
$value
,
$insertData
),[
'pick_task_id'
=>
$pickTaskId
]));
$value
=
array_merge
(
self
::
handleOutStoreDetailInsertData
(
$value
,
$insertData
),[
'pick_task_id'
=>
$pickTaskId
]);
$outStoreDetailId
=
OutStoreDetailModel
::
insertGetId
(
$value
);
//is_apply_customs报关任务默认隐藏
PickTaskDetailModel
::
insertGetId
(
PickTaskLogic
::
handleInsertData
([
$pickTaskData
=
PickTaskLogic
::
handleInsertData
([
'out_store_id'
=>
$outStoreId
,
'out_store_detail_id'
=>
$outStoreDetailId
,
'store_id'
=>
$insertData
[
'store_id'
],
'pick_task_id'
=>
$pickTaskId
,
'is_show'
=>
empty
(
$insertData
[
'is_apply_customs'
])
?
1
:
0
]));
],
$value
);
foreach
(
$pickTaskData
as
$v
){
PickTaskDetailModel
::
insertGetId
(
$v
);
}
}
DB
::
commit
();
...
...
app/Http/Model/Logic/PackCheckLogic.php
View file @
03641e6b
...
...
@@ -65,9 +65,12 @@ class PackCheckLogic
$outStoreDetailIdArr
=
BoxModel
::
where
(
'box_sn'
,
$data
[
'goods_name_box_id'
])
->
value
(
'box_id'
);
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'pick_task_id'
,
$pickTaskId
)
->
where
(
'box_id'
,
$outStoreDetailIdArr
)
->
pluck
(
'out_store_detail_id'
);
break
;
case
'FH'
:
$fh
=
substr
(
$data
[
'goods_name_box_id'
],
2
);
$outStoreDetailIdArr
=
[
$fh
];
break
;
default
:
$outStoreDetailIdArr
=
GoodsModel
::
where
(
'goods_name'
,
$data
[
'goods_name_box_id'
])
->
value
(
'goods_id'
);
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'pick_task_id'
,
$pickTaskId
)
->
where
(
'goods_id'
,
$outStoreDetailIdArr
)
->
pluck
(
'out_store_detail_id'
);
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'goods_name'
,
$data
[
'goods_name_box_id'
])
->
pluck
(
'out_store_detail_id'
);
break
;
}
...
...
@@ -83,4 +86,41 @@ class PackCheckLogic
PickTaskDetailModel
::
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
update
([
'pack_status'
=>
2
]);
return
[];
}
public
function
left_pack_check
(
$data
)
{
//获取所有的out_store_detail_id
$goodsType
=
substr
(
$data
[
'goods_name_box_id'
],
0
,
2
);
$pickTaskId
=
PickTaskModel
::
where
(
'pick_task_sn'
,
$data
[
'pick_task_sn'
])
->
value
(
'pick_task_id'
);
switch
(
$goodsType
){
case
'KB'
:
$outStoreDetailIdArr
=
PalletModel
::
getWhereObj
([])
->
where
(
'pallet_sn'
,
$data
[
'goods_name_box_id'
])
->
value
(
'pallet_id'
);
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'pick_task_id'
,
$pickTaskId
)
->
where
(
'pallet_id'
,
$outStoreDetailIdArr
)
->
pluck
(
'out_store_detail_id'
);
break
;
case
'XB'
:
$outStoreDetailIdArr
=
BoxModel
::
where
(
'box_sn'
,
$data
[
'goods_name_box_id'
])
->
value
(
'box_id'
);
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'pick_task_id'
,
$pickTaskId
)
->
where
(
'box_id'
,
$outStoreDetailIdArr
)
->
pluck
(
'out_store_detail_id'
);
break
;
case
'FH'
:
$fh
=
substr
(
$data
[
'goods_name_box_id'
],
2
);
$outStoreDetailIdArr
=
[
$fh
];
break
;
default
:
$outStoreDetailIdArr
=
OutStoreDetailModel
::
where
(
'goods_name'
,
$data
[
'goods_name_box_id'
])
->
pluck
(
'out_store_detail_id'
);
break
;
}
if
(
empty
(
$outStoreDetailIdArr
)){
throw
new
\Exception
(
'该拣货任务下没找到该型号'
);
}
//判断是否是未复核状态
$packStatus
=
PickTaskDetailModel
::
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
value
(
'pack_status'
);
if
(
$packStatus
!==
2
){
throw
new
\Exception
(
'该型号没有在复核状态中'
);
}
PickTaskDetailModel
::
whereIn
(
'out_store_detail_id'
,
$outStoreDetailIdArr
)
->
update
([
'pack_status'
=>
1
]);
return
[];
}
}
\ No newline at end of file
app/Http/Model/Logic/PalletLogic.php
View file @
03641e6b
This diff is collapsed.
Click to expand it.
app/Http/Model/Logic/PickTaskLogic.php
View file @
03641e6b
This diff is collapsed.
Click to expand it.
storage/laravels.json
View file @
03641e6b
{
"server"
:{
"listen_ip"
:
"0.0.0.0"
,
"listen_port"
:
"40003"
,
"socket_type"
:
1
,
"enable_coroutine_runtime"
:
false
,
"server"
:
"LaravelS"
,
"handle_static"
:
false
,
"laravel_base_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"inotify_reload"
:{
"enable"
:
false
,
"watch_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"file_types"
:[
".php"
],
"excluded_dirs"
:[],
"log"
:
true
},
"event_handlers"
:[],
"websocket"
:{
"enable"
:
false
},
"sockets"
:[],
"processes"
:[],
"timer"
:{
"enable"
:
false
,
"jobs"
:[],
"pid_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/laravels-timer.pid"
,
"max_wait_time"
:
5
},
"events"
:[],
"swoole_tables"
:[],
"register_providers"
:[],
"cleaners"
:[],
"swoole"
:{
"daemonize"
:
false
,
"dispatch_mode"
:
2
,
"reactor_num"
:
4
,
"worker_num"
:
"3"
,
"task_ipc_mode"
:
1
,
"task_max_request"
:
8000
,
"task_tmpdir"
:
"/tmp"
,
"max_request"
:
8000
,
"open_tcp_nodelay"
:
true
,
"pid_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/laravels.pid"
,
"log_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/logs/swoole-2020-05.log"
,
"log_level"
:
4
,
"document_root"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/public"
,
"buffer_output_size"
:
2097152
,
"socket_buffer_size"
:
134217728
,
"package_max_length"
:
4194304
,
"reload_async"
:
true
,
"max_wait_time"
:
60
,
"enable_reuse_port"
:
true
,
"enable_coroutine"
:
false
,
"http_compression"
:
false
},
"enable_gzip"
:
false
,
"process_prefix"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"ignore_check_pid"
:
false
},
"laravel"
:{
"root_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"static_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/public"
,
"cleaners"
:[],
"register_providers"
:[],
"is_lumen"
:
true
,
"_SERVER"
:{
"SHELL"
:
"/bin/bash"
,
"TERM"
:
"xterm-256color"
,
"HOMEBREW_BOTTLE_DOMAIN"
:
"https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
,
"TMPDIR"
:
"/var/folders/vd/95yw3kdx65n1qw9ggmkkkp7c0000gn/T/"
,
"Apple_PubSub_Socket_Render"
:
"/private/tmp/com.apple.launchd.wWtj0v7Agw/Render"
,
"USER"
:
"gongyang"
,
"SSH_AUTH_SOCK"
:
"/private/tmp/com.apple.launchd.tXmktxiIKD/Listeners"
,
"__CF_USER_TEXT_ENCODING"
:
"0x1F5:0x19:0x34"
,
"PATH"
:
"/usr/local/opt/mysql@5.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin"
,
"_"
:
"/usr/bin/php"
,
"PWD"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"XPC_FLAGS"
:
"0x0"
,
"XPC_SERVICE_NAME"
:
"0"
,
"HOME"
:
"/Users/gongyang"
,
"SHLVL"
:
"2"
,
"LOGNAME"
:
"gongyang"
,
"LC_CTYPE"
:
"zh_CN.UTF-8"
,
"PHP_SELF"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"SCRIPT_NAME"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"SCRIPT_FILENAME"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"PATH_TRANSLATED"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"DOCUMENT_ROOT"
:
""
,
"REQUEST_TIME_FLOAT"
:
1589425564.966995
,
"REQUEST_TIME"
:
1589425564
,
"argv"
:[
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"laravels"
,
"config"
],
"argc"
:
3
,
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
""
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_TIMEZONE"
:
"+08:00"
,
"SYSTEM_CODE"
:
"01"
,
"SYSTEM_NAME"
:
"服务初始服务(开发环境)"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"40003"
,
"worker_num"
:
"3"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_USERNAME"
:
"liexin_scm_wms"
,
"DB_PASSWORD"
:
"liexin_scm_wms#zsyM"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"liexin_scm_wms"
,
"DB_PREFIX"
:
"lie_"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.237"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"RABBIT_IP"
:
"192.168.1.237"
,
"RABBIT_PORT"
:
"5672"
,
"RABBIT_USER"
:
"huntadmin"
,
"RABBIT_PASS"
:
"jy2y2900"
,
"SHELL_VERBOSITY"
:
0
},
"_ENV"
:{
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
""
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_TIMEZONE"
:
"+08:00"
,
"SYSTEM_CODE"
:
"01"
,
"SYSTEM_NAME"
:
"服务初始服务(开发环境)"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"40003"
,
"worker_num"
:
"3"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_USERNAME"
:
"liexin_scm_wms"
,
"DB_PASSWORD"
:
"liexin_scm_wms#zsyM"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"liexin_scm_wms"
,
"DB_PREFIX"
:
"lie_"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.237"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"RABBIT_IP"
:
"192.168.1.237"
,
"RABBIT_PORT"
:
"5672"
,
"RABBIT_USER"
:
"huntadmin"
,
"RABBIT_PASS"
:
"jy2y2900"
,
"SHELL_VERBOSITY"
:
0
}}}
\ No newline at end of file
{
"server"
:{
"listen_ip"
:
"0.0.0.0"
,
"listen_port"
:
"40003"
,
"socket_type"
:
1
,
"enable_coroutine_runtime"
:
false
,
"server"
:
"LaravelS"
,
"handle_static"
:
false
,
"laravel_base_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"inotify_reload"
:{
"enable"
:
false
,
"watch_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"file_types"
:[
".php"
],
"excluded_dirs"
:[],
"log"
:
true
},
"event_handlers"
:[],
"websocket"
:{
"enable"
:
false
},
"sockets"
:[],
"processes"
:[],
"timer"
:{
"enable"
:
false
,
"jobs"
:[],
"pid_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/laravels-timer.pid"
,
"max_wait_time"
:
5
},
"events"
:[],
"swoole_tables"
:[],
"register_providers"
:[],
"cleaners"
:[],
"swoole"
:{
"daemonize"
:
false
,
"dispatch_mode"
:
2
,
"reactor_num"
:
4
,
"worker_num"
:
"3"
,
"task_worker_num"
:
3
,
"task_ipc_mode"
:
1
,
"task_max_request"
:
8000
,
"task_tmpdir"
:
"/tmp"
,
"max_request"
:
8000
,
"open_tcp_nodelay"
:
true
,
"pid_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/laravels.pid"
,
"log_file"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/storage/logs/swoole-2020-05.log"
,
"log_level"
:
4
,
"document_root"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/public"
,
"buffer_output_size"
:
2097152
,
"socket_buffer_size"
:
134217728
,
"package_max_length"
:
4194304
,
"reload_async"
:
true
,
"max_wait_time"
:
60
,
"enable_reuse_port"
:
true
,
"enable_coroutine"
:
false
,
"http_compression"
:
false
},
"enable_gzip"
:
false
,
"process_prefix"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"ignore_check_pid"
:
false
},
"laravel"
:{
"root_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"static_path"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/public"
,
"cleaners"
:[],
"register_providers"
:[],
"is_lumen"
:
true
,
"_SERVER"
:{
"SHELL"
:
"/bin/bash"
,
"TERM"
:
"xterm-256color"
,
"HOMEBREW_BOTTLE_DOMAIN"
:
"https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
,
"TMPDIR"
:
"/var/folders/vd/95yw3kdx65n1qw9ggmkkkp7c0000gn/T/"
,
"Apple_PubSub_Socket_Render"
:
"/private/tmp/com.apple.launchd.qUCXwtFWzp/Render"
,
"USER"
:
"gongyang"
,
"SSH_AUTH_SOCK"
:
"/private/tmp/com.apple.launchd.Z1K2tYGKcP/Listeners"
,
"__CF_USER_TEXT_ENCODING"
:
"0x1F5:0x19:0x34"
,
"PATH"
:
"/usr/local/opt/mysql@5.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin"
,
"_"
:
"/usr/bin/php"
,
"PWD"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service"
,
"XPC_FLAGS"
:
"0x0"
,
"XPC_SERVICE_NAME"
:
"0"
,
"HOME"
:
"/Users/gongyang"
,
"SHLVL"
:
"2"
,
"LOGNAME"
:
"gongyang"
,
"LC_CTYPE"
:
"zh_CN.UTF-8"
,
"PHP_SELF"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"SCRIPT_NAME"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"SCRIPT_FILENAME"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"PATH_TRANSLATED"
:
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"DOCUMENT_ROOT"
:
""
,
"REQUEST_TIME_FLOAT"
:
1589768657.672203
,
"REQUEST_TIME"
:
1589768657
,
"argv"
:[
"/usr/local/var/www/ichunt/scm_wms_outstore_service/artisan"
,
"laravels"
,
"config"
],
"argc"
:
3
,
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
""
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_TIMEZONE"
:
"+08:00"
,
"SYSTEM_CODE"
:
"01"
,
"SYSTEM_NAME"
:
"服务初始服务(开发环境)"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"40003"
,
"worker_num"
:
"3"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_USERNAME"
:
"liexin_scm_wms"
,
"DB_PASSWORD"
:
"liexin_scm_wms#zsyM"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"liexin_scm_wms"
,
"DB_PREFIX"
:
"lie_"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.237"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"RABBIT_IP"
:
"192.168.1.237"
,
"RABBIT_PORT"
:
"5672"
,
"RABBIT_USER"
:
"huntadmin"
,
"RABBIT_PASS"
:
"jy2y2900"
,
"RABBITMQ_LOG_HOST"
:
"192.168.1.237"
,
"RABBITMQ_LOG_PORT"
:
"5672"
,
"RABBITMQ_LOG_VHOST"
:
"/"
,
"RABBITMQ_LOG_LOGIN"
:
"huntadmin"
,
"RABBITMQ_LOG_PASSWORD"
:
"jy2y2900"
,
"RABBITMQ_LOG_QUEUE"
:
"scm_wms_log"
,
"SHELL_VERBOSITY"
:
0
},
"_ENV"
:{
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
""
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_TIMEZONE"
:
"+08:00"
,
"SYSTEM_CODE"
:
"01"
,
"SYSTEM_NAME"
:
"服务初始服务(开发环境)"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"40003"
,
"worker_num"
:
"3"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_USERNAME"
:
"liexin_scm_wms"
,
"DB_PASSWORD"
:
"liexin_scm_wms#zsyM"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"liexin_scm_wms"
,
"DB_PREFIX"
:
"lie_"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.237"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"RABBIT_IP"
:
"192.168.1.237"
,
"RABBIT_PORT"
:
"5672"
,
"RABBIT_USER"
:
"huntadmin"
,
"RABBIT_PASS"
:
"jy2y2900"
,
"RABBITMQ_LOG_HOST"
:
"192.168.1.237"
,
"RABBITMQ_LOG_PORT"
:
"5672"
,
"RABBITMQ_LOG_VHOST"
:
"/"
,
"RABBITMQ_LOG_LOGIN"
:
"huntadmin"
,
"RABBITMQ_LOG_PASSWORD"
:
"jy2y2900"
,
"RABBITMQ_LOG_QUEUE"
:
"scm_wms_log"
,
"SHELL_VERBOSITY"
:
0
}}}
\ No newline at end of file
storage/laravels.pid
View file @
03641e6b
74392
\ No newline at end of file
13578
\ No newline at end of file
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