From 7c6b2c777ebe4ea64c492d2dd5aea69d902c94a7 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 01 六月 2023 19:52:41 +0800
Subject: [PATCH] 提交粮食定价配置
---
igds-core/src/main/java/com/ld/igds/view/DepotStorePR.java | 50 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/igds-core/src/main/java/com/ld/igds/view/DepotStorePR.java b/igds-core/src/main/java/com/ld/igds/view/DepotStorePR.java
index 247e658..7b0f58e 100644
--- a/igds-core/src/main/java/com/ld/igds/view/DepotStorePR.java
+++ b/igds-core/src/main/java/com/ld/igds/view/DepotStorePR.java
@@ -4,8 +4,8 @@
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
+import com.ld.igds.constant.DepotStatus;
import com.ld.igds.models.DepotStore;
-import com.ld.igds.view.service.HDepotService;
import com.ld.igds.view.service.HDepotStoreService;
import org.springframework.stereotype.Component;
@@ -30,19 +30,17 @@
/**
- * depotStorePR#pageListDepotStore
+ * depotStorePR#pageList
*
* @Desc: 鍒嗛〉鏌ヨ搴撳瓨淇℃伅
* @author: Andy
* @update-time: 2022/11/17
*/
@DataProvider
- public void pageListDepotStore(Page<DepotStore> page, Map<String, Object> param) throws Exception {
-
+ public void pageList(Page<DepotStore> page, Map<String, Object> param) throws Exception {
if (null == param) {
param = new HashMap<>();
}
-
depotStoreService.listDepotStore(page, param);
}
@@ -52,15 +50,53 @@
* @param data
*/
@DataResolver
- public void saveDepotStore(DepotStore data) {
+ public String saveDepotStore(DepotStore data) throws Exception {
+
+ //濡傛灉浠撳簱鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓�
+ if (DepotStatus.STATUS_2.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_3.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_4.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_31.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_32.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_33.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_34.getCode().equals(data.getDepotStatus())) {
+
+ if (null == data.getFoodYear()) return "璐т綅鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓紝鏀惰揣骞村害涓嶈兘涓虹┖";
+
+ if (null == data.getCountry()) return "璐т綅鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓紝鍥藉埆涓嶈兘涓虹┖";
+
+ if (null == data.getFoodLocation()) return "璐т綅鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓紝绮浜у湴涓嶈兘涓虹┖";
+
+ if (null == data.getFoodLocation()) return "璐т綅鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓紝绮浜у湴涓嶈兘涓虹┖";
+
+ if (null == data.getStoreDate()) return "璐т綅鐘舵��=灏佷粨/鍏ュ簱涓�/鍑哄簱涓紝鍏ュ簱鏃堕棿涓嶅彲涓虹┖";
+ }
+
+ //璐т綅鐘舵��=灏佷粨/鍑哄簱涓紝蹇呭~
+ if (DepotStatus.STATUS_3.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_4.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_31.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_32.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_33.getCode().equals(data.getDepotStatus()) ||
+ DepotStatus.STATUS_34.getCode().equals(data.getDepotStatus())) {
+
+ if (null == data.getFullDate()) return "璐т綅鐘舵��=灏佷粨/鍑哄簱涓紝灏佷粨鏃堕棿涓嶅彲涓虹┖";
+ }
+
+ //璐т綅鐘舵��=绌轰粨锛屽繀濉�傛渶鍚庝竴杞︾伯椋熷嚭浠撴椂闂�
+ if (DepotStatus.STATUS_1.getCode().equals(data.getDepotStatus())) {
+ if (null == data.getOutDate()) return "璐т綅鐘舵��=绌轰粨锛屽嚭浠撳畬鎴愭椂闂翠笉鍙负绌�";
+ }
depotStoreService.saveDepotStore(data);
- //鏇存柊搴撳瓨鍜岀姸鎬�
+ //鏍规嵁搴撳瓨淇℃伅鏇存柊鍒颁粨搴撲俊鎭紝浠撳簱鍌ㄧ伯淇℃伅浠ュ綋鍓嶄负鍑�
depotPR.updateByStore(data);
//杩滅▼鍚屾鐘舵��
depotPR.pullDepotStatus(data.getCompanyId(), data.getDepotId(), data.getDepotStatus());
+
+ return null;
}
/**
--
Gitblit v1.9.3