Commit 70d355c1 by 叶明星

格式化

parent 29143cfe
Showing with 31 additions and 32 deletions
......@@ -13,6 +13,7 @@ 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)
......@@ -26,11 +27,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);
}
......@@ -39,26 +40,24 @@ 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);
......@@ -69,12 +68,12 @@ 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');
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;
$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);
......@@ -84,13 +83,13 @@ 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');
$outStoreDetailIdArr = PickTaskDetailModel::where('pick_task_detail_id', $data['pick_task_detail_id'])->pluck('out_store_detail_id');
$data['out_store_detail_id_arr'] = $outStoreDetailIdArr;
$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);
......@@ -100,11 +99,11 @@ 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']);
$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);
......@@ -114,10 +113,10 @@ class OutstoreController extends Controller
public function palletActive($request)
{
$data = $request->all();
try{
try {
$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);
......@@ -127,10 +126,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);
......@@ -140,10 +139,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);
......
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