wtt
2025-03-17 15316f51a5e129c2ebcf8dabff4ac30c1ee1dc32
WebAPI/Controllers/Éú²ú¹ÜÀí/ÖÊÁ¿»ã±¨µ¥/Sc_QualityReportBillController.cs
@@ -92,23 +92,25 @@
                        ds = oCN.RunProcReturn
                     ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
                     ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HSourceID,s.HName HSourceName" +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName" +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName,a.HProcID,p.HName HProcName" +
                     " from Sc_ICMOBillStatus_Tmp a " +
                     " left join Gy_Material m on a.HMaterID=m.HItemID " +
                     " left join Gy_Department d on a.HDeptID=d.HItemID " +
                     " left join Gy_Unit u on m.HUnitID=u.HItemID " +
                     " left join Gy_Source s on a.HSourceID=s.HItemID " +
                     " left join Gy_Process p on a.HProcID = p.HItemID " +
                     " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                    else {
                        ds = oCN.RunProcReturn
                         ("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID,a.HSourceID,s.HName HSourceName" +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName " +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName,a.HProcID,p.HName HProcName " +
                         " from Sc_ICMOBillStatus_Tmp a " +
                         " left join Gy_Material m on a.HMaterID=m.HItemID " +
                         " left join Gy_Department d on a.HDeptID=d.HItemID " +
                         " left join Gy_Unit u on m.HUnitID=u.HItemID " +
                         " left join Gy_Source s on a.HSourceID=s.HItemID " +
                         " left join Gy_Process p on a.HProcID = p.HItemID " +
                         " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                 
@@ -638,7 +640,7 @@
        #region æäº¤ä¿å­˜ï¼Œå­˜ä¸»å­è¡¨åŠæ˜Žç»†è¡¨
        [Route("Sc_QualityReportBill/set_SaveBill")]
        [HttpGet]
        public object set_SaveBill(long HInterID,string HBillNo, string HChecker)
        public object set_SaveBill(long HInterID,string HBillNo, string HChecker,string HBillSubType)
        {
            try
            {
@@ -670,11 +672,11 @@
                ds = oCN.RunProcReturn(sql, "Sc_QualityReportBillSub");
                if (ds.Tables[0].Rows.Count>0)
                {
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBillSum " + HInterID + "");
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBillSum '" + HInterID + "','" + HBillSubType +"'");
                }
                else
                {
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID + "");
                    oCN.RunProc("exec h_p_save_Sc_QualityReportBill '" + HInterID + "','" + HBillSubType + "'");
                }
                
                //判断是否允许保存,不允许则回滚
@@ -797,7 +799,7 @@
                    string subSql = "Insert into Sc_QualityReportBillSub " +
                 " (HInterID,HEntryID,HBillNo_bak,HRemark" +
                 ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                 ",HMaterID,HUnitID,HQty,HResult,HEmpID,HSourceID,HProcID,HBadReasonID,HBadReasonNumber,HGroupID" +
                 ",HMaterID,HUnitID,HQty,HResult,HEmpID,HSourceID,HProcID,HBadReasonID,HBadReasonNumber,HBadPhenomenaID,HGroupID" +
                 ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
                 ",HBarCode,HReportType" +
                 ",HAddr,HMaker,HMakeDate" +
@@ -822,6 +824,7 @@
                 "," + oSub.HProcID.ToString() + "" +
                 "," + oSub.HBadReasonID.ToString() + "" +
                 ",'" + oSub.HBadReasonNumber.ToString() + "'" +
                "," + oSub.HBadPhenomenaID.ToString() + "" +
                 ",'" + oSub.HGroupID.ToString() + "'" +
                 "," + oSub.HICMOInterID.ToString() + "" +
@@ -835,7 +838,7 @@
                 ",'" + 1 +
                 "','" + oSub.HAddr + "'" +
                 ",'" + msg4 + "'" +
                 ",'" + oSub.HMakeDate.ToShortDateString() + "'" +
                 ",GETDATE()" +
                 ") ";
                    oCN.RunProc(subSql);