You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

69 lines
2.1 KiB

#region 引用命名
using ChangKeTec.Wms.Controller.Report;
using ChangKeTec.Wms.Models.Wms;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#endregion
namespace ChangKeTec.Wms.Controller.Bill
{
public static class QmStockController
{
public static DataTable GetInvBatchStock(int rownum,int di_part,string site)
{
// var StartRow = rownum;
// var snycCount = 100;
// string Sql = $"select * from ( select rownum myrn ,MMRSendMtlData.* from MMRSendMtlData where plant='U32' and stdPrice>0 and mtlType in('WS','YC','WG','WT') order by di_batchNO,mtlNO ) tt where tt.myrn >={StartRow + 1} and tt.myrn <={StartRow + snycCount} order by myrn ";
//var dt_Part = DBControllerByOracle.GetDataTable(Sql);
string Sql = "";
if (site == "W21")
{
Sql = $"select* from MMRSendMtlData";
Sql += $" Where plant='W21' and stdPrice>0 and di_batchNO>{di_part}";
}
else
{
Sql = $"select* from MMRSendMtlDataFW";
Sql += $" Where plant='U32' and stdPrice>0 and di_batchNO>{di_part}";
}
var dt_Part = DBControllerByOracle.GetDataTable(Sql);
return dt_Part;
}
public class MMRSENDMTLDATA
{
/// <summary>
/// 工厂
/// </summary>
public int DI_BATCHNO { get; set; }
public string MTLNO { get; set; }
public string plant { get; set; }
public string MTLNODES { get; set; }
public string MTLTYPE { get; set; }
public string MEASUREBASEUNIT { get; set; }
public string SpMtlStatus { get; set; }
public decimal stdPrice { get; set; }
public int loadQuantity { get; set; }
public decimal grossWeight { get; set; }
public decimal netWeight { get; set; }
public string sizes { get; set; }
public string MATBRAND { get; set; }
}
}
}