修改了上架

This commit is contained in:
2025-07-05 16:25:11 +08:00
parent 777a4c73dd
commit 51137c6ac6
2 changed files with 28 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Org.BouncyCastle.Asn1.Crmf;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
@@ -24,6 +25,9 @@ namespace WMS.Web.Core.Dto.InStock
/// </summary>
public string SubStockCode { get; set; }
public string instockType { get; set; }
/// <summary>
/// 明细
/// </summary>

View File

@@ -189,16 +189,31 @@ namespace WMS.Web.Domain.Services
bool isTransaction = false;
//1.添加入库单同步金蝶在save方法里面进行
// var save_result = await this.ShelfSave(instock, InstockType.Purchase, loginInfo, isTransaction);
var save_result = await this.ShelfSave(instock, InstockType.Purchase, loginInfo, isTransaction);
if (!save_result.IsSuccess) isRollback = true;
InstockType t = new InstockType();
if (instock.instockType == "ProduceStock")
{
t = InstockType.ProduceSotck;
}
else
{
t = InstockType.Purchase;
}
//实体
var entity = save_result.Data;
//提交事务
var isSuccess = _basicsRepositories.CommitTransaction(isRollback, _transaction);
if (!isSuccess)
return save_result;
var save_result = await this.ShelfSave(instock, t, loginInfo, isTransaction);
if (!save_result.IsSuccess) isRollback = true;
//实体
var entity = save_result.Data;
//提交事务
var isSuccess = _basicsRepositories.CommitTransaction(isRollback, _transaction);
if (!isSuccess)
return save_result;
//同步金蝶
if (entity.Type == InstockType.Purchase)