1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /**
- *
- *User:Administrator
- *Date:2021/10/28
- */
- namespace app\api\controller\v1;
- use app\api\business\CydBus;
- use think\exception\ValidateException;
- class Cyd
- {
- //监管端获取抽样单列表
- public function getCydList()
- {
- $task_id = request()->param('task_id', '', 'int');
- // try {
- // validate(\app\api\validate\Sample::class)->scene('get_cyd_list')->check($task_id);
- // } catch (ValidateException $exception) {
- // return show(config('status.err_validate'),$exception->getError());
- // }
- $result = (new CydBus())->getCydList($task_id);
- if ($result['total'] == 0) {
- return showError(config('status.none_cyd_info'));
- }
- return showSuccess($result);
- }
- public function updateCydStatus()
- {
- $cyd_id = request()->param('cyd_id', '', 'int');
- $result = (new CydBus())->updateCydStatus($cyd_id);
- return showSuccess($result);
- }
- }
|