From 6596e01a2965645846c63bc942f9fb79b4c11dfd Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Wed, 26 Aug 2020 18:11:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/PromoteCompanyController.class.php | 13 ++++++++++---
Application/Admin/View/PromoteCompany/edit.html | 10 +++++++++-
Application/Admin/View/PromoteCompany/export.html | 6 ++++--
Application/Admin/View/PromoteCompany/lists.html | 2 +-
.../Base/Service/PromoteCompanyService.class.php | 12 +++++++++---
5 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php
index 19288fd17..9ed3c517c 100644
--- a/Application/Admin/Controller/PromoteCompanyController.class.php
+++ b/Application/Admin/Controller/PromoteCompanyController.class.php
@@ -603,11 +603,18 @@ class PromoteCompanyController extends ThinkController
$this->checkData($save);
$promoteCompanyService = new PromoteCompanyService();
+
+ $oldData = M('promote_company', 'tab_')->field(['id', 'company_belong'])->where(['id' => $save['company_id']])->find();
+ $isNewDeposit = false;
+ if (!in_array($oldData['company_belong'], [1, 2]) && in_array($save['company_belong'], [1, 2])) {
+ $isNewDeposit = true;
+ }
+
try {
- /* $presidentDepositService = new PresidentDepositService();
- if (in_array($save['company_belong'], [1, 2])) {
+ $presidentDepositService = new PresidentDepositService();
+ if ($isNewDeposit && in_array($save['company_belong'], [1, 2])) {
$presidentDepositService->checkBeforeSave($save['deposit'] ?? []);
- } */
+ }
$promoteCompanyService->checkPromotes($save['promotes'] ?? []);
$promoteCompanyService->checkCompanyRelation($save['relation'] ?? []);
} catch (\Exception $e) {
diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html
index 9d5d14aa1..a2afbe70d 100644
--- a/Application/Admin/View/PromoteCompany/edit.html
+++ b/Application/Admin/View/PromoteCompany/edit.html
@@ -166,7 +166,7 @@
*团体归属: |
- |