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 { public static class PoBillNumcontroller { public static DataTable GetInvBatchStock(int di_d,string site) { //string Sql = $"select * from PURStockBill"; //Sql += $" Where ordType='CY06' and plant='W21' and di_batchNO>{di_d}"; //var dt_Part = DBControllerByOracle.GetDataTable(Sql); string Sql = $"select * from PURStockBill"; Sql += $" Where ordType='CY06' and plant='W21' and di_batchNO>{di_d}"; var dt_Part = DBControllerByOracle.GetDataTable(Sql); return dt_Part; } public class PURStockBill { /// /// 工厂 /// public int DI_BATCHNO { get; set; } public string purDocNO { get; set; } public string purDocItemNO { get; set; } /// /// 物料号 /// public string ordType { get; set; } public string docDate { get; set; } public string returnsItem { get; set; } public string sizecoL { get; set; } public string purDocItemCtg { get; set; } public string plant { get; set; } public string purOrg { get; set; } public string companyCode { get; set; } public string mtlNO { get; set; } public string shortText { get; set; } public decimal quantity { get; set; } public DateTime itemDeliveryDate { get; set; } public decimal price { get; set; } public string vendorNO { get; set; } public DateTime createdDate { get; set; } public string createdBy { get; set; } public string responsibleSalesperson { get; set; } public string purGrp { get; set; } public string phone { get; set; } public DateTime di_updatetime { get; set; } public string updatedBy { get; set; } public string baseUnitMeasure { get; set; } public string firsttelno { get; set; } public string proposerid { get; set; } public string CREATEDBY { get; set; } public string ctype { get; set; } /// /// 批次 /// } /// /// 获取一般材料订单 /// /// /// /// public static DataTable GetGeneralMaterialOrder() { string Sql = $"select * from PURStockBill"; Sql += $" Where ((ordType='CY02'AND APPROVALSTATUS = '4') OR (ordType='CY04' AND APPROVALSTATUS = '4') OR (ordType='CY05' AND APPROVALSTATUS = '4') OR ( ordType='CY08'AND APPROVALSTATUS = '4' ) OR (ordType='CY09' AND APPROVALSTATUS = '4') ) and plant='W21' and docDate > add_months(trunc(SYSDATE), -12)"; var dt_Part = DBControllerByOracle.GetDataTable(Sql); return dt_Part; } public class GeneralMaterialOrder { public int PURSTOCKBILLID { get; set; } public DateTime CREATEDDATE { get; set; } public decimal? NETVALUE { get; set; } public string PURGRP { get; set; } public string ORDTYPE { get; set; } public string MTLNO { get; set; } public DateTime? ITEMDELIVERYDATE { get; set; } public string PURDOCITEMNO { get; set; } public string CLIENT { get; set; } public string REMARK { get; set; } public string ORDPRICEUNIT { get; set; } public string VENDORDESC { get; set; } public string VENDORNO { get; set; } public decimal? PRICE { get; set; } public string PURDOCNO { get; set; } public decimal? QUANTITY { get; set; } public string DI_OPERTYPE { get; set; } public string PURORG { get; set; } public string PLANT { get; set; } public string PURCHASEREQNO { get; set; } public string ITEMNO { get; set; } public string BUYLISTSTRDES { get; set; } public DateTime? DOCDATE { get; set; } public string PURGRPDESC { get; set; } public string STORELOCATION { get; set; } public string PROPOSERDESC { get; set; } public string REMARK1 { get; set; } public string CREATEDBY { get; set; } public string PROMOTION { get; set; } public string MATBRAND { get; set; } public DateTime? DI_UPDATETIME { get; set; } public string PURORGDESC { get; set; } public int DI_BATCHNO { get; set; } public string VOLUMEWEIGHT { get; set; } public string CTYPE { get; set; } public DateTime? DINDATE { get; set; } public int? BATCHNO { get; set; } public string SHORTTEXT { get; set; } public string PLANTDES { get; set; } public string SIZECOL { get; set; } public string PHONE { get; set; } public string STORELOCATIONDES { get; set; } public string REQPHONE { get; set; } public string UNITDES { get; set; } public DateTime? DI_WRITETIME { get; set; } public string CREATEDBYDESC { get; set; } public string RESPONSIBLESALESPERSON { get; set; } public string COSTCENTERDES { get; set; } public string FAXNUM { get; set; } public string GLACCTNODES { get; set; } public string FAXNUMBER { get; set; } public string PRODUCTIONCATEGORY { get; set; } public string GLACCNUM { get; set; } public string FIRSTTELNO { get; set; } public string ADDRESSINFO { get; set; } public string ISSECURITY { get; set; } public string COSTCENTER { get; set; } public string ORDERNUM { get; set; } public string RETURNSITEM { get; set; } public string BASEUNITMEASURE { get; set; } public string PURDOCITEMCTG { get; set; } public string APPROVALSTATUS { get; set; } public string PMTKEYTERMS { get; set; } public string DESCRIPTION { get; set; } public string PURINFORECORD { get; set; } public string STAGEDESC { get; set; } public string CONFIRMFLAG { get; set; } public string CONFALSEREASON { get; set; } public string CONSUCCESSID { get; set; } public string ESTIMATEDPRICEINDIC { get; set; } public string PROPOSERID { get; set; } public int? PURDOCHEADERID { get; set; } public int PURDOCITEMID { get; set; } public string DISPLANTLOCATION { get; set; } public DateTime? PRICONFIDATE { get; set; } public string ACTDELIVLOCA { get; set; } public string STOADRESS { get; set; } public decimal? RECEIPTQUANTITY { get; set; } public string STATEDESC { get; set; } public string CLOSESTATE { get; set; } public string DI_STATUS { get; set; } public string EXTITEMNO { get; set; } public string EXTREQNO { get; set; } public string STAFFNO { get; set; } } } }