zrg
2024-09-10 1d796aa056874d69177d46e6265fb542ef989b26
WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs
@@ -92,17 +92,21 @@
                        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.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty " +
                     ",a.HSourceBillNo,a.HSourceInterID,a.HSourceEntryID,a.HDatePlanQty,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName" +
                     " 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 " +
                     " 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" +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID " +
                         ",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID,a.HDeptID,d.HName HDeptName,m.HUnitID,u.HName HUnitName " +
                         " 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 " +
                         " Where a.HInterID=" + HInterID + " and a.HBillType=" + HBillType, "Sc_ICMOBillStatus_Tmp");
                    }
                 
@@ -231,6 +235,7 @@
                BillNew.HMaterID = mainList[0].HMaterID;
                BillNew.HSourceID = mainList[0].HSourceID;
                BillNew.HGroupID = mainList[0].HGroupID;
                BillNew.HDeptID = mainList[0].HDeptID;
                BillNew.HCheckManID = mainList[0].HCheckManID;
                BillNew.HBadReasonID = mainList[0].HBadReasonID;
                BillNew.HBarCode = mainList[0].HBarCode;
@@ -246,13 +251,13 @@
                oCN.RunProc("Insert Into Sc_ICMOBillQualityStatus_Tmp " +
                    " (HInterID,HBillNo,HDate,HICMOBillNo,HICMOInterID" +
                    ",HProcExchBillNo,HProcExchInterID,HProcExchEntryID,HProcID,HMaterID" +
                    ",HSourceID,HGroupID,HCheckManID,HBadReasonID,HBarCode" +
                    ",HSourceID,HGroupID,HDeptID,HCheckManID,HBadReasonID,HBarCode" +
                    ",HMaker,HMakeDate,HBillType,HReportType,HSourceBillNo" +
                    ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID,HBadReasonHQty" +
                ") " +
                " values(" + BillNew.HInterID + ",'" + BillNew.HBillNo + "','" + BillNew.HDate + "','" + BillNew.HICMOBillNo + "'," + BillNew.HICMOInterID + 
                ",'" + BillNew.HProcExchBillNo + "'," + BillNew.HProcExchInterID + "," + BillNew.HProcExchEntryID + "," + BillNew.HProcID + "," + BillNew.HMaterID +
                "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HDeptID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                ",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "','" + BillNew.HBillType + "','" + +BillNew.HReportType + "','" +BillNew.HSourceBillNo + "'" +
                "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HICMOEntryID + "," + BillNew.HBadReasonHQty +
                ") ");
@@ -790,7 +795,7 @@
                    string subSql = "Insert into Sc_QualityReportBillSub " +
                 " (HInterID,HEntryID,HBillNo_bak,HRemark" +
                 ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                 ",HMaterID,HUnitID,HQty,HResult,HEmpID,HSourceID,HBadReasonID,HBadReasonNumber,HGroupID" +
                 ",HMaterID,HUnitID,HQty,HResult,HEmpID,HSourceID,HProcID,HBadReasonID,HBadReasonNumber,HGroupID" +
                 ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
                 ",HBarCode,HReportType" +
                 ",HAddr,HMaker,HMakeDate" +
@@ -812,6 +817,7 @@
                 "','" + oSub.HResult + "'" +
                 "," + oSub.HEmpID.ToString() + "" +
                 "," + oSub.HSourceID.ToString() + "" +
                 "," + oSub.HProcID.ToString() + "" +
                 "," + oSub.HBadReasonID.ToString() + "" +
                 ",'" + oSub.HBadReasonNumber.ToString() + "'" +
                 ",'" + oSub.HGroupID.ToString() + "'" +