From 94f24db9393c430e76d8310932bc59d4ff3c0b33 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 13 五月 2025 15:47:36 +0800
Subject: [PATCH] 新增夏宝专用调拨扫码模块、缓存列表模块调用所需方法
---
WebAPI/DLL/ClsSb_EquipDotCheckBill.cs | 79 +++++++++++++++++++++++++++++++++++++--
1 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
index 05e57f1..2f2d117 100644
--- a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs
@@ -38,6 +38,22 @@
{
//
oCn.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "'2 ", "h_p_Sb_EquipDotCheckBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
//鏇存柊涓昏〃
oCn.RunProc("UpDate Sb_EquipDotCheckBillMain set " +
" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
@@ -89,6 +105,23 @@
// return false;
// }
//}
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Sb_EquipDotCheckBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
@@ -107,6 +140,22 @@
{
//寰楀埌mainid
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipDotCheckBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
//涓昏〃
@@ -114,12 +163,13 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark,HEquipID" +
",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" +
- ",HDeptID,HQty" +
+ ",HDeptID,HQty,HEquipDotCheckRuleInterID" +
+ ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
- ",'" + omodel.HDeptID + "'," + omodel.HQty +
+ ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipDotCheckRuleInterID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Models.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
@@ -129,15 +179,18 @@
"HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
"HDotCheckItem,HDotCheckPart,HClaim," +
- "HManagerID,HManagerNumber,HDotCheckResult " +
+ "HManagerID,HManagerNumber,HDotCheckResult,HDotCheckItemID " +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
- "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'" +
+ "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'," + oSub.HDotCheckItemID + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID +
") ");
}
+ //鏇存柊鐐规璁″垝瀛愯〃鍏宠仈鏍囪
+ oCn.RunProc("update Sb_EquipDotCheckPlanBillSub_Plan set HRelationFlag = 1 where HInterID = " + omodel.HPlanInterID + " and HEntryID = " + omodel.HPlanEntryID);
//
//foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl)
//{
@@ -151,6 +204,22 @@
// }
//}
//
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipDotCheckBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
--
Gitblit v1.9.1