作者 景龙
1 个管道 的构建 通过 耗费 9 秒

添加月检单号

... ... @@ -72,8 +72,11 @@ class CheckController extends RestBaseController
if (!$validate->check($data)) {
$this->error($validate->getError());
}
$data['uid'] = $this->userId;
$data['project_id'] = $user['project_id'];
//单号
$data['number'] = $common->genOrderSn();
$data['create_time'] = time();
$checkModel = new CheckModel();
$res = $checkModel->create($data);
... ...
... ... @@ -1060,8 +1060,8 @@ class CommonController extends RestBaseController
}
})
->field('i.id,i.create_time,i.project_id,p.name project_name')
->order('i.id desc')
->group("DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
->order('i.id desc')
->select()
->toArray();
return $res;
... ... @@ -1923,7 +1923,8 @@ class CommonController extends RestBaseController
//月检地点
$arr['address'] = $res['address'];
//月检单号
$arr['number'] = $res['number'];
//月检备注
$arr['remark'] = $res['remark'];
... ... @@ -2034,6 +2035,9 @@ class CommonController extends RestBaseController
$arr['test_time'] = $res['test_time'];
}
//检测单号
$arr['number'] = $res['number'];
if($flag == 'inspect'){
//日检人员(乙方项目组)
if($res['party'] == 0){
... ...
... ... @@ -317,6 +317,7 @@ class ReportController extends RestBaseController
* @return title:报表名称
* @return ins_m_time:月检时间
* @return user_login:乙方发起人
* @return number:月检单号
* @return a_leader_user:甲方领导确认人
* @return confirm_user:乙方验收人姓名
* @return finish_time:完成时间
... ... @@ -380,7 +381,7 @@ class ReportController extends RestBaseController
* @return inspect_name:项目组(甲方或者乙方)
*
* @return test_time:检测时间
*
* @return number:检测单号
* @return years:年检@
* @years spot_id:年检点id status:日检点状态(0:正常,1:故障,2:未检查) user_login:检查人姓名 spot_name:年检点名称 images:年检图片@
* @images day:图片日期 image:图片路径@
... ... @@ -503,8 +504,8 @@ class ReportController extends RestBaseController
* @b_company company_name:乙方公司 logo:公司logo
*
* @return title:报表名称
* @return number:报修单号
* @return create_time:报修时间
* @return number:改造单号
* @return create_time:改造时间
*
* @return user_login:发起人@!
* @user_login user:发起人姓名 party:发起人身份(0:甲方,1:乙方)
... ...
... ... @@ -50,6 +50,8 @@ class YearsController extends RestBaseController
$data['project_id'] = $user['project_id'];
$data['create_time'] = time();
//单号
$data['number'] = $common->genOrderSn();
$data['uid'] = $this->userId;
$test = new TestModel();
$res = $test->create($data);
... ...