From 22405fa96c12d95e13a2f6f5ff03d6c394cbf4ba Mon Sep 17 00:00:00 2001 From: Shaobin Date: Wed, 18 Dec 2024 11:03:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=88=B0=E8=B4=A7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8D=95=E6=8D=AE=E7=8A=B6=E6=80=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs | 3 +++ ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs b/ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs index 9611518..e2f461f 100644 --- a/ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs +++ b/ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs @@ -45,5 +45,8 @@ namespace ICSSoft.ERPWMS.Entity //站点 public string WorkPoint { get; set; } + + //单据状态 + public string Status { get; set; } } } diff --git a/ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs b/ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs index 7e15a3d..23691a6 100644 --- a/ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs +++ b/ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs @@ -38,7 +38,7 @@ namespace ICSSoft.ERPWMS.SQL string sql = @"select a.ID,a.cCode as '退货单号',b.ivouchrowno as '退货单行号',b.cInvCode as '物料编码',-b.iQuantity as '退货数量', d.cPOID as '采购订单',c.ivouchrowno as '采购订单行号',e.cPsn_Num as '操作人',isnull(isnull(isnull(a.cReviser,a.cchanger),a.cverifier),a.cMaker) as '操作人名称', - isnull(isnull(a.cModifyTime,a.caudittime),a.cMakeTime) as '操作时间' + isnull(isnull(a.cModifyTime,a.caudittime),a.cMakeTime) as '操作时间',a.caudittime '审核时间' from {0}.dbo.PU_ArrivalVouch a left join {0}.dbo.PU_ArrivalVouchs b on a.ID = b.ID left join {0}.dbo.PO_Podetails c on b.iPOsID = c.ID @@ -48,7 +48,7 @@ namespace ICSSoft.ERPWMS.SQL string sql2 = @"select a.ID,a.cCode as '退货单号',b.ivouchrowno as '退货单行号',b.cInvCode as '物料编码',-b.iQuantity as '退货数量', d.cCode as '采购订单',c.ivouchrowno as '采购订单行号',e.cPsn_Num as '操作人',isnull(isnull(isnull(a.cReviser,a.cchanger),a.cverifier),a.cMaker) as '操作人名称', - isnull(isnull(a.cModifyTime,a.caudittime),a.cMakeTime) as '操作时间' + isnull(isnull(a.cModifyTime,a.caudittime),a.cMakeTime) as '操作时间',a.caudittime '审核时间' from {0}.dbo.PU_ArrivalVouch a left join {0}.dbo.PU_ArrivalVouchs b on a.ID = b.ID left join {0}.dbo.OM_MODetails c on b.iPOsID = c.MODetailsID @@ -125,6 +125,15 @@ namespace ICSSoft.ERPWMS.SQL } entity.WorkPoint = WorkPoint; + if (string.IsNullOrEmpty(dr["审核时间"].ToString())) + { + entity.Status = "1";//开立 + } + else + { + entity.Status = "2";//审核 + } + entityList.Add(entity); }