Browse Source

更新版本,错误提示

master
学 赵 1 year ago
parent
commit
7acf2af23c
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  3. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  4. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  5. 182
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  6. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  7. 145
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -85,8 +85,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async override Task<IActionResult> GenerateInvoice(string invbillNum) public async override Task<IActionResult> GenerateInvoice(string invbillNum)
{ {
var main =await _bbacMng.GetMainAsync(invbillNum); var main =await _bbacMng.GetMainAsync(invbillNum);
if (main != null) if (main != null)
{ {
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _bbacMng.SetForwardState(main, SettleBillState.)) if (await _bbacMng.SetForwardState(main, SettleBillState.))
{ {
var entitys = await _bbacMng.GetDetalListAsync(invbillNum);//可结算 var entitys = await _bbacMng.GetDetalListAsync(invbillNum);//可结算
@ -105,6 +110,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL select new TEMP_CAN_SA_DETAIL
{ {
SettleBillNum = d.SettleBillNum, SettleBillNum = d.SettleBillNum,
Site = d.Site, Site = d.Site,
Version = d.Version, Version = d.Version,
@ -159,7 +165,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
else else
{ {
throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", invbillNum)); return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
} }
return new JsonResult(new { Code = 200, Message = "生成成功" }); return new JsonResult(new { Code = 200, Message = "生成成功" });
} }

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -95,7 +95,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
// }); // });
// } // }
//} //}
return ApplicationConsts.SuccessStr; // return ApplicationConsts.SuccessStr;
} }

13
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs

@ -11,6 +11,7 @@ using System.Linq;
using System.Security.Policy; using System.Security.Policy;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
@ -78,8 +79,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
var main =await _hbpoMng.GetMainAsync(invbillnum); var main =await _hbpoMng.GetMainAsync(invbillnum);
if (main != null) if (main != null)
{ {
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _hbpoMng.SetForwardState(main, SettleBillState.)) if (await _hbpoMng.SetForwardState(main, SettleBillState.))
{ {
var entitys = await _hbpoMng.GetDetalListAsync(invbillnum); var entitys = await _hbpoMng.GetDetalListAsync(invbillnum);
@ -151,6 +160,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
} }
} }
else
{
return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
}
return new JsonResult(new { Code = 200, Message = "生成成功" }); return new JsonResult(new { Code = 200, Message = "生成成功" });
} }

13
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
@ -68,8 +69,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async override Task<IActionResult> GenerateInvoice(string billnum) public async override Task<IActionResult> GenerateInvoice(string billnum)
{ {
var main = await _pubMng.GetMainAsync(billnum); var main = await _pubMng.GetMainAsync(billnum);
if (main != null) if (main != null)
{ {
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _pubMng.SetForwardState(main, SettleBillState.)) if (await _pubMng.SetForwardState(main, SettleBillState.))
{ {
var entitys = await _pubMng.GetDetalListAsync(billnum); var entitys = await _pubMng.GetDetalListAsync(billnum);
@ -99,6 +107,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL select new TEMP_CAN_SA_DETAIL
{ {
Id = d.Id,
SettleBillNum = d.SettleBillNum, SettleBillNum = d.SettleBillNum,
Site = d.Site, Site = d.Site,
Version = d.Version, Version = d.Version,
@ -133,6 +142,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
} }
} }
else
{
return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
}
return new JsonResult(new { Code = 200, Message = "生成成功" }); return new JsonResult(new { Code = 200, Message = "生成成功" });
} }

182
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -32,8 +32,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> hbpoRepository, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> hbpoRepository,
INormalEfCoreRepository<PUB_PD_DETAIL, Guid> pubRepository, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> pubRepository,
VmiAppService vimservice VmiAppService vimservice
) )
{ {
_hbpoRepository = hbpoRepository; _hbpoRepository = hbpoRepository;
@ -105,8 +103,8 @@ public class PendingDeductionService : ITransientDependency, IExportJob
LogType = Entities.BQ.Vmi.VmiLogType.Type200, LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty, ChangedQty = itm.Qty,
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC, //SubBillType = EnumDeliverSubBillType.小件BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件, //BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.PartCode, PartCode = itm.PartCode,
SettlementVinCode = itm.VinCode, SettlementVinCode = itm.VinCode,
PartCode2 = itm.PartCode2, PartCode2 = itm.PartCode2,
@ -130,45 +128,118 @@ public class PendingDeductionService : ITransientDependency, IExportJob
BillTime = itm.CreationTime, BillTime = itm.CreationTime,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
DeliverTime = itm.CreationTime, // DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200, LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty, ChangedQty = itm.Qty,
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU, PartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU, PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustomerPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.GroupNum, // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
}).ConfigureAwait(false); }).ConfigureAwait(false);
} }
} }
} }
else else
{ {
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList(); var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
switch (type) switch (type)
{ {
case "ZhiGongJianBBAC": case "ZhiGongJianBBAC":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break; break;
case "ZhiGongJianHBPO": case "ZhiGongJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,// 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break; break;
case "MaiDanJianBBAC": case "MaiDanJianBBAC":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
@ -176,18 +247,99 @@ public class PendingDeductionService : ITransientDependency, IExportJob
case "MaiDanJianHBPO": case "MaiDanJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break; break;
case "BeiJian": case "BeiJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break; break;
case "YinDuJian": case "YinDuJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -174,11 +174,6 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
return await _priceListManager.DeleteListAsync(ids); return await _priceListManager.DeleteListAsync(ids);
} }
#endregion #endregion
#region 原方法(废弃) #region 原方法(废弃)
// /// <summary> // /// <summary>
// /// 获取总数 // /// 获取总数

145
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs

@ -78,151 +78,6 @@ namespace Win.Sfs.SettleAccount
//if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
//}
//if (key.Equals(typeof(UnSettledExportService).FullName))
//{
// return implementationFactory.GetService<UnSettledExportService>();
//}
//if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
//{//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
//}
//if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
//{//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
//}
//if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
//}
//if (key.Equals(typeof(SecMatchBaseExportService).FullName))
//{
// return implementationFactory.GetService<SecMatchBaseExportService>();
//}
//if (key.Equals(typeof(SettleFisDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettleFisDiffExportService>();
//}
////大众看板结算与交货核对明细表(有条码)
//if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
//}
////大众备件结算核对明细表
//if (key.Equals(typeof(SettleSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePartExportService>();
//}
////大众备件未结明细
//if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleUnSparePartExportService>();
//}
////大众备件90天核对明细
//if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePart90ExportService>();
//}
//if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnSettleDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnSettleDiffExportService>();
//}
//if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
//{
// return implementationFactory.GetService<SettleDoorPanelExportService>();
//}
//if (key.Equals(typeof(UnsettledDetailReportService).FullName))
//{
// return implementationFactory.GetService<UnsettledDetailReportService>();
//}
//if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
//}
//if (key.Equals(typeof(SharePartUnSettledExport).FullName))
//{
// return implementationFactory.GetService<SharePartUnSettledExport>();
//}
////红旗、一汽轿车结算报表
//if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
//}
////红旗结算未结明细
//if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
//}
////红旗未结核对
//if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
//}
////红旗、轿车发运报表
//if (key.Equals(typeof(HQMShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQMShippingExportService>();
//}
//if (key.Equals(typeof(HQHShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQHShippingExportService>();
//}
//if (key.Equals(typeof(HQFShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQFShippingExportService>();
//}
//if (key.Equals(typeof(WmsOutputSumExportService).FullName))
//{
// return implementationFactory.GetService<WmsOutputSumExportService>();
//}
////大众看板未结输出
//if (key.Equals(typeof(KanBanUnSettledExport).FullName))
//{
// return implementationFactory.GetService<KanBanUnSettledExport>();
//}
//if (key.Equals(typeof(FisUpdateExportService).FullName))
//{
// return implementationFactory.GetService<FisUpdateExportService>();
//}
//if (key.Equals(typeof(FisOutputService).FullName))
//{
// return implementationFactory.GetService<FisOutputService>();
//}

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

@ -1078,7 +1078,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var query = from inv1 in invdetails var query = from inv1 in invdetails
join dto1 in dtos on join dto1 in dtos on
new { inv1.LU, inv1.PN } equals new { dto1.LU, dto1.PN } new { inv1.LU, inv1.PN,inv1.Id } equals new { dto1.LU, dto1.PN, dto1.Id }
select new select new
{ {
PartCode = inv1.PartCode, PartCode = inv1.PartCode,

Loading…
Cancel
Save