| | |
| | | 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"); |
| | | } |
| | | |
| | |
| | | #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 |
| | | { |
| | |
| | | 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 + "'"); |
| | | } |
| | | |
| | | //夿æ¯å¦å
许ä¿åï¼ä¸å
许ååæ» |
| | |
| | | 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" + |
| | |
| | | "," + oSub.HProcID.ToString() + "" + |
| | | "," + oSub.HBadReasonID.ToString() + "" + |
| | | ",'" + oSub.HBadReasonNumber.ToString() + "'" + |
| | | "," + oSub.HBadPhenomenaID.ToString() + "" + |
| | | ",'" + oSub.HGroupID.ToString() + "'" + |
| | | |
| | | "," + oSub.HICMOInterID.ToString() + "" + |
| | |
| | | ",'" + 1 + |
| | | "','" + oSub.HAddr + "'" + |
| | | ",'" + msg4 + "'" + |
| | | ",'" + oSub.HMakeDate.ToShortDateString() + "'" + |
| | | ",GETDATE()" + |
| | | ") "; |
| | | oCN.RunProc(subSql); |
| | | |