|
|
@@ -388,6 +388,31 @@ class WorkOrderVerification extends Api
|
|
|
$this->error('更新失败');
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 新增工单核检单
|
|
|
+ * @ApiMethod POST
|
|
|
+ * @params array data
|
|
|
+ */
|
|
|
+ public function add(){
|
|
|
+ if (Request::instance()->isPost() == false){
|
|
|
+ $this->error('非法请求');
|
|
|
+ }
|
|
|
+ $params = Request::instance()->post();
|
|
|
+ $UniqId = db('db_qczl')->order('UniqId desc')->value('UniqId');
|
|
|
+ if ($UniqId < 10000000){
|
|
|
+ $UniqId = 10000000;
|
|
|
+ }else{
|
|
|
+ $UniqId = $UniqId + 1;
|
|
|
+ }
|
|
|
+ $params['UniqId'] = $UniqId;
|
|
|
+ $params['sys_rq'] = date('Y-m-d H:i:s');
|
|
|
+ $res = \db('db_qczl')->insert($params);
|
|
|
+ if ($res !== false){
|
|
|
+ $this->success('新增成功');
|
|
|
+ }else{
|
|
|
+ $this->error('新增失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* 工单核检废品分布
|
|
|
* @ApiMethod GET
|