diff --git a/app/adminapi/logic/bid/BidBiddingDecisionLogic.php b/app/adminapi/logic/bid/BidBiddingDecisionLogic.php index f453c50a0..075c82318 100644 --- a/app/adminapi/logic/bid/BidBiddingDecisionLogic.php +++ b/app/adminapi/logic/bid/BidBiddingDecisionLogic.php @@ -62,7 +62,7 @@ class BidBiddingDecisionLogic extends BaseLogic 'project_assurance' => $params['project_assurance'] ?? 0, 'bid_project_overview' => $params['bid_project_overview'] ?? '', 'project_desc' => $params['project_desc'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Project::where('id',$params['project_id'])->update([ 'status' => 2, @@ -106,7 +106,7 @@ class BidBiddingDecisionLogic extends BaseLogic 'project_assurance' => $params['project_assurance'] ?? 0, 'bid_project_overview' => $params['bid_project_overview'] ?? '', 'project_desc' => $params['project_desc'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_time' => time(), ]); Db::commit(); diff --git a/app/adminapi/logic/bid/BidResultLogic.php b/app/adminapi/logic/bid/BidResultLogic.php index c67bcd31a..47d78e5eb 100644 --- a/app/adminapi/logic/bid/BidResultLogic.php +++ b/app/adminapi/logic/bid/BidResultLogic.php @@ -58,7 +58,7 @@ class BidResultLogic extends BaseLogic 'bidder_company' => $params['bidder_company'], 'bidder_amount' => $params['bidder_amount'], 'bid_summary' => $params['bid_summary'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -91,7 +91,7 @@ class BidResultLogic extends BaseLogic 'bidder_company' => $params['bidder_company'], 'bidder_amount' => $params['bidder_amount'], 'bid_summary' => $params['bid_summary'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/bid/BidSecurityApplyLogic.php b/app/adminapi/logic/bid/BidSecurityApplyLogic.php index 3b14dea34..3ce4afb5b 100644 --- a/app/adminapi/logic/bid/BidSecurityApplyLogic.php +++ b/app/adminapi/logic/bid/BidSecurityApplyLogic.php @@ -52,7 +52,7 @@ class BidSecurityApplyLogic extends BaseLogic 'pay_type' => $params['pay_type'], 'refund_date' => !empty($params['refund_date']) ? strtotime($params['refund_date']) : 0, 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'deposit_bank' => $params['deposit_bank'], 'account_name' => $params['account_name'], 'account' => $params['account'], @@ -87,7 +87,7 @@ class BidSecurityApplyLogic extends BaseLogic 'pay_type' => $params['pay_type'], 'refund_date' => !empty($params['refund_date']) ? strtotime($params['refund_date']) : 0, 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'deposit_bank' => $params['deposit_bank'], 'account_name' => $params['account_name'], 'account' => $params['account'], diff --git a/app/adminapi/logic/bid/BidSecurityRefundLogic.php b/app/adminapi/logic/bid/BidSecurityRefundLogic.php index b93f0dff5..00b271a97 100644 --- a/app/adminapi/logic/bid/BidSecurityRefundLogic.php +++ b/app/adminapi/logic/bid/BidSecurityRefundLogic.php @@ -52,7 +52,7 @@ class BidSecurityRefundLogic extends BaseLogic 'refund_amount' => $params['refund_amount'], 'refund_date' => strtotime($params['refund_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'] ?? 0, ]); Db::commit(); @@ -83,7 +83,7 @@ class BidSecurityRefundLogic extends BaseLogic 'refund_amount' => $params['refund_amount'], 'refund_date' => strtotime($params['refund_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'] ?? 0, ]); diff --git a/app/adminapi/logic/build/BuildProcessSettingsLogic.php b/app/adminapi/logic/build/BuildProcessSettingsLogic.php index d26bf26dc..10ce20a08 100644 --- a/app/adminapi/logic/build/BuildProcessSettingsLogic.php +++ b/app/adminapi/logic/build/BuildProcessSettingsLogic.php @@ -47,7 +47,7 @@ class BuildProcessSettingsLogic extends BaseLogic 'process_step_no' => $params['process_step_no'], 'process_step' => $params['process_step'], 'quality_control_points' => $params['quality_control_points'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -77,7 +77,7 @@ class BuildProcessSettingsLogic extends BaseLogic 'process_step_no' => $params['process_step_no'], 'process_step' => $params['process_step'], 'quality_control_points' => $params['quality_control_points'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/contract/ContractLogic.php b/app/adminapi/logic/contract/ContractLogic.php index 2f29cd73d..c81aa74a6 100644 --- a/app/adminapi/logic/contract/ContractLogic.php +++ b/app/adminapi/logic/contract/ContractLogic.php @@ -76,7 +76,7 @@ class ContractLogic extends BaseLogic "contract_date" => strtotime($params['contract_date']), "main_content" => $params['main_content'] ?? '', "remark" => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($returned_money as $item) { @@ -145,7 +145,7 @@ class ContractLogic extends BaseLogic "contract_date" => strtotime($params['contract_date']), "main_content" => $params['main_content'] ?? '', "remark" => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/contract/ProcurementContractLogic.php b/app/adminapi/logic/contract/ProcurementContractLogic.php index 35947b77c..da75bb6ad 100644 --- a/app/adminapi/logic/contract/ProcurementContractLogic.php +++ b/app/adminapi/logic/contract/ProcurementContractLogic.php @@ -81,7 +81,7 @@ class ProcurementContractLogic extends BaseLogic //质保金比例 'retention_money_rate' => $params['retention_money_rate'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($procurement_contract_detail as $v) { @@ -164,7 +164,7 @@ class ProcurementContractLogic extends BaseLogic //质保金比例 'retention_money_rate' => $params['retention_money_rate'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($procurement_contract_detail as $v) { diff --git a/app/adminapi/logic/contract/SubcontractingContractLogic.php b/app/adminapi/logic/contract/SubcontractingContractLogic.php index 5a653a9dc..0d8a3d222 100644 --- a/app/adminapi/logic/contract/SubcontractingContractLogic.php +++ b/app/adminapi/logic/contract/SubcontractingContractLogic.php @@ -81,7 +81,7 @@ class SubcontractingContractLogic extends BaseLogic //质保金比例 'retention_money_rate' => $params['retention_money_rate'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($subcontracting_contract_detail as $v) { @@ -165,7 +165,7 @@ class SubcontractingContractLogic extends BaseLogic //质保金比例 'retention_money_rate' => $params['retention_money_rate'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($subcontracting_contract_detail as $v) { diff --git a/app/adminapi/logic/custom/CustomContactsLogic.php b/app/adminapi/logic/custom/CustomContactsLogic.php index d4b9ddcf5..174d3f944 100644 --- a/app/adminapi/logic/custom/CustomContactsLogic.php +++ b/app/adminapi/logic/custom/CustomContactsLogic.php @@ -80,7 +80,7 @@ class CustomContactsLogic extends BaseLogic 'telephone' => $params['telephone'] ?? '', 'email' => $params['email'] ?? '', 'notes' => $params['notes'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/custom/CustomFollowLogic.php b/app/adminapi/logic/custom/CustomFollowLogic.php index 0dc0d8022..79f5a30c5 100644 --- a/app/adminapi/logic/custom/CustomFollowLogic.php +++ b/app/adminapi/logic/custom/CustomFollowLogic.php @@ -83,7 +83,7 @@ class CustomFollowLogic extends BaseLogic 'date' => strtotime($params['date']), 'types' => $params['types'], 'description' => $params['description'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'coordinate' => $params['coordinate'] ?? '', 'executor' => $params['executor'] ?? '', 'next_follow_date' => strtotime($params['next_follow_date']), diff --git a/app/adminapi/logic/custom/CustomerDemandLogic.php b/app/adminapi/logic/custom/CustomerDemandLogic.php index 5eae75539..bf3a13a88 100644 --- a/app/adminapi/logic/custom/CustomerDemandLogic.php +++ b/app/adminapi/logic/custom/CustomerDemandLogic.php @@ -55,7 +55,7 @@ class CustomerDemandLogic extends BaseLogic 'importance' => $params['importance'], 'recording_time' => strtotime($params['recording_time']), 'demand_content' => $params['demand_content'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -90,7 +90,7 @@ class CustomerDemandLogic extends BaseLogic 'importance' => $params['importance'], 'recording_time' => strtotime($params['recording_time']), 'demand_content' => $params['demand_content'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/custom/CustomerDemandSolutionLogic.php b/app/adminapi/logic/custom/CustomerDemandSolutionLogic.php index 98963589a..fcfa4cc6c 100644 --- a/app/adminapi/logic/custom/CustomerDemandSolutionLogic.php +++ b/app/adminapi/logic/custom/CustomerDemandSolutionLogic.php @@ -55,7 +55,7 @@ class CustomerDemandSolutionLogic extends BaseLogic 'submission_time' => strtotime($params['submission_time']), 'solution_content' => $params['solution_content'] ?? '', 'customer_feedback' => $params['customer_feedback'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -89,7 +89,7 @@ class CustomerDemandSolutionLogic extends BaseLogic 'submission_time' => strtotime($params['submission_time']), 'solution_content' => $params['solution_content'] ?? '', 'customer_feedback' => $params['customer_feedback'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php b/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php index 0dd839075..99add006c 100644 --- a/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php +++ b/app/adminapi/logic/finance/FinanceInvoiceApplyLogic.php @@ -63,7 +63,7 @@ class FinanceInvoiceApplyLogic extends BaseLogic 'content' => $params['content'] ?? '', 'invoice_no' => $params['invoice_no'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'invoicing_company_name' => $params['invoicing_company_name'] ?? '', 'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '', 'deposit_bank' => $params['deposit_bank'] ?? '', @@ -112,7 +112,7 @@ class FinanceInvoiceApplyLogic extends BaseLogic 'content' => $params['content'] ?? '', 'invoice_no' => $params['invoice_no'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'invoicing_company_name' => $params['invoicing_company_name'] ?? '', 'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '', 'deposit_bank' => $params['deposit_bank'] ?? '', diff --git a/app/adminapi/logic/finance/FinancePaymentApplyLogic.php b/app/adminapi/logic/finance/FinancePaymentApplyLogic.php index 0e9cad548..e195b731a 100644 --- a/app/adminapi/logic/finance/FinancePaymentApplyLogic.php +++ b/app/adminapi/logic/finance/FinancePaymentApplyLogic.php @@ -69,7 +69,7 @@ class FinancePaymentApplyLogic extends BaseLogic 'amount' => $params['amount'], 'desc' => $params['desc'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'payee_bank' => $params['payee_bank'], 'payee_account_name' => $params['payee_account_name'], 'payee_account' => $params['payee_account'], @@ -118,7 +118,7 @@ class FinancePaymentApplyLogic extends BaseLogic 'amount' => $params['amount'], 'desc' => $params['desc'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'payee_bank' => $params['payee_bank'], 'payee_account_name' => $params['payee_account_name'], 'payee_account' => $params['payee_account'], diff --git a/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php b/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php index 2fcd80099..9553dbe09 100644 --- a/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceReceiptRecordLogic.php @@ -69,7 +69,7 @@ class FinanceReceiptRecordLogic extends BaseLogic 'amount_excluding_tax' => $params['invoice_amount'] * (1 - $tax_rate[$params['invoice_tax_rate']] / 100), 'receipt_date' => strtotime($params['receipt_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -116,7 +116,7 @@ class FinanceReceiptRecordLogic extends BaseLogic 'amount_excluding_tax' => $params['invoice_amount'] * (1 - $tax_rate[$params['invoice_tax_rate']] / 100), 'receipt_date' => strtotime($params['receipt_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/finance/FinanceRefundApplyLogic.php b/app/adminapi/logic/finance/FinanceRefundApplyLogic.php index 7437739bb..9a837a3c6 100644 --- a/app/adminapi/logic/finance/FinanceRefundApplyLogic.php +++ b/app/adminapi/logic/finance/FinanceRefundApplyLogic.php @@ -55,7 +55,7 @@ class FinanceRefundApplyLogic extends BaseLogic 'refund_type' => $params['refund_type'], 'refund_user' => $params['refund_user'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'collection_bank' => $params['collection_bank'], 'collection_account' => $params['collection_account'], 'bank_account_id' => $params['bank_account_id'], @@ -91,7 +91,7 @@ class FinanceRefundApplyLogic extends BaseLogic 'refund_type' => $params['refund_type'], 'refund_user' => $params['refund_user'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'collection_bank' => $params['collection_bank'], 'collection_account' => $params['collection_account'], 'bank_account_id' => $params['bank_account_id'], diff --git a/app/adminapi/logic/finance/FinanceRefundRecordLogic.php b/app/adminapi/logic/finance/FinanceRefundRecordLogic.php index 649cd2157..917240ac7 100644 --- a/app/adminapi/logic/finance/FinanceRefundRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceRefundRecordLogic.php @@ -63,7 +63,7 @@ class FinanceRefundRecordLogic extends BaseLogic 'refund_type' => $params['refund_type'], 'reason' => $params['reason'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'], ]); Db::commit(); @@ -105,7 +105,7 @@ class FinanceRefundRecordLogic extends BaseLogic 'refund_type' => $params['refund_type'], 'reason' => $params['reason'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'], 'update_time' => time(), ]); diff --git a/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php b/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php index 0ec9d1e91..607796357 100644 --- a/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php +++ b/app/adminapi/logic/finance/FinanceReturnedMoneyLogic.php @@ -54,7 +54,7 @@ class FinanceReturnedMoneyLogic extends BaseLogic 'return_status' => $params['return_status'], 'return_duty_id' => $params['return_duty_id'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -87,7 +87,7 @@ class FinanceReturnedMoneyLogic extends BaseLogic 'return_status' => $params['return_status'], 'return_duty_id' => $params['return_duty_id'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php b/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php index ca45c2257..3f3952cf3 100644 --- a/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php +++ b/app/adminapi/logic/finance/FinanceReturnedRecordLogic.php @@ -58,7 +58,7 @@ class FinanceReturnedRecordLogic extends BaseLogic 'return_desc' => $params['return_desc'] ?? '', 'receiver' => $params['receiver'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'], ]); Db::commit(); @@ -95,7 +95,7 @@ class FinanceReturnedRecordLogic extends BaseLogic 'return_desc' => $params['return_desc'] ?? '', 'receiver' => $params['receiver'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'bank_account_id' => $params['bank_account_id'], 'update_time' => time(), ]); diff --git a/app/adminapi/logic/material/MaterialLogic.php b/app/adminapi/logic/material/MaterialLogic.php index 7b4b01c80..a3652f33e 100644 --- a/app/adminapi/logic/material/MaterialLogic.php +++ b/app/adminapi/logic/material/MaterialLogic.php @@ -55,7 +55,7 @@ class MaterialLogic extends BaseLogic 'inventory' => $params['inventory'] ?? 0, 'sales_price' => $params['sales_price'] ?? 0, 'cost_price' => $params['cost_price'] ?? 0, - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -93,7 +93,7 @@ class MaterialLogic extends BaseLogic 'inventory' => $params['inventory'] ?? 0, 'sales_price' => $params['sales_price'] ?? 0, 'cost_price' => $params['cost_price'] ?? 0, - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time() ]); diff --git a/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php b/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php index fd84d9faf..eed519eb3 100644 --- a/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php +++ b/app/adminapi/logic/material/MaterialPurchaseRequestLogic.php @@ -54,7 +54,7 @@ class MaterialPurchaseRequestLogic extends BaseLogic 'apply_date' => strtotime($params['apply_date']), 'arrival_date' => strtotime($params['arrival_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($detail as $item) { @@ -100,7 +100,7 @@ class MaterialPurchaseRequestLogic extends BaseLogic 'apply_date' => strtotime($params['apply_date']), 'arrival_date' => strtotime($params['arrival_date']), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/material/MaterialWarehouseLogic.php b/app/adminapi/logic/material/MaterialWarehouseLogic.php index 664a16dfd..e8dc0c78d 100644 --- a/app/adminapi/logic/material/MaterialWarehouseLogic.php +++ b/app/adminapi/logic/material/MaterialWarehouseLogic.php @@ -55,7 +55,7 @@ class MaterialWarehouseLogic extends BaseLogic 'address' => $params['address'] ?? '', 'telephone' => $params['telephone'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -89,7 +89,7 @@ class MaterialWarehouseLogic extends BaseLogic 'address' => $params['address'] ?? '', 'telephone' => $params['telephone'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_time' => time() ]); Db::commit(); diff --git a/app/adminapi/logic/project/CompetitorLogic.php b/app/adminapi/logic/project/CompetitorLogic.php index f069a8c34..97aa1236b 100644 --- a/app/adminapi/logic/project/CompetitorLogic.php +++ b/app/adminapi/logic/project/CompetitorLogic.php @@ -55,7 +55,7 @@ class CompetitorLogic extends BaseLogic 'competitor_advantages' => $params['competitor_advantages'] ?? '', 'competitor_disadvantages' => $params['competitor_disadvantages'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -92,7 +92,7 @@ class CompetitorLogic extends BaseLogic 'competitor_advantages' => $params['competitor_advantages'] ?? '', 'competitor_disadvantages' => $params['competitor_disadvantages'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/project/ProjectAttendanceRecordLogic.php b/app/adminapi/logic/project/ProjectAttendanceRecordLogic.php index 218d651b0..3d3f73a78 100644 --- a/app/adminapi/logic/project/ProjectAttendanceRecordLogic.php +++ b/app/adminapi/logic/project/ProjectAttendanceRecordLogic.php @@ -49,7 +49,7 @@ class ProjectAttendanceRecordLogic extends BaseLogic 'attendance_code' => $attendance_code, 'attendance_date' => strtotime($params['attendance_date']), 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); foreach($attendance_detail as $v){ ProjectAttendanceDetail::create([ diff --git a/app/adminapi/logic/project/ProjectDocumentLogic.php b/app/adminapi/logic/project/ProjectDocumentLogic.php index e072be33b..999723278 100644 --- a/app/adminapi/logic/project/ProjectDocumentLogic.php +++ b/app/adminapi/logic/project/ProjectDocumentLogic.php @@ -49,7 +49,7 @@ class ProjectDocumentLogic extends BaseLogic 'name' => $params['name'], 'describe' => $params['describe'], 'version' => $params['version'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -78,7 +78,7 @@ class ProjectDocumentLogic extends BaseLogic 'name' => $params['name'], 'describe' => $params['describe'], 'version' => $params['version'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); diff --git a/app/adminapi/logic/project/ProjectEstimateLogic.php b/app/adminapi/logic/project/ProjectEstimateLogic.php index 1ed47d125..13a65e0a9 100644 --- a/app/adminapi/logic/project/ProjectEstimateLogic.php +++ b/app/adminapi/logic/project/ProjectEstimateLogic.php @@ -60,7 +60,7 @@ class ProjectEstimateLogic extends BaseLogic 'technician' => $params['technician'] ?? 0, 'estimate_amount' => $params['estimate_amount'] ?? 0, 'ask' => $params['ask'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -98,7 +98,7 @@ class ProjectEstimateLogic extends BaseLogic 'technician' => $params['technician'] ?? 0, 'estimate_amount' => $params['estimate_amount'] ?? 0, 'ask' => $params['ask'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/project/ProjectFollowUpLogic.php b/app/adminapi/logic/project/ProjectFollowUpLogic.php index 04ce78fe2..219fe5807 100644 --- a/app/adminapi/logic/project/ProjectFollowUpLogic.php +++ b/app/adminapi/logic/project/ProjectFollowUpLogic.php @@ -58,7 +58,7 @@ class ProjectFollowUpLogic extends BaseLogic 'follow_stage' => $params['follow_stage'], 'notes' => $params['notes'] ?? '', 'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0, - 'file' => $params['file']?json_encode($params['file']) :'', + 'file' => $params['file']? json_encode($params['file']) : null, ]); Project::where('id', $params['project_id'])->update([ 'status' => 1, @@ -101,7 +101,7 @@ class ProjectFollowUpLogic extends BaseLogic 'follow_stage' => $params['follow_stage'], 'notes' => $params['notes'] ?? '', 'next_follow_up_date' => !empty($params['next_follow_up_date']) ? strtotime($params['next_follow_up_date']) : 0, - 'file' => $params['file']?json_encode($params['file']) :'', + 'file' => $params['file']? json_encode($params['file']) : null, 'update_time' => time(), ]); Db::commit(); diff --git a/app/adminapi/logic/project/ProjectInsuranceManagementLogic.php b/app/adminapi/logic/project/ProjectInsuranceManagementLogic.php index 14727a816..ff9eee0e3 100644 --- a/app/adminapi/logic/project/ProjectInsuranceManagementLogic.php +++ b/app/adminapi/logic/project/ProjectInsuranceManagementLogic.php @@ -55,7 +55,7 @@ class ProjectInsuranceManagementLogic extends BaseLogic 'insurance_detail' => $params['insurance_detail'], 'invoice_no' => $params['invoice_no'], 'handler' => $params['handler'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -91,7 +91,7 @@ class ProjectInsuranceManagementLogic extends BaseLogic 'insurance_detail' => $params['insurance_detail'], 'invoice_no' => $params['invoice_no'], 'handler' => $params['handler'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/project/ProjectLaborContractLogic.php b/app/adminapi/logic/project/ProjectLaborContractLogic.php index f605addbd..08dd2c3c3 100644 --- a/app/adminapi/logic/project/ProjectLaborContractLogic.php +++ b/app/adminapi/logic/project/ProjectLaborContractLogic.php @@ -57,7 +57,7 @@ class ProjectLaborContractLogic extends BaseLogic 'release_time' => strtotime($params['release_time']), 'release_reason' => $params['release_reason'], 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -96,7 +96,7 @@ class ProjectLaborContractLogic extends BaseLogic 'release_time' => strtotime($params['release_time']), 'release_reason' => $params['release_reason'], 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/project/ProjectLogic.php b/app/adminapi/logic/project/ProjectLogic.php index 9cb05391b..95c87d3d6 100644 --- a/app/adminapi/logic/project/ProjectLogic.php +++ b/app/adminapi/logic/project/ProjectLogic.php @@ -74,7 +74,7 @@ class ProjectLogic extends BaseLogic 'strategic_significance' => $params['strategic_significance'] ?? 0, 'industry' => $params['industry'] ?? 0, 'unit_nature' => $params['unit_nature'] ?? 0, - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'status' => 0, 'is_budget' => 0, 'add_user' => $adminId @@ -130,7 +130,7 @@ class ProjectLogic extends BaseLogic 'strategic_significance' => $params['strategic_significance'] ?? 0, 'industry' => $params['industry'] ?? 0, 'unit_nature' => $params['unit_nature'] ?? 0, - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_time' => time(), ]); Db::commit(); diff --git a/app/adminapi/logic/project/ProjectManagerAppointmentLogic.php b/app/adminapi/logic/project/ProjectManagerAppointmentLogic.php index fb99dbd08..19aa28f5e 100644 --- a/app/adminapi/logic/project/ProjectManagerAppointmentLogic.php +++ b/app/adminapi/logic/project/ProjectManagerAppointmentLogic.php @@ -57,7 +57,7 @@ class ProjectManagerAppointmentLogic extends BaseLogic 'start_date' => strtotime($params['start_date']), 'delivery_date' => strtotime($params['delivery_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -90,7 +90,7 @@ class ProjectManagerAppointmentLogic extends BaseLogic 'start_date' => strtotime($params['start_date']), 'delivery_date' => strtotime($params['delivery_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php b/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php index 2298bca76..326d8c7b7 100644 --- a/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectMaterialBudgetLogic.php @@ -51,7 +51,7 @@ class ProjectMaterialBudgetLogic extends BaseLogic 'project_id' => $params['project_id'], 'material_budget_code' => data_unique_code('项目材料预算'), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($detail as $item) { @@ -93,7 +93,7 @@ class ProjectMaterialBudgetLogic extends BaseLogic 'dept_id' => $params['dept_id'], 'project_id' => $params['project_id'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($detail as $item) { diff --git a/app/adminapi/logic/project/ProjectPlanLogic.php b/app/adminapi/logic/project/ProjectPlanLogic.php index b3ba1d274..e755fe73e 100644 --- a/app/adminapi/logic/project/ProjectPlanLogic.php +++ b/app/adminapi/logic/project/ProjectPlanLogic.php @@ -51,7 +51,7 @@ class ProjectPlanLogic extends BaseLogic 'deliver_time' => strtotime($params['deliver_time']), 'declare_time' => strtotime($params['declare_time']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $adminId, ]); Db::commit(); @@ -82,7 +82,7 @@ class ProjectPlanLogic extends BaseLogic 'deliver_time' => strtotime($params['deliver_time']), 'declare_time' => strtotime($params['declare_time']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/project/ProjectSalaryPaymentLogic.php b/app/adminapi/logic/project/ProjectSalaryPaymentLogic.php index cc671ca42..71eb864fa 100644 --- a/app/adminapi/logic/project/ProjectSalaryPaymentLogic.php +++ b/app/adminapi/logic/project/ProjectSalaryPaymentLogic.php @@ -55,7 +55,7 @@ class ProjectSalaryPaymentLogic extends BaseLogic 'total_amount' => $params['total_amount'], 'total_amount_uppercase' => $params['total_amount_uppercase'], 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach($payment_detail as $v){ ProjectSalaryDetail::create([ diff --git a/app/adminapi/logic/project/ProjectSettlementLogic.php b/app/adminapi/logic/project/ProjectSettlementLogic.php index 16f758d49..15849f0ea 100644 --- a/app/adminapi/logic/project/ProjectSettlementLogic.php +++ b/app/adminapi/logic/project/ProjectSettlementLogic.php @@ -52,7 +52,7 @@ class ProjectSettlementLogic extends BaseLogic 'remaining_amount' => $params['remaining_amount'], 'settlement_date' => strtotime($params['settlement_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id ]); Db::commit(); @@ -84,7 +84,7 @@ class ProjectSettlementLogic extends BaseLogic 'remaining_amount' => $params['remaining_amount'], 'settlement_date' => strtotime($params['settlement_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_time' => time() ]); Db::commit(); diff --git a/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php b/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php index 2bdd85e8c..fa2d3cc70 100644 --- a/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php +++ b/app/adminapi/logic/project/ProjectSubcontractSettlementLogic.php @@ -52,7 +52,7 @@ class ProjectSubcontractSettlementLogic extends BaseLogic 'remaining_amount' => $params['remaining_amount'], 'settlement_date' => strtotime($params['settlement_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $admin_id, ]); @@ -85,7 +85,7 @@ class ProjectSubcontractSettlementLogic extends BaseLogic 'remaining_amount' => $params['remaining_amount'], 'settlement_date' => strtotime($params['settlement_date']), 'remark' => $params['remark'], - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'add_user' => $params['add_user'], 'update_time' => time(), ]); diff --git a/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php b/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php index d161f8b43..930f68db2 100644 --- a/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php +++ b/app/adminapi/logic/project/ProjectSubpackageBudgetLogic.php @@ -51,7 +51,7 @@ class ProjectSubpackageBudgetLogic extends BaseLogic 'project_id' => $params['project_id'], 'subpackage_budget_code' => data_unique_code('项目分包预算'), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($detail as $item) { @@ -96,7 +96,7 @@ class ProjectSubpackageBudgetLogic extends BaseLogic 'project_id' => $params['project_id'], 'subpackage_budget_code' => data_unique_code('项目分包预算'), 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($detail as $item) { diff --git a/app/adminapi/logic/quality/QualityAcceptLogic.php b/app/adminapi/logic/quality/QualityAcceptLogic.php index 69064810d..071c7b92d 100644 --- a/app/adminapi/logic/quality/QualityAcceptLogic.php +++ b/app/adminapi/logic/quality/QualityAcceptLogic.php @@ -53,7 +53,7 @@ class QualityAcceptLogic extends BaseLogic 'engineer' => $params['engineer'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -87,7 +87,7 @@ class QualityAcceptLogic extends BaseLogic 'engineer' => $params['engineer'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualityAccidentLogic.php b/app/adminapi/logic/quality/QualityAccidentLogic.php index fa37d305f..172f56920 100644 --- a/app/adminapi/logic/quality/QualityAccidentLogic.php +++ b/app/adminapi/logic/quality/QualityAccidentLogic.php @@ -56,7 +56,7 @@ class QualityAccidentLogic extends BaseLogic 'not_our_company_user' => $params['not_our_company_user'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -94,7 +94,7 @@ class QualityAccidentLogic extends BaseLogic 'not_our_company_user' => $params['not_our_company_user'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualityDetectionLogic.php b/app/adminapi/logic/quality/QualityDetectionLogic.php index 3d9507cd0..0678835a8 100644 --- a/app/adminapi/logic/quality/QualityDetectionLogic.php +++ b/app/adminapi/logic/quality/QualityDetectionLogic.php @@ -64,7 +64,7 @@ class QualityDetectionLogic extends BaseLogic 'data_content_requirements' => $params['data_content_requirements'], 'detection_situation' => $params['detection_situation'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -109,7 +109,7 @@ class QualityDetectionLogic extends BaseLogic 'data_content_requirements' => $params['data_content_requirements'], 'detection_situation' => $params['detection_situation'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time() ]); diff --git a/app/adminapi/logic/quality/QualityDetectionTempLogic.php b/app/adminapi/logic/quality/QualityDetectionTempLogic.php index dcc336c58..f4852e0e0 100644 --- a/app/adminapi/logic/quality/QualityDetectionTempLogic.php +++ b/app/adminapi/logic/quality/QualityDetectionTempLogic.php @@ -50,7 +50,7 @@ class QualityDetectionTempLogic extends BaseLogic 'serial_number' => $params['serial_number'], 'standard_duration' => $params['standard_duration'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -82,7 +82,7 @@ class QualityDetectionTempLogic extends BaseLogic 'serial_number' => $params['serial_number'], 'standard_duration' => $params['standard_duration'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualityEventLogic.php b/app/adminapi/logic/quality/QualityEventLogic.php index 9534d1629..17ca643cb 100644 --- a/app/adminapi/logic/quality/QualityEventLogic.php +++ b/app/adminapi/logic/quality/QualityEventLogic.php @@ -53,7 +53,7 @@ class QualityEventLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -87,7 +87,7 @@ class QualityEventLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualityMboLogic.php b/app/adminapi/logic/quality/QualityMboLogic.php index 3be93bd7b..610e49f7d 100644 --- a/app/adminapi/logic/quality/QualityMboLogic.php +++ b/app/adminapi/logic/quality/QualityMboLogic.php @@ -53,7 +53,7 @@ class QualityMboLogic extends BaseLogic 'target_specification' => $params['target_specification'], 'basic_requirements' => $params['basic_requirements'], 'allowable_deviation' => $params['allowable_deviation'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -87,7 +87,7 @@ class QualityMboLogic extends BaseLogic 'target_specification' => $params['target_specification'], 'basic_requirements' => $params['basic_requirements'], 'allowable_deviation' => $params['allowable_deviation'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualitySpecificationLogic.php b/app/adminapi/logic/quality/QualitySpecificationLogic.php index d02da2da5..c26de73cf 100644 --- a/app/adminapi/logic/quality/QualitySpecificationLogic.php +++ b/app/adminapi/logic/quality/QualitySpecificationLogic.php @@ -51,7 +51,7 @@ class QualitySpecificationLogic extends BaseLogic 'release_date' => strtotime($params['release_date']), 'release_dept' => $params['release_dept'], 'content' => $params['content'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -84,7 +84,7 @@ class QualitySpecificationLogic extends BaseLogic 'release_date' => $params['release_date'], 'release_dept' => $params['release_dept'], 'content' => $params['content'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quality/QualitySuperviseLogic.php b/app/adminapi/logic/quality/QualitySuperviseLogic.php index 389c18c52..47bc2233d 100644 --- a/app/adminapi/logic/quality/QualitySuperviseLogic.php +++ b/app/adminapi/logic/quality/QualitySuperviseLogic.php @@ -51,7 +51,7 @@ class QualitySuperviseLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -83,7 +83,7 @@ class QualitySuperviseLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/quotation/QuotationLogic.php b/app/adminapi/logic/quotation/QuotationLogic.php index ec4f35cc4..262f280fb 100644 --- a/app/adminapi/logic/quotation/QuotationLogic.php +++ b/app/adminapi/logic/quotation/QuotationLogic.php @@ -67,7 +67,7 @@ class QuotationLogic extends BaseLogic 'total_amount' => $amount_including_tax + $params['freight'] + $params['other_fee'], 'customer_require' => $params['customer_require'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); foreach ($quotation_detail as $item) { diff --git a/app/adminapi/logic/safety/SafetyAccidentLogic.php b/app/adminapi/logic/safety/SafetyAccidentLogic.php index 6871bdcaf..d99bfd5db 100644 --- a/app/adminapi/logic/safety/SafetyAccidentLogic.php +++ b/app/adminapi/logic/safety/SafetyAccidentLogic.php @@ -57,7 +57,7 @@ class SafetyAccidentLogic extends BaseLogic 'not_our_company_user' => $params['not_our_company_user'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -95,7 +95,7 @@ class SafetyAccidentLogic extends BaseLogic 'not_our_company_user' => $params['not_our_company_user'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/safety/SafetyCheckLogic.php b/app/adminapi/logic/safety/SafetyCheckLogic.php index 3dd531e46..c4a5cccf1 100644 --- a/app/adminapi/logic/safety/SafetyCheckLogic.php +++ b/app/adminapi/logic/safety/SafetyCheckLogic.php @@ -61,7 +61,7 @@ class SafetyCheckLogic extends BaseLogic 'safety_hazard' => $params['safety_hazard'], 'modify_term' => $params['modify_term'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'check_nature' => $params['check_nature'], 'quality_hazard' => $params['quality_hazard'], 'sub_table' => $params['sub_table'], @@ -106,7 +106,7 @@ class SafetyCheckLogic extends BaseLogic 'safety_hazard' => $params['safety_hazard'], 'modify_term' => $params['modify_term'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'check_nature' => $params['check_nature'], 'quality_hazard' => $params['quality_hazard'], 'sub_table' => $params['sub_table'], diff --git a/app/adminapi/logic/safety/SafetyEmergencyPlanLogic.php b/app/adminapi/logic/safety/SafetyEmergencyPlanLogic.php index 785e3292a..b46fbb629 100644 --- a/app/adminapi/logic/safety/SafetyEmergencyPlanLogic.php +++ b/app/adminapi/logic/safety/SafetyEmergencyPlanLogic.php @@ -51,7 +51,7 @@ class SafetyEmergencyPlanLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; @@ -82,7 +82,7 @@ class SafetyEmergencyPlanLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_time' => time() ]); Db::commit(); diff --git a/app/adminapi/logic/safety/SafetyEvaluateLogic.php b/app/adminapi/logic/safety/SafetyEvaluateLogic.php index b04e03645..ce5ce15ca 100644 --- a/app/adminapi/logic/safety/SafetyEvaluateLogic.php +++ b/app/adminapi/logic/safety/SafetyEvaluateLogic.php @@ -50,7 +50,7 @@ class SafetyEvaluateLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; @@ -81,7 +81,7 @@ class SafetyEvaluateLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/safety/SafetyEventLogic.php b/app/adminapi/logic/safety/SafetyEventLogic.php index 2b023be51..b138159b1 100644 --- a/app/adminapi/logic/safety/SafetyEventLogic.php +++ b/app/adminapi/logic/safety/SafetyEventLogic.php @@ -52,7 +52,7 @@ class SafetyEventLogic extends BaseLogic 'happen_time' => strtotime($params['happen_time']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -85,7 +85,7 @@ class SafetyEventLogic extends BaseLogic 'happen_time' => strtotime($params['happen_time']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time() ]); diff --git a/app/adminapi/logic/safety/SafetyHazardLogic.php b/app/adminapi/logic/safety/SafetyHazardLogic.php index 79beb762c..b4038ca53 100644 --- a/app/adminapi/logic/safety/SafetyHazardLogic.php +++ b/app/adminapi/logic/safety/SafetyHazardLogic.php @@ -62,7 +62,7 @@ class SafetyHazardLogic extends BaseLogic 'manage_measure' => $params['manage_measure'], 'emergency_measure' => $params['emergency_measure'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -105,7 +105,7 @@ class SafetyHazardLogic extends BaseLogic 'manage_measure' => $params['manage_measure'], 'emergency_measure' => $params['emergency_measure'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/safety/SafetyProductMonthLogic.php b/app/adminapi/logic/safety/SafetyProductMonthLogic.php index eee95b32b..a58f9ab01 100644 --- a/app/adminapi/logic/safety/SafetyProductMonthLogic.php +++ b/app/adminapi/logic/safety/SafetyProductMonthLogic.php @@ -55,7 +55,7 @@ class SafetyProductMonthLogic extends BaseLogic 'current_important_work' => $params['current_important_work'], 'next_important_work' => $params['next_important_work'], 'item' => $params['item'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; @@ -90,7 +90,7 @@ class SafetyProductMonthLogic extends BaseLogic 'current_important_work' => $params['current_important_work'], 'next_important_work' => $params['next_important_work'], 'item' => $params['item'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/safety/SafetyRehearsalLogic.php b/app/adminapi/logic/safety/SafetyRehearsalLogic.php index e2b4d4c30..aec106e5a 100644 --- a/app/adminapi/logic/safety/SafetyRehearsalLogic.php +++ b/app/adminapi/logic/safety/SafetyRehearsalLogic.php @@ -51,7 +51,7 @@ class SafetyRehearsalLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; @@ -82,7 +82,7 @@ class SafetyRehearsalLogic extends BaseLogic 'happen_date' => strtotime($params['happen_date']), 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, ]); Db::commit(); return true; diff --git a/app/adminapi/logic/safety/SafetyStandardLogic.php b/app/adminapi/logic/safety/SafetyStandardLogic.php index 531b502cd..231a8a7ba 100644 --- a/app/adminapi/logic/safety/SafetyStandardLogic.php +++ b/app/adminapi/logic/safety/SafetyStandardLogic.php @@ -50,7 +50,7 @@ class SafetyStandardLogic extends BaseLogic 'name' => $params['name'], 'publish_dep' => $params['publish_dep'], 'content' => $params['content'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -82,7 +82,7 @@ class SafetyStandardLogic extends BaseLogic 'name' => $params['name'], 'publish_dep' => $params['publish_dep'], 'content' => $params['content'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time() ]); diff --git a/app/adminapi/logic/safety/SafetySuperviseLogic.php b/app/adminapi/logic/safety/SafetySuperviseLogic.php index 476c34c1a..e97440697 100644 --- a/app/adminapi/logic/safety/SafetySuperviseLogic.php +++ b/app/adminapi/logic/safety/SafetySuperviseLogic.php @@ -53,7 +53,7 @@ class SafetySuperviseLogic extends BaseLogic 'device_accident' => $params['device_accident'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -88,7 +88,7 @@ class SafetySuperviseLogic extends BaseLogic 'device_accident' => $params['device_accident'], 'content' => $params['content'], 'remark' => $params['remark'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time(), ]); diff --git a/app/adminapi/logic/safety/SafetyTargetLogic.php b/app/adminapi/logic/safety/SafetyTargetLogic.php index 575ca369c..a83191f55 100644 --- a/app/adminapi/logic/safety/SafetyTargetLogic.php +++ b/app/adminapi/logic/safety/SafetyTargetLogic.php @@ -54,7 +54,7 @@ class SafetyTargetLogic extends BaseLogic 'target_standard' => $params['target_standard'], 'pass_rate' => $params['pass_rate'], 'deviation' => $params['deviation'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'add_user' => $admin_id, 'update_user' => $admin_id, ]); @@ -89,7 +89,7 @@ class SafetyTargetLogic extends BaseLogic 'target_standard' => $params['target_standard'], 'pass_rate' => $params['pass_rate'], 'deviation' => $params['deviation'], - 'file' => !empty($params['file']) ? $params['file'] : null, + 'file' => $params['file']? json_encode($params['file']) : null, 'update_user' => $admin_id, 'update_time' => time() ]); diff --git a/app/adminapi/logic/supplier/SupplierContactsLogic.php b/app/adminapi/logic/supplier/SupplierContactsLogic.php index 1453678c5..fe0d9a52c 100644 --- a/app/adminapi/logic/supplier/SupplierContactsLogic.php +++ b/app/adminapi/logic/supplier/SupplierContactsLogic.php @@ -61,7 +61,7 @@ class SupplierContactsLogic extends BaseLogic 'id_type' => $params['id_type'] ?? 0, 'idcard' => $params['idcard'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, ]); Db::commit(); return true; @@ -104,7 +104,7 @@ class SupplierContactsLogic extends BaseLogic 'id_type' => $params['id_type'] ?? 0, 'idcard' => $params['idcard'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'update_time' => time(), ]); Db::commit(); diff --git a/app/adminapi/logic/supplier/SupplierLogic.php b/app/adminapi/logic/supplier/SupplierLogic.php index 2ca662060..69c8de743 100644 --- a/app/adminapi/logic/supplier/SupplierLogic.php +++ b/app/adminapi/logic/supplier/SupplierLogic.php @@ -62,7 +62,7 @@ class SupplierLogic extends BaseLogic 'email' => $params['email'] ?? '', 'address' => $params['address'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'invoice_company_name' => $params['invoice_company_name'] ?? '', 'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '', 'bank_name' => $params['bank_name'] ?? '', @@ -113,7 +113,7 @@ class SupplierLogic extends BaseLogic 'email' => $params['email'] ?? '', 'address' => $params['address'] ?? '', 'remark' => $params['remark'] ?? '', - 'annex' => $params['annex']? json_encode($params['annex']) : '', + 'annex' => $params['annex']? json_encode($params['annex']) : null, 'invoice_company_name' => $params['invoice_company_name'] ?? '', 'taxpayer_identification_number' => $params['taxpayer_identification_number'] ?? '', 'bank_name' => $params['bank_name'] ?? '',