using ChangKeTec.Wms.Controller.Report;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CK.SCP.UniApi.Controller
{
class PriceController
{
public static DataTable GetInvBatchPrice(int rownum,string site)
{
//var StartRow = rownum;
//var snycCount = 100;
//string Sql = $"select * from ( select rownum myrn ,PURPriceDealMidTab.* from PURPriceDealMidTab where plant='W21' order by di_batchNO,mtlNO ) tt where tt.myrn >={StartRow + 1} and tt.myrn <={StartRow + snycCount} order by myrn ";
string Sql = "";
if (site == "W21")
{
Sql = $"select* from PURPriceDealMidTab";
Sql += $" Where di_batchNO>{rownum} and plant='W21'";
}
else
{
Sql = $"select* from PURPriceDealMidTabFW";
Sql += $" Where di_batchNO>{rownum} and plant='U32'";
}
var dt_Part = DBControllerByOracle.GetDataTable(Sql);
return dt_Part;
}
public class PURPriceDealMidTab
{
///
/// 操作类型
///
public string DI_OPERTYPE { get; set; }
///
/// 操作批次
///
///
public int DI_BATCHNO { get; set; }
public string vendorNO { get; set; }
///
/// 物料
///
public string MTLNO { get; set; }
///
/// 工厂
///
public string plant { get; set; }
public string purchasePrice { get; set; }
public string createdBy { get; set; }
public string created { get; set; }
public string ordUnit { get; set; }
public DateTime validityStartPeriod { get; set; }
public DateTime validityEndPeriod { get; set; }
}
}
}