修改了同步领料出库
This commit is contained in:
@@ -6542,6 +6542,15 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.Public.ErpService.BillQueryForPickingOutStock(System.Collections.Generic.List{System.String},System.Nullable{System.DateTime},System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
领料出库单
|
||||||
|
</summary>
|
||||||
|
<param name="sourceBillNos"></param>
|
||||||
|
<param name="beginTime"></param>
|
||||||
|
<param name="isCheck"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Services.Public.ErpService.BillQueryForTransferDirectOutStock(System.Collections.Generic.List{System.String},System.Nullable{System.DateTime},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Services.Public.ErpService.BillQueryForTransferDirectOutStock(System.Collections.Generic.List{System.String},System.Nullable{System.DateTime},System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
直接调拨出库
|
直接调拨出库
|
||||||
|
|||||||
@@ -450,10 +450,14 @@ namespace WMS.Web.Domain.Services
|
|||||||
//DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.OutStock);
|
//DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.OutStock);
|
||||||
if (begin == null)
|
if (begin == null)
|
||||||
begin = DateTime.Now.AddHours(-8);//默认拉去8小时以内的数据,ALTER BY YZH
|
begin = DateTime.Now.AddHours(-8);//默认拉去8小时以内的数据,ALTER BY YZH
|
||||||
// begin = DateTime.Now.AddDays(-200);//默认拉去8小时以内的数据,ALTER BY YZH
|
// begin = DateTime.Now.AddDays(-200);//默认拉去8小时以内的数据,ALTER BY YZH
|
||||||
//更新时间范围内所有
|
//更新时间范围内所有
|
||||||
//result = await BillQueryForTransferOutOutStock(false, null, begin);
|
//result = await BillQueryForTransferOutOutStock(false, null, begin);
|
||||||
//if (!result.IsSuccess) isRollback = true;
|
//if (!result.IsSuccess) isRollback = true;
|
||||||
|
|
||||||
|
result = await BillQueryForPickingOutStock(false, null, begin);
|
||||||
|
if (!result.IsSuccess) isRollback = true;
|
||||||
|
|
||||||
|
|
||||||
result = await BillQueryForSalOutStock(false, null, begin);
|
result = await BillQueryForSalOutStock(false, null, begin);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
@@ -466,8 +470,6 @@ namespace WMS.Web.Domain.Services
|
|||||||
result = await BillQueryForMisDeliveryOutStock(false, null, begin);
|
result = await BillQueryForMisDeliveryOutStock(false, null, begin);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
|
|
||||||
result = await BillQueryForPickingOutStock(false, null, begin);
|
|
||||||
if (!result.IsSuccess) isRollback = true;
|
|
||||||
|
|
||||||
|
|
||||||
//更新时间管理
|
//更新时间管理
|
||||||
@@ -538,7 +540,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
}
|
}
|
||||||
if (PickingOut_Nos.Count() > 0)
|
if (PickingOut_Nos.Count() > 0)
|
||||||
{
|
{
|
||||||
result = await BillQueryForPickingOutStock(false, MisDeliveryOut_Nos);
|
result = await BillQueryForPickingOutStock(false, PickingOut_Nos);
|
||||||
if (!result.IsSuccess) isRollback = true;
|
if (!result.IsSuccess) isRollback = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2103,7 +2103,13 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 领料出库单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sourceBillNos"></param>
|
||||||
|
/// <param name="beginTime"></param>
|
||||||
|
/// <param name="isCheck"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<ResultList<ErpDeliveryNoticeOutStockResultDto>> BillQueryForPickingOutStock(List<string> sourceBillNos = null, DateTime? beginTime = null, bool isCheck = true)
|
public async Task<ResultList<ErpDeliveryNoticeOutStockResultDto>> BillQueryForPickingOutStock(List<string> sourceBillNos = null, DateTime? beginTime = null, bool isCheck = true)
|
||||||
{
|
{
|
||||||
string result_json = "";
|
string result_json = "";
|
||||||
@@ -2130,7 +2136,7 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
//3.获取金蝶采购订单:拼接参数和条件
|
//3.获取金蝶采购订单:拼接参数和条件
|
||||||
var query = new ErpBillQueryDto(token_result.Data);
|
var query = new ErpBillQueryDto(token_result.Data);
|
||||||
var param = new ErpBillQueryParamDto(FormIdParam.PRD_PickMtrl.ToString());
|
var param = new ErpBillQueryParamDto(FormIdParam.PRD_PickMtrl.ToString());
|
||||||
param.FieldKeys = "FBillNo,FOrderNo,FDeliveryOrgID,FCustomerID,FMaterialID.FNumber,FStockID.FNumber,FStockLocID,FQty,F_ENTRYREMARKS,FCreateDate,FEntity_FEntryID,FDeliveryOrgID.FNumber";//FEntryID
|
param.FieldKeys = "FBillNo,FUnitID,FStockOrgId,FUnitID.FName,FMaterialID.FNumber,FStockID.FNumber,FStockLocID,FActualQty,FEntrtyMemo,FCreateDate,FEntity_FEntryID,FStockOrgId.FNumber";//FEntryID
|
||||||
param.Limit = 10000;
|
param.Limit = 10000;
|
||||||
//查询条件:备注其中的条件值以金蝶的值为准!!!
|
//查询条件:备注其中的条件值以金蝶的值为准!!!
|
||||||
//1.创建时间在两天前和当天时间之间
|
//1.创建时间在两天前和当天时间之间
|
||||||
@@ -2141,8 +2147,9 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
//6.物料 物料属性=费用或资产或服务的排除 不拉取
|
//6.物料 物料属性=费用或资产或服务的排除 不拉取
|
||||||
param.FilterString = " 1=1";
|
param.FilterString = " 1=1";
|
||||||
if (isCheck) param.FilterString += " and FDocumentStatus='C'";
|
if (isCheck) param.FilterString += " and FDocumentStatus='C'";
|
||||||
param.FilterString += " and FRemainOutQty>=0";
|
param.FilterString += " and FActualQty>=0";
|
||||||
param.FilterString += " and FMaterialID.FERPCLSID not in (10,11,6)";
|
param.FilterString += " and FMaterialID.FERPCLSID not in (10,11,6)";
|
||||||
|
param.FilterString += "and FBillType='f4f46eb78a7149b1b7e4de98586acb67'";
|
||||||
//param.FilterString += " and FStockID.FNumber in (" + stocks_codes + ")";
|
//param.FilterString += " and FStockID.FNumber in (" + stocks_codes + ")";
|
||||||
//param.FilterString += " and FDeliveryOrgID.FNumber in (" + stocks_orgs + ")";
|
//param.FilterString += " and FDeliveryOrgID.FNumber in (" + stocks_orgs + ")";
|
||||||
for (int i = 0; i < stocks.Count(); i++)
|
for (int i = 0; i < stocks.Count(); i++)
|
||||||
@@ -2150,10 +2157,10 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
param.FilterString += " and (";
|
param.FilterString += " and (";
|
||||||
param.FilterString += $"(FStockID.FNumber='{stocks[i].Code}' and FDeliveryOrgID.FNumber='{stocks[i].ErpOrgCode}')";
|
param.FilterString += $"(FStockID.FNumber='{stocks[i].Code}' and FStockOrgId.FNumber='{stocks[i].ErpOrgCode}')";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
param.FilterString += $" or (FStockID.FNumber='{stocks[i].Code}' and FDeliveryOrgID.FNumber='{stocks[i].ErpOrgCode}')";
|
param.FilterString += $" or (FStockID.FNumber='{stocks[i].Code}' and FStockOrgId.FNumber='{stocks[i].ErpOrgCode}')";
|
||||||
if (i == stocks.Count() - 1) param.FilterString += ")";
|
if (i == stocks.Count() - 1) param.FilterString += ")";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2180,16 +2187,16 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
{
|
{
|
||||||
var lis = new ErpDeliveryNoticeOutStockResultDto();
|
var lis = new ErpDeliveryNoticeOutStockResultDto();
|
||||||
lis.SourceBillNo = item[0];
|
lis.SourceBillNo = item[0];
|
||||||
lis.SaleBillNo = item[1];
|
//lis.SaleBillNo = item[1];
|
||||||
lis.DeliveryOrgId = Convert.ToInt32(item[2]);
|
lis.DeliveryOrgId = Convert.ToInt32(item[2]);
|
||||||
lis.ReceiptCustomerId = Convert.ToInt32(item[3]);
|
//lis.ReceiptCustomerId = Convert.ToInt32(item[3]);
|
||||||
lis.MaterialNumber = item[4];
|
lis.MaterialNumber = item[4];
|
||||||
lis.StockCode = item[5];
|
lis.StockCode = item[5];
|
||||||
lis.SubStockId = Convert.ToInt32(item[6]);
|
lis.SubStockId = Convert.ToInt32(item[6]);
|
||||||
lis.AccruedQty = Convert.ToDecimal(item[7]);
|
lis.AccruedQty = Convert.ToDecimal(item[7]);
|
||||||
lis.Remark = item[8];
|
lis.Remark = item[8];
|
||||||
lis.CreateTime = Convert.ToDateTime(item[9]);
|
lis.CreateTime = Convert.ToDateTime(item[9]);
|
||||||
lis.Type = (int)OutStockType.Sal;
|
lis.Type = (int)OutStockType.PickingOut;
|
||||||
lis.Erp_DetailId = Convert.ToInt32(item[10]);
|
lis.Erp_DetailId = Convert.ToInt32(item[10]);
|
||||||
lis.OrgCode = item[11];
|
lis.OrgCode = item[11];
|
||||||
erp_list.Add(lis);
|
erp_list.Add(lis);
|
||||||
|
|||||||
Reference in New Issue
Block a user