Commit a59f541c by CnChunfeng

Merge branch 'develop' into 'master'

Develop

See merge request !1
parents 68c44461 301a4d7a
/.idea
Homestead.json
Homestead.yaml
/storage
\ No newline at end of file
......@@ -12,7 +12,6 @@ use App\Http\Model\Logic\OutStoreLogic;
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;
......
......@@ -16,6 +16,7 @@ class Controller extends BaseController
//获取错误描述
$ErrMsg = config('errmsg.cn.'.self::$errCode);
if (empty($ErrMsg))$ErrMsg=$dataArr;
//上报错误
$data=['errcode'=>self::$errCode, 'errmsg'=>$ErrMsg];
......
......@@ -201,12 +201,38 @@ class OutStoreLogic
DB::rollBack();
Controller::$level = 5;
Controller::$errCode = 5;
throw new \Exception('插入出库事物错误数据为 '.$exception->getMessage());
throw new \Exception('插入出库事物错误数据为::: '.$exception->getMessage());
}
return [];
}
/*
* 删除出库通知单
* param1 warehousing_sn
* 1 根据参数1查找出出库单ID
* 2 根据出库单ID删除对应的出库单明细
* where
* 如果生成了拣货任务就不删除
*/
public function deleteOutStore($data)
{
$outStoreInfo = OutStoreModel::where('warehousing_sn',$data['warehousing_sn'])->where('is_del',0)->select('out_store_id')->first();
if (empty($outStoreInfo)){
throw new \Exception('该入仓号号不存在');
}
if (PickTaskDetailModel::where('is_del',0)->where('is_show',1)->where('out_store_id',$outStoreInfo->out_store_id)->value('pick_task_detail_id')){
throw new \Exception('发货通知单已经生成拣货任务');
}
OutStoreModel::where('out_store_id',$outStoreInfo->out_store_id)->where('is_del',0)->update(['is_del'=>1]);
OutStoreDetailModel::where('out_store_id',$outStoreInfo->out_store_id)->where('is_del',0)->update(['is_del'=>1]);
PickTaskDetailModel::where('out_store_id',$outStoreInfo->out_store_id)->where('is_del',0)->update(['is_del'=>1]);
return [];
}
//获取出库仓号
......
......@@ -19,6 +19,7 @@ use App\Http\Model\PickTaskModel;
use App\Http\Model\StockFrozenModel;
use App\Http\Model\StockModel;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class PalletLogic
{
......@@ -176,10 +177,10 @@ class PalletLogic
}
}
$isApplyCustoms = OutStoreDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('is_apply_customs');
if (!isset($data['is_apply_customs_app'])){
//是否需要报关
if ($isApplyCustoms = OutStoreDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->value('is_apply_customs') ){
if ($isApplyCustoms){
throw new \Exception('报关单据不可在此发货');
}
//复核
......@@ -258,21 +259,30 @@ 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();
Log::info(json_encode($outStoreDetailIdArr));
$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'))){
......
......@@ -20,7 +20,7 @@ class OutStoreDetailModel extends Model
static public function getWhereObj($data)
{
$obj = self::where('store_id',app('request')->store_id);
$obj = self::where('store_id',app('request')->store_id)->where('is_del',0);
foreach ($data as $key=>$value){
if (empty($value))continue;
......
......@@ -19,6 +19,6 @@ class OutStoreModel extends Model
static public function getWhereObj($data)
{
return $obj = self::where('store_id','=',app('request')->store_id);
return $obj = self::where('store_id','=',app('request')->store_id)->where('is_del',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.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
81424
\ No newline at end of file
......@@ -279,7 +279,7 @@ class ClassLoader
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
......@@ -377,7 +377,7 @@ class ClassLoader
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
......
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