更新
This commit is contained in:
parent
f3b14a944f
commit
5c97c4cf48
@ -13,7 +13,7 @@ use Symfony\Component\HttpClient\HttpClient;
|
|||||||
|
|
||||||
class CeshiController extends BaseApiController
|
class CeshiController extends BaseApiController
|
||||||
{
|
{
|
||||||
public array $notNeedLogin = ['index','ceshi','ceshi1'];
|
public array $notNeedLogin = ['index','ceshi','ceshi1','ceshi2'];
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
@ -63,4 +63,8 @@ class CeshiController extends BaseApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ceshi2(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -21,6 +21,8 @@ class TaskController extends BaseApiController{
|
|||||||
}else{
|
}else{
|
||||||
$where[]=['director_uid','=',$this->userId];
|
$where[]=['director_uid','=',$this->userId];
|
||||||
}
|
}
|
||||||
|
$where[]=['company_id','=',$this->userInfo['company_id']];
|
||||||
|
|
||||||
// $where[]=['status','in',[1,2,3,5]];
|
// $where[]=['status','in',[1,2,3,5]];
|
||||||
}
|
}
|
||||||
if(isset($param['date_time']) && $param['date_time']!=''){
|
if(isset($param['date_time']) && $param['date_time']!=''){
|
||||||
|
@ -17,6 +17,7 @@ namespace app\common\logic\task_template;
|
|||||||
|
|
||||||
use app\common\model\task_template\TaskTemplate;
|
use app\common\model\task_template\TaskTemplate;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\informationg\UserInformationg;
|
||||||
use app\common\model\task_scheduling\TaskScheduling;
|
use app\common\model\task_scheduling\TaskScheduling;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -41,6 +42,13 @@ class TaskTemplateLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
|
if($params['type']==33){
|
||||||
|
$count=UserInformationg::where('company_id',$params['company_id'])->where('status',1)->count();
|
||||||
|
if($count<300){
|
||||||
|
self::setError('用户档案数量300不足,无法创建任务模板');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
$moeny=TaskTemplate::where('company_id', $params['company_id'])->sum('money');
|
$moeny=TaskTemplate::where('company_id', $params['company_id'])->sum('money');
|
||||||
$money_two=TaskTemplate::where('company_id', $params['company_id'])->sum('money_two');
|
$money_two=TaskTemplate::where('company_id', $params['company_id'])->sum('money_two');
|
||||||
$money_three=TaskTemplate::where('company_id', $params['company_id'])->sum('money_three');
|
$money_three=TaskTemplate::where('company_id', $params['company_id'])->sum('money_three');
|
||||||
|
@ -42,7 +42,7 @@ class TaskInformationJob
|
|||||||
$shang_date_total_price = App(RemoteController::class)->shang_date_total_price($company);
|
$shang_date_total_price = App(RemoteController::class)->shang_date_total_price($company);
|
||||||
if ($shang_date_total_price == false) {
|
if ($shang_date_total_price == false) {
|
||||||
Log::info('任务结算失败,交易金额未达到要求:' . json_encode($data));
|
Log::info('任务结算失败,交易金额未达到要求:' . json_encode($data));
|
||||||
Task::where('id', $data['task_id'])->update(['status' => 5]);
|
Task::where('id', $data['task_id'])->update(['status' => 5,'extend'=>json_encode($shang_date_total_price)]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$name = $shang_date_total_price['name'];
|
$name = $shang_date_total_price['name'];
|
||||||
@ -52,8 +52,8 @@ class TaskInformationJob
|
|||||||
($data['template_info']['type'] == 32){
|
($data['template_info']['type'] == 32){
|
||||||
$task = Task::where('id', $data['task_id'])->field('director_uid')->where('status', 3)->with('director_info')->find();
|
$task = Task::where('id', $data['task_id'])->field('director_uid')->where('status', 3)->with('director_info')->find();
|
||||||
if(empty($task)){
|
if(empty($task)){
|
||||||
$task_car = Task::where('id', $data['task_id'])->field('director_uid,extend')->where('status', 2)->with('director_info')->find();
|
Task::where('id', $data['task_id'])->update(['status' => 5]);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,20 @@ class TaskCron extends Task{
|
|||||||
protected function execute()
|
protected function execute()
|
||||||
{
|
{
|
||||||
//任务下发
|
//任务下发
|
||||||
TaskTask::where('type',32)->where('status', 2)->update(['status' => 3]);
|
$task=TaskTask::where('id',487)->select()->toArray();
|
||||||
|
// foreach($task as $k=>$v){
|
||||||
|
// if(isset($v['extend']['terminus']['lnglat'])&& isset($v['extend']['transfer']['lnglat'])){
|
||||||
|
// $arr=$v['extend']['terminus']['lnglat'];
|
||||||
|
// $a=app(RemoteController::class)->coordinate($params,$arr[0],$arr[1]);
|
||||||
|
|
||||||
|
// $arr_two=$v['extend']['transfer']['lnglat'];
|
||||||
|
// $b=app(RemoteController::class)->coordinate($params,$arr_two[0],$arr_two[1]);
|
||||||
|
// if($a<500 && $b<500){
|
||||||
|
// TaskTask::where('id',$v['id'])->update(['status'=>3]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
//...具体的任务执行
|
//...具体的任务执行
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user