From dfcab5f73b1f07e63ca9483d457bcfddccc95bf3 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 10 十月 2024 14:27:44 +0800
Subject: [PATCH] 班组列表返回数据调用方法修改,增加根据用户过滤显示班组;PDA模块所调用的班组返回数据方法新增
---
DAL/仓库管理/ClsKf_OtherInBill.cs | 81 +++++++++++++++++++++++++++++++++++++---
1 files changed, 74 insertions(+), 7 deletions(-)
diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_OtherInBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_OtherInBill.cs"
index bf7c287..307a188 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_OtherInBill.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_OtherInBill.cs"
@@ -37,6 +37,22 @@
{
try
{
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_ICStockBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_ICStockBill_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.BeginTran();
//鏇存柊涓昏〃
@@ -66,18 +82,18 @@
//鍒犻櫎瀛愯〃
DeleteBillSub(lngBillKey);
//鎻掑叆瀛愯〃
- omodel.HInterID = lngBillKey;
+ // omodel.HInterID = lngBillKey;
foreach (Model.ClsKf_OtherInBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Kf_ICStockBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ " (HInterID,HEntryID,HCloseMan,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
"," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
@@ -97,6 +113,23 @@
// return false;
// }
//}
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Kf_ICStockBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_ICStockBill_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;
@@ -125,6 +158,23 @@
{
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
}
+
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_ICStockBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_ICStockBill_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.BeginTran();
//涓昏〃
@@ -135,7 +185,7 @@
",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
- ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
") ");
@@ -143,14 +193,14 @@
foreach (Model.ClsKf_OtherInBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Kf_ICStockBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ " (HInterID,HEntryID,HCloseMan,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
"," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
@@ -170,7 +220,24 @@
// return false;
// }
//}
- //
+
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Kf_ICStockBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_ICStockBill_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