chenhaozhe
2025-10-26 1948124877478db58b27841f9398aed97ef13053
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Xs_SendGoodsPlanBillController.cs
@@ -113,21 +113,24 @@
                    {
                        error += $"没有符合条件得销售订单信息,客户订单号:{ tb2.Rows[i]["客户订单号"].ToString()},产品代码:{tb2.Rows[i]["物料编码"].ToString()}";
                    }
                }
                if (error.Length > 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = ErrorResult += $"Excel模板存在错误,{error}\r\n"; ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                    if (error.Length > 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = ErrorResult += $"Excel模板存在错误,行数{i + 1}:{error}\r\n"; ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
                        tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//销售订单主id
                        tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//销售订单子id
                    }
                //查询销售表判断有没有销售订单信息
                for (int i = 0; i < tb2.Rows.Count; i++)
                {
                    tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
                    tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//销售订单主id
                    tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//销售订单子id
                    //查找是否存在对应发货计划工单
                    var dt = oCN.RunProcReturn($"select * from Xs_SendGoodsPlanBillMain where HSeOrderInterID in({ds.Tables[0].Rows[0]["FID"].ToString()}) and  HSeOrderEntryID in({ds.Tables[0].Rows[0]["FENTRYID"].ToString()})", "Xs_SendGoodsPlanBillMain");
                    if (dt.Tables[0].Rows.Count > 0)