Porównaj commity

...

128 Commity

Autor SHA1 Wiadomość Data
  zhaoy d37271d23f Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into groupmealmanage 9 miesięcy temu
  zhaoy 7c7e3293e2 z 9 miesięcy temu
  bpa f3242397a2 更新 'Jenkinsfile' 9 miesięcy temu
  gwbvipvip 1846358018 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 9 miesięcy temu
  gwbvipvip 3618a9aa10 提交 9 miesięcy temu
  zhaoy fd0225082b Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into groupmealmanage 9 miesięcy temu
  zhaoy e59fdcbb2d 验证重复 9 miesięcy temu
  gwbvipvip 590446d462 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 9 miesięcy temu
  gwbvipvip a21b463428 提交 9 miesięcy temu
  zhaoy 3c56f1a049 能量配置 9 miesięcy temu
  zhaoy d887cf8a66 Merge branch 'master' into groupmealmanage 9 miesięcy temu
  zhaoy 6ae16d90ff 商品能量配置 9 miesięcy temu
  zhaoy ac381264b7 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into groupmealmanage 9 miesięcy temu
  zhaoy c24e68ccf8 Merge branch 'master' into groupmealmanage 9 miesięcy temu
  gwbvipvip 16f0b38df9 提交 9 miesięcy temu
  gwbvipvip cf6ed5d7de 提交 9 miesięcy temu
  gwbvipvip 22ed0c42dc 提交 9 miesięcy temu
  gwbvipvip e01dda7738 Merge branch 'kitchenmanage' into groupmealmanage 9 miesięcy temu
  gwbvipvip f68a6c68ac 提交 9 miesięcy temu
  gwbvipvip dc9adc975c 提交 9 miesięcy temu
  gwbvipvip 666e1fa9ce 提交 9 miesięcy temu
  gwbvipvip 28c6cfc671 提交 9 miesięcy temu
  gwbvipvip bcc36385d9 提交 9 miesięcy temu
  gwbvipvip 2609404328 提交 9 miesięcy temu
  gwbvipvip 50a4581680 提交 9 miesięcy temu
  gwbvipvip 4d2452cf32 提交 9 miesięcy temu
  zhaoy 3cdb5946ef Merge branch 'master' into kitchenmanage 9 miesięcy temu
  gwbvipvip db6cd3407d 提交 9 miesięcy temu
  gwbvipvip 28f2db6c8b Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 9 miesięcy temu
  gwbvipvip ff19832050 提交 9 miesięcy temu
  zhaoy 6314595add Merge branch 'master' into kitchenmanage 9 miesięcy temu
  zhaoy 760ed588d7 z 9 miesięcy temu
  gwbvipvip 0ffd125155 提交 9 miesięcy temu
  gwbvipvip 550e1f0c74 提交 9 miesięcy temu
  gwbvipvip 8ab4656b3d 提交 9 miesięcy temu
  gwbvipvip fa0d75158c 提交 9 miesięcy temu
  gwbvipvip 47c645ecd6 提交 9 miesięcy temu
  gwbvipvip 3b1823d541 提交 9 miesięcy temu
  gwbvipvip 511c229ee7 提交 9 miesięcy temu
  gwbvipvip 2b32a4aeef 提交 9 miesięcy temu
  gwbvipvip 825a5f7d6c 提交 9 miesięcy temu
  zhaoy 2cbffaba62 z 9 miesięcy temu
  zhaoy 69a31cdf4e 合并 10 miesięcy temu
  gwbvipvip 137a28f655 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 10 miesięcy temu
  gwbvipvip 4e6913ea51 提交 10 miesięcy temu
  zhaoy b2a7df1c0f Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 10 miesięcy temu
  zhaoy 2017f0c11b Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip d00f60e46c Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 10 miesięcy temu
  gwbvipvip 9f2c238e70 提交 10 miesięcy temu
  zhaoy 28f9dc02ff Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 131bd576dc Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 58f1d61b7e z 10 miesięcy temu
  zhaoy e06609b13e Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 086d8fddda z 10 miesięcy temu
  zhaoy 843a2d9d8e Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy e9beef72fb Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 2ed8535e70 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 0131b42373 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 63abfb732c z 10 miesięcy temu
  zhaoy 9e518de5f8 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 7a11b16421 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 66799b8f5a Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 152ba67c4c Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 77e98316a0 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 10 miesięcy temu
  zhaoy 2ada86f3f1 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip 4b4bdc15a4 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip 261115a63e Merge branch 'master' into groupmealmanage 10 miesięcy temu
  gwbvipvip 50a47e4952 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 10 miesięcy temu
  zhaoy 00e0ea84cb Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 81e472e11e Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 449f917dd9 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy a0c78622d5 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 10 miesięcy temu
  zhaoy aca8a272cd Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip 56301cc43b Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 10 miesięcy temu
  gwbvipvip 6976b4a35a Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip 6ed545fa45 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  gwbvipvip cb143c6346 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  gwbvipvip bba3f11734 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 10 miesięcy temu
  zhaoy f1c2c3594c Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 20ab3ab0d8 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip 10fe38208a 提交 10 miesięcy temu
  zhaoy 4d03d3c4ca Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 31ac712cb3 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip d2fded8b59 提交 10 miesięcy temu
  zhaoy 9fc88893da Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 3f76fd1cab Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy ca9f5efc14 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy a450aa28b2 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy ff0f1438f1 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 90a503345b Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy d118504bf1 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 343554359f Merge branch 'master' into kitchenmanage 10 miesięcy temu
  gwbvipvip ff8dcc233c Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 10 miesięcy temu
  gwbvipvip dbd6d44d64 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 92cc43a818 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy ec6c51708d Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 0ff84da211 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 6af1ec0900 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy ad84178845 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 7ce50cb0bc Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy ca458d5ee1 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 25c44c8e16 Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy 62e08d4257 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 48bf7ec8cf Merge branch 'master' into groupmealmanage 10 miesięcy temu
  zhaoy cd573b0861 Merge branch 'master' into kitchenmanage 10 miesięcy temu
  zhaoy 24d87f59e7 Merge branch 'master' into groupmealmanage 11 miesięcy temu
  zhaoy 9d0f63086e Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy c064da8a63 Merge branch 'master' into groupmealmanage 11 miesięcy temu
  zhaoy 6c9baa4ede Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 16b40e8ca8 Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into groupmealmanage 11 miesięcy temu
  zhaoy 6ed9594ee8 Merge branch 'master' into groupmealmanage 11 miesięcy temu
  zhaoy 47ff3d8f3c Merge branch 'master' into kitchenmanage 11 miesięcy temu
  gwbvipvip 8fe8cb195c Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into groupmealmanage 11 miesięcy temu
  gwbvipvip 4653be872b 提交 11 miesięcy temu
  zhaoy cc030fc47b z 11 miesięcy temu
  zhaoy 46b32ed6c0 Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy fa2f1493ba Merge branch 'groupmealmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into groupmealmanage 11 miesięcy temu
  zhaoy 0aa1ae5357 Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 49c3a374e7 Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 9120605f33 z 11 miesięcy temu
  gwbvipvip e369e0c25c 提交 11 miesięcy temu
  zhaoy 47f2fae372 商品删除 11 miesięcy temu
  zhaoy ef968f685e Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 93de85a900 Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 0e642f722d Merge branch 'master' into kitchenmanage 11 miesięcy temu
  zhaoy 6d168347d1 合并 11 miesięcy temu
  zhaoy db3cfb9aff z 11 miesięcy temu
  zhaoy 6ac72c2dbb zy 11 miesięcy temu
54 zmienionych plików z 1266 dodań i 105 usunięć
  1. +1
    -0
      .gitignore
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. +50
    -36
      BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/DtoValidator.cs
  7. +18
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/ResultSAASManageDto.cs
  8. +1
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/DeviceService.cs
  9. +38
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/DiningPlateServices.cs
  10. +39
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Dtos/DiningPlateCreateOrUpdataDto.cs
  11. +40
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Services/DiningPlateService.cs
  12. +19
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Services/IDiningPlateService.cs
  13. +14
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsEnergyConfigQuDto.cs
  14. +23
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsEnergyConfigVuewDto.cs
  15. +11
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs
  16. +34
    -2
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
  17. +7
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs
  18. +1
    -3
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs
  19. +1
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs
  20. +44
    -11
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/ThirdpartyPushServices.cs
  21. +47
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Dtos/GoodsDto.cs
  22. +19
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Services/IWeighingService.cs
  23. +68
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Services/WeighingService.cs
  24. +34
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/WeighingServices.cs
  25. +15
    -0
      BPA.SAAS.Manage.Application/Auth/AuthService.cs
  26. +6
    -0
      BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj
  27. +16
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsDto.cs
  28. +14
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsQueryDto.cs
  29. +15
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsViewDto.cs
  30. +23
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDto.cs
  31. +15
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigQueryDto.cs
  32. +102
    -0
      BPA.SAAS.Manage.Application/DataBase/GoodsEnergyConfigServices.cs
  33. +12
    -0
      BPA.SAAS.Manage.Application/DataBase/GoodsServices.cs
  34. +63
    -0
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsEnergyConfigService.cs
  35. +10
    -0
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsService.cs
  36. +231
    -0
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsEnergyConfigService.cs
  37. +49
    -2
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs
  38. +2
    -2
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs
  39. +1
    -1
      BPA.SAAS.Manage.Application/StoreServers.cs
  40. +2
    -31
      BPA.SAAS.Manage.Application/System/Services/MenuService.cs
  41. +1
    -1
      BPA.SAAS.Manage.Comm/Util/ITreeNode.cs
  42. +14
    -0
      BPA.SAAS.Manage.Core/Const.cs
  43. +24
    -0
      BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs
  44. +19
    -0
      BPA.SAAS.Manage.Core/DataBase/BPA_GoodsEnergyConfig.cs
  45. +19
    -0
      BPA.SAAS.Manage.Core/DataBase/BPA_GoodsEnergyConfigDetails.cs
  46. +10
    -0
      BPA.SAAS.Manage.Core/DbContext.cs
  47. +1
    -1
      BPA.SAAS.Manage.Core/Product/BPA_ProductFunctionAction.cs
  48. +12
    -0
      BPA.SAAS.Manage.Core/RequestAnalysis/Class1.cs
  49. +22
    -0
      BPA.SAAS.Manage.Core/RequestAnalysis/UserAnalysis.cs
  50. +27
    -0
      BPA.SAAS.Manage.Core/SqlSugarDb.cs
  51. +19
    -3
      BPA.SAAS.Manage.Web.Core/Handlers/RequestAuditFiltercs.cs
  52. +1
    -1
      BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json
  53. +8
    -4
      BPA.SAAS.Manage.Web.Entry/appsettings.json
  54. +4
    -4
      Jenkinsfile

+ 1
- 0
.gitignore Wyświetl plik

@@ -35,3 +35,4 @@
/BPA.SAAS.Manage.Web.Core/obj
/BPA.SAAS.Manage.Web.Entry
/.vs/BPA.SAAS.Manage/FileContentIndex
/.vs/ProjectEvaluation/bpa.saas.manage.metadata.v7.bin





+ 50
- 36
BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/DtoValidator.cs Wyświetl plik

@@ -5,6 +5,7 @@ using BPA.SAAS.Manage.Core.DataBase;
using BPA.SAAS.Manage.Core.Org;
using Furion.JsonSerialization;
using Newtonsoft.Json;
using NPOI.POIFS.Crypt.Dsig;
using NPOI.SS.Formula.Functions;
using NPOI.Util.ArrayExtensions;
using System.Collections.Generic;
@@ -23,42 +24,54 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto
public static class DtoValidator
{

/// <summary>
/// 获取签名
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="t"></param>
/// <param name="otype">0-不排序 1-按名称ASCII排序</param>
/// <returns></returns>
public static string GetSign<T>(T t, int otype = 1)
{
string retstr = "";
//定义PropertyInfo的List
List<PropertyInfo> proplist = new List<PropertyInfo>();
//遍历泛型类的每个属性加入到List里面
Array.ForEach<PropertyInfo>(typeof(T).GetProperties(),
p => proplist.Add(p));
//根据参数进行排序 0-不排序 1-按名称ASCII码排序
if (otype == 1)
proplist = proplist.OrderBy(k => k.Name).ToList();

//遍历List泛型生成我们要签名的字符串
proplist.ForEach(p =>
{
if (p.Name.ToLower() != "sign".ToLower())
{
if (p.GetValue(t, null) != null && p.GetValue(t, null).ToString() != "")
{
retstr = retstr + p.Name + "=" + p.GetValue(t, null) + "&";
}

}
});
//把字符串最后一位截断
retstr = retstr.Substring(0, retstr.Length - 1);
//输出字符串
return retstr;
}
///// <summary>
///// 获取签名
///// </summary>
///// <typeparam name="T"></typeparam>
///// <param name="t"></param>
///// <param name="otype">0-不排序 1-按名称ASCII排序</param>
///// <returns></returns>
//public static string GetSign<T>(T t, int otype = 1)
//{
// string retstr = "";
// //定义PropertyInfo的List
// List<PropertyInfo> proplist = new List<PropertyInfo>();
// //遍历泛型类的每个属性加入到List里面
// Array.ForEach<PropertyInfo>(typeof(T).GetProperties(),
// p => proplist.Add(p));
// //根据参数进行排序 0-不排序 1-按名称ASCII码排序
// if (otype == 1)
// proplist = proplist.OrderBy(k => k.Name).ToList();

// //遍历List泛型生成我们要签名的字符串
// proplist.ForEach(p =>
// {
// if (p.Name.ToLower() != "sign".ToLower())
// {
// if (p.GetValue(t, null) != null && p.GetValue(t, null).ToString() != "")
// {

// var type = p.GetValue(t, null).GetType().FullName;

// if (type == "System.String" || type == "System.Boolean" || type == "System.Int32" || type == "System.DateTime")
// {
// retstr = retstr + p.Name + "=" + p.GetValue(t, null) + "&";
// }
// else
// {

// retstr = retstr + p.Name + "=" + JsonConvert.SerializeObject(p.GetValue(t, null)) + "&";
// }

// }

// }
// });
// //把字符串最后一位截断
// retstr = retstr.Substring(0, retstr.Length - 1);
// //输出字符串
// return retstr;
//}

/// <summary>
/// 获取签名
@@ -70,6 +83,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto
string retstr = "";
//定义PropertyInfo的List
List<PropertyInfo> proplist = new List<PropertyInfo>();

//遍历泛型类的每个属性加入到List里面
Array.ForEach<PropertyInfo>(t.GetType().GetProperties(),
p => proplist.Add(p));


+ 18
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/ResultSAASManageDto.cs Wyświetl plik

@@ -10,7 +10,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto
{
public int statusCode { get; set; }

public T data { get; set; }
public T? data { get; set; }

public string succeeded { get; set; }

@@ -22,6 +22,23 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto


}
public class ResultSAASManageDto
{
public int statusCode { get; set; }

public object data { get; set; }

public string succeeded { get; set; }

public string errors { get; set; }

public string extras { get; set; }

public int timestamp { get; set; }


}


public class ResultSAASManageDataDto<T>
{


+ 1
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/DeviceService.cs Wyświetl plik

@@ -147,7 +147,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Services
private async Task CheckInsertParm(DeviceInsertDto dto)
{
if (string.IsNullOrWhiteSpace(dto.StopId)) throw Oops.Oh(ErrorCodeEnum.Code1009);
var getStopurl = BaseServerUrl + "api/store/getbyIdstorelist_alm?id=" + dto.StopId;
var getStopurl = BaseServerUrl + "api/shop/getbyIdstorelist_alm?id=" + dto.StopId;
var responseStop = await getStopurl.SetHeaders(new
{
groupId = CurrentUser.GroupId


+ 38
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/DiningPlateServices.cs Wyświetl plik

@@ -0,0 +1,38 @@
//using BPA.SAAS.KitChenManage.Core;
//using BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto;
//using BPA.SAAS.Manage.Application.AExternalPlatform.Enum;
//using BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Dtos;
//using BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Services;
//using BPA.SAAS.Manage.Comm.Util;
//using Newtonsoft.Json;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate
//{

// [ApiDescriptionSettings("开放平台", Tag = "餐盘管理"), AllowAnonymous]
// public class DiningPlateServices: IDynamicApiController
// {

// private readonly IDiningPlateService _diningPlateService;
// public DiningPlateServices(IDiningPlateService diningPlateService)
// {
// _diningPlateService = diningPlateService;
// }

// /// <summary>
// /// 根据二维码修改餐盘信息(有就修改没有就新增)
// /// </summary>
// /// <param name="inputDto"></param>
// /// <returns></returns>
// [HttpPost("/api/ExternalPlatform/Device/EditDiningPlateByQRCode")]
// public async Task<bool> EditDiningPlateByQRCode(DiningPlateCreateOrUpdataDto inputDto)
// {
// return await _diningPlateService.EditDiningPlateByQRCode(inputDto);
// }
// }
//}

+ 39
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Dtos/DiningPlateCreateOrUpdataDto.cs Wyświetl plik

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Dtos
{
public class DiningPlateDto
{
public string Id { get; set; }

/// <summary>
/// 二维码
/// </summary>
public string QRCode { get; set; }

/// <summary>
/// 芯片码
/// </summary>
public string ChipCode { get; set; }
}


public class DiningPlateCreateOrUpdataDto
{

/// <summary>
/// 二维码
/// </summary>
public string QRCode { get; set; }

/// <summary>
/// 芯片码
/// </summary>
public string ChipCode { get; set; }
}
}

+ 40
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Services/DiningPlateService.cs Wyświetl plik

@@ -0,0 +1,40 @@
using BPA.SAAS.KitChenManage.Core;
using BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto;
using BPA.SAAS.Manage.Application.AExternalPlatform.Enum;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Dtos;
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Comm.Util;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Services
{
public class DiningPlateService: IDiningPlateService, ITransient
{
/// <summary>
/// 根据二维码修改餐盘信息(有就修改没有就新增)
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<bool> EditDiningPlateByQRCode(DiningPlateCreateOrUpdataDto inputDto)
{
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("GroupId", CurrentUser.GroupId);
var url = App.Configuration["baseurl"] + "api/DiningPlate/EditDiningPlateByQRCode";
var inputData = JsonConvert.SerializeObject(inputDto);
var jsonData = HttpHelper.PostData(url, inputData, Encoding.UTF8, "application/json", dic);
var data = JsonConvert.DeserializeObject<ResultSAASManageDto>(jsonData);
if (data.statusCode != 200)
{
throw Oops.Oh(data.errors);
}
if (!Convert.ToBoolean(data.data))
{throw Oops.Oh(ErrorCodeEnum.Code1001);}
return true;
}
}
}

+ 19
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/DiningPlate/Services/IDiningPlateService.cs Wyświetl plik

@@ -0,0 +1,19 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.DiningPlate.Services
{
public interface IDiningPlateService
{
/// <summary>
/// 根据二维码修改餐盘信息(有就修改没有就新增)
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<bool> EditDiningPlateByQRCode(DiningPlateCreateOrUpdataDto inputDto);
}
}

+ 14
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsEnergyConfigQuDto.cs Wyświetl plik

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodsEnergyConfigQuDto
{
public string GoodsId { get; set; }
public string Name { get; set; }
}
}

+ 23
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsEnergyConfigVuewDto.cs Wyświetl plik

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodsEnergyConfigVuewDto
{
public string Id { get; set; }
public string GoodsId { get; set; }
public string Name { get; set; }
//public string Uint { get; set; }
public List<GoodsEnergyConfigDetailsView> Details { get; set; }
}
public class GoodsEnergyConfigDetailsView
{
public string Id { get; set; }
public string Key { get; set; }
public string Value { get; set; }
}
}

+ 11
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs Wyświetl plik

@@ -2,6 +2,7 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Services;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Core.Base;
using Microsoft.AspNetCore.Components.Forms;
using Org.BouncyCastle.Crypto;
@@ -181,5 +182,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
{
return await _goodsService.DelGoodsUint(dto);
}
/// <summary>
/// 查询商品能量配置
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/GetGoodsEnergyConfig")]
public async Task<List<GoodsEnergyConfigVuewDto>> GetGoodsEnergyConfigPage(GoodsEnergyConfigQuDto dto)
{
return await _goodsService.GetGoodsEnergyConfigPage(dto);
}
}
}

+ 34
- 2
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs Wyświetl plik

@@ -6,6 +6,7 @@ using BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.Services;
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType;
using BPA.SAAS.Manage.Core.Base;
@@ -60,6 +61,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
Data = data
};
}

/// <summary>
/// 添加商品
/// </summary>
@@ -443,7 +445,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
var resEntity = new BPA_GoodsType();
resEntity.Id = Guid.NewGuid().ToString();
resEntity.Name = dto[i].Name;
resEntity.Pid = dto[i].Pid;
resEntity.Pid =string.IsNullOrEmpty(dto[i].Pid)?"0": dto[i].Pid;
resEntity.Sort = dto[i].Sort;
GoodsTypelist.Add(resEntity);
}
@@ -464,7 +466,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
if(model==null) throw Oops.Oh("商品分类不存在");
if (dto.Pid == null) dto.Pid = "0";
model.Name = dto.Name;
model.Pid = dto.Pid;
model.Pid =string.IsNullOrEmpty(dto.Pid)?"0": dto.Pid;
model.Sort = dto.Sort;
var res = await SqlSugarDb.Db.Updateable(model).ExecuteCommandAsync();
return res > 0;
@@ -560,6 +562,36 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
}

}
/// <summary>
/// 查询商品能量配置
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<List<GoodsEnergyConfigVuewDto>> GetGoodsEnergyConfigPage(GoodsEnergyConfigQuDto dto)
{
List<IConditionalModel> conModels = new List<IConditionalModel>();
//string groupId = App.User.FindFirst(ClaimConst.GroupId)?.Value;
if (!string.IsNullOrEmpty(dto.Name))
{
conModels.Add(new ConditionalModel() { FieldName = "Name", ConditionalType = ConditionalType.Like, FieldValue = dto.Name });
}
if (!string.IsNullOrEmpty(dto.GoodsId))
{
conModels.Add(new ConditionalModel() { FieldName = "GoodsId", ConditionalType = ConditionalType.Like, FieldValue = dto.GoodsId });
}
int total = new RefAsync<int>();
var res = await SqlSugarDb.Db.Queryable<BPA_GoodsEnergyConfig>()
.Where(conModels)
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.Select(x=>new GoodsEnergyConfigVuewDto() { Id=x.Id,Name=x.Name, GoodsId =x.GoodsId})
.Mapper(x =>
{
var data=SqlSugarDb.Db.Queryable<BPA_GoodsEnergyConfigDetails>().Where(it => it.GoodsenergyconfigId == x.Id).Select(it=>new GoodsEnergyConfigDetailsView() { Id=it.Id.SelectAll()}).ToList();
x.Details = data;
})
.ToListAsync();
return res;
}
private string GetNumber2(int Length = 10)
{
byte[] buffer = Guid.NewGuid().ToByteArray();


+ 7
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs Wyświetl plik

@@ -1,5 +1,6 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
@@ -61,5 +62,11 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
Task<bool> AddGoodsUint(List<GoodsUintInsertDto> dto);
Task<bool> UpdateGoodsUint(GoodsUintUpdateDto dto);
Task<bool> DelGoodsUint(GoodsUintDelDto dto);
/// <summary>
/// 查询商品能量配置
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<List<GoodsEnergyConfigVuewDto>> GetGoodsEnergyConfigPage(GoodsEnergyConfigQuDto dto);
}
}

+ 1
- 3
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs Wyświetl plik

@@ -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,7 +262,7 @@ 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);
}


+ 1
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/Services/ThirdpartyPushService.cs Wyświetl plik

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


+ 44
- 11
BPA.SAAS.Manage.Application/AExternalPlatform/Service/ThirdpartyPush/ThirdpartyPushServices.cs Wyświetl plik

@@ -1,6 +1,9 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush.Services;
using BPA.SAAS.Manage.Core.System;
using Newtonsoft.Json;
using NPOI.SS.Formula.Eval;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -55,8 +58,38 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush
}

[ AllowAnonymous, NonUnify]
public async Task<bool> aaaaa(aaaaaaaaaaaa aaa)
public async Task<bool> aaaaa()
{
var data = new aaaaaaaaaaaa()
{
a= "你好",
b=1,
c=2,
d= 3.3f,
e=true,
t=new aaaaaaaaaaaa()
{
a = "你好aaa",
b = 10,
c = 20,
d = 30.3f,
e=false,
}

};



var thisSign = DtoValidator.GetSign(data);

thisSign = thisSign + "&key=" + "64059261-1599-472c-b418-3c18b4e3883e";


var vvv11 = thisSign.ToUpper();
var vvv = MD5Encryption.Encrypt(thisSign.ToUpper()).ToUpper();
var vvv1 =
"A=你好&B=1&C=2&D=3.3&E=TRUE&T={\"A\":\"你好AAA\",\"B\":10,\"C\":20,\"D\":30.3,\"E\":FALSE}&KEY=64059261-1599-472C-B418-3C18B4E3883E";
var vvvv2 = MD5Encryption.Encrypt(vvv1.ToUpper()).ToUpper();
return true;
}

@@ -66,19 +99,19 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.ThirdpartyPush

public class aaaaaaaaaaaa
{
public int a1 { get; set; }
public string a{ get; set; }

public bool a2 { get; set; }
public byte b{ get; set; }

public DateTime a3 { get; set; }
public int c{ get; set; }

public aaaa5 a4 { get; set; }
public float d{ get; set; }

public List<aaaa5> a5 { get; set;}
}
public bool e{ get; set; }

public aaaaaaaaaaaa t{ get; set; }

public class aaaa5
{
public string aaa { get; set; }
}

}

+ 47
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Dtos/GoodsDto.cs Wyświetl plik

@@ -0,0 +1,47 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Dtos
{

public class GoodsTypeDto
{
//类别ID
public string Id { get; set; }
//类别名称
public string Name { get; set; }
//排序
public int Sort { get; set; }


public List<GoodsDto> Foods;
}

public class GoodsDto
{
// 编号
public string Id { get; set; }

// 图片地址
public string Cover{ get; set; }

// 名称
public string Name { get; set; }

// vip价格
public decimal VipPrice { get; set; }

// 价格
public decimal Price { get; set; }

//排序
public int Sort { get; set; }

public string GoodsTypeId { get; set; }

}
}

+ 19
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Services/IWeighingService.cs Wyświetl plik

@@ -0,0 +1,19 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Services
{
public interface IWeighingService
{

/// <summary>
/// 获取商品信息
/// </summary>
/// <returns></returns>
Task<List<GoodsTypeDto>> GetGoodsInfo();
}
}

+ 68
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/Services/WeighingService.cs Wyświetl plik

@@ -0,0 +1,68 @@
using BPA.KitChen.GroupMeal.SqlSugar;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Dtos;
using BPA.SAAS.Manage.Core.DataBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Services
{
public class WeighingService : IWeighingService, ITransient
{

/// <summary>
/// 获取商品信息
/// </summary>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/WeighingService/GetGoodsInfo")]
public async Task<List<GoodsTypeDto>> GetGoodsInfo()
{
//获取商品类型
var goodsType = await SqlSugarDb.Db.Queryable<BPA_GoodsType>()
.OrderBy(x => x.Sort)
.Where(x=>x.IsDeleted==0)
.Select(x => new GoodsTypeDto()
{
Id = x.Id,
Name = x.Name,
Sort = x.Sort,
}).ToListAsync();

//获取商品
var goodsList = await SqlSugarDb.Db.Queryable<BPA_GoodsInfo>().OrderBy(x => x.Sort)
.Where(x => x.IsDeleted == 0)
.Select(x => new GoodsDto()
{
Id = x.Id,
Name = x.Name,
Sort = x.Sort,
Cover = x.ImgUrl,
GoodsTypeId = x.GoodsTypeId,
Price = x.Price,
VipPrice=x.Price
}).ToListAsync();

////获取商品属性价格
//var goodsPriceList = await SqlSugarDb.Db.Queryable<BPA_GoodsAttributePrice>().ToListAsync();
//foreach (var goods in goodsList)
//{
// var data = goodsPriceList.Where(x=>x.GoodsId==goods.Id).ToList();
// if (data!=null)
// {
// goods.Price = data.FirstOrDefault()!.Price;
// goods.VipPrice = goods.Price;
// }
//}

foreach (var item in goodsType)
{
var data = goodsList.Where(x => x.GoodsTypeId == item.Id).ToList();
item.Foods = data;
}

return goodsType;
}
}
}

+ 34
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/WeighingService/WeighingServices.cs Wyświetl plik

@@ -0,0 +1,34 @@
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Services;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Dtos;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.WeighingService.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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

[ApiDescriptionSettings("开放平台", Tag = "称重接口"), AllowAnonymous]
public class WeighingServices: IDynamicApiController
{

private readonly IWeighingService _weighingService;
public WeighingServices(IWeighingService weighingService)
{
_weighingService = weighingService;
}


/// <summary>
/// 获取商品信息
/// </summary>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/WeighingService/GetGoodsInfo")]
public async Task<List<GoodsTypeDto>> GetGoodsInfo()
{
return await _weighingService.GetGoodsInfo();
}
}
}

+ 15
- 0
BPA.SAAS.Manage.Application/Auth/AuthService.cs Wyświetl plik

@@ -229,6 +229,21 @@ namespace BPA.SAAS.Manage.Application.Auth
return await _db.Deleteable(data).ExecuteCommandHasChangeAsync();
}


/// <summary>
/// 获取加盟商信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("/api/authorization/GetCompanyByIdNew")]
[AllowAnonymous]
public async Task<BPA_Company> GetCompanyById(string id)
{
var data = await _db.Queryable<BPA_Company>().FirstAsync(x => x.Id == id);

return data;
}

#endregion
}
}

+ 6
- 0
BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj Wyświetl plik

@@ -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>

+ 16
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsDto.cs Wyświetl plik

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig
{
public class GoodsEnergyConfigDetailsDto
{
public string Id { get; set; }
public string GoodsenergyconfigId { get; set; }
public string Key { get; set; }
public string Value { get; set; }
}
}

+ 14
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsQueryDto.cs Wyświetl plik

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig
{
public class GoodsEnergyConfigDetailsQueryDto: PageInputBase
{
public string GoodsenergyconfigId { get; set; }
}
}

+ 15
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDetailsViewDto.cs Wyświetl plik

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig
{
public class GoodsEnergyConfigDetailsViewDto
{
public string Id { get; set; }
public string Key { get; set; }
public string Value { get; set; }
}
}

+ 23
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigDto.cs Wyświetl plik

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig
{
public class GoodsEnergyConfigDto
{
public string Id { get; set; }
public string GoodsId { get; set; }
public string Name { get; set; }
public string Uint { get; set; }
public List<GoodsEnergyConfigDetails> Details { get; set; }

}
public class GoodsEnergyConfigDetails
{
public string Key { get; set; }
public string Value { get; set; }
}
}

+ 15
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsEnergyConfig/GoodsEnergyConfigQueryDto.cs Wyświetl plik

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig
{
public class GoodsEnergyConfigQueryDto: PageInputBase
{
public string GoodsId { get; set; }
public string Name { get; set; }
}
}

+ 102
- 0
BPA.SAAS.Manage.Application/DataBase/GoodsEnergyConfigServices.cs Wyświetl plik

@@ -0,0 +1,102 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Application.DataBase.Interface;
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase
{
[ApiDescriptionSettings("GoodsEnergyConfig", Tag = "商品能量配置")]
public class GoodsEnergyConfigServices: IDynamicApiController, ITransient
{
IGoodsEnergyConfigService _energyConfigService;
public GoodsEnergyConfigServices(IGoodsEnergyConfigService energyConfigService)
{
_energyConfigService=energyConfigService;
}
/// <summary>
/// 分页查询
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsenergyconfig/getgoodsenergyconfigpage")]
public async Task<PageUtil> GetGoodsEnergyConfigPage(GoodsEnergyConfigQueryDto dto)
{
return await _energyConfigService.GetGoodsEnergyConfigPage(dto);
}
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsenergyconfig/addGoodsenergyconfig")]
public async Task<bool> AddGoodsEnergyConfig(GoodsEnergyConfigDto dto)
{
return await _energyConfigService.AddGoodsEnergyConfig(dto);
}
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsenergyconfig/updategoodsenergyconfig")]
public async Task<bool> UpdateGoodsEnergyConfig(GoodsEnergyConfigDto dto)
{
return await _energyConfigService.UpdateGoodsEnergyConfig(dto);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
[HttpGet("/api/goodsenergyconfig/delgoodsenergyconfig")]
public async Task<bool> DelGoodsEnergyConfig(string Id)
{
return await _energyConfigService.DelGoodsEnergyConfig(Id);
}
/// <summary>
/// 查询详情
/// </summary>
/// <param name="goodsenergyconfigId"></param>
/// <returns></returns>
[HttpGet("/api/goodsenergyconfig/getgoodsenergyconfigdetailslist")]
public async Task<List<GoodsEnergyConfigDetailsViewDto>> GetGoodsEnergyConfigDetailsList(string goodsenergyconfigId)
{
return await _energyConfigService.GetGoodsEnergyConfigDetailsList(goodsenergyconfigId);
}
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsenergyconfig/addgoodsenergyconfigdetails")]
public async Task<bool> AddGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto)
{
return await _energyConfigService.AddGoodsEnergyConfigDetails(dto);
}
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsenergyconfig/updategoodsenergyconfigdetails")]
public async Task<bool> UpdateGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto)
{
return await _energyConfigService.UpdateGoodsEnergyConfigDetails(dto);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
[HttpGet("/api/goodsenergyconfig/delgoodsenergyconfigdetails")]
public async Task<bool> DelGoodsEnergyConfigDetails(string Id)
{
return await _energyConfigService.DelGoodsEnergyConfigDetails(Id);
}
}
}

+ 12
- 0
BPA.SAAS.Manage.Application/DataBase/GoodsServices.cs Wyświetl plik

@@ -148,6 +148,18 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsService.GetGoods(id);
}

/// <summary>
/// 更具id查询商品信息列表
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpPost("/api/goods/GetGoodsListByIds")]
public async Task<List<GoodsInfoBaseView>> GetGoodsListByIds(List<string> ids)
{
return await _goodsService.GetGoodsListByIds(ids);
}

///// <summary>
///// 设备上传商品数据
///// </summary>


+ 63
- 0
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsEnergyConfigService.cs Wyświetl plik

@@ -0,0 +1,63 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.DataBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Interface
{
public interface IGoodsEnergyConfigService
{
/// <summary>
/// 分页查询
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<PageUtil> GetGoodsEnergyConfigPage(GoodsEnergyConfigQueryDto dto);
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> AddGoodsEnergyConfig(GoodsEnergyConfigDto dto);
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> UpdateGoodsEnergyConfig(GoodsEnergyConfigDto dto);
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
Task<bool> DelGoodsEnergyConfig(string Id);
/// <summary>
/// 查询详情
/// </summary>
/// <param name="goodsenergyconfigId"></param>
/// <returns></returns>
Task<List<GoodsEnergyConfigDetailsViewDto>> GetGoodsEnergyConfigDetailsList(string goodsenergyconfigId);
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> AddGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto);
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> UpdateGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto);
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
Task<bool> DelGoodsEnergyConfigDetails(string Id);
}
}

+ 10
- 0
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsService.cs Wyświetl plik

@@ -73,6 +73,16 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// <param name="id"></param>
/// <returns></returns>
Task<GoodsInfoBaseView> GetGoods(string id);


/// <summary>
/// 更具id查询商品信息
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
Task<List<GoodsInfoBaseView>> GetGoodsListByIds(List<string> ids);


///// <summary>
///// 设备上传商品数据
///// </summary>


+ 231
- 0
BPA.SAAS.Manage.Application/DataBase/Services/GoodsEnergyConfigService.cs Wyświetl plik

@@ -0,0 +1,231 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsEnergyConfig;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType;
using BPA.SAAS.Manage.Application.DataBase.Interface;
using BPA.SAAS.Manage.Comm.Const;
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.DataBase;
using NPOI.POIFS.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Services
{
public class GoodsEnergyConfigService: IGoodsEnergyConfigService, ITransient
{
private readonly ISqlSugarClient _db;
public GoodsEnergyConfigService(ISqlSugarClient db)
{
_db = db;
}
/// <summary>
/// 分页查询
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<PageUtil> GetGoodsEnergyConfigPage(GoodsEnergyConfigQueryDto dto)
{
List<IConditionalModel> conModels = new List<IConditionalModel>();
//string groupId = App.User.FindFirst(ClaimConst.GroupId)?.Value;
if (!string.IsNullOrEmpty(dto.Name))
{
conModels.Add(new ConditionalModel() { FieldName = "Name", ConditionalType = ConditionalType.Like, FieldValue = dto.Name });
}
if (!string.IsNullOrEmpty(dto.GoodsId))
{
conModels.Add(new ConditionalModel() { FieldName = "GoodsId", ConditionalType = ConditionalType.Like, FieldValue = dto.GoodsId });
}
int total = new RefAsync<int>();
var res = await _db.Queryable<BPA_GoodsEnergyConfig>()
.Where(conModels)
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.ToPageListAsync(dto.Current, dto.PageSize, total);
PageUtil util = new PageUtil()
{
Total = total,
Data = res

};
return util;
}
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<bool> AddGoodsEnergyConfig(GoodsEnergyConfigDto dto)
{
try
{
_db.Ado.BeginTran();
var resEntity = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Name == dto.Name && it.GoodsId == dto.GoodsId);
if (resEntity != null) throw Oops.Oh("配置名称已存在");
var newType = new BPA_GoodsEnergyConfig
{
GoodsId = dto.GoodsId,
Name = dto.Name,
Uint = dto.Uint,
};
var model = await _db.Insertable(newType).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
List<BPA_GoodsEnergyConfigDetails> list = new();
for (int i = 0; i < dto.Details.Count; i++)
{
var model1 = new BPA_GoodsEnergyConfigDetails
{
GoodsenergyconfigId = model.Id,
Key = dto.Details[i].Key,
Value = dto.Details[i].Value,
};
list.Add(model1);
}
var res = await _db.Insertable(list).CallEntityMethod(m => m.Create()).ExecuteCommandAsync();
_db.Ado.CommitTran();
return res > 0;
}
catch (Exception e)
{
_db.Ado.RollbackTran();
throw Oops.Oh("系统异常:"+ e.Message);
}
}
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<bool> UpdateGoodsEnergyConfig(GoodsEnergyConfigDto dto)
{
try
{
_db.Ado.BeginTran();
// 查询数据库中是否存在未删除的商品类型
var resEntity = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Id == dto.Id);
if (null == resEntity) throw Oops.Oh("配置不存在");
var resEntity1 = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Name == dto.Name && it.Id != dto.Id && it.GoodsId!= dto.GoodsId);
if (resEntity1 != null) throw Oops.Oh("配置名称已存在");
resEntity.Name = dto.Name;
resEntity.Uint = dto.Uint;
await _db.Updateable(resEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
var model = _db.Queryable<BPA_GoodsEnergyConfigDetails>().Where(it => it.GoodsenergyconfigId == dto.Id).ToList();
if (model.Count > 0) await _db.Deleteable(model).ExecuteCommandAsync();
List<BPA_GoodsEnergyConfigDetails> list = new();
for (int i = 0; i < dto.Details.Count; i++)
{
var model1 = new BPA_GoodsEnergyConfigDetails
{
GoodsenergyconfigId = dto.Id,
Key = dto.Details[i].Key,
Value = dto.Details[i].Value,
};
list.Add(model1);
}
var res = await _db.Insertable(list).CallEntityMethod(m => m.Create()).ExecuteCommandAsync();
_db.Ado.CommitTran();
return res > 0;
}
catch (Exception e)
{
_db.Ado.RollbackTran();
throw Oops.Oh("系统异常,异常信息:" + e.Message);
}
}
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public async Task<bool> DelGoodsEnergyConfig(string Id)
{
try
{
_db.Ado.BeginTran();
// 查询数据库中是否存在未删除的商品类型
var resEntity = _db.Queryable<BPA_GoodsEnergyConfig>().First(it => it.Id == Id);
if (resEntity == null)
{
throw Oops.Oh("配置不存在");
}
var model = _db.Queryable<BPA_GoodsEnergyConfigDetails>().Where(it => it.GoodsenergyconfigId == Id).ToList();
if (model.Count > 0) await _db.Deleteable(model).ExecuteCommandAsync();
var res = await _db.Deleteable(resEntity).ExecuteCommandAsync();
_db.Ado.CommitTran();
return res > 0;
}
catch (Exception e)
{

_db.Ado.RollbackTran();
throw Oops.Oh("系统异常,异常信息:" + e.Message);
}
}
public async Task<List<GoodsEnergyConfigDetailsViewDto>> GetGoodsEnergyConfigDetailsList(string goodsenergyconfigId)
{

int total = new RefAsync<int>();
var res = await _db.Queryable<BPA_GoodsEnergyConfigDetails>()
.Where(x=>x.GoodsenergyconfigId== goodsenergyconfigId)
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.Select(x => new GoodsEnergyConfigDetailsViewDto() { Id=x.Id,Key=x.Key,Value=x.Value})
.ToListAsync();
return res;
}
/// <summary>
/// 添加
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<bool> AddGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto)
{
var resEntity = _db.Queryable<BPA_GoodsEnergyConfigDetails>().First(it => it.Key == dto.Key);
if(resEntity!=null) throw Oops.Oh("key已存在");
var newType = new BPA_GoodsEnergyConfigDetails
{
GoodsenergyconfigId = dto.GoodsenergyconfigId,
Key = dto.Key,
Value = dto.Value,
};
var res = await _db.Insertable(newType).CallEntityMethod(m => m.Create()).ExecuteCommandAsync();
return res > 0;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<bool> UpdateGoodsEnergyConfigDetails(GoodsEnergyConfigDetailsDto dto)
{
// 查询数据库中是否存在未删除的商品类型
var resEntity = _db.Queryable<BPA_GoodsEnergyConfigDetails>().First(it => it.Id == dto.Id);
if (null == resEntity) throw Oops.Oh("配置不存在");
var resEntity1 = _db.Queryable<BPA_GoodsEnergyConfigDetails>().First(it => it.Key == dto.Key && it.Id != dto.Id);
if (resEntity1 != null) throw Oops.Oh("配置Key已存在");
resEntity.Key = dto.Key;
resEntity.Value = dto.Value;
var res = await _db.Updateable(resEntity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
return res > 0;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public async Task<bool> DelGoodsEnergyConfigDetails(string Id)
{
// 查询数据库中是否存在未删除的商品类型
var resEntity = _db.Queryable<BPA_GoodsEnergyConfigDetails>().First(it => it.Id == Id);
if (resEntity == null)
{
throw Oops.Oh("配置不存在");
}
var res = await _db.Deleteable(resEntity).ExecuteCommandAsync();
return res > 0;
}
}
}

+ 49
- 2
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs Wyświetl plik

@@ -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,
@@ -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;
@@ -460,7 +462,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
GoodsUintName = SqlFunc.Subqueryable<BPA_GoodsUint>().Where(s => s.Id == a.GoodsUintId && s.IsDeleted == 0).Select(s => s.Name),
//GoodsAttributeList = new List<GoodsAttributeList>()
}).FirstAsync();
if (!res.IsAttrubute)
if (res!=null&&!res.IsAttrubute)
{
res.GoodsAttributeList = await _goodsAttributeService.GetByNameAttribute("默认属性");
}
@@ -471,6 +473,50 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services

return res;
}

/// <summary>
/// 更具id查询商品信息
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public async Task<List<GoodsInfoBaseView>> GetGoodsListByIds(List<string> ids)
{
var res = await _db.Queryable<BPA_GoodsInfo>()
.Where((a) => a.IsDeleted == 0 && ids.Contains(a.Id))
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.Select((a) => new GoodsInfoBaseView
{
Id = a.Id,
Code = a.Code,
Name = a.Name,
Price = a.Price,
ImgUrl = a.ImgUrl,
Status = a.Status,
GoodsTypeId = a.GoodsTypeId,
GoodsTypeName = SqlFunc.Subqueryable<BPA_GoodsType>().Where(s => s.Id == a.GoodsTypeId && s.IsDeleted == 0).Select(s => s.Name),
Remark = a.Descritption,
// CreateAt = a.CreateAt,
GoodsUintId = a.GoodsUintId,
IsAttrubute = a.IsAttrubute,
GoodsUintName = SqlFunc.Subqueryable<BPA_GoodsUint>().Where(s => s.Id == a.GoodsUintId && s.IsDeleted == 0).Select(s => s.Name),
//GoodsAttributeList = new List<GoodsAttributeList>()
}).ToListAsync();

foreach (var item in res)
{
if (!item.IsAttrubute)
{
item.GoodsAttributeList = await _goodsAttributeService.GetByNameAttribute("默认属性");
}
else
{
item.GoodsAttributeList = await _goodsAttributeService.GetByGoodsIdAttribute(item.Id);
}
}

return res;
}

public async Task<bool> ExportGood(IFormFile file)
{
bool isReplace = true;
@@ -562,6 +608,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
item2.Id = thisitem.Id;
item2.GroupId = thisitem.GroupId;
item2.CreateBy = string.IsNullOrEmpty(item2.CreateBy) ? "" : item2.CreateBy;
_db.Updateable(item2).ExecuteCommand();
}
else


+ 2
- 2
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTypeService.cs Wyświetl plik

@@ -72,7 +72,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
var newType = new BPA_GoodsType
{
Pid = dto.Pid,
Pid = string.IsNullOrEmpty(dto.Pid)?"0": dto.Pid,
Name = dto.Name,
Remark = dto.Remark,
Sort = dto.Sort,
@@ -100,7 +100,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
}

resEntity.Name = dto.Name;
resEntity.Pid = dto.Pid;
resEntity.Pid =string.IsNullOrEmpty(dto.Pid)?"0": dto.Pid;
resEntity.Sort = dto.Sort;
resEntity.Remark = dto.Remark;


+ 1
- 1
BPA.SAAS.Manage.Application/StoreServers.cs Wyświetl plik

@@ -22,7 +22,7 @@ namespace BPA.SAAS.Manage.Application
[HttpGet("/api/stop/getstop")]
public async Task<List<StoreDto>> GetStop()
{
var getStoreurl = BaseServerUrl + "api/store/getstorelist_alm";//获取商品属性
var getStoreurl = BaseServerUrl + "api/shop/alllist";
var responseGoodsAttribute = await getStoreurl.SetHeaders(new
{
groupId = App.User?.FindFirst(ClaimConst.GroupId)?.Value


+ 2
- 31
BPA.SAAS.Manage.Application/System/Services/MenuService.cs Wyświetl plik

@@ -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>


+ 1
- 1
BPA.SAAS.Manage.Comm/Util/ITreeNode.cs Wyświetl plik

@@ -70,7 +70,7 @@ namespace BPA.SAAS.Manage.Comm.Util
var nodeSubList = new List<T>();
totalNodes.ForEach(u =>
{
if (u.GetPid().Equals(node.GetId()))
if (u.GetPid()== node.GetId())
nodeSubList.Add(u);
});
nodeSubList.ForEach(u => BuildChildNodes(totalNodes, u, new List<T>()));


+ 14
- 0
BPA.SAAS.Manage.Core/Const.cs Wyświetl plik

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core
{
public class Const
{

public const string ExternalPlatform = "base";
}
}

+ 24
- 0
BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs Wyświetl plik

@@ -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; }
}
}

+ 19
- 0
BPA.SAAS.Manage.Core/DataBase/BPA_GoodsEnergyConfig.cs Wyświetl plik

@@ -0,0 +1,19 @@
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_goodsenergyconfig")]
public class BPA_GoodsEnergyConfig : IBaseEntity, IGroupId
{
public string GoodsId { get; set; }
public string Name { get; set; }
public string Uint { get; set; }
public string GroupId { get; set ; }
}
}

+ 19
- 0
BPA.SAAS.Manage.Core/DataBase/BPA_GoodsEnergyConfigDetails.cs Wyświetl plik

@@ -0,0 +1,19 @@
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_goodsenergyconfigdetails")]
public class BPA_GoodsEnergyConfigDetails : IBaseEntity, IGroupId
{
public string GoodsenergyconfigId { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public string GroupId { get ; set; }
}
}

+ 10
- 0
BPA.SAAS.Manage.Core/DbContext.cs Wyświetl plik

@@ -34,6 +34,16 @@ namespace BPA.SAAS.Manage.Core
};

SqlSugarDb.SqlSugarScope(configConnection);

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

SqlSugarScope sqlSugar = new SqlSugarScope(configConnection,
db =>
{


+ 1
- 1
BPA.SAAS.Manage.Core/Product/BPA_ProductFunctionAction.cs Wyświetl plik

@@ -33,7 +33,7 @@ namespace BPA.SAAS.Manage.Core.Product
/// 排序
/// </summary>
public int Sort { get; set; }
public bool IsDefault { get; set; }
public bool? IsDefault { get; set; }
// public string GroupId { get; set; }
}
}

+ 12
- 0
BPA.SAAS.Manage.Core/RequestAnalysis/Class1.cs Wyświetl plik

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.RequestAnalysis
{
internal class Class1
{
}
}

+ 22
- 0
BPA.SAAS.Manage.Core/RequestAnalysis/UserAnalysis.cs Wyświetl plik

@@ -0,0 +1,22 @@
using BPA.SAAS.KitChenManage.Core;
using Furion;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.RequestAnalysis
{
public class UserAnalysis
{
public UserAnalysis()
{

//CurrentUser.AppId = App.HttpContext.Request.Headers["AppId"];
CurrentUser.GroupId = App.HttpContext.Request.Headers["GroupId"];

}
}
}

+ 27
- 0
BPA.SAAS.Manage.Core/SqlSugarDb.cs Wyświetl plik

@@ -16,12 +16,39 @@ namespace BPA.KitChen.GroupMeal.SqlSugar


public static SqlSugarScope Db { get; set; }
public static SqlSugarScope DbLog { get; set; }

public static SqlSugarScope SqlSugarScope(ConnectionConfig configConnection)
{
//全局过滤

Db = new SqlSugarScope(configConnection, db =>
{
//全局过滤
TableFilterItem(db);
db.Aop.OnLogExecuting = (sql, pars) =>
{
//sql 执行前
};
db.Aop.OnLogExecuted = (sql, pars) =>
{
Console.WriteLine($"当前SQL语句:【{sql}】,参数:【{string.Join(",", pars.Select(t => t.Value))}】");
//sql 执行后
};
db.Aop.OnError = ex =>
{
//sql 异常
};
});

return Db;
}

public static SqlSugarScope SqlSugarScopeLog(ConnectionConfig configConnection)
{
//全局过滤

DbLog = new SqlSugarScope(configConnection, db =>
{
//全局过滤
TableFilterItem(db);


+ 19
- 3
BPA.SAAS.Manage.Web.Core/Handlers/RequestAuditFiltercs.cs Wyświetl plik

@@ -69,18 +69,34 @@ namespace BPA.SAAS.Manage.Web.Core
// var vvvv = stingA;
//}

var groupId = httpRequest.Headers["GroupId"];
if (!string.IsNullOrEmpty(groupId))
{
CurrentUser.GroupId = groupId;
}

if (requestUrl.ToUpper().Contains("ExternalPlatform".ToUpper()))
{

var key = httpRequest.Headers["key"];
var sign = httpRequest.Headers["sign"];
List<PropertyInfo> proplist = new List<PropertyInfo>();
foreach (var parameter in parameters)
if (parameters.Count<=0)
{
//var stingA = DtoValidator.GetSign(parameter.Value);
//var sign = DtoValidator.GetAttributePrice(parameter.Value, "sign");
await _checkServices.CheckSign(key, "", sign);
}
else
{
foreach (var parameter in parameters)
{
// var stingA = DtoValidator.GetSign(parameter.Value);
//var sign = DtoValidator.GetAttributePrice(parameter.Value, "sign");
await _checkServices.CheckSign(key, "stingA", sign);
}
}
}

//============== 这里是执行方法之后获取数据 ====================
@@ -96,7 +112,7 @@ namespace BPA.SAAS.Manage.Web.Core
try
{
//记录日志
await SqlSugarDb.Db.Insertable(new BPA_ThirdpartyRequestLog()
await SqlSugarDb.DbLog.Insertable(new BPA_ThirdpartyRequestLog()
{
Id = CurrentUser.MessageId,
CreateBy = DateTime.Now.ToString(),


+ 1
- 1
BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json Wyświetl plik

@@ -14,7 +14,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://192.168.1.19:5006"
"applicationUrl": "http://192.168.1.30:5001"
},
"Docker": {
"commandName": "Docker",


+ 8
- 4
BPA.SAAS.Manage.Web.Entry/appsettings.json Wyświetl plik

@@ -8,10 +8,15 @@
}
},
"AllowedHosts": "*",
"baseurl": "http://192.168.1.19:5007/",
"ConnectionConfigs": [
{
"ConnectionString": "server=10.2.1.21;Database=bpa_kitchen_kitchenbasemanage;Uid=root;Pwd=cygadmin;Allow Zero Datetime=True;Convert Zero Datetime=True;",
"ConnectionString": "server=10.2.1.21;Database=bpa_kitchen_groupmealbase;Uid=root;Pwd=cygadmin;Allow Zero Datetime=True;Convert Zero Datetime=True;",
"DbType": "Mysql",
"IsAutoCloseConnection": true
},
{
"ConnectionString": "server=10.2.1.21;Database=bpa_kitchen_groupmeallog;Uid=root;Pwd=cygadmin;Allow Zero Datetime=True;Convert Zero Datetime=True;",
"DbType": "Mysql",
"IsAutoCloseConnection": true
}
@@ -31,6 +36,5 @@
"UserName": "emqx_u_block",
"Password": "emqx_p_admin8765490789"
},
"order_url": "http://order",
"wechat_url": "http://wechat"
"baseurl": "http://192.168.1.16:5002/"//团餐服务
}

+ 4
- 4
Jenkinsfile Wyświetl plik

@@ -112,10 +112,10 @@ pipeline{
// input "确认要部署线上环境吗?"
// }
sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s_saasbase.yaml"
sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s_saasbase.yaml"
sh "sed -i 's/<NAMESPACES>/${params.environment}/' k8s_saasbase.yaml"
sh "kubectl apply -f k8s_saasbase.yaml --record"
// sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s_saasbase.yaml"
// sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s_saasbase.yaml"
// sh "sed -i 's/<NAMESPACES>/${params.environment}/' k8s_saasbase.yaml"
// sh "kubectl apply -f k8s_saasbase.yaml --record"




Ładowanie…
Anuluj
Zapisz