正在显示
6 个修改的文件
包含
45 行增加
和
2 行删除
@@ -263,6 +263,7 @@ return array ( | @@ -263,6 +263,7 @@ return array ( | ||
263 | // 'video' => 'require', | 263 | // 'video' => 'require', |
264 | // 'audio' => 'require', | 264 | // 'audio' => 'require', |
265 | 'description' => 'require', | 265 | 'description' => 'require', |
266 | +// 'uid' => 'require|number', | ||
266 | ], | 267 | ], |
267 | 'msg' => [ | 268 | 'msg' => [ |
268 | 'images.require' => '图片凭证不能为空', | 269 | 'images.require' => '图片凭证不能为空', |
@@ -272,6 +273,8 @@ return array ( | @@ -272,6 +273,8 @@ return array ( | ||
272 | // 'video.require' => '视频凭证不能为空', | 273 | // 'video.require' => '视频凭证不能为空', |
273 | // 'audio.require' => '音频凭证不能为空', | 274 | // 'audio.require' => '音频凭证不能为空', |
274 | 'description.require' => '故障问题不能为空', | 275 | 'description.require' => '故障问题不能为空', |
276 | + 'uid.require' => '指派人员不能为空', | ||
277 | + 'uid.number' => '指派人员必须为数字', | ||
275 | ] | 278 | ] |
276 | ], | 279 | ], |
277 | 'data' => [ | 280 | 'data' => [ |
@@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
8 | // +---------------------------------------------------------------------- | 8 | // +---------------------------------------------------------------------- |
9 | namespace api\home\controller; | 9 | namespace api\home\controller; |
10 | 10 | ||
11 | +use app\portal\model\InsRecordUidModel; | ||
11 | use think\Db; | 12 | use think\Db; |
12 | use cmf\controller\RestBaseController; | 13 | use cmf\controller\RestBaseController; |
13 | use app\portal\model\StepModel; | 14 | use app\portal\model\StepModel; |
@@ -114,7 +115,7 @@ class CommonController extends RestBaseController | @@ -114,7 +115,7 @@ class CommonController extends RestBaseController | ||
114 | } | 115 | } |
115 | $add = [ | 116 | $add = [ |
116 | 'id' => 100, | 117 | 'id' => 100, |
117 | - 'name' => '报修', | 118 | + 'name' => '使用说明', |
118 | 'english_name' => '', | 119 | 'english_name' => '', |
119 | 'icon' => $host.'/uploads/20190621/300e16a3ec39a4cc8e536d0b911d9f48.png' | 120 | 'icon' => $host.'/uploads/20190621/300e16a3ec39a4cc8e536d0b911d9f48.png' |
120 | ]; | 121 | ]; |
@@ -2366,4 +2367,13 @@ class CommonController extends RestBaseController | @@ -2366,4 +2367,13 @@ class CommonController extends RestBaseController | ||
2366 | return null; | 2367 | return null; |
2367 | } | 2368 | } |
2368 | 2369 | ||
2370 | + //记录日检人员(添加或编辑) | ||
2371 | + public function createInsUid($data){ | ||
2372 | + $recordData['uid'] = $this->userId; | ||
2373 | + $recordData['project_id'] = $data['project_id']; | ||
2374 | + $recordData['create_time'] = $data['create_time']; | ||
2375 | + $insUidModel = new InsRecordUidModel(); | ||
2376 | + $insUidModel->create($recordData); | ||
2377 | + } | ||
2378 | + | ||
2369 | } | 2379 | } |
@@ -33,7 +33,7 @@ class IndexController extends RestBaseController | @@ -33,7 +33,7 @@ class IndexController extends RestBaseController | ||
33 | * @return company_name:公司名称 | 33 | * @return company_name:公司名称 |
34 | * @return logo:公司logo | 34 | * @return logo:公司logo |
35 | * @return service:企业拥有的服务@ | 35 | * @return service:企业拥有的服务@ |
36 | - * @service id:服务id(1:巡检,2:月检,3:改造,4:报修跟进,5:培训,6:演习,7:年检,100:报修,101:消息审批) name:服务名称 icon:图标路径 | 36 | + * @service id:服务id(1:巡检,2:月检,3:改造,4:报修跟进,5:培训,6:演习,7:年检,100:使用说明,101:消息审批) name:服务名称 icon:图标路径 |
37 | * @return run_time:0 运行时间 | 37 | * @return run_time:0 运行时间 |
38 | * @return is_finish:未检修数量(甲乙方员工有此字段) | 38 | * @return is_finish:未检修数量(甲乙方员工有此字段) |
39 | * @return tips:提示语 | 39 | * @return tips:提示语 |
@@ -140,6 +140,9 @@ class InspectionController extends RestBaseController | @@ -140,6 +140,9 @@ class InspectionController extends RestBaseController | ||
140 | 140 | ||
141 | $res = $inspectModel->create($data); | 141 | $res = $inspectModel->create($data); |
142 | if($res){ | 142 | if($res){ |
143 | + //记录巡检人员id | ||
144 | + $common->createInsUid($data); | ||
145 | + | ||
143 | $this->success('您的巡检点信息添加成功!'); | 146 | $this->success('您的巡检点信息添加成功!'); |
144 | }else{ | 147 | }else{ |
145 | $this->error('失败'); | 148 | $this->error('失败'); |
@@ -236,6 +239,9 @@ class InspectionController extends RestBaseController | @@ -236,6 +239,9 @@ class InspectionController extends RestBaseController | ||
236 | $user = $common->getIdentity(); | 239 | $user = $common->getIdentity(); |
237 | 240 | ||
238 | $inspectModel->where(['point_id'=>$data['point_id'],'party'=>$user['party']])->whereTime('create_time','today')->update($arr); | 241 | $inspectModel->where(['point_id'=>$data['point_id'],'party'=>$user['party']])->whereTime('create_time','today')->update($arr); |
242 | + //记录巡检人员id | ||
243 | + $common->createInsUid($data); | ||
244 | + | ||
239 | $this->success('保存成功!'); | 245 | $this->success('保存成功!'); |
240 | }else{ | 246 | }else{ |
241 | $this->error('请求方式错误!'); | 247 | $this->error('请求方式错误!'); |
@@ -31,6 +31,7 @@ class RepairController extends RestBaseController | @@ -31,6 +31,7 @@ class RepairController extends RestBaseController | ||
31 | * @param name:video type:file require:0 default: other desc:视频凭证 | 31 | * @param name:video type:file require:0 default: other desc:视频凭证 |
32 | * @param name:audio type:file require:0 default: other desc:音频凭证 | 32 | * @param name:audio type:file require:0 default: other desc:音频凭证 |
33 | * @param name:description type:string require:1 default: other desc:故障问题描述 | 33 | * @param name:description type:string require:1 default: other desc:故障问题描述 |
34 | + * @param name:uid type:inter require:1 default: other desc:指派人员id | ||
34 | */ | 35 | */ |
35 | public function addRepairPost(){ | 36 | public function addRepairPost(){ |
36 | if($this->request->isPost()){ | 37 | if($this->request->isPost()){ |
app/portal/model/InsRecordUidModel.php
0 → 100644
1 | +<?php | ||
2 | +// +---------------------------------------------------------------------- | ||
3 | +// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ] | ||
4 | +// +---------------------------------------------------------------------- | ||
5 | +// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved. | ||
6 | +// +---------------------------------------------------------------------- | ||
7 | +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
8 | +// +---------------------------------------------------------------------- | ||
9 | +// | Author: 老猫 <thinkcmf@126.com> | ||
10 | +// +---------------------------------------------------------------------- | ||
11 | +namespace app\portal\model; | ||
12 | + | ||
13 | +use think\Model; | ||
14 | + | ||
15 | +class InsRecordUidModel extends Model | ||
16 | +{ | ||
17 | + | ||
18 | + protected $type = [ | ||
19 | + 'more' => 'array', | ||
20 | + ]; | ||
21 | + | ||
22 | + | ||
23 | +} |
-
请 注册 或 登录 后发表评论