作者 lyh

gx

... ... @@ -57,7 +57,7 @@ class Count extends Command
//服务达标天数
$arr['compliance_day'] = $this->compliance_day($yesterday);
//剩余服务时常
$arr['service_day'] = ((int)$v['service_duration'] - (int)$arr['compliance_day']);
$arr['service_day'] = ((int)$v['service_duration'] - (int)$arr['compliance_day']) < 0 ?? 0;
//项目id
$arr['project_id'] = $v['project_id'];
$arr['created_at'] = date('Y-m-d H:i:s');
... ...
... ... @@ -63,4 +63,21 @@ class RenewProjectController extends BaseController
$lists = $logic->renewListsLog($this->map,$this->page,$this->row,$this->order);
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :获取续费单详情
* @name :info
* @author :lyh
* @method :post
* @time :2023/8/14 9:08
*/
public function info(RenewLogic $logic){
$this->request->validate([
'id'=>'required',
],[
'id.required' => 'ID不能为空'
]);
$info = $logic->renewRead();
$this->response('success',Code::SUCCESS,$info);
}
}
... ...
... ... @@ -18,6 +18,7 @@ class RenewLogic extends BaseLogic
public function __construct()
{
parent::__construct();
$this->param = $this->requestAll;
$this->model = new ProjectRenew();
}
... ... @@ -38,4 +39,19 @@ class RenewLogic extends BaseLogic
}
return $this->success($lists);
}
/**
* @remark :根据主键获取续费单详情
* @name :renewRead
* @author :lyh
* @method :post
* @time :2023/8/14 9:12
*/
public function renewRead(){
$info = $this->model->read(['id'=>$this->param['id']]);
if($info === false){
$this->fail('当前数据不存在或者被删除');
}
return $this->success($info);
}
}
... ...
... ... @@ -153,7 +153,8 @@ Route::middleware(['aloginauth'])->group(function () {
//续费
Route::prefix('renew')->group(function () {
Route::any('/', [Aside\Project\RenewProjectController::class, 'lists'])->name('admin.renew');
Route::any('/log', [Aside\Project\RenewProjectController::class, 'renewLists'])->name('admin.renewLists');
Route::any('/log', [Aside\Project\RenewProjectController::class, 'renewLists'])->name('admin.renew_renewLists');
Route::any('/info', [Aside\Project\RenewProjectController::class, 'info'])->name('admin.renew_info');
});
//工单管理
Route::prefix('task')->group(function () {
... ...