|
@@ -273,7 +273,7 @@ namespace SMP.Service.Compute
|
|
|
throw new Exception($"必须传入expense.Id");
|
|
|
if (expense.VersionDate == null)
|
|
|
throw new Exception("版本日期[VersionDate]不可为空");
|
|
|
- string existsSql = "select * from Compute_ExpenseVersion(nolock) where ExpenseId=@ExpenseId and VersionDate=@VersionDate and BindBillId=@BindBillId";
|
|
|
+ string existsSql = "select * from Compute_ExpenseVersion(nolock) where ExpenseId=@ExpenseId and VersionDate=@VersionDate and BindBillId=@BindBillId and IsDelete=1";
|
|
|
if (expense.BindBillId == 0)
|
|
|
{
|
|
|
//如果绑定过提单Id的,我们不做日期版本限制
|
|
@@ -371,9 +371,6 @@ namespace SMP.Service.Compute
|
|
|
|
|
|
public async Task InsertComputeExpense(Compute_Expense expense)
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if (expense == null)
|
|
|
throw new Exception($"必须传入expense");
|
|
|
|
|
@@ -585,7 +582,7 @@ namespace SMP.Service.Compute
|
|
|
throw new Exception("未传入需要变更的版本");
|
|
|
|
|
|
|
|
|
- string existsSql = "select * from Compute_ExpenseVersion(nolock) where ExpenseId=@ExpenseId and VersionDate=@VersionDate and Id<>@Id And BindBillId = @BindBillId";
|
|
|
+ string existsSql = "select * from Compute_ExpenseVersion(nolock) where ExpenseId=@ExpenseId and VersionDate=@VersionDate and Id<>@Id And BindBillId = @BindBillId and IsDelete=0";
|
|
|
int countQty = await versionRepository.ExecuteScalarAsync<int>(existsSql,
|
|
|
new
|
|
|
{
|