2 Commits

Author SHA1 Message Date
Shaobin d007db1b11 no message 5 months ago
Shaobin 22405fa96c 采购到货新增单据状态字段 5 months ago
  1. 3
      ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs
  2. 13
      ICSSoft.ToERP/SQL/GetPurchaseReturnInfo.cs

3
ICSSoft.ToERP/Entity/GetPurchaseReturnEntity.cs

@ -45,5 +45,8 @@ namespace ICSSoft.ERPWMS.Entity
//站点
public string WorkPoint { get; set; }
//单据状态
public string Status { get; set; }
}
}

13
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
@ -102,6 +102,7 @@ namespace ICSSoft.ERPWMS.SQL
{
foreach (DataRow dr in dt.Rows)
{
GetPurchaseReturnEntity entity = new GetPurchaseReturnEntity();
entity.ID = dr["ID"].ToString();
@ -125,12 +126,16 @@ namespace ICSSoft.ERPWMS.SQL
}
entity.WorkPoint = WorkPoint;
entityList.Add(entity);
if (!string.IsNullOrEmpty(dr["审核时间"].ToString()))
{
entity.Status = "2";//审核
entityList.Add(entity);
}
}
res.IsSuccess = true;
res.Message = "执行成功!";
res.Message = "执行成功,无已审核单据!";
res.data = entityList;
return res;
}

Loading…
Cancel
Save