From 2e8a3535e87184604bb0512b7c84430c101acbd9 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 07 五月 2025 13:20:47 +0800
Subject: [PATCH] 返修条码生成
---
WebAPI/DLL/ClsSc_MouldProdInBill.cs | 101 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 95 insertions(+), 6 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_MouldProdInBill.cs b/WebAPI/DLL/ClsSc_MouldProdInBill.cs
index 49cd166..ed94f9b 100644
--- a/WebAPI/DLL/ClsSc_MouldProdInBill.cs
+++ b/WebAPI/DLL/ClsSc_MouldProdInBill.cs
@@ -44,12 +44,12 @@
string sql = "Insert Into Sc_MouldStockBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HRemark,HMaker,HMakeDate" + /*"HYear, HPeriod,"*/
- ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
", '" + omodel.HRemark.ToString() + "','" + omodel.HMaker + "',getdate()" + /*omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" +*/
- ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HSupID.ToString() + ", " + omodel.HSupTypeID.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) +
") ";
@@ -65,14 +65,14 @@
",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
",HDesignLife,HLeaveLife,HUseLife" +
- ",HSCSPID,HSPGroupID,HBatchNo" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HStockOrgID" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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() +
"," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
- "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'" +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HStockOrgID.ToString() +
") ");
}
DataSet Ds;
@@ -121,6 +121,7 @@
",HUpDateDate=getdate()" +
//========================================
",HSupID=" + omodel.HSupID.ToString() +
+ ",HSupTypeID=" + omodel.HSupTypeID.ToString() +
",HWHID=" + omodel.HWHID.ToString() +
",HSCWHID=" + omodel.HSCWHID.ToString() +
",HEmpID=" + omodel.HEmpID.ToString() +
@@ -147,14 +148,14 @@
",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
",HDesignLife,HLeaveLife,HUseLife" +
- ",HSCSPID,HSPGroupID,HBatchNo" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HStockOrgID" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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() +
"," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
- "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'" +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HStockOrgID.ToString() +
") ");
}
DataSet Ds;
@@ -185,5 +186,93 @@
}
}
+
+ //鏄剧ず鍗曟嵁
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("Select * from Sc_MouldStockBillMain Where HInterID=" + lngBillKey.ToString(), "Sc_MouldStockBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+ omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
+ omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
+ omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+ omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
+ omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
+ //
+
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("Select * from Sc_MouldStockBillSub Where HInterID=" + lngBillKey.ToString(), "Sc_MouldStockBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Models.ClsSc_MouldProdBillSub oSub = new Models.ClsSc_MouldProdBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+ oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+ oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
+ oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
+ oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]);
+ oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
+ oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1