Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
f54cbe6d07
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  4. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  5. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  6. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  7. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  8. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  9. 83
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
  10. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  11. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  12. 54
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  13. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
  14. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  15. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs

@ -69,7 +69,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "是否退货")] //BBAC-JIS显示 其他没有这个字段 [ExporterHeader(DisplayName = "是否退货")] //BBAC-JIS显示 其他没有这个字段
public string IsReturn { get; set; } public string IsReturn { get; set; }
[ExporterHeader(DisplayName = "合同号")] [ExporterHeader(DisplayName = "SA号")]
public string ContractDocID { set; get; } public string ContractDocID { set; get; }
@ -132,8 +132,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "版本号")] [ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; } public int Version { get; set; }
[ExporterHeader(DisplayName = "合同号")] [ExporterHeader(DisplayName = "SA号")]
public int ContractDocID { set; get; } public string ContractDocID { set; get; }
} }
//public class BBAC_CAN_SA_EXP_DTO //public class BBAC_CAN_SA_EXP_DTO

7
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -59,6 +59,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "发票税后尾差")] [Display(Name = "发票税后尾差")]
public decimal TaxDiff { get; set; } public decimal TaxDiff { get; set; }
[Display(Name = "客户代码")] [Display(Name = "客户代码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
} }
@ -146,7 +147,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
//[ExporterHeader(DisplayName ="发票税后尾差")] //[ExporterHeader(DisplayName ="发票税后尾差")]
//public decimal TaxDiff { get; set; } //public decimal TaxDiff { get; set; }
[ExporterHeader(DisplayName = "客户码")] [ExporterHeader(DisplayName = "客户码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
} }
@ -179,7 +180,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal Tax { get; set; } public decimal Tax { get; set; }
[ImporterHeader(Name = "客户码", FixAllSpace = true)] [ImporterHeader(Name = "客户码", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
@ -298,7 +299,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
///扩展字段1 ///扩展字段1
/// </summary> /// </summary>
[Display(Name = "合同号")] [Display(Name = "SA号")]
public string Extend1 { get; set; } public string Extend1 { get; set; }
/// <summary> /// <summary>

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -325,14 +325,6 @@ public class ADJ_SERVICE : BASE_SERVICE
ls = inner.ToList(); ls = inner.ToList();
} }
return new JsonResult(new { Code = 200, data =ls }); ; return new JsonResult(new { Code = 200, data =ls }); ;
} }

22
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -127,18 +127,18 @@ namespace Win.Sfs.SettleAccount.Bases
); );
return _fileName; return _fileName;
} }
/// <summary> ///// <summary>
/// 生成发票 ///// 生成发票
/// </summary> ///// </summary>
/// <param name="input">主表查询条件</param> ///// <param name="input">主表查询条件</param>
/// <returns></returns> ///// <returns></returns>
[HttpPost] //[HttpPost]
//[Route("generateinvoice")] ////[Route("generateinvoice")]
public virtual async Task<IActionResult> GenerateInvoice([FromBody] string input) //public virtual async Task<IActionResult> GenerateInvoice([FromBody] string input)
{ //{
return new JsonResult(new { Code = 200, Message = "创建成功" }); ; // return new JsonResult(new { Code = 200, Message = "创建成功" }); ;
} //}
/// <summary> /// <summary>
/// 查询主表 /// 查询主表

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -79,6 +79,7 @@ namespace Win.Sfs.SettleAccount.Bases
_hbpoSecRepository=hbpoSecRepository; _hbpoSecRepository=hbpoSecRepository;
} }
/// <summary> /// <summary>
/// 查询明细 /// 查询明细
/// </summary> /// </summary>

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

@ -75,15 +75,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_priceRepository = priceRepository; _priceRepository = priceRepository;
} }
/// <summary> /// <summary>
/// 生成发票 /// 生成发票
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[UnitOfWork(false)] [UnitOfWork(false)]
public async override Task<IActionResult> GenerateInvoice([FromBody] string invbillNum) public async Task<IActionResult> GenerateInvoice([FromBody] string invbillNum)
{ {
var main =await _bbacMng.GetMainAsync(invbillNum); var main =await _bbacMng.GetMainAsync(invbillNum);

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

@ -21,6 +21,8 @@ using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Entities.TaskJobs; using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Volo.Abp;
using EFCore.BulkExtensions;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
@ -44,18 +46,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
_service = service; _service = service;
} }
[UnitOfWork(false)]
public override async Task<string> ApprovalPassed(List<string> p_list) public override async Task<string> ApprovalPassed(List<string> p_list)
{ {
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value =string.Join(",",p_list) }); customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value =string.Join(",",p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisBBAC.ToString() }); customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisBBAC.ToString() });
customConditionList.Add(new CustomCondition() { Name = "IsOut", Value ="out"}); customConditionList.Add(new CustomCondition() { Name = "IsOut", Value ="out"});
var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();
var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.));
if (lst.Count() > 0)
{
throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交");
}
foreach (var item in ls)
{
item.State = SettleBillState.;
}
await _repository.DbContext.BulkUpdateAsync(ls);
var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
} }
} }
} }

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

@ -74,11 +74,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[UnitOfWork(false)]
[HttpPost] [HttpPost]
[UnitOfWork(false)]
//[Route("generateinvoice")] //[Route("generateinvoice")]
public async override Task<IActionResult> GenerateInvoice([FromBody] string invbillnum) public async Task<IActionResult> GenerateInvoice([FromBody] string invbillnum)
{ {
var main =await _hbpoMng.GetMainAsync(invbillnum); var main =await _hbpoMng.GetMainAsync(invbillnum);
if (main != null) if (main != null)

83
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs

@ -1,8 +1,10 @@
using DocumentFormat.OpenXml.Bibliography; using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Charts; using DocumentFormat.OpenXml.Drawing.Charts;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -10,7 +12,9 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using TaskJob.EventArgs; using TaskJob.EventArgs;
using TaskJob.Services; using TaskJob.Services;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
@ -20,6 +24,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ; using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
@ -29,73 +34,37 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO, HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO> HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO>
{ {
public HBPO_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository) private readonly TaskJobService _service;
public HBPO_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository, TaskJobService service) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{ {
_service = service;
} }
//public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository) [UnitOfWork(false)]
//{
// //List<CustomCondition> customConditionList = new List<CustomCondition>();
// //customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
// //customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// //customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
// //customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty });
// //customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// //var _versionQuery = _versionRepository.Where(p => p.Version == version);
// //if (_versionQuery.Count() > 0)
// //{
// // _versionQuery.BatchDelete();
// //}
// //var _query = _repository.Where(p => p.Version == version);
// //if (_query.Count() > 0)
// //{
// // await _query.BatchDeleteAsync();
// //}
// //var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) =>
// //{
// //});
//}
public override async Task<string> ApprovalPassed(List<string> p_list) public override async Task<string> ApprovalPassed(List<string> p_list)
{ {
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
if (detailist != null && detailist.Count > 0) List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisHBPO.ToString() });
customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" });
var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();
var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.));
if (lst.Count() > 0)
{ {
foreach (var itm in detailist) throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交");
{
await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
AssembleData = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
DeliverSubBillType = EnumDeliverSubBillType.BBAC,
DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,
CustPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
});
}
} }
return ApplicationConsts.SuccessStr; foreach (var item in ls)
{
item.State = SettleBillState.;
}
await _repository.DbContext.BulkUpdateAsync(ls);
var _taskid = await _service.ExportEnqueueAsync("HBPO待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{
});
return _taskid;
} }

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -378,6 +378,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
inv.RealnvBillNum = newinv.RealnvBillNum; inv.RealnvBillNum = newinv.RealnvBillNum;
inv.RealAmt = newinv.RealAmt; inv.RealAmt = newinv.RealAmt;
inv.TaxDiff = inv.TaxAmt-newinv.RealAmt; inv.TaxDiff = inv.TaxAmt-newinv.RealAmt;
inv.ClientCode = newinv.ClientCode;
} }
foreach (var detail in invdetail) foreach (var detail in invdetail)
{ {

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

@ -10,6 +10,7 @@ using SettleAccount.Domain.BQ;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
@ -66,7 +67,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_pricebjRepository = pricebjRepository; _pricebjRepository = pricebjRepository;
} }
[HttpPost] [HttpPost]
public async override Task<IActionResult> GenerateInvoice( [FromBody] string billnum) [UnitOfWork(false)]
public async Task<IActionResult> GenerateInvoice( [FromBody] string billnum)
{ {
var main = await _pubMng.GetMainAsync(billnum); var main = await _pubMng.GetMainAsync(billnum);

54
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -1,12 +1,17 @@
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using TaskJob.EventArgs;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
@ -16,6 +21,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ; using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
@ -26,39 +32,35 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
PUB_PD_DETAIL, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO, PUB_PD_DETAIL, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO,
PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_DTO> PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_DTO>
{ {
public PUB_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository) private readonly TaskJobService _service;
public PUB_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> detailRepository, TaskJobService service) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{ {
_service=service;
} }
[UnitOfWork(false)]
public override async Task<string> ApprovalPassed(List<string> p_list) public override async Task<string> ApprovalPassed(List<string> p_list)
{ {
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
if (detailist != null && detailist.Count > 0) List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = "PUB" });
customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" });
var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();
var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.));
if (lst.Count() > 0)
{
throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交");
}
foreach (var item in ls)
{ {
foreach (var itm in detailist) item.State = SettleBillState.;
{
await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
AssembleData = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
DeliverSubBillType = EnumDeliverSubBillType.BBAC,
DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,
CustPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
});
}
} }
return ApplicationConsts.SuccessStr; await _repository.DbContext.BulkInsertAsync(ls);
var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{
});
return _taskid;
} }

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs

@ -109,7 +109,7 @@ public class BBAC_CAN_SA_DETAIL: SA_CAN_BASE
public bool IsReturn { get; set; } =false; public bool IsReturn { get; set; } =false;
[Display(Name="合同号")] [Display(Name="SA")]
public string ContractDocID { get; set; } public string ContractDocID { get; set; }

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1190,7 +1190,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
bussiessType: businessType, bussiessType: businessType,
amt: detail.Amt, amt: detail.Amt,
pRICE: detail.Price, pRICE: detail.Price,
extend1: string.Empty, extend1: detail.ContractDocID,
extend2: string.Empty, extend2: string.Empty,
beginDate: detail.BeginDate, beginDate: detail.BeginDate,
endDate: detail.EndDate, endDate: detail.EndDate,
@ -1394,7 +1394,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
bussiessType: businessType, bussiessType: businessType,
amt: detail.Amt, amt: detail.Amt,
pRICE: detail.Price, pRICE: detail.Price,
extend1: string.Empty, extend1: detail.ContactDocID,
extend2: string.Empty, extend2: string.Empty,
beginDate: detail.BeginDate, beginDate: detail.BeginDate,
endDate: detail.EndDate, endDate: detail.EndDate,

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

@ -30,7 +30,8 @@ namespace Win.Sfs.SettleAccount
= 5, = 5,
[Description("客户已收票")] [Description("客户已收票")]
= 4, = 4,
[Description("已提交扣减")]
= 6
} }
public enum InvoiceBillState public enum InvoiceBillState

Loading…
Cancel
Save