Parcourir la source

提交

groupmealmanage
gwbvipvip il y a 8 mois
Parent
révision
666e1fa9ce
7 fichiers modifiés avec 13 ajouts et 22 suppressions
  1. BIN
     
  2. BIN
     
  3. +8
    -19
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs
  4. +1
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs
  5. +1
    -1
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs
  6. +2
    -1
      BPA.SAAS.Manage.Core/DbContext.cs
  7. +1
    -0
      BPA.SAAS.Manage.Core/SqlSugarDb.cs


+ 8
- 19
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs Voir le fichier

@@ -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();


+ 1
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs Voir le fichier

@@ -143,7 +143,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.S
productKey = b.Key,
productName = b.Name,
productVersion = c.Vesion,
type = 2
type = 2,

})
.ToListAsync();


+ 1
- 1
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs Voir le fichier

@@ -96,7 +96,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
GoodsTypeName = b.IsDeleted == 0 ? b.Name : "",
Descritption = a.Descritption,
IsDeleted = a.IsDeleted,
a.GroupId,
// CreateAt = a.CreateAt,
GoodsUintId = a.GoodsUintId,
ForeignKeyRe = a.ForeignKeyRe,


+ 2
- 1
BPA.SAAS.Manage.Core/DbContext.cs Voir le fichier

@@ -34,9 +34,10 @@ namespace BPA.SAAS.Manage.Core
};

SqlSugarDb.SqlSugarScope(configConnection);

SqlSugarDb.SqlSugarScopeLog(new ConnectionConfig()
{
ConnectionString = App.GetConfig<List<ConnectionConfig>>("ConnectionConfigs")[1].ConnectionString,
ConnectionString = connectionConfigs[1].ConnectionString,
DbType = DbType.MySql,//设置数据库类型
IsAutoCloseConnection = true,//自动释放数据务,如果存在事务,在事务结束后释放
InitKeyType = InitKeyType.Attribute, //从实体特性中读取主键自增列信息


+ 1
- 0
BPA.SAAS.Manage.Core/SqlSugarDb.cs Voir le fichier

@@ -32,6 +32,7 @@ namespace BPA.KitChen.GroupMeal.SqlSugar
};
db.Aop.OnLogExecuted = (sql, pars) =>
{
Console.WriteLine($"当前SQL语句:【{sql}】,参数:【{string.Join(",", pars.Select(t => t.Value))}】");
//sql 执行后
};
db.Aop.OnError = ex =>


Chargement…
Annuler
Enregistrer