From a8e17feaaaafd549c81ea7e18f5c968af28d9391 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期二, 09 七月 2024 14:01:13 +0800 Subject: [PATCH] 工单清理,检测线段 --- 代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs" index 6a808ba..221c1b8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs" @@ -37,5 +37,39 @@ //澶氱鎴蜂細鐢ㄥ埌杩檌nit浠g爜锛屽叾浠栨儏鍐靛彲浠ヤ笉鐢� //base.Init(dbRepository); } - } + public override WebResponseContent Add(SaveModel saveDataModel) + { + WebResponseContent responseContent = new WebResponseContent(); + var a = saveDataModel.MainData["a"].ToFloat(); + var b = saveDataModel.MainData["b"].ToFloat(); + var c = saveDataModel.MainData["c"].ToFloat(); + var d = saveDataModel.MainData["d"].ToFloat(); + var e = saveDataModel.MainData["e"].ToFloat(); + var stackNoRange = saveDataModel.MainData["stackNoRange"].ToInt(); + if (stackNoRange < 3) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘灏戜簬3涓紒"); + if (stackNoRange > 6) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘澶氫簬6涓紒"); + if (e > 1060 && stackNoRange > 5) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘瓒呰繃5涓紒"); + var height = a + b + c + (stackNoRange - 1) * (a + b + c + d); + if (height > 1170) return responseContent.Error($"鎵撳寘鏁伴噺涓嶈兘瓒呰繃{stackNoRange}涓紒"); + responseContent = base.Add(saveDataModel); + return responseContent; + } + public override WebResponseContent Update(SaveModel saveModel) + { + WebResponseContent responseContent = new WebResponseContent(); + var a = saveModel.MainData["a"].ToFloat(); + var b = saveModel.MainData["b"].ToFloat(); + var c = saveModel.MainData["c"].ToFloat(); + var d = saveModel.MainData["d"].ToFloat(); + var e = saveModel.MainData["e"].ToFloat(); + var stackNoRange = saveModel.MainData["stackNoRange"].ToInt(); + if (stackNoRange < 3) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘灏戜簬3涓紒"); + if (stackNoRange > 6) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘澶氫簬6涓紒"); + if (e > 1060 && stackNoRange > 5) return responseContent.Error("鎵撳寘鏁伴噺涓嶈兘瓒呰繃5涓紒"); + var height = a + b + c + (stackNoRange - 1) * (a + b + c + d); + if (height > 1170) return responseContent.Error($"鎵撳寘鏁伴噺涓嶈兘瓒呰繃{stackNoRange}涓紒"); + responseContent = base.Update(saveModel); + return responseContent; + } + } } -- Gitblit v1.9.3