From fc39fb3b951d6ac4e4e4de836091d671ec00c14d Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 05 六月 2024 15:00:54 +0800
Subject: [PATCH] 1.更新菜单栏,报工台跳转过来时,根据物料+工序+生产资源带出对应清单信息 2.报工台跳转过来时,根据物料带出对应产品防错验证清单清单信息
---
WebAPI/Controllers/Kf_EntrustInBillController.cs | 99 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 97 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/Kf_EntrustInBillController.cs b/WebAPI/Controllers/Kf_EntrustInBillController.cs
index 36be5ed..83ea244 100644
--- a/WebAPI/Controllers/Kf_EntrustInBillController.cs
+++ b/WebAPI/Controllers/Kf_EntrustInBillController.cs
@@ -269,7 +269,7 @@
websLsmain.HDate = lsmain[0].HDate;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = lsmain[0].HBillType;
- websLsmain.HBillerID = DBUtility.ClsPub.isLong(DBUtility.ClsPub.CurUserID);
+ websLsmain.HBillerID = lsmain[0].HBillerID;
websLsmain.HDeptID = lsmain[0].HDeptID;
websLsmain.HEmpID = lsmain[0].HEmpID;
websLsmain.HRemark = "";
@@ -447,6 +447,89 @@
}
}
+ #region 濮斿鍔犲伐鍏ュ簱鍗� 鍒犻櫎
+
+ /// </summary>
+ [Route("Kf_EntrustInBill/DeleteKf_EntrustInBill")]
+ [HttpGet]
+ public object DeleteKf_EntrustInBill(string HInterID, string user)
+ {
+ try
+ {
+ string s = "";
+ DAL.ClsKf_OtherInBill oBill = new DAL.ClsKf_OtherInBill();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Kf_EntrustInBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (oBill.ShowBill(long.Parse(HInterID), ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ oCN.RunProc("delete from Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("delete from Kf_ICStockBillSub where HInterID= " + HInterID);
+
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#region 濮斿鍔犲伐鍏ュ簱鍗� 瀹℃牳/鍙嶅鏍�
/// <summary>
@@ -478,6 +561,17 @@
objJsonResult.count = 0;
objJsonResult.Message = "HInterID涓虹┖锛�";
objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
return objJsonResult;
}
@@ -525,7 +619,7 @@
objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
objJsonResult.data = null;
return objJsonResult;
- }
+ }
//瀹℃牳鍗曟嵁
if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
{
@@ -569,6 +663,7 @@
objJsonResult.data = null;
return objJsonResult;
}
+
//鍙嶅鏍稿崟鎹�
if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
{
--
Gitblit v1.9.1