update
This commit is contained in:
parent
f351126770
commit
258c880ec7
app
adminapi
controller/statistics
logic/project
validate
bid
BidBiddingDecisionValidate.phpBidDocumentExaminationValidate.phpBidResultValidate.phpBidSecurityApplyValidate.phpBidSecurityRefundValidate.php
contract
ContractValidate.phpProcurementContractValidate.phpSubcontractingContractNegotiationValidate.phpSubcontractingContractValidate.php
custom
CustomContactsValidate.phpCustomFollowValidate.phpCustomerDemandSolutionValidate.phpCustomerDemandValidate.php
finance
FinanceInvoiceApplyValidate.phpFinancePaymentApplyValidate.phpFinancePaymentPlanValidate.phpFinanceReceiptRecordValidate.phpFinanceRefundApplyValidate.phpFinanceRefundRecordValidate.phpFinanceReturnedMoneyValidate.phpFinanceReturnedRecordValidate.php
material
project
CompetitorValidate.phpProjectEstimateValidate.phpProjectFollowUpValidate.phpProjectMaterialBudgetValidate.phpProjectSubpackageBudgetValidate.php
quotation
supplier
common/model/project
54
app/adminapi/controller/statistics/StatisticsController.php
Normal file
54
app/adminapi/controller/statistics/StatisticsController.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\adminapi\controller\statistics;
|
||||||
|
|
||||||
|
use app\adminapi\controller\BaseAdminController;
|
||||||
|
use app\common\model\custom\Custom;
|
||||||
|
use app\common\model\project\Project;
|
||||||
|
use app\common\model\project\ProjectInsuranceManagement;
|
||||||
|
use think\response\Json;
|
||||||
|
|
||||||
|
class StatisticsController extends BaseAdminController
|
||||||
|
{
|
||||||
|
//客户统计数据
|
||||||
|
public function customs(): Json
|
||||||
|
{
|
||||||
|
$year = $this->request->get('year');
|
||||||
|
if(empty($year)){
|
||||||
|
$year = date('Y');
|
||||||
|
}
|
||||||
|
$column = ['1','2','3','4','5','6','7','8','9','10','11','12'];
|
||||||
|
$series = [
|
||||||
|
'name' => '客户数',
|
||||||
|
'data' => []
|
||||||
|
];
|
||||||
|
foreach($column as &$v){
|
||||||
|
$month = $v;
|
||||||
|
if($month < 10){
|
||||||
|
$month = '0'.$month;
|
||||||
|
}
|
||||||
|
$series['data'][] = Custom::field('id')->whereMonth('create_time', $year.'-'.$month)->count();
|
||||||
|
$v = $v.'月';
|
||||||
|
}
|
||||||
|
$custom_total = Custom::field('id')->count();
|
||||||
|
$this_year_add = Custom::field('id')->whereYear('create_time',date('Y'))->count();
|
||||||
|
$result = [
|
||||||
|
'column' => $column,
|
||||||
|
'series' => $series,
|
||||||
|
'custom_total' => $custom_total,
|
||||||
|
'this_year_add' => $this_year_add
|
||||||
|
];
|
||||||
|
return $this->success('success',$result);
|
||||||
|
}
|
||||||
|
|
||||||
|
//项目立项
|
||||||
|
public function projectInitiation(){
|
||||||
|
//立项总数
|
||||||
|
$project_total = Project::field('id')->where('status',0)->count();
|
||||||
|
//项目跟进
|
||||||
|
$project_follow_total = ProjectInsuranceManagement::field('id')->count();
|
||||||
|
//项目需求
|
||||||
|
// $project_demand_total =
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -58,7 +58,7 @@ class ProjectFollowUpLogic extends BaseLogic
|
|||||||
'follow_stage' => $params['follow_stage'],
|
'follow_stage' => $params['follow_stage'],
|
||||||
'notes' => $params['notes'] ?? '',
|
'notes' => $params['notes'] ?? '',
|
||||||
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
|
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
|
||||||
'file' => $params['file']? json_encode($params['file']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
]);
|
]);
|
||||||
Project::where('id', $params['project_id'])->update([
|
Project::where('id', $params['project_id'])->update([
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
@ -101,7 +101,7 @@ class ProjectFollowUpLogic extends BaseLogic
|
|||||||
'follow_stage' => $params['follow_stage'],
|
'follow_stage' => $params['follow_stage'],
|
||||||
'notes' => $params['notes'] ?? '',
|
'notes' => $params['notes'] ?? '',
|
||||||
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
|
'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0,
|
||||||
'file' => $params['file']? json_encode($params['file']) : null,
|
'annex' => $params['annex']? json_encode($params['annex']) : null,
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
@ -175,8 +175,7 @@ class BidBiddingDecisionValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,7 @@ class BidDocumentExaminationValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,8 +136,7 @@ class BidResultValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,7 @@ class BidSecurityApplyValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,7 @@ class BidSecurityRefundValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,8 +217,7 @@ class ContractValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,7 @@ class ProcurementContractValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,7 @@ class SubcontractingContractNegotiationValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,8 +188,7 @@ class SubcontractingContractValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,8 +108,7 @@ class CustomContactsValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,7 @@ class CustomFollowValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,7 @@ class CustomerDemandSolutionValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,8 +143,7 @@ class CustomerDemandValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,7 @@ class FinanceInvoiceApplyValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,8 +191,7 @@ class FinancePaymentApplyValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,8 +156,7 @@ class FinancePaymentPlanValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,8 +157,7 @@ class FinanceReceiptRecordValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,7 @@ class FinanceRefundApplyValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,8 +148,7 @@ class FinanceRefundRecordValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,7 @@ class FinanceReturnedMoneyValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,8 +161,7 @@ class FinanceReturnedRecordValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,8 +137,7 @@ class MaterialPurchaseRequestValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,8 +136,7 @@ class MaterialValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,7 @@ class MaterialWarehouseValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,7 @@ class CompetitorValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,8 +198,7 @@ class ProjectEstimateValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class ProjectFollowUpValidate extends BaseValidate
|
|||||||
'follow_status' => 'require|checkStatus',
|
'follow_status' => 'require|checkStatus',
|
||||||
'follow_stage' => 'require|checkStage',
|
'follow_stage' => 'require|checkStage',
|
||||||
'next_follow_up_date' => 'date|dateFormat:Y-m-d|checkNextFollowUpDate',
|
'next_follow_up_date' => 'date|dateFormat:Y-m-d|checkNextFollowUpDate',
|
||||||
'file' => 'checkFile',
|
'annex' => 'checkAnnex',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $message = [
|
protected $message = [
|
||||||
@ -155,9 +155,9 @@ class ProjectFollowUpValidate extends BaseValidate
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkFile($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if($value){
|
if(!empty($value) && $value != ''){
|
||||||
if(!is_array($value)){
|
if(!is_array($value)){
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,7 @@ class ProjectMaterialBudgetValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,8 +137,7 @@ class ProjectSubpackageBudgetValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,8 +200,7 @@ class QuotationValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,8 +137,7 @@ class SupplierContactsValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,8 +171,7 @@ class SupplierValidate extends BaseValidate
|
|||||||
public function checkAnnex($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if(!empty($value) && $value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$annex = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($annex) || !is_array($annex)){
|
|
||||||
return '附件格式错误';
|
return '附件格式错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,8 +65,8 @@ class ProjectFollowUp extends BaseModel
|
|||||||
return !empty($value) ? date('Y-m-d',$value) : '';
|
return !empty($value) ? date('Y-m-d',$value) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFileAttr($value)
|
public function getAnnexAttr($value)
|
||||||
{
|
{
|
||||||
return !empty($value) ? json_decode($value) : null;
|
return !empty($value) ? json_decode($value) : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user