|
|
@@ -37,8 +37,6 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service |
|
|
|
/// <returns></returns> |
|
|
|
public async Task<PageUtil<List<MaterialDto>>> GetMaterialPageList(MaterialPageInputDto inputDto) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
int total = new RefAsync<int>(); |
|
|
|
var data = SqlSugarDb.Db.Queryable<BPA_Batching, BPA_BatchingType, BPA_BatchingUint>((a, b, c) => |
|
|
|
new JoinQueryInfos(JoinType.Left, a.Batching_Type == b.Id, |
|
|
@@ -264,27 +262,18 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (material != null && material.Id == materialData.Id) |
|
|
|
if (material != null && material.Id != materialData.Id) |
|
|
|
{ |
|
|
|
throw Oops.Oh(ErrorCodeEnum.Code10017); |
|
|
|
} |
|
|
|
|
|
|
|
materialData = new BPA_Batching() |
|
|
|
{ |
|
|
|
Id = Guid.NewGuid().ToString(), |
|
|
|
GroupId = CurrentUser.GroupId, |
|
|
|
Aittribute = 0, |
|
|
|
Batching_Name = materia.Name, |
|
|
|
Batching_Type = typeData.Id, |
|
|
|
Code = materia.Code, |
|
|
|
Price = 0, |
|
|
|
Specs = "", |
|
|
|
outstockUint = uintData.Id, |
|
|
|
Status = CommonStatus.ENABLE, |
|
|
|
StockUint = uintData.Id, |
|
|
|
TypeID = typeData.Id, |
|
|
|
IsDeleted = 0, |
|
|
|
}; |
|
|
|
|
|
|
|
materialData.Batching_Name = materia.Name; |
|
|
|
materialData.Code = materia.Code; |
|
|
|
materialData.Batching_Type = typeData.Id; |
|
|
|
materialData.StockUint = uintData.Id; |
|
|
|
materialData.outstockUint = uintData.Id; |
|
|
|
materialData.TypeID = typeData.Id; |
|
|
|
SqlSugarDb.Db.Updateable(materialData).ExecuteCommand(); |
|
|
|
} |
|
|
|
SqlSugarDb.Db.Ado.CommitTran(); |
|
|
|