Commit 86684503 by Joneq

修改代码

parent fcf2beee
...@@ -45,10 +45,9 @@ class AdminOutstoreController extends Controller ...@@ -45,10 +45,9 @@ class AdminOutstoreController extends Controller
$data = $request->all(); $data = $request->all();
try{ try{
//获取需要修改的货品 //获取需要修改的货品
if ($data['pick_task_detail_id'] == 'all'){ 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'); $data['pick_task_detail_id_arr'] = PickTaskDetailModel::where('pick_task_id',$data['pick_task_id'])->whereIn('pick_status',[1,4])->pluck('pick_task_detail_id');
}else{ }else{
$data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']]; $data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']];
} }
...@@ -67,7 +66,7 @@ class AdminOutstoreController extends Controller ...@@ -67,7 +66,7 @@ class AdminOutstoreController extends Controller
try{ try{
//获取需要修改的货品 //获取需要修改的货品
if ($data['pick_task_detail_id'] == 'all'){ 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(); $data['pick_task_detail_id_arr'] = PickTaskDetailModel::where('pick_task_id',$data['pick_task_id'])->where('pick_status',3)->pluck('pick_task_detail_id')->toArray();
}else{ }else{
$data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']]; $data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']];
} }
...@@ -85,7 +84,7 @@ class AdminOutstoreController extends Controller ...@@ -85,7 +84,7 @@ class AdminOutstoreController extends Controller
try{ try{
//获取需要修改的货品 //获取需要修改的货品
if ($data['pick_task_detail_id'] == 'all'){ 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(); $data['pick_task_detail_id_arr'] = PickTaskDetailModel::where('pick_task_id',$data['pick_task_id'])->pluck('pick_task_detail_id')->toArray();
}else{ }else{
$data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']]; $data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']];
} }
...@@ -105,7 +104,7 @@ class AdminOutstoreController extends Controller ...@@ -105,7 +104,7 @@ class AdminOutstoreController extends Controller
try{ try{
//获取需要修改的货品 //获取需要修改的货品
if ($data['pick_task_detail_id'] == 'all'){ 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(); $data['pick_task_detail_id_arr'] = PickTaskDetailModel::where('pick_task_id',$data['pick_task_id'])->pluck('pick_task_detail_id')->toArray();
}else{ }else{
$data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']]; $data['pick_task_detail_id_arr'] = [$data['pick_task_detail_id']];
} }
......
...@@ -69,6 +69,8 @@ class PackCheckLogic ...@@ -69,6 +69,8 @@ class PackCheckLogic
//判断是否是未复核状态 //判断是否是未复核状态
$packStatus = PickTaskDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('pack_status'); $packStatus = PickTaskDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('pack_status');
if ($packStatus !== 1 ){ if ($packStatus !== 1 ){
throw new \Exception('该型号没有在未复核状态中'); throw new \Exception('该型号没有在未复核状态中');
} }
...@@ -80,36 +82,18 @@ class PackCheckLogic ...@@ -80,36 +82,18 @@ class PackCheckLogic
public function left_pack_check($data) public function left_pack_check($data)
{ {
//获取所有的out_store_detail_id //获取所有的out_store_detail_id
$goodsType = substr($data['goods_name_box_id'],0,2); $pickTaskDetailId = substr($data['goods_name_box_id'],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)){ if (empty($pickTaskDetailId)){
throw new \Exception('该拣货任务下没找到该型号'); throw new \Exception('该拣货任务下没找到该型号');
} }
//判断是否是未复核状态 //判断是否是未复核状态
$packStatus = PickTaskDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('pack_status'); $packStatus = PickTaskDetailModel::where('pick_task_detail_id',$pickTaskDetailId)->value('pack_status');
if ($packStatus !== 2 ){ if ($packStatus !== 2 ){
throw new \Exception('该型号没有在复核状态中'); throw new \Exception('该型号没有在复核状态中');
} }
PickTaskDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->update(['pack_status'=>1]); PickTaskDetailModel::where('pick_task_detail_id',$pickTaskDetailId)->update(['pack_status'=>1]);
return []; return [];
} }
} }
\ No newline at end of file
...@@ -117,7 +117,7 @@ class PalletLogic ...@@ -117,7 +117,7 @@ class PalletLogic
$adminInfo = CommonLogic::getAdminInfo(); $adminInfo = CommonLogic::getAdminInfo();
if (PickTaskDetailModel::getWhereObj([])->whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('pick_status','!=',3)){ if (PickTaskDetailModel::getWhereObj([])->whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('pick_status','!=',3)->value('pick_task_detail_id')){
throw new \Exception('拣货任务存在未拣货数据,请拣货'); throw new \Exception('拣货任务存在未拣货数据,请拣货');
} }
...@@ -135,7 +135,7 @@ class PalletLogic ...@@ -135,7 +135,7 @@ class PalletLogic
//获取需要修改的货品 //获取需要修改的货品
$pickTaskDetailIdArr = $data['pick_task_detail_id_arr']; $pickTaskDetailIdArr = $data['pick_task_detail_id_arr'];
PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->update(['is_confirm'=>0]); PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('is_confirm',1)->update(['is_confirm'=>0]);
return []; return [];
} }
...@@ -179,7 +179,7 @@ class PalletLogic ...@@ -179,7 +179,7 @@ class PalletLogic
if (!isset($data['is_apply_customs_app'])){ if (!isset($data['is_apply_customs_app'])){
//是否需要报关 //是否需要报关
if (OutStoreDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('is_apply_customs') ){ if ($isApplyCustoms = OutStoreDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('is_apply_customs') ){
throw new \Exception('报关单据不可在此发货'); throw new \Exception('报关单据不可在此发货');
} }
//复核 //复核
...@@ -188,9 +188,13 @@ class PalletLogic ...@@ -188,9 +188,13 @@ class PalletLogic
} }
} }
//非报关单据不需要确认
if ($isApplyCustoms){
if(PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('is_confirm',0)->value('pick_task_detail_id')){ if(PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('is_confirm',0)->value('pick_task_detail_id')){
throw new \Exception('单据存在未确认数据,请确认'); throw new \Exception('单据存在未确认数据,请确认');
} }
}
if(PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->whereIn('pack_status',[4])->value('pick_task_detail_id')){ if(PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->whereIn('pack_status',[4])->value('pick_task_detail_id')){
throw new \Exception('单据存在已出库数据,不可重复操作'); throw new \Exception('单据存在已出库数据,不可重复操作');
......
{"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.RP4T9084bj/Render","USER":"gongyang","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.BXbjJyYU9J/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":1589953151.894511,"REQUEST_TIME":1589953151,"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}}} {"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.Cbm9nTKoj1/Render","USER":"gongyang","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.F27n9HY3bm/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":1590049958.276179,"REQUEST_TIME":1590049958,"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 \ No newline at end of file
77401 81424
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment