优化
This commit is contained in:
parent
308ec3760f
commit
aee6eb35d9
@ -83,7 +83,7 @@ class OrderService extends Service
|
||||
$virtualOrders = app(VirtualOrderRepository::class)->withConditions(['id' => $orderIds])->get()->keyBy('id');
|
||||
}
|
||||
|
||||
$simArray = $tmpCards[0]->pluck('sim')->toArray();
|
||||
$simArray = isset($tmpCards[0]) ? $tmpCards[0]->pluck('sim')->toArray() : [];
|
||||
|
||||
$virtualOrderCards = [];
|
||||
// 没有订单的从当前状态下读取公司和套餐
|
||||
@ -96,6 +96,7 @@ class OrderService extends Service
|
||||
}
|
||||
|
||||
$cards->map(function ($item) use ($virtualOrders, $virtualOrderCards) {
|
||||
$item->sim = (string)$item->sim;
|
||||
$item->company_name = '';
|
||||
$item->package_name = '';
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
<?php
|
||||
echo array_search(0, [0, 1, 2, 3]);
|
@ -46,6 +46,7 @@ class OrderController extends Controller
|
||||
return collect([
|
||||
'id' => $item->id,
|
||||
'sn' => $item->sn,
|
||||
'transaction_no' => $item->transaction_no,
|
||||
'package_name' => $item->package->name,
|
||||
'company_name' => $item->company->name,
|
||||
'pay_channel' => CommonService::namePayChannel($item->pay_channel),
|
||||
|
67
app/Domains/Virtual/Jobs/CreateRealVirtualRelation.php
Normal file
67
app/Domains/Virtual/Jobs/CreateRealVirtualRelation.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Virtual\Jobs;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use App\Models\Real\RealVirtual;
|
||||
use Dipper\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\Domains\Real\Repositories\OrderRepository as RealOrderRepository;
|
||||
use App\Domains\Virtual\Repositories\OrderRepository as VirtualOrderRepository;
|
||||
|
||||
class CreateRealVirtualRelation implements ShouldQueue
|
||||
{
|
||||
use Queueable, Dispatchable;
|
||||
|
||||
protected $virtualOrderId;
|
||||
protected $realOrderIds;
|
||||
|
||||
public function __construct($virtualOrderId, $realOrderIds)
|
||||
{
|
||||
$this->virtualOrderId = $virtualOrderId;
|
||||
$this->realOrderIds = $realOrderIds;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function handle(RealOrderRepository $realOrderRepository, VirtualOrderRepository $virtualOrderRepository)
|
||||
{
|
||||
$select = ['id', 'company_id', 'package_id'];
|
||||
|
||||
if (!$virtualOrder = $virtualOrderRepository->select($select)->find($this->virtualOrderId)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
$realOrders = $realOrderRepository->select($select)->whereIn('id', $this->realOrderIds)->get();
|
||||
|
||||
if (empty($realOrders)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
$array = [];
|
||||
|
||||
foreach ($realOrders as $value) {
|
||||
$k = implode(',', [$value['company_id'], $value['package_id'], $virtualOrder['company_id'], $virtualOrder['package_id']]);
|
||||
$array[$k] = [
|
||||
'real_company_id' => $value['company_id'],
|
||||
'real_package_id' => $value['package_id'],
|
||||
'virtual_company_id' => $virtualOrder['company_id'],
|
||||
'virtual_package_id' => $virtualOrder['package_id'],
|
||||
'counts' => 1,
|
||||
'updated_at' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
}
|
||||
|
||||
$builder = RealVirtual::query()->toBase();
|
||||
|
||||
$sql = $builder->getGrammar()->compileInsert($builder, $array);
|
||||
|
||||
$sql .= ' on conflict (real_company_id,real_package_id,virtual_company_id,virtual_package_id) do update set
|
||||
counts=real_virtual_relations.counts+excluded.counts,
|
||||
updated_at=excluded.updated_at';
|
||||
|
||||
$builder->connection->insert($sql, Arr::flatten($array, 1));
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ use Dipper\Foundation\Exceptions\HttpException;
|
||||
use App\Domains\Virtual\Services\CompanyService;
|
||||
use App\Domains\Virtual\Services\PackageService;
|
||||
use App\Domains\Virtual\Repositories\OrderRepository;
|
||||
use App\Domains\Virtual\Jobs\CreateRealVirtualRelation;
|
||||
use App\Domains\Virtual\Repositories\ProductRepository;
|
||||
use App\Models\Real\OrderCardPartition as RealOrderCardPartition;
|
||||
use App\Domains\Virtual\Repositories\OrderCardPartitionRepository;
|
||||
@ -128,10 +129,9 @@ class OrderService extends Service
|
||||
'address.required' => '请选择收货地址',
|
||||
];
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
if (!$attributes['id']) {
|
||||
$attributes['sn'] = $attributes['sn'] ?: $this->generateSn();
|
||||
$attributes['transaction_no'] = $attributes['transaction_no'] ?: $this->generateTransactionNo($attributes['pay_channel']);
|
||||
|
||||
if ($attributes['company_id'] && $attributes['package_id'] && isset($attributes['unit_price'])) {
|
||||
$attributes['unit_price'] = intval($attributes['unit_price'] * 100);
|
||||
@ -161,6 +161,8 @@ class OrderService extends Service
|
||||
|
||||
Validator::validate($attributes, $rule, $message);
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
if (!$attributes['id']) {
|
||||
if ($product->company_id != $attributes['company_id']) {
|
||||
throw new NotAllowedException('非法操作');
|
||||
@ -212,7 +214,7 @@ class OrderService extends Service
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
$array = array_chunk($data, 1000);
|
||||
$array = array_chunk($data, 10000);
|
||||
|
||||
foreach ($array as $value) {
|
||||
DB::table($table)->upsert($value, ['sim', 'order_id', 'deleted_at']);
|
||||
@ -226,8 +228,11 @@ class OrderService extends Service
|
||||
}
|
||||
|
||||
$this->orderRepository->forgetCached();
|
||||
$this->orderCardPartitionRepository->forgetCached();
|
||||
app(RealOrderCardPartitionRepository::class)->forgetCached();
|
||||
app(RealOrderRepository::class)->forgetCached();
|
||||
|
||||
CreateRealVirtualRelation::dispatch($node->id, array_pluck($attributes['selected'], 'id'));
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
throw new HttpException('操作失败');
|
||||
@ -319,4 +324,48 @@ class OrderService extends Service
|
||||
{
|
||||
return date('YmdHis') .sprintf('%04d', explode('.', microtime(true))[1]) . sprintf('%02d', rand(0, 99));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成流水号
|
||||
*
|
||||
* 4200000252201903085372480404 微信
|
||||
* 2019030722001407831022090620 支付宝
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function generateTransactionNo($payChannel)
|
||||
{
|
||||
switch ($payChannel) {
|
||||
case 'wx':
|
||||
case 'wx_pub':
|
||||
case 'wx_pub_qr':
|
||||
case 'wx_pub_scan':
|
||||
case 'wx_wap':
|
||||
case 'wx_lite':
|
||||
$transactionNo = '4200000' . sprintf('%03d', rand(0, 999)) . date('YmdHis') .sprintf('%04d', explode('.', microtime(true))[1]);
|
||||
break;
|
||||
case 'alipay':
|
||||
case 'alipay_wap':
|
||||
case 'alipay_qr':
|
||||
case 'alipay_scan':
|
||||
case 'alipay_pc_direct':
|
||||
$transactionNo = date('YmdHis') . sprintf('%04d', explode('.', microtime(true))[1]) . '1' . sprintf('%9d', rand(0, 999999999));
|
||||
break;
|
||||
case 'bank':
|
||||
$transactionNo = date('YmdHis') . sprintf('%04d', explode('.', microtime(true))[1]) . '2' . sprintf('%9d', rand(0, 999999999));
|
||||
break;
|
||||
case 'account':
|
||||
$transactionNo = date('YmdHis') . sprintf('%04d', explode('.', microtime(true))[1]) . '3' . sprintf('%9d', rand(0, 999999999));
|
||||
break;
|
||||
case 'tmall':
|
||||
$transactionNo = date('YmdHis') . sprintf('%04d', explode('.', microtime(true))[1]) . '4' . sprintf('%9d', rand(0, 999999999));
|
||||
break;
|
||||
|
||||
default:
|
||||
$transactionNo = date('YmdHis') . sprintf('%04d', explode('.', microtime(true))[1]) . '0' . sprintf('%9d', rand(0, 999999999));
|
||||
break;
|
||||
}
|
||||
|
||||
return intval($transactionNo);
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,11 @@ class ProductService extends Service
|
||||
|
||||
$attributes['sn'] = self::sn($package['sn'], $attributes['company_id'], $attributes['price']);
|
||||
|
||||
// 禁用相同套餐的其他定价
|
||||
if ($attributes['status']) {
|
||||
$this->productRepository->where('package_id', $attributes['package_id'])->update(['status' => 1]);
|
||||
}
|
||||
|
||||
if (!$attributes['id']) {
|
||||
if ($this->productRepository->where('sn', $attributes['sn'])->count()) {
|
||||
throw new NotAllowedException('已存在相同定价,请勿重复添加');
|
||||
|
12
app/Models/Real/RealVirtual.php
Normal file
12
app/Models/Real/RealVirtual.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Real;
|
||||
|
||||
use App\Core\Model;
|
||||
|
||||
class RealVirtual extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'real_virtual_relations';
|
||||
}
|
@ -34,6 +34,7 @@ class CreateVirtualOrderCardsTables extends Migration
|
||||
$table->integer('unit_price')->unsigned()->default(0)->comment('单价');
|
||||
$table->timestamp('service_start_at')->nullable()->comment('服务开始时间');
|
||||
$table->timestamp('service_end_at')->nullable()->comment('服务结束时间');
|
||||
$table->bigInteger('original_sim')->unsigned()->default(0)->comment('原始sim号');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCompanyRelations extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('real_virtual_relations')) {
|
||||
Schema::create('real_virtual_relations', function (Blueprint $table) {
|
||||
$table->integer('real_company_id')->unsigned()->default(0)->comment('RD企业ID');
|
||||
$table->integer('real_package_id')->unsigned()->default(0)->comment('RD套餐ID');
|
||||
$table->integer('virtual_company_id')->unsigned()->default(0)->comment('VD企业ID');
|
||||
$table->integer('virtual_package_id')->unsigned()->default(0)->comment('VD套餐ID');
|
||||
$table->integer('times')->unsigned()->default(0)->comment('关联次数');
|
||||
$table->timestamp('updated_at')->comment('更新时间');
|
||||
|
||||
$table->primary(['real_company_id', 'real_package_id', 'virtual_company_id', 'virtual_package_id']);
|
||||
|
||||
$table->comment('RD VD关系关联');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('real_virtual_relations');
|
||||
}
|
||||
}
|
@ -930,8 +930,8 @@ table {
|
||||
|
||||
/*编辑页面*/
|
||||
.page-edit-wrap {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
.ui-list {
|
||||
margin-bottom: 25px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Modal :footer-hide="true" :mask-closable="false" @on-visible-change="visibleChange" title="企业详情" v-model="my_show" width="900">
|
||||
<div class="page-detail-wrap" v-if="data">
|
||||
<Row>
|
||||
<Row :gutter="16">
|
||||
<Col span="12">
|
||||
<Divider>基础信息</Divider>
|
||||
<ul>
|
||||
@ -31,7 +31,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</Col>
|
||||
<Col offset="1" span="11">
|
||||
<Col span="12">
|
||||
<Divider>账号信息</Divider>
|
||||
<ul>
|
||||
<li class="ui-list">
|
||||
|
@ -104,8 +104,8 @@
|
||||
</div>
|
||||
|
||||
<div class="page-list-wrap">
|
||||
<Row>
|
||||
<Col span="16">
|
||||
<Row :gutter="8">
|
||||
<Col span="18">
|
||||
<Table
|
||||
ref="orderSelection"
|
||||
size="small"
|
||||
@ -113,6 +113,9 @@
|
||||
:columns="orderColumns"
|
||||
:data="orders ? orders.data : []"
|
||||
@on-row-dblclick="handleOrderRowDblclick"
|
||||
stripe
|
||||
border
|
||||
:height="449"
|
||||
></Table>
|
||||
<ul class="common-tips-wraper umar-t5">
|
||||
<li class="t-title">提示</li>
|
||||
@ -130,13 +133,15 @@
|
||||
></Page>
|
||||
</div>
|
||||
</Col>
|
||||
<Col offset="1" span="7">
|
||||
<Col span="6">
|
||||
<BTable
|
||||
ref="cardSelection"
|
||||
size="small"
|
||||
:loading="cardLoading"
|
||||
:columns="cardColumns"
|
||||
:data="cards"
|
||||
stripe
|
||||
border
|
||||
:height="449"
|
||||
></BTable>
|
||||
</Col>
|
||||
|
@ -45,13 +45,13 @@
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">订单备注:</div>
|
||||
<div class="ui-list-content">{{data.remark}}</div>
|
||||
<div class="ui-list-title">支付方式:</div>
|
||||
<div class="ui-list-content">{{data.pay_channel}}</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">支付方式:</div>
|
||||
<div class="ui-list-content">{{data.pay_channel}}</div>
|
||||
<div class="ui-list-title">支付流水号:</div>
|
||||
<div class="ui-list-content">{{data.transaction_no}}</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
@ -107,6 +107,11 @@
|
||||
<div class="ui-list-title">退款备注:</div>
|
||||
<div class="ui-list-content">{{data.extends.refund_remark}}</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">订单备注:</div>
|
||||
<div class="ui-list-content">{{data.remark}}</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<Divider>物流信息</Divider>
|
||||
|
@ -62,6 +62,17 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">支付流水号:</div>
|
||||
<div class="ui-list-content">
|
||||
<Input :maxlength="32" v-model.trim="params.transaction_no"></Input>
|
||||
<ul class="common-tips-wraper umar-t5">
|
||||
<li class="t-title">提示</li>
|
||||
<li class="t-content">未填写将自动生成</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">套餐定价</div>
|
||||
<div class="ui-list-content">
|
||||
@ -69,28 +80,33 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">
|
||||
<span class="title-require">*</span>订单卡量
|
||||
</div>
|
||||
<div class="ui-list-content">
|
||||
<InputNumber
|
||||
v-if="!counts"
|
||||
:max="100000"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
v-model.trim="params.counts"
|
||||
></InputNumber>
|
||||
<span v-else class="lh-32">{{params.counts}}</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">订单金额</div>
|
||||
<div
|
||||
class="ui-list-content lh-32"
|
||||
>{{Number(params.unit_price * params.counts).toFixed(2)}} 元</div>
|
||||
</li>
|
||||
<Row :gutter="16">
|
||||
<Col span="12">
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">
|
||||
<span class="title-require">*</span>订单卡量
|
||||
</div>
|
||||
<div class="ui-list-content">
|
||||
<InputNumber
|
||||
v-if="!counts"
|
||||
:max="100000"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
v-model.trim="params.counts"
|
||||
></InputNumber>
|
||||
<span v-else class="lh-32">{{params.counts}}</span>
|
||||
</div>
|
||||
</li>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">订单金额</div>
|
||||
<div
|
||||
class="ui-list-content lh-32"
|
||||
>{{Number(params.unit_price * params.counts).toFixed(2)}} 元</div>
|
||||
</li>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<li class="ui-list">
|
||||
<div class="ui-list-title">
|
||||
|
@ -130,7 +130,7 @@
|
||||
</div>
|
||||
|
||||
<div class="page-list-wrap">
|
||||
<Table :columns="table_titles" :data="list_data ? list_data.data : []"></Table>
|
||||
<Table :columns="table_titles" :data="list_data ? list_data.data : []" stripe border></Table>
|
||||
</div>
|
||||
|
||||
<div class="page-turn-wrap" v-if="list_data">
|
||||
@ -172,11 +172,11 @@
|
||||
<p>请选择您要进行的操作</p>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<Row class="ta-c">
|
||||
<Col span="11">
|
||||
<Row class="ta-c" :gutter="2">
|
||||
<Col span="12">
|
||||
<Button type="error" long @click="orderCannel">取消订单</Button>
|
||||
</Col>
|
||||
<Col offset="2" span="11">
|
||||
<Col span="12">
|
||||
<Button type="primary" long @click="orderOut">确认出库</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -88,7 +88,9 @@ export default {
|
||||
let indeterminate =
|
||||
select &&
|
||||
select.cards &&
|
||||
context.row.counts !== select.cards.length;
|
||||
context.row.counts !== select.cards.reduce((acc, cur) => {
|
||||
return acc + cur.counts;
|
||||
}, 0);
|
||||
|
||||
return h("Checkbox", {
|
||||
props: {
|
||||
@ -107,7 +109,7 @@ export default {
|
||||
{
|
||||
title: "订单编号",
|
||||
key: "sn",
|
||||
width: 210
|
||||
width: 220
|
||||
},
|
||||
|
||||
{
|
||||
@ -161,7 +163,9 @@ export default {
|
||||
return item.id === context.row.id;
|
||||
});
|
||||
|
||||
let value = select ? select.cards.length : 0;
|
||||
let value = select ? select.cards.reduce((acc, cur) => {
|
||||
return acc + cur.counts;
|
||||
}, 0) : 0;
|
||||
|
||||
return h("InputNumber", {
|
||||
props: {
|
||||
@ -248,12 +252,13 @@ export default {
|
||||
{
|
||||
title: "数量",
|
||||
key: "counts",
|
||||
width: 75
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "",
|
||||
width: 100,
|
||||
align: 'center',
|
||||
render: (h, { row, column, index }) => {
|
||||
return h(
|
||||
"Tag", {
|
||||
@ -305,11 +310,11 @@ export default {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return selected.map(item => {
|
||||
return item.cards.length;
|
||||
}).reduce((acc, cur) => {
|
||||
return acc + cur;
|
||||
});
|
||||
return selected.reduce((acc, cur) => {
|
||||
return acc + cur.cards.reduce((a, c) => {
|
||||
return a + c.counts;
|
||||
}, 0);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -375,21 +380,32 @@ export default {
|
||||
}
|
||||
this.index(1);
|
||||
},
|
||||
handleSelectOrder(order_id, value, counts = 0) {
|
||||
handleSelectOrder(order_id, value, counts = null) {
|
||||
if (value) {
|
||||
this.getCards(order_id).then(cards => {
|
||||
cards = this.filterUsed(cards);
|
||||
|
||||
if (cards.length) {
|
||||
let arr = cards.map(item => {
|
||||
return { sim: item.sim, counts: item.counts };
|
||||
cards.sort((a, b) => {
|
||||
return a.counts < b.counts ? -1 : (a.counts > b.counts ? 1 : 0);
|
||||
});
|
||||
|
||||
if (counts) {
|
||||
arr = arr.slice(0, counts);
|
||||
}
|
||||
let arr = [];
|
||||
|
||||
this.$store.commit('PUSH_REAL_ORDER_SELECTED', { order_id, cards: arr });
|
||||
counts = counts === null ? cards.length : counts;
|
||||
|
||||
cards.map(item => {
|
||||
if (counts > 0) {
|
||||
arr.push({ sim: item.sim, counts: item.counts });
|
||||
counts -= item.counts;
|
||||
}
|
||||
});
|
||||
|
||||
if (arr.length) {
|
||||
this.$store.commit('PUSH_REAL_ORDER_SELECTED', { order_id, cards: arr });
|
||||
} else {
|
||||
this.$store.commit('REMOVE_REAL_ORDER_SELECTED', order_id);
|
||||
}
|
||||
} else {
|
||||
this.$Message.error('选中零张卡');
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ export default {
|
||||
package_id: '',
|
||||
unit_price: 0,
|
||||
pay_channel: '',
|
||||
transaction_no: '',
|
||||
counts: 0,
|
||||
order_at: '',
|
||||
remark: '',
|
||||
@ -64,11 +65,11 @@ export default {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return selected.map(item => {
|
||||
return item.cards.length;
|
||||
}).reduce((acc, cur) => {
|
||||
return acc + cur;
|
||||
});
|
||||
return selected.reduce((acc, cur) => {
|
||||
return acc + cur.cards.reduce((a, c) => {
|
||||
return a + c.counts;
|
||||
}, 0);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -496,7 +496,7 @@ export default {
|
||||
ids: row.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$Message.success('作废成功');
|
||||
this.$Message.success('操作成功');
|
||||
this.request();
|
||||
}
|
||||
});
|
||||
|
@ -1,11 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Domains\Virtual\Jobs\CreateRealVirtualRelation;
|
||||
|
||||
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
||||
|
||||
$simArray = '1064801704887,1065801704889,1065801704890,1065801704891,1065801704892,1064801704893,1065801704894,1064801704895,1064801704896,1064801704897';
|
||||
|
||||
$res = \DB::select("select * from get_timelines('{{$simArray }}'::INT8[]);");
|
||||
|
||||
$res = collect($res)->collect()->groupBy('sim')->toArray();
|
||||
|
||||
dd($res);
|
||||
CreateRealVirtualRelation::dispatchNow(1, [1, 2]);
|
||||
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -13,11 +13,10 @@ return array(
|
||||
'ConfigSeeder' => $baseDir . '/database/seeds/ConfigSeeder.php',
|
||||
'CreateBlocsTable' => $baseDir . '/database/migrations/2018_12_24_164210_create_blocs_table.php',
|
||||
'CreateCardsTable' => $baseDir . '/database/migrations/2018_12_24_164218_create_cards_table.php',
|
||||
'CreateCompanyRelations' => $baseDir . '/database/migrations/2019_03_08_110806_create_company_relations.php',
|
||||
'CreateFailedJobsTable' => $baseDir . '/database/migrations/0000_00_00_000000_create_failed_jobs_table.php',
|
||||
'CreateFlowPoolTables' => $baseDir . '/database/migrations/2019_01_24_175246_create_flow_pool_tables.php',
|
||||
'CreateJobsTable' => $baseDir . '/database/migrations/0000_00_00_000000_create_jobs_table.php',
|
||||
'CreateRealAddedOrderCardsTables' => $baseDir . '/database/migrations/2018_12_24_164459_create_real_added_order_cards_tables.php',
|
||||
'CreateRealAddedOrdersTable' => $baseDir . '/database/migrations/2018_12_24_164457_create_real_added_orders_table.php',
|
||||
'CreateRealCompaniesTable' => $baseDir . '/database/migrations/2018_12_24_164318_create_real_companies_table.php',
|
||||
'CreateRealOrderCardsTable' => $baseDir . '/database/migrations/2018_12_24_164434_create_real_order_cards_table.php',
|
||||
'CreateRealOrdersTable' => $baseDir . '/database/migrations/2018_12_24_164430_create_real_orders_table.php',
|
||||
|
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@ -732,11 +732,10 @@ class ComposerStaticInite79258a3e34ad3e251999111d9f334d9
|
||||
'ConfigSeeder' => __DIR__ . '/../..' . '/database/seeds/ConfigSeeder.php',
|
||||
'CreateBlocsTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164210_create_blocs_table.php',
|
||||
'CreateCardsTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164218_create_cards_table.php',
|
||||
'CreateCompanyRelations' => __DIR__ . '/../..' . '/database/migrations/2019_03_08_110806_create_company_relations.php',
|
||||
'CreateFailedJobsTable' => __DIR__ . '/../..' . '/database/migrations/0000_00_00_000000_create_failed_jobs_table.php',
|
||||
'CreateFlowPoolTables' => __DIR__ . '/../..' . '/database/migrations/2019_01_24_175246_create_flow_pool_tables.php',
|
||||
'CreateJobsTable' => __DIR__ . '/../..' . '/database/migrations/0000_00_00_000000_create_jobs_table.php',
|
||||
'CreateRealAddedOrderCardsTables' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164459_create_real_added_order_cards_tables.php',
|
||||
'CreateRealAddedOrdersTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164457_create_real_added_orders_table.php',
|
||||
'CreateRealCompaniesTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164318_create_real_companies_table.php',
|
||||
'CreateRealOrderCardsTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164434_create_real_order_cards_table.php',
|
||||
'CreateRealOrdersTable' => __DIR__ . '/../..' . '/database/migrations/2018_12_24_164430_create_real_orders_table.php',
|
||||
|
Loading…
x
Reference in New Issue
Block a user