From 080398b3ec314095e2fd5cccd3590e42815cc6c8 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 05 十一月 2025 15:32:00 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/日计划管理/Sc_WorkBillSortBillController.cs | 41 +++++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 12 deletions(-)
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
index fb4aa7a..d3efed6 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
@@ -18,6 +18,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
Sc_WorkBillSortBillMain omdelMian = new Sc_WorkBillSortBillMain();
List<Sc_WorkBillSortBillSub> omodelsub = new List<Sc_WorkBillSortBillSub>();
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
#region 鏃ヨ鍒掑伐鍗� 鍒楄〃
[Route("Sc_WorkBillSortBill/Sc_WorkBillSortBillList")]
@@ -309,21 +310,14 @@
{
var NumData = HInterID.Split(',');
+ //鑾峰彇绯荤粺鍙傛暟
+ string sReturn = "";
+ oSystemParameter.ShowBill(ref sReturn);
+
for (int i = 0; i < NumData.Length; i++)
{
- ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1 and hmainid=" + NumData[i], "h_v_JIT_Sc_WorkBillSortBillList");
-
- if (ds.Tables[0].Rows.Count > 0)
+ if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧")
{
- if (ds.Tables[0].Rows[0]["鍗曟嵁鐘舵��"].ToString() != "1")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鍗曟嵁涓嶈兘鍒犻櫎锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
oCN.BeginTran();//寮�鍚簨鍔�
oCN.RunProc($"delete from Sc_WorkBillSortBillSub where HInterID={ NumData[i]}");
@@ -331,6 +325,29 @@
oCN.Commit();//缁撴潫浜嬪姟
}
+ else
+ {
+ ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList_Left where 1=1 and hmainid=" + NumData[i], "h_v_JIT_Sc_WorkBillSortBillList");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["鍗曟嵁鐘舵��"].ToString() != "1")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍗曟嵁涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();//寮�鍚簨鍔�
+
+ oCN.RunProc($"delete from Sc_WorkBillSortBillSub where HInterID={ NumData[i]}");
+ oCN.RunProc($"delete from Sc_WorkBillSortBillMain where HInterID={ NumData[i]}");
+
+ oCN.Commit();//缁撴潫浜嬪姟
+ }
+ }
}
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1