mahao
1 year ago
30 changed files with 6210 additions and 151 deletions
@ -1,3 +1,4 @@ |
|||||
files/ |
files/ |
||||
btsecsummary/ |
btsecsummary/ |
||||
secsummary/ |
secsummary/ |
||||
|
influxdb/data/** |
Binary file not shown.
@ -0,0 +1,6 @@ |
|||||
|
[meta] |
||||
|
dir = "./data/meta" |
||||
|
|
||||
|
[data] |
||||
|
dir = "./data/data" |
||||
|
wal-dir = "./data/wal" |
@ -0,0 +1,11 @@ |
|||||
|
@echo off |
||||
|
|
||||
|
tasklist|find /i "influxd.exe" |
||||
|
|
||||
|
if %errorlevel% == 0 ( |
||||
|
¡¡¡¡exit |
||||
|
) |
||||
|
|
||||
|
%1 start mshta vbscript:createobject("wscript.shell").run("""%~0"" ::",0)(window.close)&&exit |
||||
|
|
||||
|
start /b ./influxd.exe -config ./influxdb.conf |
@ -0,0 +1,3 @@ |
|||||
|
@ECHO OFF |
||||
|
|
||||
|
taskkill /im influxd.exe /f /t |
@ -0,0 +1,125 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win.Sfs.SettleAccount; |
||||
|
|
||||
|
namespace SettleAccount.Domain.BQ; |
||||
|
|
||||
|
|
||||
|
[Display(Name = "BBAC不可结算导入明细")] |
||||
|
public class BBAC_ADJ_DETAIL:SA_NOT_BASE |
||||
|
{ |
||||
|
///// <summary>
|
||||
|
///// 对应字段(Material+ExternalCalNumber)
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "LU+生产码")]
|
||||
|
//public string KeyCode { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 期间
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "期间")]
|
||||
|
//public int Version { get; set; }
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 结算单号
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "结算单号")]
|
||||
|
//public string SettleBillNum { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段Material
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "零件号")]
|
||||
|
//public string LU { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段ExternalCalNumber
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "生产码")]
|
||||
|
//public string PN { get; set; } = null!;
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 选择工厂导入
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "工厂地点")] |
||||
|
public string Site { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段Quantity
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算数量")]
|
||||
|
//public decimal Qty { get; set; }
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 匹配价格表对应区间对应地点带出
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "单价")]
|
||||
|
//public decimal Price { get; set; }
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ExternalCallNumber包含(R0)为买单件 1为JIS 2.为买单件
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "业务类别")] |
||||
|
public EnumBusinessType BusinessType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段MovementType,996正常,997为退货
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "是否退货")] |
||||
|
public string IsReturn { get; set; } = null!; |
||||
|
|
||||
|
//[Display(Name = "发票分组号")]
|
||||
|
//public string InvGroupNum { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段PostingDate
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "结算日期(收货日期)")]
|
||||
|
//public DateTime SettleDate { get; set; }
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段Reference
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算分组")]
|
||||
|
//public string GroupNum { get; set; } = null!;
|
||||
|
|
||||
|
[Display(Name = "合同号")] |
||||
|
public string ContractDocID { get; set; } |
||||
|
[Display(Name = "作废发票号")] |
||||
|
public string OldInvBillNum { get; set; } |
||||
|
|
||||
|
[Display(Name = "发票号")] |
||||
|
public string InvBillNum { get; set; } |
||||
|
|
||||
|
public BBAC_ADJ_DETAIL() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public BBAC_ADJ_DETAIL(Guid guid, string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, EnumBusinessType category, string isReturn, string invGroupNum, DateTime settleDate, string groupNum,string contractDocID, string oldinv, string inv) |
||||
|
{ |
||||
|
Id = guid; |
||||
|
KeyCode = keyCode; |
||||
|
Version = version; |
||||
|
SettleBillNum = settleBillNum; |
||||
|
LU = lU; |
||||
|
PN = pN; |
||||
|
Site = site; |
||||
|
Qty = qty; |
||||
|
Price = price; |
||||
|
BusinessType = category; |
||||
|
IsReturn = isReturn; |
||||
|
InvGroupNum = invGroupNum; |
||||
|
SettleDate = settleDate; |
||||
|
GroupNum = groupNum; |
||||
|
ContractDocID = contractDocID; |
||||
|
|
||||
|
|
||||
|
OldInvBillNum = oldinv; |
||||
|
|
||||
|
|
||||
|
InvBillNum =inv; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,133 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win.Sfs.SettleAccount; |
||||
|
|
||||
|
namespace SettleAccount.Domain.BQ; |
||||
|
//
|
||||
|
//[Display(Name = "HBPO不可结算导入")]
|
||||
|
//public class HBPO_NOT_SA: BaseEntity
|
||||
|
//{
|
||||
|
// [Display(Name = "期间")]
|
||||
|
// public int Version { get; set; }
|
||||
|
|
||||
|
// [Display(Name = "结算单据")]
|
||||
|
// [OneToMany<HBPO_NOT_SA_DETAIL>]
|
||||
|
// public string BillNum { get; set; } = null!;
|
||||
|
|
||||
|
// [Display(Name = "出库单号")]
|
||||
|
// public string DNBillNum { get; set; } = null!;
|
||||
|
|
||||
|
// /// <summary>
|
||||
|
// /// 1、新建 2、已有出库3、已有扣减寄售库
|
||||
|
// /// </summary>
|
||||
|
// [Display(Name = "状态")]
|
||||
|
// public string State { get; set; } = null!;
|
||||
|
|
||||
|
// /// <summary>
|
||||
|
// /// 明细记录行数
|
||||
|
// /// </summary>
|
||||
|
// [Display(Name = "明细记录行数")]
|
||||
|
// public string RecordCount { get; set; } = null!;
|
||||
|
//}
|
||||
|
[Display(Name = "HBPO不可结算导入明细")] |
||||
|
public class HBPO_ADJ_DETAIL : SA_NOT_BASE |
||||
|
{ |
||||
|
///// <summary>
|
||||
|
///// 对应字段(PartNumber+ProductioNumber)
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "LU+生产码")]
|
||||
|
//public string KeyCode { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 期间
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "期间")]
|
||||
|
//public int Version { get; set; }
|
||||
|
|
||||
|
//[Display(Name = "结算单号")]
|
||||
|
//public string SettleBillNum { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段PartNumber
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "零件号")]
|
||||
|
//public string LU { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段productionlumber
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "生产码")]
|
||||
|
//public string PN { get; set; } = null!;
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段filename 区分 cn1、cn5
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "工厂地点")] |
||||
|
public string Site { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段Qty
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算数量")]
|
||||
|
//public decimal Qty { get; set; }
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 匹配价格表对应区间带出
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "单价")]
|
||||
|
//public decimal Price { get; set; }
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段ReceiveDate
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算日期(收货日期)")]
|
||||
|
//public DateTime SettleDate { get; set; }
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段DeliveryNode
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "结算分组")]
|
||||
|
//public string GroupNum { get; set; } = null!;
|
||||
|
|
||||
|
//[Display(Name = "发票分组号")]
|
||||
|
//public string InvGroupNum { get; set; } = null!;
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 业务类型
|
||||
|
/// </summary>
|
||||
|
public EnumBusinessType BusinessType { get; set; } |
||||
|
|
||||
|
|
||||
|
[Display(Name = "作废发票号")] |
||||
|
public string OldInvBillNum { get; set; } |
||||
|
|
||||
|
[Display(Name = "发票号")] |
||||
|
public string InvBillNum { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public HBPO_ADJ_DETAIL(Guid guid ,string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum, EnumBusinessType businessType, string oldinv, string inv) |
||||
|
{ |
||||
|
Id = guid; |
||||
|
KeyCode = keyCode; |
||||
|
Version = version; |
||||
|
SettleBillNum = settleBillNum; |
||||
|
LU = lU; |
||||
|
PN = pN; |
||||
|
Site = site; |
||||
|
Qty = qty; |
||||
|
Price = price; |
||||
|
SettleDate = settleDate; |
||||
|
GroupNum = groupNum; |
||||
|
InvGroupNum = invGroupNum; |
||||
|
BusinessType = businessType; |
||||
|
OldInvBillNum = oldinv; |
||||
|
InvBillNum = inv; |
||||
|
} |
||||
|
|
||||
|
public HBPO_ADJ_DETAIL() |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Services; |
||||
|
using Volo.Abp; |
||||
|
using Win.Sfs.Shared.RepositoryBase; |
||||
|
using Win.Sfs.SettleAccount.Bases; |
||||
|
using EFCore.BulkExtensions; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 不能結算管理
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="TEntity"></typeparam>
|
||||
|
/// <typeparam name="TEntityDetail"></typeparam>
|
||||
|
/// <typeparam name="TNOTDetail"></typeparam>
|
||||
|
public class BBAC_NOT_SA_MNG : DomainService |
||||
|
|
||||
|
{ |
||||
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA, Guid> _repository; |
||||
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository; |
||||
|
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository; |
||||
|
|
||||
|
public BBAC_NOT_SA_MNG() |
||||
|
{ |
||||
|
} |
||||
|
public BBAC_NOT_SA_MNG |
||||
|
( |
||||
|
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository, |
||||
|
INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> detailRepository, |
||||
|
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_detailRepository = detailRepository; |
||||
|
_notRepository = notRepository; |
||||
|
} |
||||
|
public virtual async Task<bool> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list) |
||||
|
{ |
||||
|
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N"); |
||||
|
var _entity = new BBAC_CAN_SA(); |
||||
|
_entity.BillNum = billNumber; |
||||
|
_entity.InvGroupNum = billNumber; |
||||
|
_entity.Version = DateTime.Now.Year + DateTime.Now.Month; |
||||
|
_entity.State = SettleBillState.未结状态; |
||||
|
_entity.SettleBillNum = string.Empty; |
||||
|
_entity.BusinessType = EnumBusinessType.BBAC; |
||||
|
var _entityList = new List<BBAC_CAN_SA_DETAIL>(); |
||||
|
foreach (var itm in p_list) |
||||
|
{ |
||||
|
var _detailEntity = new BBAC_CAN_SA_DETAIL(); |
||||
|
{ |
||||
|
_detailEntity.SettleBillNum = itm.SettleBillNum; |
||||
|
_detailEntity.BillNum = billNumber; |
||||
|
_detailEntity.InvGroupNum = billNumber; |
||||
|
_detailEntity.LU = itm.LU; |
||||
|
_detailEntity.PN = itm.PN; |
||||
|
_detailEntity.GroupNum = itm.GroupNum; |
||||
|
_detailEntity.KeyCode = itm.KeyCode; |
||||
|
_detailEntity.Price = itm.Price; |
||||
|
_detailEntity.Version = itm.Version; |
||||
|
}; |
||||
|
_entityList.Add(_detailEntity); |
||||
|
} |
||||
|
await _repository.DbContext.BulkDeleteAsync(p_list); |
||||
|
await _repository.DbContext.BulkInsertAsync(new List<BBAC_CAN_SA>() { _entity }); |
||||
|
await _repository.DbContext.BulkInsertAsync(_entityList); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Services; |
||||
|
using Volo.Abp; |
||||
|
using Win.Sfs.Shared.RepositoryBase; |
||||
|
using Win.Sfs.SettleAccount.Bases; |
||||
|
using EFCore.BulkExtensions; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 不能結算管理
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="TEntity"></typeparam>
|
||||
|
/// <typeparam name="TEntityDetail"></typeparam>
|
||||
|
/// <typeparam name="TNOTDetail"></typeparam>
|
||||
|
public class HBPO_NOT_SA_MNG : DomainService |
||||
|
//where TEntity : SA_CAN_BASE_MAIN, new()
|
||||
|
//where TEntityDetail : SA_CAN_BASE, new()
|
||||
|
//where TNOTDetail : SA_NOT_BASE
|
||||
|
{ |
||||
|
private readonly INormalEfCoreRepository<HBPO_CAN_SA, Guid> _repository; |
||||
|
private readonly INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> _detailRepository; |
||||
|
private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository; |
||||
|
|
||||
|
public HBPO_NOT_SA_MNG() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public HBPO_NOT_SA_MNG |
||||
|
( |
||||
|
INormalEfCoreRepository<HBPO_CAN_SA, Guid> repository, |
||||
|
INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> detailRepository, |
||||
|
INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> notRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_detailRepository = detailRepository; |
||||
|
_notRepository = notRepository; |
||||
|
} |
||||
|
public virtual async Task<bool> GenerateSettlementOrder(List<HBPO_NOT_SA_DETAIL> p_list) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N"); |
||||
|
var _entity = new HBPO_CAN_SA(); |
||||
|
_entity.BillNum = billNumber; |
||||
|
_entity.InvGroupNum = billNumber; |
||||
|
_entity.Version = DateTime.Now.Year + DateTime.Now.Month; |
||||
|
_entity.State = SettleBillState.未结状态; |
||||
|
_entity.SettleBillNum = string.Empty; |
||||
|
_entity.BusinessType = p_list.FirstOrDefault().BusinessType; |
||||
|
var _entityList = new List<HBPO_CAN_SA_DETAIL>(); |
||||
|
foreach (var itm in p_list) |
||||
|
{ |
||||
|
var _detailEntity = new HBPO_CAN_SA_DETAIL( |
||||
|
GuidGenerator.Create(), |
||||
|
settleBillNum: itm.SettleBillNum, |
||||
|
billNum: billNumber, |
||||
|
invGroupNum: billNumber, |
||||
|
lU: itm.LU, |
||||
|
pN: itm.PN, |
||||
|
groupNum: itm.GroupNum, |
||||
|
keyCode: itm.KeyCode, |
||||
|
price: itm.Price, |
||||
|
version: itm.Version, |
||||
|
businessType: itm.BusinessType, |
||||
|
qty: itm.Qty, |
||||
|
settleDate: itm.SettleDate, |
||||
|
site: itm.Site |
||||
|
); |
||||
|
_entityList.Add(_detailEntity); |
||||
|
} |
||||
|
await _notRepository.DbContext.BulkDeleteAsync(p_list); |
||||
|
await _repository.DbContext.BulkInsertAsync(new List<HBPO_CAN_SA>() { _entity }); |
||||
|
await _repository.DbContext.BulkInsertAsync(_entityList); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Domain.Services; |
||||
|
using Volo.Abp; |
||||
|
using Win.Sfs.Shared.RepositoryBase; |
||||
|
using Win.Sfs.SettleAccount.Bases; |
||||
|
using EFCore.BulkExtensions; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 不能結算管理
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="TEntity"></typeparam>
|
||||
|
/// <typeparam name="TEntityDetail"></typeparam>
|
||||
|
/// <typeparam name="TNOTDetail"></typeparam>
|
||||
|
public class PUB_NOT_SA_MNG : DomainService |
||||
|
//where TEntity : SA_CAN_BASE_MAIN, new()
|
||||
|
//where TEntityDetail : SA_CAN_BASE, new()
|
||||
|
//where TNOTDetail : SA_NOT_BASE
|
||||
|
{ |
||||
|
private readonly INormalEfCoreRepository<PUB_CAN_SA, Guid> _repository; |
||||
|
private readonly INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> _detailRepository; |
||||
|
private readonly INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> _notRepository; |
||||
|
|
||||
|
public PUB_NOT_SA_MNG() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public PUB_NOT_SA_MNG |
||||
|
( |
||||
|
INormalEfCoreRepository<PUB_CAN_SA, Guid> repository, |
||||
|
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> detailRepository, |
||||
|
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> notRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_detailRepository = detailRepository; |
||||
|
_notRepository = notRepository; |
||||
|
} |
||||
|
public virtual async Task<bool> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list) |
||||
|
{ |
||||
|
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N"); |
||||
|
var _entity = new PUB_CAN_SA(); |
||||
|
_entity.BillNum = billNumber; |
||||
|
_entity.InvGroupNum = billNumber; |
||||
|
_entity.Version = DateTime.Now.Year + DateTime.Now.Month; |
||||
|
_entity.State = SettleBillState.未结状态; |
||||
|
_entity.SettleBillNum = string.Empty; |
||||
|
var _entityList = new List<PUB_CAN_SA_DETAIL>(); |
||||
|
foreach (var itm in p_list) |
||||
|
{ |
||||
|
var _detailEntity = new PUB_CAN_SA_DETAIL(); |
||||
|
{ |
||||
|
_detailEntity.SettleBillNum = itm.SettleBillNum; |
||||
|
_detailEntity.BillNum = billNumber; |
||||
|
_detailEntity.InvGroupNum = billNumber; |
||||
|
_detailEntity.LU = itm.LU; |
||||
|
_detailEntity.PN = itm.PN; |
||||
|
_detailEntity.GroupNum = itm.GroupNum; |
||||
|
_detailEntity.KeyCode = itm.KeyCode; |
||||
|
_detailEntity.Price = itm.Price; |
||||
|
_detailEntity.Version = itm.Version; |
||||
|
}; |
||||
|
_entityList.Add(_detailEntity); |
||||
|
} |
||||
|
await _notRepository.DbContext.BulkDeleteAsync(p_list); |
||||
|
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity }); |
||||
|
await _repository.DbContext.BulkInsertAsync(_entityList); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,98 @@ |
|||||
|
using SettleAccount.Bases; |
||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Win.Sfs.SettleAccount; |
||||
|
|
||||
|
namespace SettleAccount.Domain.BQ; |
||||
|
|
||||
|
[Display(Name = "PUB不可结算导入明细")] |
||||
|
public class PUB_ADJ_DETAIL : SA_NOT_BASE |
||||
|
{ |
||||
|
//[Display(Name = "LU+生产码")]
|
||||
|
//public string KeyCode { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 期间
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "期间")]
|
||||
|
//public int Version { get; set; }
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 结算单号
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "结算单号")]
|
||||
|
//public string SettleBillNum { get; set; } = null!;
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段Material
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "零件号")]
|
||||
|
//public string LU { get; set; } = null!;
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 对应字段ExternalCalNumber
|
||||
|
///// </summary>
|
||||
|
//[Display(Name = "生产码")]
|
||||
|
//public string PN { get; set; } = null!;
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 选择工厂导入
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "工厂地点")] |
||||
|
public string Site { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 对应字段Quantity
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算数量")]
|
||||
|
//public decimal Qty { get; set; }
|
||||
|
|
||||
|
[Display(Name = "扩展1")] |
||||
|
public string Extend1 { get; set; } = null!; |
||||
|
|
||||
|
|
||||
|
//[Display(Name = "单价")]
|
||||
|
//public decimal Price { get; set; }
|
||||
|
//[Display(Name = "发票分组号")]
|
||||
|
//public string InvGroupNum { get; set; } = null!;
|
||||
|
/// <summary>
|
||||
|
/// 对应字段PostingDate
|
||||
|
/// </summary>
|
||||
|
//[Display(Name = "结算日期(收货日期)")]
|
||||
|
//public DateTime SettleDate { get; set; }
|
||||
|
[Display(Name = "业务分类")] |
||||
|
public EnumBusinessType BusinessType { get; set; } |
||||
|
//[Display(Name = "结算分组")]
|
||||
|
//public string GroupNum { get; set; } = null!;
|
||||
|
[Display(Name = "作废发票号")] |
||||
|
public string OldInvBillNum { get; set; } |
||||
|
|
||||
|
[Display(Name = "发票号")] |
||||
|
public string InvBillNum { get; set; } |
||||
|
|
||||
|
|
||||
|
public PUB_ADJ_DETAIL(string keyCode, int version, string settleBillNum, string lU, string pN, |
||||
|
string site, decimal qty, string extend1, decimal price, string invGroupNum, DateTime settleDate, |
||||
|
EnumBusinessType businessType, string groupNum,string oldinv,string inv) |
||||
|
{ |
||||
|
KeyCode = keyCode; |
||||
|
Version = version; |
||||
|
SettleBillNum = settleBillNum; |
||||
|
LU = lU; |
||||
|
PN = pN; |
||||
|
Site = site; |
||||
|
Qty = qty; |
||||
|
Extend1 = extend1; |
||||
|
Price = price; |
||||
|
InvGroupNum = invGroupNum; |
||||
|
SettleDate = settleDate; |
||||
|
BusinessType = businessType; |
||||
|
GroupNum = groupNum; |
||||
|
OldInvBillNum= oldinv; |
||||
|
InvBillNum = inv; |
||||
|
} |
||||
|
|
||||
|
public PUB_ADJ_DETAIL() |
||||
|
{ |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,130 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202307260001 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "BusinessType", |
||||
|
table: "Set_BBAC_CAN_SA", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Set_BBAC_ADJ_DETAIL", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
BusinessType = table.Column<int>(type: "int", nullable: false), |
||||
|
IsReturn = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
ContractDocID = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
OldInvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
InvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
Version = table.Column<int>(type: "int", nullable: false), |
||||
|
SettleBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
SettleDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
InvGroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
LU = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
PN = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
KeyCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
GroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Set_BBAC_ADJ_DETAIL", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Set_HBPO_ADJ_DETAIL", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
BusinessType = table.Column<int>(type: "int", nullable: false), |
||||
|
OldInvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
InvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
Version = table.Column<int>(type: "int", nullable: false), |
||||
|
SettleBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
SettleDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
InvGroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
LU = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
PN = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
KeyCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
GroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Set_HBPO_ADJ_DETAIL", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Set_PUB_ADJ_DETAIL", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
Extend1 = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
BusinessType = table.Column<int>(type: "int", nullable: false), |
||||
|
OldInvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
InvBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
Version = table.Column<int>(type: "int", nullable: false), |
||||
|
SettleBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
SettleDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
InvGroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
LU = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
PN = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
KeyCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
||||
|
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
||||
|
GroupNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Set_PUB_ADJ_DETAIL", x => x.Id); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Set_BBAC_ADJ_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Set_HBPO_ADJ_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Set_PUB_ADJ_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BusinessType", |
||||
|
table: "Set_BBAC_CAN_SA"); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue