Bladeren bron

Merge branch 'kitchenmanage' into groupmealmanage

groupmealmanage
gwbvipvip 7 maanden geleden
bovenliggende
commit
e01dda7738
5 gewijzigde bestanden met toevoegingen van 55 en 31 verwijderingen
  1. +21
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs
  2. +6
    -0
      BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj
  3. +2
    -0
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs
  4. +2
    -31
      BPA.SAAS.Manage.Application/System/Services/MenuService.cs
  5. +24
    -0
      BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs

+ 21
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs Bestand weergeven

@@ -1,4 +1,7 @@

using BPA.SAAS.Manage.Core.Org;
using Microsoft.AspNetCore.Authorization;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Authorization
{

@@ -6,6 +9,24 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Authorization
[ApiDescriptionSettings("开放平台", Tag = "授权管理"), AllowAnonymous, NonUnify]
public class AuthServices : IDynamicApiController
{
private readonly ISqlSugarClient _db;
public AuthServices(ISqlSugarClient db)
{
_db = db;
}
/// <summary>
/// 获取加盟商信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("/api/authorization/GetCompanyById")]
[AllowAnonymous]
public async Task<BPA_Company> GetCompanyById(string id)
{
var data = await _db.Queryable<BPA_Company>().FirstAsync(x => x.Id == id);

return data;
}
}
}

+ 6
- 0
BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj Bestand weergeven

@@ -30,4 +30,10 @@
<ProjectReference Include="..\BPA.SAAS.Manage.Core\BPA.SAAS.Manage.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="AExternalPlatform\Service\Authorization\Dtos\" />
<Folder Include="AExternalPlatform\Service\Authorization\Services\" />
<Folder Include="AExternalPlatform\Service\CheckService\Dtos\" />
</ItemGroup>

</Project>

+ 2
- 0
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs Bestand weergeven

@@ -202,8 +202,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
if (goods == null) throw Oops.Oh("商品不存在");
var goodsbom = _db.Queryable<BPA_GoodsBom>().Where(x => x.Goods_Id == id).ToList();
var goodsTechnology = _db.Queryable<BPA_GoodsTechnologyAction>().Where(x => x.GoodsId == id).ToList();
//var FoodMenuGoods = _db.Queryable<BPA_FoodMenuGoods>().Where(x => x.GoodsId == id).ToList();
await _db.Deleteable(goodsbom).ExecuteCommandAsync();
await _db.Deleteable(goodsTechnology).ExecuteCommandAsync();
//await _db.Deleteable(FoodMenuGoods).ExecuteCommandAsync();
var res = await _db.Deleteable(goods).ExecuteCommandAsync();
_db.Ado.CommitTran();
return res > 0;


+ 2
- 31
BPA.SAAS.Manage.Application/System/Services/MenuService.cs Bestand weergeven

@@ -57,7 +57,7 @@ namespace BPA.SAAS.Manage.Application.System.Services
Status = t.Status,
IsAdmin=t.IsAdmin,
Type= t.Type,
//TypeName= GetTypeName(t.Type),
// TypeName= GetTypeName(t.Type),
Children = AllMenus.Where(x => x.Pid == t.Id).Select(x => new MenuTreeDtoOutput
{
Id = x.Id,
@@ -87,42 +87,13 @@ namespace BPA.SAAS.Manage.Application.System.Services
Status = y.Status,
IsAdmin=y.IsAdmin,
Type = y.Type,
// TypeName = GetTypeName(y.Type),
//TypeName = GetTypeName(y.Type),
}).ToList()
}).ToList()
}).ToList();

return data;
}
public string GetTypeName(string type)
{
var ary = type.Split(',');
var name = "";
for (int i = 0; i < ary.Length; i++)
{
if (ary[i] == "0")
{
name += "团餐";
}
if (ary[i] == "1")
{
name += "门店";
}
if (ary[i] == "2")
{
name += "后厨";
}
if (ary[i] == "3")
{
name += "公共";
}
if(i< ary.Length - 1)
{
name += ",";
}
}
return name;
}
/// <summary>
/// 新增菜单
/// </summary>


+ 24
- 0
BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs Bestand weergeven

@@ -0,0 +1,24 @@
using BPA.SAAS.Manage.Core.Base;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.DataBase
{
[SugarTable("bpa_foodmenugoods")]
public class BPA_FoodMenuGoods : IBaseEntity, IGroupId
{
/// <summary>
/// 菜谱id
/// </summary>
public string FoodMenuId { get; set; }
/// <summary>
/// 商品id
/// </summary>
public string GoodsId { get; set; }
public string GroupId { get; set; }
}
}

Laden…
Annuleren
Opslaan