Browse Source

采购入库批量提交修改

master
yangtm 1 week ago
parent
commit
8709227c59
  1. 6
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs

6
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs

@ -390,10 +390,9 @@ namespace ICSSoft.DataProject
//{ //{
// throw new Exception(language.GetNameByCode("WMSAPIInfo202"));//单次提交单据数量卡控(只允许一张单据) // throw new Exception(language.GetNameByCode("WMSAPIInfo202"));//单次提交单据数量卡控(只允许一张单据)
//} //}
log.Info("采购上架传入SAP数据:" + JsonConvert.SerializeObject(dt));
log.Info("采购上架数据:" + JsonConvert.SerializeObject(dt));
for (int i = 0; i < dt.Rows.Count; i++) for (int i = 0; i < dt.Rows.Count; i++)
{ {
log.Info("采购上架传入SAP数据:" + JsonConvert.SerializeObject(dt.Rows));
string chksql = @"select SUM(Quantity) AS Quantity,SUM(RCVQuantity) AS RCVQuantity from ICSDeliveryNotice string chksql = @"select SUM(Quantity) AS Quantity,SUM(RCVQuantity) AS RCVQuantity from ICSDeliveryNotice
where DNCode='{0}' and WorkPoint='{1}' where DNCode='{0}' and WorkPoint='{1}'
GROUP BY DNCode,WorkPoint"; GROUP BY DNCode,WorkPoint";
@ -401,7 +400,7 @@ namespace ICSSoft.DataProject
DataTable chkdt = DBHelper.SQlReturnData(chksql, cmd); DataTable chkdt = DBHelper.SQlReturnData(chksql, cmd);
if (Convert.ToDecimal(chkdt.Rows[0]["Quantity"]) != Convert.ToDecimal(chkdt.Rows[0]["RCVQuantity"])) if (Convert.ToDecimal(chkdt.Rows[0]["Quantity"]) != Convert.ToDecimal(chkdt.Rows[0]["RCVQuantity"]))
{ {
return;
continue;
} }
sql = @"select A.DNCode, sql = @"select A.DNCode,
CASE WHEN SUM(Convert(decimal(18,6),A.SAPSequence)) IS NULL THEN SUM(A.RCVQuantity) CASE WHEN SUM(Convert(decimal(18,6),A.SAPSequence)) IS NULL THEN SUM(A.RCVQuantity)
@ -424,6 +423,7 @@ namespace ICSSoft.DataProject
Info.LGORT = Sapdt.Rows[0]["WHCode"].ToString(); ;//仓库 Info.LGORT = Sapdt.Rows[0]["WHCode"].ToString(); ;//仓库
Info.Z_GERNR = new SAPCallBackJYHGDVPN.ZWEBS_GERNR[0]; Info.Z_GERNR = new SAPCallBackJYHGDVPN.ZWEBS_GERNR[0];
log.Info("采购上架传入SAP数据:" + JsonConvert.SerializeObject(Info));
SAPCallBackJYHGDVPN.ZWMS_SK_WS_RUKUResponse result = new SAPCallBackJYHGDVPN.ZWMS_SK_WS_RUKUResponse(); SAPCallBackJYHGDVPN.ZWMS_SK_WS_RUKUResponse result = new SAPCallBackJYHGDVPN.ZWMS_SK_WS_RUKUResponse();
result = Client.CallZWMS_SK_WS_RUKU(Info); result = Client.CallZWMS_SK_WS_RUKU(Info);
if (result.Z_NULL == "N") if (result.Z_NULL == "N")

Loading…
Cancel
Save