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.
 
 
 
 
 

70 lines
2.1 KiB

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
{
/// <summary>
/// 操作类型
/// </summary>
public string DI_OPERTYPE { get; set; }
/// <summary>
/// 操作批次
/// </summary>
///
public int DI_BATCHNO { get; set; }
public string vendorNO { get; set; }
/// <summary>
/// 物料
/// </summary>
public string MTLNO { get; set; }
/// <summary>
/// 工厂
/// </summary>
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; }
}
}
}