From 2ffe77fe9f2f45660be629acb06de680f278303e Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 28 十二月 2022 08:49:19 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
DAL/生产管理/模具管理/ClsSc_MouldDotCheckRuleBill.cs | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckRuleBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckRuleBill.cs"
index 9f4698c..c0d9de1 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckRuleBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckRuleBill.cs"
@@ -8,12 +8,13 @@
public class ClsSc_MouldDotCheckRuleBill : DBUtility.ClsXt_BaseBill
{
public Model.ClsSc_MouldDotCheckRuleBillMain omodel = new Model.ClsSc_MouldDotCheckRuleBillMain();
- public List<Model.ClsSc_MouldDotCheckRuleBillSub> DetailColl = new List<Model.ClsSc_MouldDotCheckRuleBillSub>();
+ public List<Model.ClsSc_MouldDotCheckRuleBillSub> DetailCol = new List<Model.ClsSc_MouldDotCheckRuleBillSub>();
+ public List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> DetailColl = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>();
public ClsSc_MouldDotCheckRuleBill()
{
base.MvarItemKeySub = "Sc_MouldDotCheckRuleBillSub";
- base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub2 = "Sc_MouldDotCheckRuleBillSub_Item";
base.MvarItemKeySub3 = "";
base.MvarItemKeySub4 = "";
base.MvarItemKey = "Sc_MouldDotCheckRuleBillMain";
@@ -39,7 +40,6 @@
//鏇存柊涓昏〃
oCn.RunProc("UpDate Sc_MouldDotCheckRuleBillMain set " +
" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
- ",HDate='" + omodel.HDate + "'" +
",HYear='" + omodel.HYear.ToString() + "'" +
",HPeriod='" + omodel.HPeriod.ToString() + "'" +
",HRemark='" + omodel.HRemark + "'" +
@@ -58,9 +58,10 @@
//DeleteRelation(ref sReturn, lngBillKey);
////鍒犻櫎瀛愯〃
DeleteBillSub(lngBillKey);
+ oCn.RunProc("delete from Sc_MouldDotCheckRuleBillSub_Item where HInterID=" + lngBillKey);
////鎻掑叆瀛愯〃
omodel.HInterID = lngBillKey;
- foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailColl)
+ foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailCol)
{
oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
@@ -74,6 +75,21 @@
"," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
") ");
}
+ foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HUnitID" +
+ ",HQty,HQtyMust" +
+ ") 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.HUnitID.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HQtyMust.ToString() +
+ ") ");
+ }
+
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
@@ -106,7 +122,7 @@
") ");
////鎻掑叆瀛愯〃
- foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailColl)
+ foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailCol)
{
oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
@@ -119,6 +135,20 @@
"," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
") ");
+ }
+ foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HUnitID" +
+ ",HQty,HQtyMust" +
+ ") 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.HUnitID.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HQtyMust.ToString() +
+ ") ");
}
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
@@ -181,7 +211,7 @@
//寰幆
DataSet DsSub;
DsSub = oCn.RunProcReturn("Select * from Sc_MouldDotCheckRuleBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_MouldDotCheckRuleBillSub");
- DetailColl.Clear();//娓呯┖
+ DetailCol.Clear();//娓呯┖
for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
{
Model.ClsSc_MouldDotCheckRuleBillSub oSub = new Model.ClsSc_MouldDotCheckRuleBillSub();
@@ -205,7 +235,7 @@
oSub.HClaim = DsSub.Tables[0].Rows[0]["HClaim"].ToString().Trim();
oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]);
- DetailColl.Add(oSub);
+ DetailCol.Add(oSub);
}
sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
return true;
--
Gitblit v1.9.1