From bb929bd0809eefc1108dd779846ff07d997f7ef0 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期五, 19 七月 2024 09:25:14 +0800 Subject: [PATCH] 反馈MES工单完成 --- 代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 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 cbc4836..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" @@ -39,11 +39,37 @@ } public override WebResponseContent Add(SaveModel saveDataModel) { - return base.Add(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) { - return base.Update(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