作者 jinglong
1 个管道 的构建 通过 耗费 2 秒

修改报修为使用说明

... ... @@ -263,6 +263,7 @@ return array (
// 'video' => 'require',
// 'audio' => 'require',
'description' => 'require',
// 'uid' => 'require|number',
],
'msg' => [
'images.require' => '图片凭证不能为空',
... ... @@ -272,6 +273,8 @@ return array (
// 'video.require' => '视频凭证不能为空',
// 'audio.require' => '音频凭证不能为空',
'description.require' => '故障问题不能为空',
'uid.require' => '指派人员不能为空',
'uid.number' => '指派人员必须为数字',
]
],
'data' => [
... ...
... ... @@ -8,6 +8,7 @@
// +----------------------------------------------------------------------
namespace api\home\controller;
use app\portal\model\InsRecordUidModel;
use think\Db;
use cmf\controller\RestBaseController;
use app\portal\model\StepModel;
... ... @@ -114,7 +115,7 @@ class CommonController extends RestBaseController
}
$add = [
'id' => 100,
'name' => '报修',
'name' => '使用说明',
'english_name' => '',
'icon' => $host.'/uploads/20190621/300e16a3ec39a4cc8e536d0b911d9f48.png'
];
... ... @@ -2366,4 +2367,13 @@ class CommonController extends RestBaseController
return null;
}
//记录日检人员(添加或编辑)
public function createInsUid($data){
$recordData['uid'] = $this->userId;
$recordData['project_id'] = $data['project_id'];
$recordData['create_time'] = $data['create_time'];
$insUidModel = new InsRecordUidModel();
$insUidModel->create($recordData);
}
}
... ...
... ... @@ -33,7 +33,7 @@ class IndexController extends RestBaseController
* @return company_name:公司名称
* @return logo:公司logo
* @return service:企业拥有的服务@
* @service id:服务id(1:巡检,2:月检,3:改造,4:报修跟进,5:培训,6:演习,7:年检,100:报修,101:消息审批) name:服务名称 icon:图标路径
* @service id:服务id(1:巡检,2:月检,3:改造,4:报修跟进,5:培训,6:演习,7:年检,100:使用说明,101:消息审批) name:服务名称 icon:图标路径
* @return run_time:0 运行时间
* @return is_finish:未检修数量(甲乙方员工有此字段)
* @return tips:提示语
... ...
... ... @@ -140,6 +140,9 @@ class InspectionController extends RestBaseController
$res = $inspectModel->create($data);
if($res){
//记录巡检人员id
$common->createInsUid($data);
$this->success('您的巡检点信息添加成功!');
}else{
$this->error('失败');
... ... @@ -236,6 +239,9 @@ class InspectionController extends RestBaseController
$user = $common->getIdentity();
$inspectModel->where(['point_id'=>$data['point_id'],'party'=>$user['party']])->whereTime('create_time','today')->update($arr);
//记录巡检人员id
$common->createInsUid($data);
$this->success('保存成功!');
}else{
$this->error('请求方式错误!');
... ...
... ... @@ -31,6 +31,7 @@ class RepairController extends RestBaseController
* @param name:video type:file require:0 default: other desc:视频凭证
* @param name:audio type:file require:0 default: other desc:音频凭证
* @param name:description type:string require:1 default: other desc:故障问题描述
* @param name:uid type:inter require:1 default: other desc:指派人员id
*/
public function addRepairPost(){
if($this->request->isPost()){
... ...
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\model;
use think\Model;
class InsRecordUidModel extends Model
{
protected $type = [
'more' => 'array',
];
}
\ No newline at end of file
... ...