chenhaozhe
5 小时以前 e9a84a2ca945afa4693306045bc244973ebe9835
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -8693,10 +8693,23 @@
        {
            try
            {
                string sql = "";
                List<object> columnNameList = new List<object>();
                string sql = "select a.HSourceBillNo 流转卡号,a.HSourceBillType 流转卡类型,a.HSourceInterID 流转卡主内码,a.HSourceEntryID 流转卡子内码,b.HNumber 物料代码,b.HName 物料名称,b.HModel 规格型号,a.HDatePlanQty 计划数量,a.HSourceID,c.HName 生产资源 from Sc_ICMOBillStatus_Tmp a " +
                if (!string.IsNullOrEmpty(HSourceBill) && HSourceBill.Substring(0, 6) == "GXCZHB")
                {
                    HSourceBill = HSourceBill.Split('-')[0];
                    //华舟做末件发起安灯的时候 传过来的是出站单的单据号
                    sql = @"select a.HProcExchInterID 流转卡主内码,a.HProcExchEntryID 流转卡子内码,a.HProcExchBillNo 流转卡号,a.HSourceID,b.HName 生产资源, c.HNumber 物料代码, c.HName 物料名称, c.HModel 规格型号, a.HPlanQty 计划数量
                            from Sc_StationOutBillMain a  left  join Gy_Source b on a.HSourceID = b.HItemID  left  join Gy_Material c on a.HMaterID = c.HItemID  where a.HBillNo = '" + HSourceBill + "'";
                }
                else
                {
                    //报工台传过来的是流转卡的
                    sql = "select a.HSourceBillNo 流转卡号,a.HSourceBillType 流转卡类型,a.HSourceInterID 流转卡主内码,a.HSourceEntryID 流转卡子内码,b.HNumber 物料代码,b.HName 物料名称,b.HModel 规格型号,a.HDatePlanQty 计划数量,a.HSourceID,c.HName 生产资源 from Sc_ICMOBillStatus_Tmp a " +
                    "left join Gy_Material b on a.HMaterID=b.HItemID  left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "' and a.HICMOStatus=1";
                }
                ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
                if (ds.Tables[0].Rows.Count == 0)
                {