Commit f4671998 by 叶明星

调整格式

parent b7d27cdf
Showing with 56 additions and 60 deletions
......@@ -7,6 +7,7 @@
*/
namespace App\Http\Controllers;
use App\Http\Logic\CommonLogic;
use Illuminate\Http\Request;
......@@ -22,18 +23,18 @@ class OutStoreController extends Controller
public function pick_task_list($request)
{
$data = $request->all();
try{
try {
CommonLogic::checkEmpty(['pick_task_sn'],$data);
CommonLogic::checkEmpty(['pick_task_sn'], $data);
$returnData = $this->curl('/pick_task/getFrontPickTaskList',$data,$request);
$returnData = $this->curl('/pick_task/getFrontPickTaskList', $data, $request);
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -44,18 +45,18 @@ class OutStoreController extends Controller
public function confirm_pick($request)
{
$data = $request->all();
try{
try {
CommonLogic::checkEmpty(['location_id','pick_task_sn','goods_sn'],$data);
CommonLogic::checkEmpty(['location_id', 'pick_task_sn', 'goods_sn'], $data);
$returnData = $this->curl('/pick_task/confirmPick',$data,$request);
$returnData = $this->curl('/pick_task/confirmPick', $data, $request);
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -65,18 +66,18 @@ class OutStoreController extends Controller
public function cancel_pick($request)
{
$data = $request->all();
try{
try {
CommonLogic::checkEmpty(['pick_task_detail_id'],$data);
CommonLogic::checkEmpty(['pick_task_detail_id'], $data);
$returnData = $this->curl('/pick_task/cancelPick',$data,$request);
$returnData = $this->curl('/pick_task/cancelPick', $data, $request);
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -87,41 +88,39 @@ class OutStoreController extends Controller
public function pallet_box_list($request)
{
$data = $request->all();
try{
try {
CommonLogic::checkEmpty(['pallet_sn'],$data);
CommonLogic::checkEmpty(['pallet_sn'], $data);
$returnData = $this->curl('/out_store/palletBoxList',$data,$request);
$returnData = $this->curl('/out_store/palletBoxList', $data, $request);
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (!isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
}
//装卡板
public function pallet_active($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['box_id_arr','pallet_sn'],$data);
try {
CommonLogic::checkEmpty(['box_id_arr', 'pallet_sn'], $data);
$returnData = $this->curl('/out_store/palletActive',$data,$request);
$returnData = $this->curl('/out_store/palletActive', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -131,15 +130,15 @@ class OutStoreController extends Controller
public function scan_out_store_list($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['pallet_box_sn'],$data);
$returnData = $this->curl('/out_store/scan_out_store_list',$data,$request);
try {
CommonLogic::checkEmpty(['pallet_box_sn'], $data);
$returnData = $this->curl('/out_store/scan_out_store_list', $data, $request);
//jiagezhushi
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -149,15 +148,15 @@ class OutStoreController extends Controller
public function confirm_out_store($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['pick_task_detail_id'],$data);
$returnData = $this->curl('/out_store/confirm_out_store',$data,$request);
try {
CommonLogic::checkEmpty(['pick_task_detail_id'], $data);
$returnData = $this->curl('/out_store/confirm_out_store', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -167,35 +166,32 @@ class OutStoreController extends Controller
public function cancel_out_store($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['pick_task_detail_id'],$data);
$returnData = $this->curl('/out_store/cancel_out_store',$data,$request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
try {
CommonLogic::checkEmpty(['pick_task_detail_id'], $data);
$returnData = $this->curl('/out_store/cancel_out_store', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
}
//发货
public function deliver_goods($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['pick_task_detail_id'],$data);
$returnData = $this->curl('/out_store/deliver_goods',$data,$request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
try {
CommonLogic::checkEmpty(['pick_task_detail_id'], $data);
$returnData = $this->curl('/out_store/deliver_goods', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -205,14 +201,14 @@ class OutStoreController extends Controller
public function get_box_info($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['box_sn'],$data);
$returnData = $this->curl('/out_store/get_box_info',$data,$request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
try {
CommonLogic::checkEmpty(['box_sn'], $data);
$returnData = $this->curl('/out_store/get_box_info', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......@@ -222,14 +218,14 @@ class OutStoreController extends Controller
public function get_pallet_info($request)
{
$data = $request->all();
try{
CommonLogic::checkEmpty(['pallet_sn'],$data);
$returnData = $this->curl('/out_store/get_pallet_info',$data,$request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])){
try {
CommonLogic::checkEmpty(['pallet_sn'], $data);
$returnData = $this->curl('/out_store/get_pallet_info', $data, $request);
if (isset($returnData['errcode']) && !empty($returnData['errcode'])) {
CommonLogic::$errCode = $returnData['errcode'];
throw new \Exception($returnData['data']);
}
}catch (\Exception $exception){
} catch (\Exception $exception) {
return $this->returnJson($exception->getMessage());
}
return $this->returnJson($returnData['data']);
......
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