|
|
|
@ -247,6 +247,10 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
item.Quantity = order.KGS.GetValueOrDefault();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "Bill": //单票
|
|
|
|
|
item.Quantity = 1;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "P": //单票
|
|
|
|
|
item.Quantity = 1;
|
|
|
|
|
break;
|
|
|
|
@ -956,38 +960,33 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
FeeType feeType = default;
|
|
|
|
|
//变更状态为提交审核
|
|
|
|
|
if (taskType == TaskBaseTypeEnum.BILL_RECV_AUDIT)
|
|
|
|
|
{
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.RecvSubmitted;
|
|
|
|
|
entity.ARFeeStatus = BillFeeStatus.AuditSubmitted;
|
|
|
|
|
feeType = FeeType.Receivable;
|
|
|
|
|
|
|
|
|
|
entity.APFeeStatus = BillFeeStatus.AuditSubmitted;
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.BillAuditStatus,
|
|
|
|
|
x.ARFeeStatus
|
|
|
|
|
x.ARFeeStatus,
|
|
|
|
|
x.APFeeStatus
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
//修改关联费用状态为提交审核
|
|
|
|
|
await TenantDb.Updateable<FeeRecord>().Where(x => x.BusinessId == bid && x.BusinessType == type &&
|
|
|
|
|
(x.FeeStatus == FeeStatus.Entering || x.FeeStatus == FeeStatus.Withdraw || x.FeeStatus == FeeStatus.RejectSubmission))
|
|
|
|
|
.SetColumns(x => x.FeeStatus == FeeStatus.AuditSubmitted).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
else if (taskType == TaskBaseTypeEnum.BILL_PAY_AUDIT)
|
|
|
|
|
{
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.PaySubmitted;
|
|
|
|
|
entity.APFeeStatus = BillFeeStatus.AuditSubmitted;
|
|
|
|
|
feeType = FeeType.Payable;
|
|
|
|
|
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.BillAuditStatus,
|
|
|
|
|
x.APFeeStatus
|
|
|
|
|
x.BillAuditStatus
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//修改关联费用状态为提交审核
|
|
|
|
|
await TenantDb.Updateable<FeeRecord>().Where(x => x.BusinessId == bid && x.BusinessType == type && x.FeeType == feeType &&
|
|
|
|
|
(x.FeeStatus == FeeStatus.Entering || x.FeeStatus == FeeStatus.Withdraw || x.FeeStatus == FeeStatus.RejectSubmission))
|
|
|
|
|
.SetColumns(x => x.FeeStatus == FeeStatus.AuditSubmitted).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
await TenantDb.Ado.CommitTranAsync();
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
}
|
|
|
|
@ -1031,9 +1030,8 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
}
|
|
|
|
|
else if (taskType == TaskBaseTypeEnum.BILL_PAY_AUDIT)
|
|
|
|
|
{
|
|
|
|
|
if (entity.BillAuditStatus != BillAuditStatus.PaySubmitted)
|
|
|
|
|
return DataResult.Failed(string.Format(
|
|
|
|
|
MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BusinessStatusError)), entity.BillAuditStatus.GetDescription()));
|
|
|
|
|
return DataResult.Failed(string.Format(
|
|
|
|
|
MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BusinessStatusError)), entity.BillAuditStatus.GetDescription()));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -1064,35 +1062,15 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FeeType feeType = default;
|
|
|
|
|
//变更状态为待提交
|
|
|
|
|
if (taskType == TaskBaseTypeEnum.BILL_RECV_AUDIT)
|
|
|
|
|
{
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.Pending;
|
|
|
|
|
entity.ARFeeStatus = BillFeeStatus.Entering;
|
|
|
|
|
feeType = FeeType.Receivable;
|
|
|
|
|
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.BillAuditStatus,
|
|
|
|
|
x.ARFeeStatus
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
else if (taskType == TaskBaseTypeEnum.BILL_PAY_AUDIT)
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.Pending;
|
|
|
|
|
entity.ARFeeStatus = BillFeeStatus.Entering;
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.RecvPassed;
|
|
|
|
|
entity.APFeeStatus = BillFeeStatus.Entering;
|
|
|
|
|
feeType = FeeType.Payable;
|
|
|
|
|
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
|
{
|
|
|
|
|
x.BillAuditStatus,
|
|
|
|
|
x.APFeeStatus
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
x.BillAuditStatus,
|
|
|
|
|
x.ARFeeStatus
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
//修改关联费用状态为录入状态
|
|
|
|
|
await TenantDb.Updateable<FeeRecord>().Where(x => x.BusinessId == bid && x.BusinessType == type && x.FeeType == feeType && x.FeeStatus == FeeStatus.AuditSubmitted)
|
|
|
|
|
await TenantDb.Updateable<FeeRecord>().Where(x => x.BusinessId == bid && x.BusinessType == type && x.FeeStatus == FeeStatus.AuditSubmitted)
|
|
|
|
|
.SetColumns(x => x.FeeStatus == FeeStatus.Entering).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
await TenantDb.Ado.CommitTranAsync();
|
|
|
|
|