From 0f7f19c41c4b6c29176a2829f96b9b54fe47d498 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期三, 19 一月 2022 00:47:29 +0800
Subject: [PATCH] 雅琪诺报工台产量汇报修改

---
 WebAPI/DLL/ClsOA_InformBill.cs |   46 +++++++++++++++-------------------------------
 1 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/WebAPI/DLL/ClsOA_InformBill.cs b/WebAPI/DLL/ClsOA_InformBill.cs
index b047f43..e14af5a 100644
--- a/WebAPI/DLL/ClsOA_InformBill.cs
+++ b/WebAPI/DLL/ClsOA_InformBill.cs
@@ -7,8 +7,8 @@
 {
     public  class ClsOA_InformBill:DBUtility.ClsXt_BaseBill
     {
-        public Model.ClsOA_InformBillMain omodel = new Model.ClsOA_InformBillMain();
-        public List<Model.ClsOA_InformBillSub> DetailColl = new List<Model.ClsOA_InformBillSub>();
+        public Models.ClsOA_InformBillMain omodel = new Models.ClsOA_InformBillMain();
+        public List<Models.ClsOA_InformBillSub> DetailColl = new List<Models.ClsOA_InformBillSub>();
 
         public ClsOA_InformBill()
         {
@@ -41,16 +41,13 @@
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate OA_InformBillMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
-                ",HDate='" + omodel.HDate + "'" +
-                ",HYear='" + omodel.HYear.ToString() + "'" +
-                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
-                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+                ",HUpDater='" + omodel.HMaker + "'" +
                 ",HUpDateDate=getdate()" +
                     //========================================
                 ",HContext='" + omodel.HContext + "'" +
                 ",HDeptID=" + omodel.HDeptID.ToString() +
-                ",HSendMan =" + omodel.HSendMan.ToString() +                
+                ",HSendMan ='" + omodel.HSendMan.ToString()+"'" +                
                 ",HReceiveMan='" + omodel.HReceiveMan + "'" +
                 ",HLevel='" + omodel.HLevel + "'" +
                 ",HDescription='" + omodel.HDescription + "'" +
@@ -62,7 +59,7 @@
                 DeleteBillSub(lngBillKey);
                 //鎻掑叆瀛愯〃
                 omodel.HInterID = lngBillKey;
-                foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+                foreach (Models.ClsOA_InformBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into OA_InformBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
@@ -71,7 +68,7 @@
                       ") 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.HReceiveMan.ToString() + "," + Convert.ToString(oSub.HReadFlag ? 1 : 0) + 
+                      ",'" + oSub.HReceiveMan.ToString() + "'," + Convert.ToString(oSub.HReadFlag ? 1 : 0) + 
                       ") ");
                 }
                 //
@@ -114,36 +111,23 @@
                 ",HReceiveMan,HLevel,HDescription" +
                 ") " +
                 " 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.HContext + "'," + omodel.HDeptID.ToString() + "," + omodel.HSendMan.ToString() + 
-                ",'" + omodel.HReceiveMan + "','" + omodel.HLevel + "','" + omodel.HDescription + "'" +
+                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+                 ",'" + omodel.HContext + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HSendMan.ToString() + 
+                "','" + omodel.HReceiveMan + "','" + omodel.HLevel + "','" + omodel.HDescription + "'" +
                 ") ");
                 //鎻掑叆瀛愯〃
-                foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+                foreach (Models.ClsOA_InformBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into OA_InformBillSub " +
                        " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                        ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                        ",HReceiveMan,HReadFlag " +
                        ") 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.HReceiveMan.ToString() + "," + Convert.ToString(oSub.HReadFlag ? 1 : 0) +
+                       ",'" + oSub.HReceiveMan.ToString() + "'," + Convert.ToString(oSub.HReadFlag ? 1 : 0) +
                        ") ");
                 }
-                //
-                //foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_OA_InformBill_Qty " + oSub.HICMOInterID, "");
-                //    if (Ds.Tables[0].Rows.Count == 0)
-                //        return;
-                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
-                //    {
-                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
-                //        return false;
-                //    }
-                //}
-                //
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -195,7 +179,7 @@
                 omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
                 omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                 //========================================================
-                omodel.HSendMan = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSendMan"]);
+                omodel.HSendMan =Ds.Tables[0].Rows[0]["HSendMan"].ToString();
                 omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);                
                 omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]);
                 omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]);
@@ -210,7 +194,7 @@
                 DetailColl.Clear();//娓呯┖
                 for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                 {
-                    Model.ClsOA_InformBillSub oSub = new Model.ClsOA_InformBillSub();
+                    Models.ClsOA_InformBillSub oSub = new Models.ClsOA_InformBillSub();
                     // 鍥哄畾璧嬪��===============================================
                     oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
                     oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
@@ -225,7 +209,7 @@
                     oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
                     oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
                     //===================================================
-                    oSub.HReceiveMan = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HReceiveMan"]);
+                    oSub.HReceiveMan = DsSub.Tables[0].Rows[i]["HReceiveMan"].ToString();
                     oSub.HReadFlag = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HReadFlag"]);
                     DetailColl.Add(oSub);
                 }

--
Gitblit v1.9.1