From ec3daa05f122738f18d4474b9257e4cf794dc5cf Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期五, 06 三月 2026 10:36:01 +0800
Subject: [PATCH] 接口新增
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_SelectionStandardsService.cs | 87 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 82 insertions(+), 5 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_SelectionStandardsService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_SelectionStandardsService.cs"
index 457eae1..3fee087 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_SelectionStandardsService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_SelectionStandardsService.cs"
@@ -1,4 +1,7 @@
-锘縰sing WIDESEA_IServices;
+锘縰sing AngleSharp.Dom;
+using System.Reflection;
+using WIDESEA_Core.Utilities;
+using WIDESEA_IServices;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_Model.Models;
@@ -23,15 +26,27 @@
decimal lowerValue = Convert.ToDecimal(saveModel.MainData["lowerValue"]);
decimal upperValue = Convert.ToDecimal(saveModel.MainData["upperValue"]);
int isCantainGK = saveModel.MainData["isCantainGK"].ObjToInt();
- decimal lowerValue_gk = Convert.ToDecimal(saveModel.MainData["lowerValue_gk"]);
- decimal upperValue_gk = Convert.ToDecimal(saveModel.MainData["upperValue_gk"]);
+ string PostContainer = saveModel.MainData["postContainer"].ToString();
+ decimal Estimatedvalue = Convert.ToDecimal(saveModel.MainData["estimatedvalue"]);
+
if (lowerValue < 0 || upperValue < 0) throw new Exception("杩囩泩閲忓�煎紓甯�");
+ decimal lowerValue_gk = 0;
+ decimal upperValue_gk = 0;
if (isCantainGK != 0)
{
- if (lowerValue_gk < 0 || upperValue_gk < 0) throw new Exception("鎴潰杩囩泩閲忓�煎紓甯�");
+
+ lowerValue_gk = Convert.ToDecimal(saveModel.MainData["lowerValue_gk"]);
+ upperValue_gk = Convert.ToDecimal(saveModel.MainData["upperValue_gk"]);
+ if (isCantainGK != 0)
+ {
+ if (lowerValue_gk < 0 || upperValue_gk < 0) throw new Exception("鎴潰杩囩泩閲忓�煎紓甯�");
+ }
+
}
+
+
Dt_SelectionStandards selectionStandards = new Dt_SelectionStandards
{
@@ -45,7 +60,9 @@
mttype = mttype,
neworold = neworold,
upperValue_gk = upperValue_gk,
- upperValue = upperValue
+ upperValue = upperValue,
+ PostContainer = PostContainer,
+ Estimatedvalue = Estimatedvalue,
};
if (BaseDal.AddData(selectionStandards) > 0)
@@ -62,5 +79,65 @@
return content.Error($"娣诲姞澶辫触:{ex.Message}");
}
}
+
+ /// <summary>
+ /// 淇敼鏁版嵁
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ public virtual WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ try
+ {
+ int id = int.Parse(saveModel.MainData["id"].ToString());
+ string carType = saveModel.MainData["carType"].ToString();
+ string mttype = saveModel.MainData["mttype"].ToString();
+ string neworold = saveModel.MainData["neworold"].ToString();
+ string gkdj = saveModel.MainData["gkdj"].ToString();
+ decimal lowerValue = Convert.ToDecimal(saveModel.MainData["lowerValue"]);
+ decimal upperValue = Convert.ToDecimal(saveModel.MainData["upperValue"]);
+
+ decimal Estimatedvalue = Convert.ToDecimal(saveModel.MainData["estimatedvalue"]);
+ string PostContainer = saveModel.MainData["postContainer"].ToString();
+ int isCantainGK = saveModel.MainData["isCantainGK"].ObjToInt();
+
+ Dt_SelectionStandards dt_Selection = BaseDal.QueryFirst(x => x.ID == id);
+
+
+ dt_Selection.Estimatedvalue = Estimatedvalue;
+ dt_Selection.CarType = carType;
+ dt_Selection.mttype = mttype;
+ dt_Selection.neworold = neworold;
+ dt_Selection.gkdj = gkdj;
+
+ dt_Selection.PostContainer = PostContainer;
+
+ dt_Selection.isCantainGK = isCantainGK != 0 ? true : false;
+ if (isCantainGK != 0)
+ {
+ decimal lowerValue_gk = Convert.ToDecimal(saveModel.MainData["lowerValue_gk"]);
+ decimal upperValue_gk = Convert.ToDecimal(saveModel.MainData["upperValue_gk"]);
+
+ dt_Selection.lowerValue_gk = lowerValue_gk;
+ dt_Selection.upperValue_gk = upperValue_gk;
+ }
+
+
+ if (BaseDal.UpdateData(dt_Selection))
+ {
+ return WebResponseContent.Instance.OK("娣诲姞鎴愬姛");
+ }
+ else
+ {
+ return WebResponseContent.Instance.Error("娣诲姞澶辫触");
+ }
+
+
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3