作者 王智

baoxiu

... ... @@ -529,26 +529,73 @@ class Index extends Api
$param = $this->request->param();
if ($param['type'] == 0) {
$is_genghuan = 2;
$status = 0;
// $status = 0;
} else {
if ($param['type'] == 1) {
$is_genghuan = 1;
$status = 0;
// $status = 0;
} else {
$is_genghuan = 1;
$status = 1;
// $status = 1;
}
}
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
'is_genghuan' => $is_genghuan,
'price' => $param['type'],
'status' => $status,
// 'status' => $status,
'repair_type' => 1,
]
);
if ($res) {
$this->success('成功', $status);
$this->success('成功', 1);
} else {
$this->error('失败', 0);
}
}
/**
* @ApiTitle (首页-维修负责人报修单操作)
* @ApiSummary (维修负责人报修单操作)
* @ApiMethod (POST)
* @ApiRoute (/api/Index/OrderPlayKing)
* @ApiHeaders (name="id", type=int, required=true, description="报修单ID")
* @ApiHeaders (name="type", type=int, required=true, description="设备价格:1=2000以下,2=2000-10000元,3=10000元以上")
* @ApiHeaders (name="con", type=int, required=true, description="维修情况")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
"code":"1",
"msg": "返回成功",
"data":{
}
})
*/
public function OrderPlayKing()
{
$param = $this->request->param();
// if ($param['type'] == 0) {
// $is_genghuan = 2;
//// $status = 0;
// } else {
// if ($param['type'] == 1) {
// $is_genghuan = 1;
//// $status = 0;
// } else {
// $is_genghuan = 1;
//// $status = 1;
// }
// }
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
// 'is_genghuan' => $is_genghuan,
'price' => $param['type'],
// 'status' => $status,
// 'repair_type' => 1,
]
);
if ($res) {
$this->success('成功', 1);
} else {
$this->error('失败', 0);
}
... ...