aaa
This commit is contained in:
parent
54853749b4
commit
13f76e622f
@ -15,6 +15,7 @@
|
||||
namespace app\adminapi\logic\bid;
|
||||
|
||||
|
||||
use app\adminapi\logic\oa\FlowApproveLogic;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\bid\BidBiddingDecision;
|
||||
use app\common\model\bid\BidBuyBiddingDocument;
|
||||
@ -22,6 +23,7 @@ use app\common\model\bid\BidDocumentExamination;
|
||||
use app\common\model\bid\BidDocumentExaminationDetail;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\custom\Custom;
|
||||
use app\common\model\oa\FlowApprove;
|
||||
use app\common\model\project\Project;
|
||||
use think\facade\Db;
|
||||
|
||||
@ -85,6 +87,7 @@ class BidDocumentExaminationLogic extends BaseLogic
|
||||
$res->id,
|
||||
'app\common\model\bid\BidDocumentExamination',
|
||||
'app\adminapi\logic\bid\BidDocumentExaminationLogic',
|
||||
$params['approve_detail']['path'],
|
||||
$params['approve_detail']['flow_type'],
|
||||
$params['approve_detail']['flow_path'],
|
||||
$admin_id
|
||||
@ -134,6 +137,10 @@ class BidDocumentExaminationLogic extends BaseLogic
|
||||
$data['project_desc'] = $bid_decision['project_desc'];
|
||||
$data['annex'] = $bid_decision['annex'];
|
||||
$data['total_amount'] = BidDocumentExaminationDetail::where('bid_document_examination_id',$data['id'])->sum('sale_amount');
|
||||
$approve_info = FlowApprove::field('id')->where('content_id',$params['id'])
|
||||
->where('content_model','app\common\model\bid\BidDocumentExamination')
|
||||
->where('content_logic','app\adminapi\logic\bid\BidDocumentExaminationLogic')->findOrEmpty();
|
||||
$data['approve_detail'] = FlowApproveLogic::detail(['id'=>$approve_info['id']]);
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -27,8 +27,7 @@ class FlowApproveLogic extends BaseLogic
|
||||
public static function detail($params): array
|
||||
{
|
||||
$data = FlowApprove::field('id,title,flow_id,content_id,content_model,content_logic,create_user,check_status')->findOrEmpty($params['id']);
|
||||
//获取审批内容信息
|
||||
$content = $data['content_logic']::detail(['id'=>$data['content_id']]);
|
||||
if($data->isEmpty()) return [];
|
||||
//获取创建人信息
|
||||
$create_user = Admin::field('name')->where('id',$data['create_user'])->findOrEmpty();
|
||||
//获取审批流程信息
|
||||
@ -61,10 +60,9 @@ class FlowApproveLogic extends BaseLogic
|
||||
$data['current_check_user'] = $current_check_user;
|
||||
$data['create_user_name'] = $create_user['name'];
|
||||
$data['copy_user'] = implode(',',$copy);
|
||||
$data['content'] = $content;
|
||||
$data['step'] = $step;
|
||||
$data['record'] = $record;
|
||||
unset($data['flow_id'],$data['content_id'],$data['content_model'],$data['content_logic']);
|
||||
unset($data['flow_id'],$data['content_model'],$data['content_logic']);
|
||||
return $data->toArray();
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ function daysBetweenDates($start_date,$end_date): bool|int
|
||||
return $interval->days;
|
||||
}
|
||||
|
||||
function addApprove($title,$content_id,$content_model,$content_logic,$flow_type_id,$flow_id,$create_user_id){
|
||||
function addApprove($title,$content_id,$content_model,$content_logic,$patah,$flow_type_id,$flow_id,$create_user_id){
|
||||
$createUser = Admin::field('name,dept_id')->where('id',$create_user_id)->findOrEmpty();
|
||||
//获取审批流程信息
|
||||
$flowData = Flow::where('id',$flow_id)->findOrEmpty();
|
||||
@ -372,6 +372,7 @@ function addApprove($title,$content_id,$content_model,$content_logic,$flow_type_
|
||||
'content_id' => $content_id,
|
||||
'content_model' => $content_model,
|
||||
'content_logic' => $content_logic,
|
||||
'path' => $patah,
|
||||
'flow_type_id' => $flow_type_id,
|
||||
'flow_id' => $flow_id,
|
||||
'create_user' => $create_user_id,
|
||||
|
@ -33,6 +33,6 @@ class FlowApprove extends BaseModel
|
||||
|
||||
public function getCheckStatusTextAttr($value,$data){
|
||||
$dict = DictData::where('type_value','check_status')->column('name','value');
|
||||
return $dict[$data['check_status']];
|
||||
return !empty($data['check_status']) ? $dict[$data['check_status']] : '';
|
||||
}
|
||||
}
|
@ -104,6 +104,9 @@ class BaseValidate extends Validate
|
||||
$fp = Flow::where('id',$value['flow_path'])->where('flow_cate',$value['flow_type'])->findOrEmpty();
|
||||
if($fp->isEmpty()) return '审批流程数据不存在';
|
||||
}
|
||||
if(empty($value['path'])){
|
||||
return 'path字段不能为空';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user