Compare commits

...

100 Commits

Author SHA1 Message Date
  gwbvipvip e66a6f202e 配料吧台提交20241109 2 days ago
  gwbvipvip fb54abfb4e 配料吧台修改提交20241109 2 days ago
  gwbvipvip 1e044cea23 配料吧台系统提交20241026 2 weeks ago
  gwbvipvip 3b25491a15 删除IsDelete字段,新增物料及配方修改20240919 1 month ago
  gwbvipvip e30bbb9765 修复下载商品图片路径不正确问题20240817 2 months ago
  gwbvipvip 42cc6020ea 新增通过设备Id获取授权码20240816 2 months ago
  gwbvipvip 05fea5ccfb 新增商品导入导出及分类,版本管理,设备工艺增加"备注",商品管理筛选增加"设备",隐藏"价格配置"20240815 2 months ago
  gwbvipvip 553aa9626c 修复工艺导出和添加工艺bug20240717 3 months ago
  gwbvipvip 1cd82bee7e 商品分类更新Bug修复20240716 3 months ago
  gwbvipvip 42a3647a10 商品分类更新bug修复20240715 3 months ago
  gwbvipvip cf8bd50e84 商品工艺导出20240712 4 months ago
  gwbvipvip a0fa88837c 设备物料接口获取获取商品修改为当前设备20240711 4 months ago
  gwbvipvip 6b0b8b971d 设备获取设备物料接口获取工艺修改为当前设备20240711 4 months ago
  gwbvipvip 5a8d97135f 重写商品导入,商品及分类验重20240709 4 months ago
  gwbvipvip 2009f6a879 重写商品导入,商品及分类验重20240708 4 months ago
  gwbvipvip a5180e139d Revert "重写商品导入,商品及分类验重" 4 months ago
  gwbvipvip 395b6f0408 重写商品导入,商品及分类验重 4 months ago
  gwbvipvip 4470d20793 商品新增查重,工艺导出的商品同名修改20240705 4 months ago
  gwbvipvip d371885442 设备工艺优化校验及工艺导出多选20240703 4 months ago
  gwbvipvip 9768e24380 后厨优化完成20240628 4 months ago
  gwbvipvip feace0f667 设备工艺同步下载路径改为阿里云路径储存 5 months ago
  gwbvipvip 32af9c5faa Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 5 months ago
  gwbvipvip a58a9260b0 上传文件从腾讯云换到阿里云 5 months ago
  gwbvipvip 8ef177a037 上传文件从腾讯云换到阿里云 5 months ago
  zhaoy 64b3468686 opt:修改删除 5 months ago
  zhaoy b96790df61 属性值排序问题更改 5 months ago
  zhaoy 86e6029391 复制功能接口及商品数据处理接口 5 months ago
  zhaoy c8a4062cfc 属性和属性值排序问题,设备仓位排序问题, 5 months ago
  zhaoy 825467d7dd opt:增加判空操作 5 months ago
  zhaoy 8a06854c16 opt:报错提交 5 months ago
  zhaoy 9b9ab4b511 opt:修改属性值设置后工艺配置值出现问题 5 months ago
  zhaoy fa9c5640d8 增加商品地址的参数 5 months ago
  zhaoy 23973578c6 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 5 months ago
  zhaoy 14126b15ac opt:更改商品分类添加属性值设置排序问题 5 months ago
  zhaoy 5bbdc8d7e6 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 5 months ago
  zhaoy d80cf370cc 非空异常处理 5 months ago
  bpa 69c4219b05 更新 'Jenkinsfile' 6 months ago
  gwbvipvip cfbaa8894b 提交 6 months ago
  zhaoy dedc819fc3 z 6 months ago
  zhaoy 9d63816802 z 7 months ago
  zhaoy a4db765d08 Merge branch 'master' into kitchenmanage 7 months ago
  zhaoy daa6e4e72b z 7 months ago
  zhaoy 42accd2f1d z 7 months ago
  zhaoy a6e8346174 z 7 months ago
  zhaoy 28a648127b Merge branch 'master' into kitchenmanage 7 months ago
  zhaoy 3cdb5946ef Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 6314595add Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 2cbffaba62 z 8 months ago
  zhaoy 69a31cdf4e 合并 8 months ago
  gwbvipvip 137a28f655 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 8 months ago
  gwbvipvip 4e6913ea51 提交 8 months ago
  zhaoy b2a7df1c0f Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 8 months ago
  zhaoy 2017f0c11b Merge branch 'master' into kitchenmanage 8 months ago
  gwbvipvip d00f60e46c Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 8 months ago
  gwbvipvip 9f2c238e70 提交 8 months ago
  zhaoy 28f9dc02ff Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 131bd576dc Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 58f1d61b7e z 8 months ago
  zhaoy e06609b13e Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 086d8fddda z 8 months ago
  zhaoy 843a2d9d8e Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy e9beef72fb Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 0131b42373 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 63abfb732c z 8 months ago
  zhaoy 9e518de5f8 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 66799b8f5a Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 77e98316a0 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 8 months ago
  zhaoy 2ada86f3f1 Merge branch 'master' into kitchenmanage 8 months ago
  gwbvipvip 4b4bdc15a4 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 81e472e11e Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy a0c78622d5 Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.NewKitChen.Manage into kitchenmanage 8 months ago
  zhaoy aca8a272cd Merge branch 'master' into kitchenmanage 8 months ago
  gwbvipvip 56301cc43b Merge branch 'kitchenmanage' of http://10.2.1.24:10244/zhaoy/BPA.SAAS.Manage into kitchenmanage 8 months ago
  gwbvipvip 6976b4a35a Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 20ab3ab0d8 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 31ac712cb3 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 3f76fd1cab Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy a450aa28b2 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 90a503345b Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 343554359f Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy ec6c51708d Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy 0ff84da211 Merge branch 'master' into kitchenmanage 8 months ago
  zhaoy ad84178845 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy ca458d5ee1 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 62e08d4257 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy cd573b0861 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 9d0f63086e Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 6c9baa4ede Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 47ff3d8f3c Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 46b32ed6c0 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 0aa1ae5357 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 49c3a374e7 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 9120605f33 z 9 months ago
  zhaoy 47f2fae372 商品删除 9 months ago
  zhaoy ef968f685e Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 93de85a900 Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 0e642f722d Merge branch 'master' into kitchenmanage 9 months ago
  zhaoy 6d168347d1 合并 9 months ago
  zhaoy db3cfb9aff z 9 months ago
  zhaoy 6ac72c2dbb zy 9 months ago
100 changed files with 3489 additions and 637 deletions
Split View
  1. BIN
     
  2. BIN
     
  3. BIN
     
  4. +0
    -2
      BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/BaseRequestDto.cs
  5. +8
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/ResponDataBase.cs
  6. +3
    -3
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs
  7. +18
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/CheckServices.cs
  8. +48
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/Services/CheckServices.cs
  9. +16
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/Services/ICheckServices.cs
  10. +10
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/DeviceServices.cs
  11. +32
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceTechnogolyDto.cs
  12. +31
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/DeviceService.cs
  13. +7
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/IDeviceService.cs
  14. +10
    -3
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsAttributeinsertDto.cs
  15. +23
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyInsertDto.cs
  16. +14
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyQueryDto.cs
  17. +17
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyViewDto.cs
  18. +14
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsInsertDto.cs
  19. +13
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionDelDto.cs
  20. +8
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs
  21. +36
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionUpdateDto.cs
  22. +1
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsUintInsertDto.cs
  23. +10
    -1
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsUpdateDto.cs
  24. +2
    -0
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodstypeInsertDto.cs
  25. +51
    -9
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs
  26. +645
    -235
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
  27. +34
    -5
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs
  28. +37
    -27
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Dtos/MaterialDto.cs
  29. +18
    -7
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/MaterialServices.cs
  30. +12
    -5
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/IMaterialServices.cs
  31. +273
    -195
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs
  32. +2
    -2
      BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs
  33. +1
    -4
      BPA.SAAS.Manage.Application/Auth/AuthService.cs
  34. +7
    -0
      BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj
  35. +65
    -0
      BPA.SAAS.Manage.Application/DataBase/ActivationServices.cs
  36. +3
    -3
      BPA.SAAS.Manage.Application/DataBase/BatchingServices.cs
  37. +1
    -1
      BPA.SAAS.Manage.Application/DataBase/BomServices.cs
  38. +20
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationInfoDto.cs
  39. +27
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationInfoQueryDto.cs
  40. +21
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationLogDto.cs
  41. +3
    -53
      BPA.SAAS.Manage.Application/DataBase/Dtos/Batching/BatchingInfoDto.cs
  42. +3
    -59
      BPA.SAAS.Manage.Application/DataBase/Dtos/Batching/BatchingListQuery.cs
  43. +1
    -1
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/BatchingModel.cs
  44. +5
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/DeviceVersionTemplateImportInputDto.cs
  45. +33
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsClassifyDto.cs
  46. +1
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsDto.cs
  47. +6
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsInfoBaseView.cs
  48. +29
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsQueryDto.cs
  49. +144
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsTechnologyImportDto.cs
  50. +24
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsTechnologyImportModel.cs
  51. +104
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsResultDto.cs
  52. +1
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologDelete.cs
  53. +21
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs
  54. +15
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyQueryDto.cs
  55. +16
    -1
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsType/GoodsTypeDto.cs
  56. +3
    -1
      BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsType/GoodsTypeTree.cs
  57. +19
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/ActivationDeviceDto.cs
  58. +49
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/BatchingDto.cs
  59. +48
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/DeviceInfoDto.cs
  60. +15
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/DeviceLogDto.cs
  61. +16
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/InterfaceMessageDto.cs
  62. +91
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeAttrDto.cs
  63. +87
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeBatchingDto.cs
  64. +50
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeDto.cs
  65. +42
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeGroupDto.cs
  66. +43
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeInfoDto.cs
  67. +53
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeTemplateDto.cs
  68. +26
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeUseDetailDto.cs
  69. +31
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeVersionDto.cs
  70. +42
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/UsersDto.cs
  71. +30
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeBatchingDto.cs
  72. +32
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeDto.cs
  73. +18
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeGroupDto.cs
  74. +56
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeInfoDto.cs
  75. +16
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeQueryDto.cs
  76. +28
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeTemplateDto.cs
  77. +26
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeVersionDto.cs
  78. +18
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/RecipeAttribute/RecipeAttributeDto.cs
  79. +17
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/RecipeAttribute/RecipeAttributeValueDto.cs
  80. +66
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Report/MainReportDto.cs
  81. +17
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Report/MainReportQueryDto.cs
  82. +30
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Report/RecipeQueryDto.cs
  83. +40
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Report/RecipeReportDto.cs
  84. +22
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceInfoDto.cs
  85. +20
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceLogDto.cs
  86. +18
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceLogQueryDto.cs
  87. +27
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceQueryDto.cs
  88. +20
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/StoreInfoDto.cs
  89. +25
    -0
      BPA.SAAS.Manage.Application/DataBase/Dtos/Store/StoreQueryDto.cs
  90. +10
    -1
      BPA.SAAS.Manage.Application/DataBase/GoodsAttributeServices.cs
  91. +76
    -0
      BPA.SAAS.Manage.Application/DataBase/GoodsClassifyService.cs
  92. +111
    -4
      BPA.SAAS.Manage.Application/DataBase/GoodsServices.cs
  93. +47
    -1
      BPA.SAAS.Manage.Application/DataBase/GoodsTechnologyService.cs
  94. +5
    -5
      BPA.SAAS.Manage.Application/DataBase/GoodsTypeServices.cs
  95. +18
    -0
      BPA.SAAS.Manage.Application/DataBase/Interface/IActivationInfoService.cs
  96. +1
    -1
      BPA.SAAS.Manage.Application/DataBase/Interface/IBatchingService.cs
  97. +6
    -0
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsAttributeService.cs
  98. +48
    -0
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsClassifyService.cs
  99. +70
    -3
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsService.cs
  100. +12
    -1
      BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsTechnologyService.cs

BIN
View File


BIN
View File


BIN
View File


+ 0
- 2
BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/BaseRequestDto.cs View File

@@ -23,7 +23,5 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto
public List<string> DeviceIdList { get; set; }

public List<T> DataInfo { get; set; }

}

}

+ 8
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/BaseDto/ResponDataBase.cs View File

@@ -13,4 +13,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto
public string succeeded { get; set; }
public string errors { get; set; }
}

public class ResponseMessageDto
{
public int Code { get; set; }
public string Message { get;set; }
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 3
- 3
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs View File

@@ -44,7 +44,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
BomQty=a.BomQty,
BomId=a.BomId,
Sort=a.sort,
BatchingName=b.Batching_Name
BatchingName=b.Name
}).ToList();
x.BomEntr = list;
})
@@ -157,7 +157,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
var list = new List<BPA_Bom>();
for (int i = 0; i < dto.DataInfo.Count; i++)
{
var resEntity = SqlSugarDb.Db.Queryable<BPA_Bom>().Where(it => it.IsDeleted == 0).First(it => it.Id == dto.DataInfo[i].Id);
var resEntity = SqlSugarDb.Db.Queryable<BPA_Bom>().First(it => it.Id == dto.DataInfo[i].Id);
if (resEntity != null)
{
resEntity.Name = dto.DataInfo[i].Name;
@@ -212,7 +212,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
BatchingId=a.BatchingId,
BomQty=a.BomQty,
Sort=a.sort,
BatchingName=c.Batching_Name,
BatchingName=c.Name,
BomId = a.BomId,
BomName=b.Name
}).ToListAsync();


+ 18
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/CheckServices.cs View File

@@ -33,6 +33,24 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService
await _checkServices.CheckSign( key, signStr, signMd5);
}

/// <summary>
/// 通过key获取用户Id
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public async Task<string> GetUserId(string key)
{
return await _checkServices.GetUserId(key);
}

/// <summary>
/// 通过设备Id获取授权码
/// </summary>
/// <param name="deviceId"></param>
/// <returns></returns>
public async Task<string> GetAuthKey(int deviceId)
{
return await _checkServices.GetAuthKey(deviceId);
}
}
}

+ 48
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/Services/CheckServices.cs View File

@@ -13,6 +13,10 @@ using System.Threading.Tasks;
using BPA.SAAS.KitChenManage.Core;
using BPA.KitChen.GroupMeal.SqlSugar;
using BPA.SAAS.Manage.Core.System;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Store;
using BPA.SAAS.Manage.Comm.Const;
using System.Security.Claims;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Services
{
@@ -26,7 +30,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser

//检查key
await CheckKey(key);
//await CheckKey(key);

//var thisSign = signStr + "&key=" + key;
//var vvv = MD5Encryption.Encrypt(thisSign.ToUpper()).ToUpper();
@@ -81,5 +85,48 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser

CurrentUser.GroupId = tenantId;
}

/// <summary>
/// 通过key获取用户Id
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public async Task<string> GetUserId(string key)
{
var data = await SqlSugarDb.Db.Queryable<BPA_PlatformAuthorization>().FirstAsync(t => t.Key == key);
if(data == null)
return null;
return data.CreateBy;
}

public async Task<string> GetAuthKey(int deviceId)
{
var deviceInfo = await SqlSugarDb.Db.Queryable<Core.Device.BPA_DeviceInfo>().ClearFilter().FirstAsync(t => t.AutoKey == deviceId);
if (deviceInfo == null)
throw Oops.Oh("设备不存在");
var auth = await SqlSugarDb.Db.Queryable<BPA_PlatformAuthorization>().ClearFilter().FirstAsync(t => t.GroupId == deviceInfo.GroupId);
if (auth == null)
throw Oops.Oh("不存在授权码");
return auth.Key;
}

public async Task UpdateId(string autokey, bool skip = false)
{
var intAutokey = int.Parse(autokey);
var device = await SqlSugarDb.Db.Queryable<Core.Store.BPA_DeviceInfo>().ClearFilter().FirstAsync(t => t.AutoKey == intAutokey);
if (device == null)
throw Oops.Oh("设备autokey不存在");
if (device.IsActivation == 0 && !skip)
throw Oops.Oh("设备未激活");
var identity = App.User.Identity as ClaimsIdentity;
var currentGroupIdClaim = identity.FindFirst(ClaimConst.GroupId);
if (currentGroupIdClaim != null)
{
identity.RemoveClaim(currentGroupIdClaim);
}
identity.AddClaim(new Claim(ClaimConst.GroupId, device.GroupId));
identity.AddClaim(new Claim(ClaimConst.CLAINM_USERID, device.CreateBy));
identity.AddClaim(new Claim(ClaimConst.CLAINM_SUPERADMIN, "Customer"));
}
}
}

+ 16
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/CheckService/Services/ICheckServices.cs View File

@@ -18,5 +18,21 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser
///检查Sign
/// </summary>
Task CheckSign(string key, string signStr, string signMd5);

/// <summary>
/// 通过key获取用户Id
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
Task<string> GetUserId(string key);

/// <summary>
/// 通过设备Id获取授权码
/// </summary>
/// <param name="deviceId"></param>
/// <returns></returns>
Task<string> GetAuthKey(int deviceId);

Task UpdateId(string deviceId, bool skip = false);
}
}

+ 10
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/DeviceServices.cs View File

@@ -59,5 +59,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device
{
return await _deviceService.DeleteDevice(ids);
}
/// <summary>
/// 设备autoKey获取工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Device/GetDeviceTechnology")]
public async Task<List<DeviceTechnogolyDateDto>> GetDeviceTechnology(DeviceTechnogolyRequestDto dto)
{
return await _deviceService.GetDeviceTechnology(dto);
}
}
}

+ 32
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceTechnogolyDto.cs View File

@@ -0,0 +1,32 @@
using BPA.SAAS.Manage.Comm.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Dtos
{
public class DeviceTechnogolyRequestDto
{
public int AutoKey { get;set; }
}

public class DeviceTechnogolyDateDto
{
public string Id { get; set; }
public string Name { get; set; }
public List<DeviceTechnogolyActionDateDto> ActionList { get;set;}
}

public class DeviceTechnogolyActionDateDto
{
public string Id { get; set; }
public string TechnologyId { get; set; }
public string ActionName { get; set; }
public string ActionValue { get; set; }
public string ActionType { get; set; }
public TechnologyEnums TechnologyType { get; set; }
public int Sort { get; set; }
}
}

+ 31
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/DeviceService.cs View File

@@ -103,7 +103,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Services
/// <returns></returns>
public async Task<bool>UpdateDevice(DeviceUpateDto dto)
{
var resEntity = SqlSugarDb.Db.Queryable<BPA_DeviceInfo>().Where(it => it.IsDeleted == 0).First(it => it.Id == dto.Id);
var resEntity = SqlSugarDb.Db.Queryable<BPA_DeviceInfo>().First(it => it.Id == dto.Id);
resEntity.DeviceName = dto.DeviceName;
//resEntity.StopId = dto.StopId;
//resEntity.ProductId = dto.ProductId;
@@ -164,5 +164,35 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Services
var checkProductVesion = SqlSugarDb.Db.Queryable<BPA_ProductVesion>().Where(x => x.Id == dto.ProductVersionId).Any();
if (!checkProductVesion) throw Oops.Oh(ErrorCodeEnum.Code10011);
}

public async Task<List<DeviceTechnogolyDateDto>> GetDeviceTechnology(DeviceTechnogolyRequestDto dto)
{
var deviceInfo = await SqlSugarDb.Db.Queryable<BPA_DeviceInfo>().FirstAsync(t => t.AutoKey == dto.AutoKey);
if (deviceInfo == null)
throw Oops.Oh("该设备不存在");
var technologyList = await SqlSugarDb.Db.Queryable<BPA_Technology>().Where(t => t.DeviceVersionId == deviceInfo.ProductVersionId).ToListAsync();
var technologyActionList = await SqlSugarDb.Db.Queryable<BPA_TechnologyAction>().Where(t => technologyList.Select(a => a.Id).Contains(t.TechnologyId)).ToListAsync();
var result = new List<DeviceTechnogolyDateDto>();
foreach (var technology in technologyList)
{
var item = new DeviceTechnogolyDateDto { Id = technology.Id, Name = technology.Name, ActionList = new List<DeviceTechnogolyActionDateDto>() };
var actionList = technologyActionList.Where(t => t.TechnologyId == technology.Id).ToList();
foreach (var action in actionList)
{
item.ActionList.Add(new DeviceTechnogolyActionDateDto
{
Id = action.Id,
TechnologyId = action.TechnologyId,
ActionName = action.ActionName,
ActionValue = action.ActionValue,
ActionType = action.ActionType,
TechnologyType = action.TechnologyType,
Sort = action.Sort
});
}
result.Add(item);
}
return result;
}
}
}

+ 7
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Services/IDeviceService.cs View File

@@ -38,5 +38,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Services
/// <param name="ids"></param>
/// <returns></returns>
Task<bool> DeleteDevice(DeviceInfoDelDto ids);

/// <summary>
/// 设备autoKey获取工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<List<DeviceTechnogolyDateDto>> GetDeviceTechnology(DeviceTechnogolyRequestDto dto);
}
}

+ 10
- 3
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsAttributeinsertDto.cs View File

@@ -6,20 +6,27 @@ using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodsAttributeinsertDto
public class GoodsAttributeInsertDto
{
public string Id { get; set; }
/// <summary>
/// 属性名称
/// </summary>
public string AttributeName { get; set; }
/// <summary>
/// 商品分类
/// 工艺分类Id
/// </summary>
public string GoodsTypeId { get; set; }
/// <summary>
/// 工艺分类名称
/// </summary>
public string GoodsTypeName { get; set; }
public List<GoodsAttributeInsertValue> GoodsAttributeValue { get; set; }
public int Sort { get; set; }
public List<GoodsAttributeInsertValue> GoodsAttributeValueList { get; set; }
}
public class GoodsAttributeInsertValue
{
public string Id { get; set; }
/// <summary>
/// 属性值
/// </summary>


+ 23
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyInsertDto.cs View File

@@ -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 GoodsClassifyInsertDto
{
public string Id { get;set; }
public string Name { get;set; }
public int Sort { get;set; }
public string Remark { get; set; }
public List<ClassifyGoodsInfoDto> GoodsList { get;set;}
}

public class ClassifyGoodsInfoDto
{
public string GoodsId { get;set; }
public string GoodsName { get;set; }
}
}

+ 14
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyQueryDto.cs View File

@@ -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 GoodsClassifyQueryDto
{
public int Current { get; set; }
public int PageSize { get; set; }
}
}

+ 17
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsClassifyViewDto.cs View File

@@ -0,0 +1,17 @@
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 GoodsClassifyViewDto
{
public string Id { get;set; }
public string Name { get;set; }
public int Sort { get;set; }
public string Remark { get;set; }
public List<string> GoodsIdList { get;set; }
}
}

+ 14
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsInsertDto.cs View File

@@ -8,6 +8,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodsInsertDto
{
public string Id { get; set; }
/// <summary>
/// 商品名称
/// </summary>
@@ -29,12 +30,24 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
/// </summary>
public bool IsWeigh { get; set; }
/// <summary>
/// 商品分类id
/// 工艺分类id
/// </summary>
public string GoodsTypeId { get; set; }
/// <summary>
/// 工艺分类名称
/// </summary>
public string GoodsTypeName { get; set; }
/// <summary>
/// 商品单位id
/// </summary>
public string GoodsUintId { get; set; }
/// <summary>
/// 商品单位名称
/// </summary>
public string GoodsUintName { get; set; }
/// <summary>
/// 序号
/// </summary>
public int Sort { get; set; }
}
}

+ 13
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionDelDto.cs View File

@@ -0,0 +1,13 @@
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 GoodsTechnologyActionDelDto
{
public List<string> Ids { get; set; }
}
}

+ 8
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs View File

@@ -13,6 +13,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
public string WarehousrTemplateId { get; set; }
public string GoodsAttributeId { get; set; }
public string TechnologyName { get; set; }
public int Order { get; set; }
public List<GoodsTechnologyActionViewDto> Data { get; set; }
}
public class GoodsTechnologyActionViewDto
@@ -30,15 +31,21 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
/// 商品属性id集合
/// </summary>
public string GoodsAttributeId { get; set; }

/// <summary>
/// 是否物料
/// </summary>
public bool IsBatch { get; set; }
/// <summary>
/// 动作value
/// </summary>
public string ChnologyId { get; set; }
public DateTime CreateAt { get; set; }
public string GroupId { get; set; }
public int IsDeleted { get; set; }
public int Sort { get; set; }
public string GoodsId { get; set; }
public string DeviceId { get; set; }
public string WarehousrTemplateId { get; set; }
public int Order { get; set; }
}
}

+ 36
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionUpdateDto.cs View File

@@ -0,0 +1,36 @@
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 GoodsTechnologyActionUpdateDto
{
public string GoodsId { get; set; }
public string GoodsName { get; set; }
public int DeviceId { get; set; }
public string DeviceName { get; set; }
public string WarehouseTemplateId { get; set; }
public string WarehouseTemplateName { get; set; }
public List<GoodsTechnologyActionDto> TechnologyActionList { get; set; }
}
public class GoodsTechnologyActionDto
{
public string Id { get;set; }
public string StepName { get; set; }
public List<ActionJsonDto> ActionJson { get; set; }
public string GoodsAttributeId { get; set; }
public string ChnologyId { get; set; }
public int Sort { get; set; }
}

public class ActionJsonDto
{
public string actionName { get; set; }
public string actionValue { get; set; }
public string technologyactionId { get; set; }
public string index { get; set; }
}
}

+ 1
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsUintInsertDto.cs View File

@@ -8,6 +8,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodsUintInsertDto
{
public string Id { get;set; }
public string Name { get; set; }
public string Remark { get; set; }
}


+ 10
- 1
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsUpdateDto.cs View File

@@ -30,12 +30,21 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
/// </summary>
public bool IsWeigh { get; set; }
/// <summary>
/// 商品分类id
/// 工艺分类id
/// </summary>
public string GoodsTypeId { get; set; }
/// <summary>
/// 工艺分类id
/// </summary>
public string GoodsTypeName { get; set; }
/// <summary>
/// 商品单位id
/// </summary>
public string GoodsUintId { get; set; }

/// <summary>
/// 商品单位id
/// </summary>
public string GoodsUintName { get; set; }
}
}

+ 2
- 0
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodstypeInsertDto.cs View File

@@ -8,8 +8,10 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
{
public class GoodstypeInsertDto
{
public string Id { get;set;}
public string Pid { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
public string Remark { get; set; }
}
}

+ 51
- 9
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs View File

@@ -38,7 +38,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoods")]
public async Task<bool> AddGoods(BaseRequestDto<GoodsInsertDto> dto)
public async Task<List<ResponseMessageDto>> AddGoods(List<GoodsInsertDto> dto)
{
return await _goodsService.AddGoods(dto);
}
@@ -48,7 +48,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/UpdateGoods")]
public async Task<bool> UpdateGoods(BaseRequestDto<GoodsUpdateDto> dto)
public async Task<bool> UpdateGoods(List<GoodsUpdateDto> dto)
{
return await _goodsService.UpdateGoods(dto);
}
@@ -68,7 +68,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoodsAttribute")]
public async Task<bool> AddGoodsAttribute(GoodsAttributeinsertDto dto)
public async Task<List<ResponseMessageDto>> AddGoodsAttribute(List<GoodsAttributeInsertDto> dto)
{
return await _goodsService.AddGoodsAttribute(dto);
}
@@ -102,7 +102,27 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
return await _goodsService.GetGoodsTechnologyAction(goodsId);
}
/// <summary>
/// 查询商品分类
/// 添加商品工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoodsTechnologyAction")]
public async Task<List<ResponseMessageDto>> AddGoodsTechnologyAction(List<GoodsTechnologyActionUpdateDto> dto)
{
return await _goodsService.AddGoodsTechnologyAction(dto);
}
/// <summary>
/// 删除商品工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/DeleteGoodsTechnologyAction")]
public async Task<bool> DeleteGoodsTechnologyAction(GoodsTechnologyActionDelDto dto)
{
return await _goodsService.DeleteGoodsTechnologyAction(dto);
}
/// <summary>
/// 查询工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
@@ -112,17 +132,17 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
return await _goodsService.GetGoodsTypePage(dto);
}
/// <summary>
/// 添加商品分类
/// 添加工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoodsType")]
public async Task<bool> AddGoodsType(List<GoodstypeInsertDto> dto)
public async Task<List<ResponseMessageDto>> AddGoodsType(List<GoodstypeInsertDto> dto)
{
return await _goodsService.AddGoodsType(dto);
}
/// <summary>
/// 修改商品分类
/// 修改工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
@@ -132,7 +152,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
return await _goodsService.UpdateGoodsType(dto);
}
/// <summary>
/// 删除商品分类
/// 删除工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
@@ -157,7 +177,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoodsUint")]
public async Task<bool> AddGoodsUint(List<GoodsUintInsertDto> dto)
public async Task<List<ResponseMessageDto>> AddGoodsUint(List<GoodsUintInsertDto> dto)
{
return await _goodsService.AddGoodsUint(dto);
}
@@ -181,5 +201,27 @@ 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/GetGoodsClassify")]
public async Task<PageUtil> GetGoodsClassify(GoodsClassifyQueryDto dto)
{
return await _goodsService.GetGoodsClassify(dto);
}

/// <summary>
/// 添加商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Goods/AddGoodsClassify")]
public async Task<List<ResponseMessageDto>> AddGoodsClassify(List<GoodsClassifyInsertDto> dto)
{
return await _goodsService.AddGoodsClassify(dto);
}
}
}

+ 645
- 235
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
File diff suppressed because it is too large
View File


+ 34
- 5
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs View File

@@ -22,13 +22,13 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> AddGoods(BaseRequestDto<GoodsInsertDto> dto);
Task<List<ResponseMessageDto>> AddGoods(List<GoodsInsertDto> dto);
/// <summary>
/// 更新商品
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> UpdateGoods(BaseRequestDto<GoodsUpdateDto> dto);
Task<bool> UpdateGoods(List<GoodsUpdateDto> dto);
/// <summary>
/// 删除商品
/// </summary>
@@ -40,7 +40,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> AddGoodsAttribute(GoodsAttributeinsertDto dto);
Task<List<ResponseMessageDto>> AddGoodsAttribute(List<GoodsAttributeInsertDto> dto);
Task<bool> AddGoodsAttributeValue(List<GoodsAttributeValue> dto);
/// <summary>
/// 查询商品属性
@@ -53,13 +53,42 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
/// <param name="goodsId"></param>
/// <returns></returns>
Task<List<GoodsTechnologyActionListViewDto>> GetGoodsTechnologyAction(GoodsIdDto goodsId);

/// <summary>
/// 添加商品工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<List<ResponseMessageDto>> AddGoodsTechnologyAction(List<GoodsTechnologyActionUpdateDto> dto);

/// <summary>
/// 删除商品工艺
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> DeleteGoodsTechnologyAction(GoodsTechnologyActionDelDto dto);

Task<PageUtil> GetGoodsTypePage(GoodstypeQueryDto dto);
Task<bool> AddGoodsType(List<GoodstypeInsertDto> dto);
Task<List<ResponseMessageDto>> AddGoodsType(List<GoodstypeInsertDto> dto);
Task<bool> UpdateGoodsType(GoodstypeUpdateDto dto);
Task<bool> DelGoodsType(GoodstypeDelDto dto);
Task<PageUtil> GetGoodsUintPage(GoodsUintQueryDto dto);
Task<bool> AddGoodsUint(List<GoodsUintInsertDto> dto);
Task<List<ResponseMessageDto>> AddGoodsUint(List<GoodsUintInsertDto> dto);
Task<bool> UpdateGoodsUint(GoodsUintUpdateDto dto);
Task<bool> DelGoodsUint(GoodsUintDelDto dto);

/// <summary>
/// 查询商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<PageUtil> GetGoodsClassify(GoodsClassifyQueryDto dto);

/// <summary>
/// 添加商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<List<ResponseMessageDto>> AddGoodsClassify(List<GoodsClassifyInsertDto> dto);
}
}

+ 37
- 27
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Dtos/MaterialDto.cs View File

@@ -67,20 +67,20 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Dtos
/// </summary>
public string Name { get; set; }

///// <summary>
///// 原料类型
///// </summary>
//public string TypeId { get; set; }
/// <summary>
/// 原料类型Id
/// </summary>
public string TypeId { get; set; }

/// <summary>
/// 原料类型名称
/// </summary>
public string TypeName { get; set; }

///// <summary>
///// 物料单位
///// </summary>
//public string UintId { get; set; }
/// <summary>
/// 物料单位Id
/// </summary>
public string UintId { get; set; }


/// <summary>
@@ -92,37 +92,33 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Dtos

public class DelMaterialDto
{
public string MaterialId { get; set; }
public List<string> Ids { get; set; }

}

public class MaterialCreateDto
public class MaterialCreateDto
{
/// <summary>
/// 原料编码
/// </summary>
public string Code { get; set; }

public string Id { get; set; }
/// <summary>
/// 原料名称
/// </summary>
/// </summary>
public string Name { get; set; }


/// <summary>
/// 原料类型名称
/// </summary>
/// 物料类型Id
/// </summary>
public string TypeId { get; set; }
/// <summary>
/// 物料类型名称
/// </summary>
public string TypeName { get; set; }


/// <summary>
/// 物料单位Id
/// </summary>
public string UintId { get; set; }
/// <summary>
/// 物料单位名称
/// </summary>
public string UintName { get; set; }

}

public class MaterialUpdateDto
@@ -154,5 +150,19 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Dtos

}

public class MaterialTypeDto
{
public string Id { get; set; }

/// <summary>
/// 原料名称
/// </summary>
public string Name { get; set; }
}

public class DefaultUintDto
{
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 18
- 7
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/MaterialServices.cs View File

@@ -39,18 +39,18 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 添加物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Material/AddMaterial")]
public async Task<string> AddMaterial(BaseRequestDto<MaterialCreateDto> InputDto)
public async Task<List<ResponseMessageDto>> AddMaterial(List<MaterialCreateDto> inputDto)
{
return await _materialServices.AddMaterial(InputDto);
return await _materialServices.AddMaterial(inputDto);
}

/// <summary>
/// 删除物料
/// </summary>
/// <param name="MaterialId"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Material/DelMaterial")]
public async Task<bool> DelMaterial(DelMaterialDto inputDto)
@@ -62,12 +62,23 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 修改物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Material/UpdateMateria")]
public async Task<bool> UpdateMateria(BaseRequestDto<MaterialUpdateDto> InputDto)
public async Task<bool> UpdateMateria(List<MaterialUpdateDto> inputDto)
{
return await _materialServices.UpdateMateria(inputDto);
}

/// <summary>
/// 分页查询物料分类
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
[HttpPost("/api/ExternalPlatform/Material/GetMaterialTypePageList")]
public async Task<PageUtil<List<MaterialTypeDto>>> GetMaterialTypePageList(MaterialPageInputDto inputDto)
{
return await _materialServices.UpdateMateria(InputDto);
return await _materialServices.GetMaterialTypePageList(inputDto);
}
}
}

+ 12
- 5
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/IMaterialServices.cs View File

@@ -26,14 +26,14 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 添加物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<string> AddMaterial(BaseRequestDto<MaterialCreateDto> inputDto);
Task<List<ResponseMessageDto>> AddMaterial(List<MaterialCreateDto> inputDto);

/// <summary>
/// 删除物料
/// </summary>
/// <param name="MaterialId"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<bool> DelMaterial(DelMaterialDto inputDto);

@@ -41,8 +41,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 修改物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<bool> UpdateMateria(List<MaterialUpdateDto> inputDto);

/// <summary>
/// 分页查询物料分类
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
Task<bool> UpdateMateria(BaseRequestDto<MaterialUpdateDto> inputDto);
Task<PageUtil<List<MaterialTypeDto>>> GetMaterialTypePageList(MaterialPageInputDto inputDto);
}
}

+ 273
- 195
BPA.SAAS.Manage.Application/AExternalPlatform/Service/Material/Services/MaterialService.cs View File

@@ -17,6 +17,7 @@ using Microsoft.AspNetCore.Components.Forms;
using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
using System.Drawing.Drawing2D;
using System.Text;

namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Services
{
@@ -40,22 +41,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service


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,
JoinType.Left, a.StockUint == c.Id))
.Where((a, b, c) => a.IsDeleted == 0)
.WhereIF(!string.IsNullOrEmpty(inputDto.Name), (a, b, c) => a.Batching_Name.Contains(inputDto.Name))
.Select((a, b, c) => new MaterialDto()
var data = await SqlSugarDb.Db.Queryable<BPA_Batching>()
.WhereIF(!string.IsNullOrEmpty(inputDto.Name), a => a.Name.Contains(inputDto.Name))
.Select(a => new MaterialDto()
{
Id = a.Id,
Code = a.Code,
Name = a.Batching_Name,
//TypeId = b.Id,
TypeName = b.Name,
// UintId = c.Id,
UintName = c.Name,
Name = a.Name,

}).ToPageList(inputDto.Current, inputDto.PageSize, ref total);
}).ToPageListAsync(inputDto.Current, inputDto.PageSize, total);

return new PageUtil<List<MaterialDto>>()
{
@@ -68,112 +62,175 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 添加物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<string> AddMaterial(BaseRequestDto<MaterialCreateDto> inputDto)
public async Task<List<ResponseMessageDto>> AddMaterial(List<MaterialCreateDto> inputDto)
{
try
{

var list=new List<BPA_Batching>();

SqlSugarDb.Db.Ado.BeginTran();

foreach (var item in inputDto.DataInfo)
var userId = await _checkServices.GetUserId(App.HttpContext.Request.Headers["key"].ToString());
var batchingList = await SqlSugarDb.Db.Queryable<BPA_Batching>().ToListAsync();
var typeList = await SqlSugarDb.Db.Queryable<BPA_BatchingType>().ToListAsync();
var uintList = await SqlSugarDb.Db.Queryable<BPA_BatchingUint>().ToListAsync();
var typeIdList = new List<string>();
var uintIdList = new List<string>();
var repeatList = new List<ResponseMessageDto>();
var successList = new List<ResponseMessageDto>();
var defaultUintData = uintList.FirstOrDefault(t => t.Name == "g");
var defaultUint = new DefaultUintDto();
if (defaultUintData != null)
{
//1.物料单位查询
var typeData = await SqlSugarDb.Db.Queryable<BPA_BatchingType>().FirstAsync(x => x.Name == item.TypeName);
if (typeData == null)
defaultUint.Id = defaultUintData.Id;
defaultUint.Name = defaultUintData.Name;
}
else
{
var dUint = new BPA_BatchingUint
{

typeData = new BPA_BatchingType()
Id = Guid.NewGuid().ToString(),
Name = "默认单位",
CreateBy = userId
};
await SqlSugarDb.Db.Insertable(dUint).ExecuteCommandAsync();
defaultUint.Id = dUint.Id;
defaultUint.Name = dUint.Name;
}
var typeAddList = new List<BPA_BatchingType>();
var typeUpdateList = new List<BPA_BatchingType>();
var uintAddList = new List<BPA_BatchingUint>();
var uintUpdateList = new List<BPA_BatchingUint>();
var batchingAddList = new List<BPA_Batching>();
var batchingUpdateList = new List<BPA_Batching>();
foreach (var item in inputDto)
{
var batchingData = batchingList.FirstOrDefault(t => t.Name == item.Name && t.Id != item.Id);
if (batchingData != null)
repeatList.Add(new ResponseMessageDto { Code = 30001, Message = "物料上传失败:重复物料数据", Id = item.Id, Name = item.Name });
var typeData = typeList.FirstOrDefault(t => t.Name == item.TypeName && t.Id != item.TypeId);
if (typeData != null)
repeatList.Add(new ResponseMessageDto { Code = 30001, Message = "物料类型上传失败:重复物料类型数据", Id = item.TypeId, Name = item.TypeName });
if (string.IsNullOrWhiteSpace(item.UintId))
{
item.UintId = defaultUint.Id;
item.UintName = defaultUint.Name;
}
else
{
var uintData = uintList.FirstOrDefault(t => t.Name == item.UintName && t.Id != item.UintId);
if (uintData != null)
repeatList.Add(new ResponseMessageDto { Code = 30001, Message = "物料单位上传失败:重复物料单位数据", Id = item.UintId, Name = item.UintName });
}
var typeInfo = typeList.FirstOrDefault(x => x.Id == item.TypeId);
if (typeInfo == null)
{
if (!typeIdList.Contains(item.TypeId))
{
GroupId = CurrentUser.GroupId,
Id = Guid.NewGuid().ToString(),
Name = string.IsNullOrEmpty(item.TypeName) ? "默认分类" : item.TypeName,
};
SqlSugarDb.Db.Insertable(typeData).ExecuteCommand();
typeInfo = new BPA_BatchingType()
{
Id = item.TypeId,
Name = item.TypeName,
CreateBy = userId
};
typeAddList.Add(typeInfo);
typeIdList.Add(item.TypeId);
}
}

//2.单位查询
var uintData = await SqlSugarDb.Db.Queryable<BPA_BatchingUint>()
.FirstAsync(x => x.Name == item.UintName);
if (uintData == null)
else
{
uintData = new BPA_BatchingUint()
typeInfo.Name = item.TypeName;
typeUpdateList.Add(typeInfo);
}
successList.Add(new ResponseMessageDto { Code = 30000, Message = "物料类型上传成功", Id = item.TypeId, Name = item.TypeName });
var uintInfo = uintList.FirstOrDefault(x => x.Id == item.UintId);
if (uintInfo == null)
{
if (!uintIdList.Contains(item.UintId))
{
GroupId = CurrentUser.GroupId,
Id = Guid.NewGuid().ToString(),
Name = string.IsNullOrEmpty(item.UintName) ? "默认分类" : item.UintName,
};
SqlSugarDb.Db.Insertable(uintData).ExecuteCommand();
uintInfo = new BPA_BatchingUint()
{
Id = item.UintId,
Name = item.UintName,
CreateBy = userId
};
uintAddList.Add(uintInfo);
uintIdList.Add(item.UintId);
}
}
//3.物料查询
var materialData = await SqlSugarDb.Db.Queryable<BPA_Batching>().FirstAsync(x => x.Batching_Name == item.Name || x.Code == item.Code);
if (materialData == null)
else
{
uintInfo.Name = item.UintName;
uintUpdateList.Add(uintInfo);
}
successList.Add(new ResponseMessageDto { Code = 30000, Message = "物料单位上传成功", Id = item.UintId, Name = item.UintName });
var code = GenerateRandomString();
while (batchingList.Any(t => t.Code == code))
{
materialData = new BPA_Batching()
code = GenerateRandomString();
}
var batchingInfo = batchingList.FirstOrDefault(t => t.Id == item.Id);
if (batchingInfo == null)
{
batchingInfo = new BPA_Batching()
{
Id = Guid.NewGuid().ToString(),
GroupId = CurrentUser.GroupId,
Aittribute = 0,
Batching_Name = item.Name,
Batching_Type = typeData.Id,
Code = item.Code,
Price = 0,
Specs = "",
outstockUint = uintData.Id,
Status = CommonStatus.ENABLE,
StockUint = uintData.Id,
TypeID = typeData.Id,
IsDeleted = 0,
Id = item.Id,
Name = item.Name,
Code = code,
//StockUint = item.UintId,
CreateBy = userId
};

SqlSugarDb.Db.Insertable(materialData).ExecuteCommand();
batchingAddList.Add(batchingInfo);
}
else
{
throw Oops.Oh(ErrorCodeEnum.Code1002);
batchingInfo.Name = item.Name;
//batchingInfo.StockUint = item.UintId;
batchingUpdateList.Add(batchingInfo);
}
list.Add(materialData);
successList.Add(new ResponseMessageDto { Code = 30000, Message = "物料上传成功", Id = item.Id, Name = item.Name });
}

if (repeatList.Count > 0)
return repeatList;
await SqlSugarDb.Db.Insertable(typeAddList).ExecuteCommandAsync();
await SqlSugarDb.Db.Updateable(typeUpdateList).ExecuteCommandAsync();
await SqlSugarDb.Db.Insertable(uintAddList).ExecuteCommandAsync();
await SqlSugarDb.Db.Updateable(uintUpdateList).ExecuteCommandAsync();
await SqlSugarDb.Db.Insertable(batchingAddList).ExecuteCommandAsync();
await SqlSugarDb.Db.Updateable(batchingUpdateList).ExecuteCommandAsync();
SqlSugarDb.Db.Ado.CommitTran();

#region 下发数据到设备

var data = new List<PushDataBatchingDto>();
foreach (var item in list)
{
data.Add(new PushDataBatchingDto()
{
Aittribute = item.Aittribute,
AutoKey = item.AutoKey,
Code = item.Code,
ForeignKeyRe = item.ForeignKeyRe,
Id = item.Id,
Name = item.Batching_Name,
netrecovery = item.netrecovery,
outstockUint = item.outstockUint,
Price = item.Price,
proportion = item.proportion,
Specs = item.Specs,
StockUint = item.StockUint,
StockUintName = item.StockUint,
TypeID = item.TypeID,
});
}
if (inputDto.IsPush)
{
await _thirdpartyPushService.AddPushRecordAndPushDevice<MaterialCreateDto>(inputDto, 2, JsonConvert.SerializeObject(list.Select(x => x.Id).ToList()),
JsonConvert.SerializeObject(data));
}
return successList;
#region 下发数据到设备(后厨弃用)
//var data = new List<PushDataBatchingDto>();
//foreach (var item in list)
//{
// data.Add(new PushDataBatchingDto()
// {
// Aittribute = item.Aittribute,
// AutoKey = item.AutoKey,
// Code = item.Code,
// ForeignKeyRe = item.ForeignKeyRe,
// Id = item.Id,
// Name = item.Batching_Name,
// netrecovery = item.netrecovery,
// outstockUint = item.outstockUint,
// Price = item.Price,
// proportion = item.proportion,
// Specs = item.Specs,
// StockUint = item.StockUint,
// StockUintName = item.StockUint,
// TypeID = item.TypeID,
// });
//}
//if (inputDto.IsPush)
//{
// await _thirdpartyPushService.AddPushRecordAndPushDevice<MaterialCreateDto>(inputDto, 2, JsonConvert.SerializeObject(list.Select(x => x.Id).ToList()),
// JsonConvert.SerializeObject(data));
//}


#endregion

return JsonConvert.SerializeObject(list.Select(x => x.Id).ToList());
}
catch (Exception e)
{
@@ -185,17 +242,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
/// <summary>
/// 删除物料
/// </summary>
/// <param name="MaterialId"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<bool> DelMaterial(DelMaterialDto inputDto)
{
try
{
var materialData = await SqlSugarDb.Db.Queryable<BPA_Batching>().FirstAsync(x => x.Id == inputDto.MaterialId);
var materialData = await SqlSugarDb.Db.Queryable<BPA_Batching>().Where(x => inputDto.Ids.Contains(x.Id)).ToListAsync();
if (materialData == null)
{
throw Oops.Oh(ErrorCodeEnum.Code1003);
}
throw Oops.Oh("物料不存在");
var res = await SqlSugarDb.Db.Deleteable(materialData).ExecuteCommandAsync();
return res > 0;
}
@@ -203,118 +258,102 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
{
throw Oops.Oh(e.Message);
}


}

/// <summary>
/// 修改物料
/// </summary>
/// <param name="InputDto"></param>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<bool> UpdateMateria(BaseRequestDto<MaterialUpdateDto> inputDto)
public async Task<bool> UpdateMateria(List<MaterialUpdateDto> inputDto)
{
try
{
SqlSugarDb.Db.Ado.BeginTran();

if (inputDto.DataInfo.Count>1)
{
throw Oops.Oh("不支持多物料修改");
}

var materia = inputDto.DataInfo.FirstOrDefault();


//1.物料单位查询
var typeData = await SqlSugarDb.Db.Queryable<BPA_BatchingType>().FirstAsync(x => x.Name == materia.TypeName);
if (typeData == null)
var batchingList = await SqlSugarDb.Db.Queryable<BPA_Batching>().ToListAsync();
var typeList = await SqlSugarDb.Db.Queryable<BPA_BatchingType>().ToListAsync();
var uintList = await SqlSugarDb.Db.Queryable<BPA_BatchingUint>().ToListAsync();
var typeIdList = new Dictionary<string, string>();
var uintIdList = new Dictionary<string, string>();
foreach (var item in inputDto)
{

typeData = new BPA_BatchingType()
{
GroupId = CurrentUser.GroupId,
Id = Guid.NewGuid().ToString(),
Name = string.IsNullOrEmpty(materia.TypeName) ? "默认分类" : materia.TypeName,
};
SqlSugarDb.Db.Insertable(typeData).ExecuteCommand();
}

//2.单位查询
var uintData = await SqlSugarDb.Db.Queryable<BPA_BatchingUint>()
.FirstAsync(x => x.Name == materia.UintName);
if (uintData == null)
{
uintData = new BPA_BatchingUint()
{
GroupId = CurrentUser.GroupId,
Id = Guid.NewGuid().ToString(),
Name = string.IsNullOrEmpty(materia.UintName) ? "默认分类" : materia.UintName,
};
SqlSugarDb.Db.Insertable(uintData).ExecuteCommand();
}
//3.物料查询
var material = await SqlSugarDb.Db.Queryable<BPA_Batching>().FirstAsync(x => x.Code == materia.Code || x.Batching_Name == materia.Name);
// if(material==null) throw Oops.Oh(ErrorCodeEnum.Code1003);
var materialData = await SqlSugarDb.Db.Queryable<BPA_Batching>().FirstAsync(x => x.Id == materia.Id);

if (materialData == null)
{
throw Oops.Oh(ErrorCodeEnum.Code1003);
}
else
{
if (material != null && material.Id == materialData.Id)
//1.物料单位查询
var typeId = string.Empty;
var typeData = typeList.FirstOrDefault(x => x.Name == item.TypeName);
if (typeData == null)
{
throw Oops.Oh(ErrorCodeEnum.Code10017);
if (!typeIdList.ContainsKey(item.TypeName))
{
typeData = new BPA_BatchingType()
{
Id = Guid.NewGuid().ToString(),
Name = item.TypeName
};
SqlSugarDb.Db.Insertable(typeData).ExecuteCommand();
typeIdList.Add(item.TypeName, typeData.Id);
typeId = typeData.Id;
}
else
typeId = typeIdList[item.TypeName];
}

materialData = new BPA_Batching()
else
typeId = typeData.Id;
//2.单位查询
var uintId = string.Empty;
var uintData = uintList.FirstOrDefault(x => x.Name == item.UintName);
if (uintData == null)
{
Id = materia.Id,
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,
};
SqlSugarDb.Db.Updateable(materialData).ExecuteCommand();
if (!uintIdList.ContainsKey(item.UintName))
{
uintData = new BPA_BatchingUint()
{
Id = Guid.NewGuid().ToString(),
Name = item.UintName
};
SqlSugarDb.Db.Insertable(uintData).ExecuteCommand();
uintIdList.Add(item.UintName, uintData.Id);
uintId = uintData.Id;
}
else
uintId = uintIdList[item.UintName];
}
else
uintId = uintData.Id;
var bathingData = batchingList.FirstOrDefault(t => t.Id == item.Id);
if (bathingData == null)
throw Oops.Oh($"物料“{item.Name}”不存在");
bathingData.Name = item.Name;
//bathingData.StockUint = uintId;
SqlSugarDb.Db.Updateable(bathingData).ExecuteCommand();
#region 下发数据到设备(后厨弃用)

//var data = new PushDataBatchingDto()
//{
// Aittribute = materialData.Aittribute,
// AutoKey = materialData.AutoKey,
// Code = materialData.Code,
// ForeignKeyRe = materialData.ForeignKeyRe,
// Id = materialData.Id,
// Name = materialData.Batching_Name,
// netrecovery = materialData.netrecovery,
// outstockUint = materialData.outstockUint,
// Price = materialData.Price,
// proportion = materialData.proportion,
// Specs = materialData.Specs,
// StockUint = materialData.StockUint,
// StockUintName = materialData.StockUint,
// TypeID = materialData.TypeID,
//};
//if (inputDto.IsPush)
//{
// await _thirdpartyPushService.AddPushRecordAndPushDevice<MaterialUpdateDto>(inputDto, 2, materialData.Id,
// JsonConvert.SerializeObject(data));
//}


#endregion
}
SqlSugarDb.Db.Ado.CommitTran();
#region 下发数据到设备

var data = new PushDataBatchingDto()
{
Aittribute = materialData.Aittribute,
AutoKey = materialData.AutoKey,
Code = materialData.Code,
ForeignKeyRe = materialData.ForeignKeyRe,
Id = materialData.Id,
Name = materialData.Batching_Name,
netrecovery = materialData.netrecovery,
outstockUint = materialData.outstockUint,
Price = materialData.Price,
proportion = materialData.proportion,
Specs = materialData.Specs,
StockUint = materialData.StockUint,
StockUintName = materialData.StockUint,
TypeID = materialData.TypeID,
};
if (inputDto.IsPush)
{
await _thirdpartyPushService.AddPushRecordAndPushDevice<MaterialUpdateDto>(inputDto, 2, materialData.Id,
JsonConvert.SerializeObject(data));
}


#endregion
return true;
}
catch (Exception e)
@@ -323,5 +362,44 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Material.Service
throw Oops.Oh(e.Message);
}
}

private static Random random = new();
public static string GenerateRandomString()
{
const string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string digits = "0123456789";
StringBuilder result = new();
for (int i = 0; i < 4; i++)
{
result.Append(letters[random.Next(letters.Length)]);
}
for (int i = 0; i < 4; i++)
{
result.Append(digits[random.Next(digits.Length)]);
}
return result.ToString();
}

/// <summary>
/// 分页查询物料分类
/// </summary>
/// <param name="inputDto"></param>
/// <returns></returns>
public async Task<PageUtil<List<MaterialTypeDto>>> GetMaterialTypePageList(MaterialPageInputDto inputDto)
{
int total = new RefAsync<int>();
var data = await SqlSugarDb.Db.Queryable<BPA_BatchingType>()
.WhereIF(!string.IsNullOrEmpty(inputDto.Name), a => a.Name.Contains(inputDto.Name))
.Select(a => new MaterialTypeDto()
{
Id = a.Id,
Name = a.Name
}).ToPageListAsync(inputDto.Current, inputDto.PageSize, total);
return new PageUtil<List<MaterialTypeDto>>()
{
Total = total,
Data = data
};
}
}
}

+ 2
- 2
BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs View File

@@ -36,7 +36,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
})
.Mapper(x =>
{
x.WarehousePostion = SqlSugarDb.Db.Queryable<BPA_WarehousePostion,BPA_Batching>((a, b) => new JoinQueryInfos(JoinType.Left,a.BatchingId==b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id=a.Id.SelectAll(),BatchingName=b.Batching_Name}).ToList();
x.WarehousePostion = SqlSugarDb.Db.Queryable<BPA_WarehousePostion,BPA_Batching>((a, b) => new JoinQueryInfos(JoinType.Left,a.BatchingId==b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id=a.Id.SelectAll(),BatchingName=b.Name}).ToList();
})
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.ToPageListAsync(inputDto.Current, inputDto.PageSize, total);
@@ -65,7 +65,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
})
.Mapper(x =>
{
x.WarehousePostion = SqlSugarDb.Db.Queryable<BPA_WarehousePostion, BPA_Batching>((a, b) => new JoinQueryInfos(JoinType.Left, a.BatchingId == b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id = a.Id.SelectAll(), BatchingName = b.Batching_Name }).ToList();
x.WarehousePostion = SqlSugarDb.Db.Queryable<BPA_WarehousePostion, BPA_Batching>((a, b) => new JoinQueryInfos(JoinType.Left, a.BatchingId == b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id = a.Id.SelectAll(), BatchingName = b.Name }).ToList();
})
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.ToListAsync();


+ 1
- 4
BPA.SAAS.Manage.Application/Auth/AuthService.cs View File

@@ -40,14 +40,11 @@ namespace BPA.SAAS.Manage.Application.Auth
// 判断用户名和密码是否正确 忽略全局过滤器
var user = await _db.Queryable<BPA_Users>().Where(u => u.Account.Equals(input.Account)
&& u.Password.Equals(encryptPasswod)
&& u.IsDeleted == 0
).FirstAsync();
_ = user ?? throw Oops.Oh("用户名或密码不正确");
//获取权限
List<IConditionalModel> conModels = new List<IConditionalModel>();
conModels.Add(new ConditionalModel() { FieldName = "Id", ConditionalType = ConditionalType.Equal, FieldValue = user.GroupId });
conModels.Add(new ConditionalModel() { FieldName = "Status", ConditionalType = ConditionalType.Equal, FieldValue = CommonStatus.ENABLE.ToString() });
conModels.Add(new ConditionalModel() { FieldName = "IsDeleted", ConditionalType = ConditionalType.Equal, FieldValue ="0" });
//if (user.AdminType != 1)
//{
// conModels.Add(new ConditionalModel() { FieldName = "Type", ConditionalType = ConditionalType.Equal, FieldValue = input.Type.ToString() });
@@ -68,7 +65,7 @@ namespace BPA.SAAS.Manage.Application.Auth
{ ClaimConst.CLAINM_NAME, user.Name },
{ ClaimConst.CLAINM_SUPERADMIN, CLAINM_SUPERADMIN },
{ ClaimConst.GroupId, user.GroupId},
{ ClaimConst.OrgId,user.SysOrgId},
{ ClaimConst.OrgId,user.OrgId},
//{ ClaimConst.SupplyPlatformId,company?.SupplyPlatformId}
}, 1440);



+ 7
- 0
BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj View File

@@ -22,6 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Aliyun.OSS" Version="1.0.7" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.35" />
</ItemGroup>

@@ -30,4 +31,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>

+ 65
- 0
BPA.SAAS.Manage.Application/DataBase/ActivationServices.cs View File

@@ -0,0 +1,65 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.ActivationInfo;
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("Activation", Tag = "授权码信息")]
public class ActivationServices : IDynamicApiController
{
IActivationInfoService _authInfoService;
public ActivationServices(IActivationInfoService authInfoService)
{
_authInfoService = authInfoService;
}

/// <summary>
/// 获取授权码分页
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/activation/getActivationInfoPage")]
public async Task<PageUtil> GetActivationInfoPage(ActivationInfoQueryDto dto)
{
return await _authInfoService.GetActivationInfoPage(dto);
}

/// <summary>
/// 更新授权码
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/activation/updateActivationInfo")]
public async Task<bool> UpdateActivationInfo(ActivationInfoUpDto dto)
{
return await _authInfoService.UpdateActivationInfo(dto);
}

/// <summary>
/// 生成离线授权码
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/activation/updateOfflineKey")]
public async Task<string> UpdateOfflineKey(OfflineKeyDto dto)
{
return await _authInfoService.UpdateOfflineKey(dto);
}

/// <summary>
/// 删除授权码
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("/api/activation/deleteActivationInfo")]
public async Task<bool> DeleteActivationInfo(string id)
{
return await _authInfoService.DeleteActivationInfo(id);
}
}
}

+ 3
- 3
BPA.SAAS.Manage.Application/DataBase/BatchingServices.cs View File

@@ -22,10 +22,10 @@ namespace BPA.SAAS.Manage.Application.DataBase
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/batching/getpage")]
public async Task<PageUtil> GetBatchingList(BatchingListQuery dto)
[HttpPost("/api/batching/getBatchingPage")]
public async Task<PageUtil> GetBatchingPage(BatchingListQuery dto)
{
return await _batchingService.GetBatchingList(dto);
return await _batchingService.GetBatchingPage(dto);
}
/// <summary>
/// 添加


+ 1
- 1
BPA.SAAS.Manage.Application/DataBase/BomServices.cs View File

@@ -125,7 +125,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
/// <summary>
/// 删除配方
/// </summary>
/// <param name="dto"></param>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("/api/bom/DelBom")]
public async Task<bool> DelBom(string id)


+ 20
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.ActivationInfo
{
public class ActivationInfoDto
{
public string Id { get; set; }
public string OnlineKey { get; set; }
public string OfflineKey { get; set; }
public DateTime EffectiveDate { get; set; }
public int Status { get; set; }
public int? AutoKey { get; set; }
public string DeviceName { get;set; }
public ActivationLogDto Log { get; set; }
}
}

+ 27
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationInfoQueryDto.cs View File

@@ -0,0 +1,27 @@
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.ActivationInfo
{
public class ActivationInfoQueryDto : PageInputBase
{
public int? Status { get;set; }
public string DeviceName { get; set; }
}

public class ActivationInfoUpDto
{
public string Id { get; set; }
public DateTime? EffectiveDate { get; set; }
}

public class OfflineKeyDto
{
public string Id { get; set; }
public int AutoKey { get;set; }
}
}

+ 21
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/ActivationInfo/ActivationLogDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.ActivationInfo
{
public class ActivationLogDto
{
public string Id { get;set; }
public string ActivationId { get; set; }
public string OnlineKey { get; set; }
public string OfflineKey { get; set; }
public string EffectiveDate { get; set; }
public DateTime ActivationDate { get; set; }
public int AutoKey { get; set; }
public string DeviceName { get; set; }
public string Company { get;set; }
}
}

+ 3
- 53
BPA.SAAS.Manage.Application/DataBase/Dtos/Batching/BatchingInfoDto.cs View File

@@ -19,64 +19,14 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Batching
/// <summary>
/// 物料编码
/// </summary>
public string code { get; set; }
/// <summary>
/// 物料规格
/// </summary>
public string specs { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
public string Code { get; set; }
/// <summary>
/// 单位
/// </summary>
public string StockUint { get; set; }
/// <summary>
/// 类型
/// </summary>
public string TypeID { get; set; }
/// <summary>
/// itemName
/// </summary>
public string itemName { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 原料属性
/// </summary>
public string Aittribute { get; set; }
public int StockUint { get; set; }
/// <summary>
/// 配料类型
/// </summary>
public string batchingType { get; set; }

/// <summary>
/// 成本价
/// </summary>
public decimal Price { get; set; }


/// <summary>
/// 出库单位
/// </summary>
public string outstockUint { get; set; }


/// <summary>
/// 换算比例
/// </summary>
public decimal proportion { get; set; }
/// <summary>
/// 净料率
/// </summary>
public decimal netrecovery { get; set; }
/// <summary>
///
/// </summary>
public List<BatchingDetailedDto> membersList { get; set; }
public string ForeignKeyRe { get; set; }
public int Type { get; set; }
}
}

+ 3
- 59
BPA.SAAS.Manage.Application/DataBase/Dtos/Batching/BatchingListQuery.cs View File

@@ -18,76 +18,20 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Batching
/// </summary>
public string Code { get; set; }
/// <summary>
/// 商品属性 (0成品,1半成品,2,易耗品)
/// </summary>
public string Aittribute { get; set; }
/// <summary>
/// 原料名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 原料类型
/// </summary>
public string TypeID { get; set; }
/// <summary>
/// 原料类型名称
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateAt { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? UpdateAt { get; set; }
/// <summary>
/// 库存单位
/// </summary>
public string StockUint { get; set; }
/// <summary>
/// 库存单位名称
/// </summary>
public string StockUintName { get; set; }

/// <summary>
/// 规格属性
/// </summary>
public string Specs { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
public int StockUint { get; set; }
/// <summary>
///
/// </summary>
public string batchingType { get; set; }
/// <summary>
/// 成本价
/// </summary>
public decimal? Price { get; set; }
/// <summary>
/// 净料率
/// </summary>
public decimal? netrecovery { get; set; }

/// <summary>
/// 出库单位
/// </summary>
public string outstockUint { get; set; }


/// <summary>
/// 换算比例
/// </summary>
public decimal proportion { get; set; }
/// <summary>
///
/// 原料类型
/// </summary>
public List<BatchingDetailedDto> MembersList { get; set; }
public DateTime? DeleteAt { get; set; }
public string DeleteBy { get; set; }
public string ForeignKeyRe { get; set; }

public int Type { get; set; }
}
}

+ 1
- 1
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/BatchingModel.cs View File

@@ -9,7 +9,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
{
public class BatchingModel
{
[Column("仓位")]
[Column("仓位")]
public string Index { get; set; }
[Column("物料名称")]
public string BatchingName { get; set; }


+ 5
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/DeviceVersionTemplateImportInputDto.cs View File

@@ -27,5 +27,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
public IFormFile file { get; set; }

public bool IsAddGoodsTemplate { get; set; } = false;

/// <summary>
/// 阿里云路径
/// </summary>
public string AliyunUrl { get;set; }
}
}

+ 33
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsClassifyDto.cs View File

@@ -0,0 +1,33 @@
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.Goods
{
public class GoodsClassifyDto : PageInputBase
{
public string Name { get; set; }
}

public class GoodsClassifyDataDto
{
public string Id { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
public string Remark { get; set; }
}

public class RelationDto
{
public string ClassifyId { get; set; }
public List<RelationGoodsIdDto> GoodsIdList { get;set; }
}

public class RelationGoodsIdDto
{
public string GoodsId { get; set; }
}
}

+ 1
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsDto.cs View File

@@ -1,4 +1,5 @@
using BPA.SAAS.Manage.Comm.Enum;
using Npoi.Mapper.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;


+ 6
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsInfoBaseView.cs View File

@@ -24,4 +24,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
public bool IsAttrubute { get; set; }
public List<GoodsAttributeList> GoodsAttributeList { get; set; }
}

public class GoodsInfoView
{
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 29
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsQueryDto.cs View File

@@ -23,4 +23,33 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods


}

/// <summary>
/// 根据设备查询工艺
/// </summary>
public class DeviceQueryDto : PageInputBase
{
public string DeviceId { get; set; }
public string TechnologyName { get; set; }
}

public class IputParam
{
//商品id
public string OldgoodsId { get; set; }
//新商品id
public string NewgoodsId { get; set; }
//工艺属性
public string goodsAttributeId { get; set; }
/// <summary>
/// 新工艺属性
/// </summary>
public string NewgoodsAttributeId { get; set; }
/// <summary>
/// 设备id
/// </summary>
public string DevideId { get; set; }
}


}

+ 144
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsTechnologyImportDto.cs View File

@@ -0,0 +1,144 @@
using Npoi.Mapper.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
{
public class GoodsTechnologyImportDto
{
/// <summary>
/// 文件
/// </summary>
public IFormFile File { get; set; }
}

public class GoodsTechnologyExportDto
{
/// <summary>
/// 商品Id
/// </summary>
public List<string> GoodsId { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 文档名
/// </summary>
public string FileName { get; set; }
/// <summary>
/// Ids
/// </summary>
public List<string> Ids { get; set; }
}

public class GoodsInfoImportDto
{
/// <summary>
/// 文件
/// </summary>
public IFormFile File { get; set; }
}

public class GoodsExportDto
{
/// <summary>
/// 商品Id
/// </summary>
public string GoodId { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 多个商品Id
/// </summary>
public List<string> GoodsId { get; set; }
}

public class AttrDto
{
public string Attr { get; set; }
public string AttrValue { get; set; }
}

public class GoodsChooseDto
{
public string GoodsName { get; set; }
public bool IsSkip { get;set; }
}

public class GoodsImportDto
{
/// <summary>
/// 文件
/// </summary>
public IFormFile File { get; set; }
public string Json { get; set; }
public string DeviceId { get;set;}
}

public class GoodsImportJsonDto
{
public string key { get; set; }
public bool Value { get; set; }
}


public class GoodsImportDataDto
{
[Column("商品名称")]
public string Name { get; set; }
[Column("工艺分类")]
public string Type { get; set; }
[Column("商品单位")]
public string Uint { get; set; }
[Column("商品价格(¥)")]
public decimal Price { get; set; }
[Column("是否称重")]
public string IsWeigh { get; set; }
[Column("备注")]
public string Descritption { get; set; }
[Column("图片")]
public object ImgUrl { get; set; }
}

public class GoodsTechnologyValueModel
{
public string StepName { get; set; }
public string ActionName { get; set; }
public string ActionValue { get; set; }
public string Index { get; set; }
}

public class AttributeDataDto
{
public string AttrName { get;set; }
public string AttrValue { get; set; }
}

public class TechnologyImportModel
{
public string StepName { get; set; }

public List<TechnologyImportChildModel> Child { get; set; }
}

public class TechnologyImportChildModel
{
public string ActionName { get; set; }
public string ActionValue { get; set; }
public string Index { get; set; }
}

public class ActionJsonModel
{
public string actionName { get; set; }
public string actionValue { get; set; }
public string technologyactionId { get; set; }
public string index { get; set; }
}
}

+ 24
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Goods/GoodsTechnologyImportModel.cs View File

@@ -0,0 +1,24 @@
using Npoi.Mapper.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Goods
{
public class GoodsTechnologyDataModel
{
public string Ids { get; set; }
public string Names { get; set; }
public List<GoodsTechnologyValueModel> Values { get; set; }
}

public class NewActionJsonModel
{
public string actionName { get; set; }
public string actionValue { get; set; }
public string batchingId { get; set; }
public string technologyactionId { get; set; }
}
}

+ 104
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsResultDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos
{

public class GoodsTypeResultDto
{
public string GoodsTypeId { get; set; }

public string GoodsTypeName { get; set; }

public List<GoodsAttributeResultDto> GoodsAttributeList { get; set; }

public List<GoodsInfoResultDto> GoodsInfoList{ get; set; }
}

public class GoodsClassifyResultDto
{
public string GoodsClassifyId { get; set; }
public string GoodsClassifyName { get; set; }
public List<GoodsDataResultDto> GoodsList { get; set; }
}

public class GoodsDataResultDto
{
public string GoodsId { get; set; }

public string GoodsName { get; set; }

public string ImgUrl { get; set; }
}

public class GoodsAttributeResultDto
{
public string GoodsAttributeId { get; set; }

public string GoodsAttributeName { get; set; }

public int Sort { get; set; }

public List<GoodsAttributeValueResultDto> GoodsAttributeValueList { get; set; }
}

public class GoodsAttributeValueResultDto
{
public string GoodsAttributeId { get; set; }
public string GoodsAttributeValueId { get; set; }
public string AttributeValue { get; set; }
public int Sort { get; set; }
}

public class GoodsResultDto
{
public string TypeId { get; set; }

public string TypeName { get; set; }
}

public class GoodsInfoResultDto
{
public string GoodsId { get; set; }

public string GoodsName { get; set; }

public string ImgUrl { get; set; }
public List<GoodsTechnologyActionResultDto> GoodsTechnologyActionList { get; set; }
}

public class GoodsTechnologyActionResultDto
{
/// <summary>
/// 步骤名称
/// </summary>
public string StepName { get; set; }
/// <summary>
/// 动作json
/// </summary>
public string ActionJson { get; set; }
/// <summary>
/// 商品属性id集合
/// </summary>
public string GoodsAttributeId { get; set; }
/// <summary>
/// 是否物料
/// </summary>
public bool IsBatch { get; set; }
/// <summary>
/// 动作value
/// </summary>
public string ChnologyId { get; set; }
public string GroupId { get; set; }
public int Sort { get; set; }
public string GoodsId { get; set; }
public string DeviceId { get; set; }
/// <summary>
/// 仓位模板
/// </summary>
public string WarehousrTemplateId { get; set; }
}
}

+ 1
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologDelete.cs View File

@@ -11,5 +11,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology
public string devideId { get; set; }
public string goodsId { get; set; }
public string goodsAttributeId { get; set; }
public string warehousrTemplateId { get; set; }
}
}

+ 21
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyActionListView.cs View File

@@ -12,6 +12,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology
public string WarehousrTemplateId { get; set; }
public string GoodsAttributeId { get; set; }
public string DeviceName { get; set; }
public int Order { get; set; }
public List<GoodsTechnologyActionView> Data { get; set; }
}
public class GoodsTechnologyActionView
@@ -44,5 +45,25 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology
public string GoodsId { get; set; }
public string DeviceId { get; set; }
public string WarehousrTemplateId { get; set; }
public int Order { get; set; }
}

public class DeviceTechnologyActionListView
{
public string Id { get; set; }
public string DeviceId { get; set; }
public string WarehousrTemplateId { get; set; }
//属性值
public string GoodsAttributeId { get; set; }
//工艺属性名称
public string TechnologyName { get; set; }
//设备名称
public string DeviceName { get; set; }

public string GoodsId{ get; set; }
//商品名称
public string GoodsName { get; set; }
}


}

+ 15
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsTechnology/GoodsTechnologyQueryDto.cs View File

@@ -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.GoodsTechnology
{
public class GoodsTechnologyQueryDto : PageInputBase
{
public string GoodsId { get; set; }
public string DeviceName { get; set; }
}
}

+ 16
- 1
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsType/GoodsTypeDto.cs View File

@@ -1,4 +1,5 @@
using System;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -14,5 +15,19 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType
public int Sort { get; set; }
public int Status { get; set; }
public string Remark { get; set; }
public List<AttributeDto> AttributeList { get; set; }
}

public class AttributeDto
{
public string AttributeName { get; set; }
public int Sort { get; set; }
public List<AttributeValueDto> AttributeValueList { get; set; }
}

public class AttributeValueDto
{
public string AttributeValue { get; set; }
public int Sort { get; set; }
}
}

+ 3
- 1
BPA.SAAS.Manage.Application/DataBase/Dtos/GoodsType/GoodsTypeTree.cs View File

@@ -1,4 +1,5 @@
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute;
using BPA.SAAS.Manage.Comm.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -17,5 +18,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType
public CommonStatus Status { get; set; }
public string Pid { get; set; }//父级字段
public List<GoodsTypeTree> Children { get; set; }
public List<GoodsAttributeView> GoodsAttributeViewList { get;set; }
}
}

+ 19
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/ActivationDeviceDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class ActivationDeviceDto
{
public string OnlineKey { get;set; }
}

public class OfflineActivationLogDto
{
public string OfflineKey { get;set; }
public DateTime ActivationDate { get; set; }
}
}

+ 49
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/BatchingDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class BatchingDto
{
public string Id { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public DateTime CreateAt { get; set; }
public int StockUint { get; set; }
public int Type { get; set; }
public string Key { get; set; }
}

public class BatchingDataDto
{
/// <summary>
/// 物料Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 物料单位(1:液体料 2:主料)
/// </summary>
public int StockUint { get; set; }
/// <summary>
/// 物料类型(1:g 2:kg)
/// </summary>
public int Type { get; set; }
/// <summary>
/// 第三方对接标识
/// </summary>
public string Key { get; set; }
}

public class BatchingDelDto
{
public string Id { get;set; }
public string Name { get; set; }
}
}

+ 48
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/DeviceInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class DeviceInfoDto
{
/// <summary>
/// 门店Id
/// </summary>
public string StoreId { get; set; }
/// <summary>
/// 门店名称
/// </summary>
public string StoreName { get; set; }
/// <summary>
/// 门店电话
/// </summary>
public string StorePhone { get; set; }
/// <summary>
/// 设备Id
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string DeviceName { get; set; }
/// <summary>
/// 设备编号
/// </summary>
public string DeviceAutokey { get; set; }
/// <summary>
/// 设备位置
/// </summary>
public string DevicePosition { get; set; }
/// <summary>
/// 主体单位
/// </summary>
public string OrgName { get;set; }
/// <summary>
/// 联系电话
/// </summary>
public string ContactPhone { get; set; }
}
}

+ 15
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/DeviceLogDto.cs View File

@@ -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.Interface
{
public class DeviceLogDto
{
public string StoreName { get; set; }
public string DeviceName { get; set; }
public IFormFile FormFile { get; set; }
}
}

+ 16
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/InterfaceMessageDto.cs View File

@@ -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.Interface
{
public class InterfaceMessageDto
{
public int Code { get; set; }
public string Message { get; set; }
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 91
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeAttrDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeAttrDto
{
public string Id { get; set; }
public string RecipeId { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
public List<RecipeAttrValueDto> ValueList { get; set; }
}

public class RecipeAttrValueDto
{
public string Id { get; set; }
public string AttributeId { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
}

public class RecipeAttrDataDto
{
/// <summary>
/// 配方版本Id
/// </summary>
public string RecipeVersionId { get; set; }
/// <summary>
/// 配方版本名称
/// </summary>
public string RecipeVersionName { get; set; }
/// <summary>
/// 属性集合
/// </summary>
public List<AttrDto> AttrList { get; set; }
}

public class AttrDto
{
/// <summary>
/// 属性Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 属性名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 序号
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 属性值集合
/// </summary>
public List<AttrValueDto> ValueList { get; set; }
}

public class AttrValueDto
{
/// <summary>
/// 属性值Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 属性Id
/// </summary>
public string AttributeId { get; set; }
/// <summary>
/// 属性值名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 序号
/// </summary>
public int Sort { get; set; }
}

public class AttrValueDelDto
{
public string RecipeId { get;set; }
public string RecipeName { get; set; }
public string AttrId { get; set; }
public string AttrName { get; set; }
public string ValueId { get; set; }
public string ValueName { get; set; }
}
}

+ 87
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeBatchingDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeBatchingDto
{
public string Id { get; set; }
public string AttributeId { get; set; }
public string AttributeName { get; set; }
public List<RecipeBatchingListDto> BatchingList { get; set; }
}

public class RecipeBatchingListDto
{
public string BatchingId { get; set; }
public string BatchingName { get; set; }
public decimal Weight { get; set; }
}

public class RecipeBatchingDataDto
{
/// <summary>
/// 配方版本Id
/// </summary>
public string RecipeVersionId { get; set; }
/// <summary>
/// 配方版本名称
/// </summary>
public string RecipeVersionName { get; set; }
/// <summary>
/// 配置列表
/// </summary>
public List<ConfigDto> ConfigList { get;set; }
}

public class ConfigDto
{
/// <summary>
/// 配置Id
/// </summary>
public string Id { get;set; }
/// <summary>
/// 多属性Id集合
/// </summary>
public string AttributeId { get; set; }
/// <summary>
/// 多属性名称集合
/// </summary>
public string AttributeName { get; set; }
/// <summary>
/// 物料列表
/// </summary>
public List<BatchingListDto> BatchingList { get; set; }
}

public class BatchingListDto
{
/// <summary>
/// 主键Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 物料Id
/// </summary>
public string BatchingId { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string BatchingName { get; set; }
/// <summary>
/// 用量
/// </summary>
public decimal Weight { get; set; }
}

public class RecipeBatchingDelDto
{
public string RecipeId { get; set; }
public string RecipeName { get; set; }
public string ConfigId { get;set; }
public string ConfigName { get;set; }
}
}

+ 50
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeDto
{
/// <summary>
/// 配方模版分组
/// </summary>
public List<BPA_RecipeGroup> RecipeGroupList { get; set; }
/// <summary>
/// 配方模版
/// </summary>
public List<BPA_RecipeTemplate> RecipeTemplateList { get; set; }
/// <summary>
/// 配方列表
/// </summary>
public List<BPA_RecipeInfo> RecipeInfoList { get; set; }
/// <summary>
/// 配方版本
/// </summary>
public List<BPA_RecipeVersion> RecipeVersionList { get; set; }
/// <summary>
/// 配方属性
/// </summary>
public List<BPA_RecipeAttribute> RecipeAttrList { get; set; }
/// <summary>
/// 配方属性值
/// </summary>
public List<BPA_RecipeAttributeValue> RecipeAttrValueList { get; set; }
/// <summary>
/// 配方基本配置
/// </summary>
public List<BPA_RecipeBaseConfig> RecipeBaseConfigList { get; set; }
/// <summary>
/// 配方多属性配置
/// </summary>
public List<BPA_RecipeConfig> RecipeAttrConfigList { get; set; }
/// <summary>
/// 配方配置详情
/// </summary>
public List<BPA_RecipeConfigDetail> RecipeConfigDetailList { get; set; }
}
}

+ 42
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeGroupDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeGroupDto
{
public string Id { get; set; }
public string Name { get; set; }
public bool IsWeight { get; set; }
public int Sort { get; set; }
}

public class RecipeGroupDataDto
{
/// <summary>
/// 分组Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 分组名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 是否称重(true:称重模式 false:标准模式)
/// </summary>
public bool IsWeight { get; set; }
/// <summary>
/// 序号
/// </summary>
public int Sort { get; set; }
}

public class RecipeGroupDelDto
{
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 43
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeInfoDto
{
public string Id { get; set; }
public string RecipeGroupId { get; set; }
public string Name { get; set; }
public decimal? ReferenceWeight { get; set; }
public int Sort { get; set; }
}

public class RecipeInfoDataDto
{
/// <summary>
/// 配方Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 是否称重(true:称重模式 false:标准模式)
/// </summary>
public bool IsWeight { get;set; }
/// <summary>
/// 配方名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 基准克数
/// </summary>
public decimal? ReferenceWeight { get; set; }
}

public class RecipeInfoDelDto
{
public string Id { get; set; }
public string Name { get; set; }
}
}

+ 53
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeTemplateDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeTemplateDataDto
{
/// <summary>
/// 分组Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 分组名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 分组类型(false:标准 true:称重)
/// </summary>
public bool IsWeight { get; set; }
/// <summary>
/// 序号
/// </summary>
public int Sort { get;set; }
/// <summary>
/// 模版集合
/// </summary>
public List<TemplateDto> TemplateList { get;set; }
}

public class TemplateDto
{
/// <summary>
/// 模版Id
/// </summary>
public string Id { get; set; }
/// <summary>
/// 配方Id
/// </summary>
public string RecipeId { get; set; }
/// <summary>
/// 版本Id
/// </summary>
public string VersionId { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }

}
}

+ 26
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeUseDetailDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeUseDetailDataDto
{
public bool IsWeight { get;set; }
public int Status { get; set; }
public string RecipeName { get; set; }
public string AttributeName { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public DateTime UseDate { get; set; }
public List<RecipeBatchingUseDetailDataDto> BatchingList { get;set; }
}

public class RecipeBatchingUseDetailDataDto
{
public string BatchingName { get; set; }
public decimal UseWeight { get; set; }
}
}

+ 31
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/RecipeVersionDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class RecipeVersionDataDto
{
/// <summary>
/// 配方Id
/// </summary>
public string RecipeId { get; set; }
/// <summary>
/// 配方名称
/// </summary>
public string RecipeName { get; set; }
/// <summary>
/// 版本集合
/// </summary>
public List<VersionDto> VersionList { get; set; }
}

public class VersionDto
{
public string Id { get;set; }
public int Version { get; set; }
public string Describe { get; set; }
}
}

+ 42
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Interface/UsersDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Interface
{
public class UsersDto
{
public string Id { get; set; }
/// <summary>
/// 用户名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 登录账号
/// </summary>
public string Account { get; set; }
/// <summary>
/// 登录密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 手机号码
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 管理员类型(1:超级管理员、2:管理员、3:普通账号)
/// </summary>
public int AdminType { get; set; }
/// <summary>
/// 归属组织
/// </summary>
public string SysOrgId { get; set; }
/// <summary>
/// 企业名称
/// </summary>
public string CompanyName { get; set; }
public DateTime? CreateAt { get; set; }
}
}

+ 30
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeBatchingDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Recipe
{
public class RecipeBatchingDto
{
public string Id { get; set; }
public string BatchingId { get; set; }
public string Name { get; set; }
public decimal Weight { get; set; }
}

public class RecipeBatchingDataDto
{
public string RecipeVersionId { get; set; }
public string ValueIds { get; set; }
public int AutoKey { get; set; }
public List<BatchingDto> BatchingList { get; set; }
}

public class BatchingDto
{
public string BatchingId { get; set; }
public decimal Weight { get; set; }
}
}

+ 32
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Recipe
{
public class RecipeResDto
{
public string Id { get; set; }
public string Name { get; set; }
public bool IsWeight { get; set; }
public decimal? ReferenceWeight { get; set; }
public DateTime? CreateAt { get; set; }
}

public class RecipeResUpDto
{
public string Id { get; set; }
public string Name { get; set; }
public bool IsWeight { get; set; }
public decimal? ReferenceWeight { get; set; }
public int AutoKey { get; set; }
}

public class CopyItemDto
{
public int Value { get; set; }
public string Label { get; set; }
}
}

+ 18
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeGroupDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Recipe
{
public class RecipeGroupDto
{
public string Id { get; set; }
public string GroupTempId { get;set; }
public string Name { get; set; }
public bool IsWeight { get; set; }
public int Sort { get; set; }
public int AutoKey { get; set; }
}
}

+ 56
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Recipe
{
public class RecipeTemplateInfoDto
{
public string Id { get; set; }
public string RecipeGroupId { get; set; }
public string RecipeId { get; set; }
public string RecipeName { get; set; }
public string VersionId { get; set; }
public int? Version { get; set; }
public string Describe { get; set; }
public int Sort { get; set; }
}

public class RecipeSelectDto
{
public string RecipeId { get; set; }
public string Name { get; set; }
public List<VersionSelectDto> VersionList { get; set; }
}

public class VersionSelectDto
{
public string VersionId { get; set; }
public string Version { get; set; }
public string Describe { get; set; }
}

public class AttrRecipeListDto
{
public string Id { get; set; }
public string ValueIds { get; set; }
public string Name { get; set; }
public List<RecipeBatchingDto> BatchingList { get; set; }
}

public class RecipePageDto
{
public string RecipeGroupId { get; set; }
public int AutoKey { get;set; }
}

public class RecipeTemplateUpDto
{
public string Id { get; set; }
public string RecipeId { get;set; }
public string VersionId { get;set; }
public int AutoKey { get; set; }
}
}

+ 16
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeQueryDto.cs View File

@@ -0,0 +1,16 @@
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.Recipe
{
public class RecipeQueryDto : PageInputBase
{
public string Name { get; set; }
public bool? IsWeight { get;set; }
public int AutoKey { get;set; }
}
}

+ 28
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeTemplateDto.cs View File

@@ -0,0 +1,28 @@
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.Recipe
{
public class RecipeGroupTemplateQueryDto : PageInputBase
{
public string Name { get;set; }
}

public class RecipeGroupTemplateDto
{
public string Id { get;set; }
public string Name { get; set; }
public string Describe { get; set; }
}

public class RecipeGroupTemplateUpDto
{
public string Id { get; set; }
public string Name { get; set; }
public string Describe { get; set; }
}
}

+ 26
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Recipe/RecipeVersionDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Recipe
{
public class RecipeVersionResDto
{
public string Id { get;set; }
public string RecipeId { get; set; }
public int Version { get;set; }
public string Describe { get;set; }
public DateTime? CreateAt { get; set; }
}

public class RecipeVersionResUpDto
{
public string Id { get; set; }
public string RecipeId { get; set; }
public int Version { get; set; }
public string Describe { get; set; }
public int AutoKey { get; set; }
}
}

+ 18
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/RecipeAttribute/RecipeAttributeDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.RecipeAttribute
{
public class RecipeAttributeDto
{
public string Id { get; set; }
public string RecipeVersionId { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
public int AutoKey { get; set; }
public List<RecipeAttributeValueDto> ValueList { get; set; }
}
}

+ 17
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/RecipeAttribute/RecipeAttributeValueDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.RecipeAttribute
{
public class RecipeAttributeValueDto
{
public string Id { get; set; }
public string AttributeId { get; set; }
public string Name { get; set; }
public int Sort { get; set; }
public int AutoKey { get; set; }
}
}

+ 66
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Report/MainReportDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Report
{
public class ListDto
{
public List<ValueDto> StoreList { get; set; }
public List<ValueDto> DeviceList { get; set; }
}

public class ValueDto
{
public string Value { get; set; }
public string Label { get; set; }
}

public class RankDto
{
public RecipeUseBarDto RecipeUseBar { get; set; }
public RecipeUseLineDto RecipeUseLine { get; set; }
public BatchingUseBarDto BatchingUseBar { get; set; }
public BatchingUseLineDto BatchingUseLine { get; set; }
}

public class RecipeUseBarDto
{
public string[] Names { get; set; }
public int[] Values { get; set; }
}

public class RecipeUseLineDto
{
public string[] Xcoos { get; set; }
public string[] Names { get; set; }
public List<LineDto> Values { get; set; }
}

public class LineDto
{
public string Name { get;set; }
public int[] Data { get; set; }
}

public class BatchingUseBarDto
{
public string[] Names { get; set; }
public decimal[] Values { get; set; }
}

public class BatchingUseLineDto
{
public string[] Xcoos { get; set; }
public string[] Names { get; set; }
public List<BatchingLineDto> Values { get; set; }
}

public class BatchingLineDto
{
public string Name { get; set; }
public decimal[] Data { get; set; }
}
}

+ 17
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Report/MainReportQueryDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Report
{
public class MainReportQueryDto
{
public string StoreName { get; set; }
public string DeviceName { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string Grain { get; set; }
}
}

+ 30
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Report/RecipeQueryDto.cs View File

@@ -0,0 +1,30 @@
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.Report
{
public class RecipeQueryDto
{
public string RecipeName { get;set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string StoreName { get;set; }
public string DeviceName { get; set; }
public bool? IsWeight { get; set; }
public int? Status { get;set; }
}

public class BatchingQueryDto
{
public string BatchingName { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public bool? IsWeight { get; set; }
}
}

+ 40
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Report/RecipeReportDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Report
{
public class RecipeUseDetailDto
{
public string Id { get; set; }
public string RecipeName { get;set; }
public string StoreName { get;set;}
public string DeviceName { get;set; }
public bool IsWeight { get;set; }
public int Status { get; set; }
public DateTime UseDate { get;set; }
}

public class RecipeUseSummaryDto
{
public string Id { get; set; }
public string RecipeName { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public bool IsWeight { get; set; }
public int Status { get; set; }
public int UseCount { get;set; }
}

public class RecipeBatchingUseSummaryDto
{
public string Id { get; set; }
public string BatchingName { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public decimal UseWeight { get;set; }
public bool IsWeight { get; set; }
}
}

+ 22
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Store
{
public class DeviceInfoDto
{
public string Id { get;set; }
public string Name { get; set; }
public string StoreId { get; set; }
public string StoreName { get; set; }
public int IsEnable { get; set; }
public int IsActivation { get; set; }
public int AutoKey { get; set; }
public string Remark { get; set; }
public List<ActivationLogDto> LogList { get; set; }
}
}

+ 20
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceLogDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Store
{
public class DeviceLogDto
{
public string Id { get; set; }
public string FileName { get; set; }
public string FileUrl { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public string GroupId { get;set; }
public string CompanyName { get; set; }
public DateTime CreateAt { get; set; }
}
}

+ 18
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceLogQueryDto.cs View File

@@ -0,0 +1,18 @@
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.Store
{
public class DeviceLogQueryDto : PageInputBase
{
public string FileName { get; set; }
public string StoreName { get; set; }
public string DeviceName { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
}
}

+ 27
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/DeviceQueryDto.cs View File

@@ -0,0 +1,27 @@
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.Store
{
public class DeviceQueryDto : PageInputBase
{
public string Name { get; set; }
}

public class DeviceRelationDto
{
public string DeviceId { get; set; }
public List<RelationRecipeIdDto> RecipeIdList { get; set; }
}

public class UpLoadDeviceLogDto
{
public string StoreName { get;set; }
public string DeviceName { get;set;}
public IFormFile FormFile { get; set; }
}
}

+ 20
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/StoreInfoDto.cs View File

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

namespace BPA.SAAS.Manage.Application.DataBase.Dtos.Store
{
public class StoreInfoDto
{
public string Id { get; set; }
public string Name { get; set; }
public string OrgId { get; set; }
public string OrgName { get; set; }
public string Header { get; set; }
public string Phone { get; set; }
public string Position { get; set; }
public string Description { get; set; }
}
}

+ 25
- 0
BPA.SAAS.Manage.Application/DataBase/Dtos/Store/StoreQueryDto.cs View File

@@ -0,0 +1,25 @@
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.Store
{
public class StoreQueryDto : PageInputBase
{
public string Name { get; set; }
}

public class RelationRecipeIdDto
{
public string RecipeId { get; set; }
}

public class StoreRelationDto
{
public string StoreId { get; set; }
public List<RelationRecipeIdDto> RecipeIdList { get; set; }
}
}

+ 10
- 1
BPA.SAAS.Manage.Application/DataBase/GoodsAttributeServices.cs View File

@@ -98,6 +98,15 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsAttributeServices.GetByGoodsIdAttribute(id);
}
/// <summary>
/// 获取商品属性和属性值
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("/api/goodsattribute/GetGoodsAttributeList")]
public async Task<List<GoodsAttributeView>> GetGoodsAttributeViewList(string id)
{
return await _goodsAttributeServices.GetGoodsAttributeViewList(id);
}
}
}

+ 76
- 0
BPA.SAAS.Manage.Application/DataBase/GoodsClassifyService.cs View File

@@ -0,0 +1,76 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
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("GoodsClassify", Tag = "商品分类管理")]
public class GoodsClassifyService : IDynamicApiController, ITransient
{
IGoodsClassifyService _goodsClassifyService;
public GoodsClassifyService(IGoodsClassifyService goodsClassifyService)
{
_goodsClassifyService = goodsClassifyService;
}

/// <summary>
/// 分页获取商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsClassify/getGoodsClassifyPage")]
public async Task<PageUtil<List<GoodsClassifyDataDto>>> GetGoodsClassifyPage(GoodsClassifyDto dto)
{
return await _goodsClassifyService.GetGoodsClassifyPage(dto);
}

/// <summary>
/// 更新商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsClassify/updateGoodsClassify")]
public async Task<bool> UpdateGoodsClassify(GoodsClassifyDataDto dto)
{
return await _goodsClassifyService.UpdateGoodsClassify(dto);
}

/// <summary>
/// 删除商品分类
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpGet("/api/goodsClassify/deleteGoodsClassify")]
public async Task<bool> DeleteGoodsClassify(string ids)
{
return await _goodsClassifyService.DeleteGoodsClassify(ids);
}

/// <summary>
/// 根据分类获取商品
/// </summary>
/// <param name="classifyId"></param>
/// <returns></returns>
[HttpGet("/api/goodsClassify/getRelation")]
public async Task<List<RelationGoodsIdDto>> GetRelation(string classifyId)
{
return await _goodsClassifyService.GetRelation(classifyId);
}

/// <summary>
/// 设置商品的分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodsClassify/setRelation")]
public async Task<bool> SetRelation(RelationDto dto)
{
return await _goodsClassifyService.SetRelation(dto);
}
}
}

+ 111
- 4
BPA.SAAS.Manage.Application/DataBase/GoodsServices.cs View File

@@ -1,4 +1,5 @@
using BPA.Franchisee.Application.FranchiseeCenter.GoodsServices;
using BPA.SAAS.Manage.Application.DataBase.Dtos;
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute;
using BPA.SAAS.Manage.Application.DataBase.Interface;
@@ -13,12 +14,12 @@ using System.Threading.Tasks;
namespace BPA.SAAS.Manage.Application.DataBase
{
[ApiDescriptionSettings("Goods", Tag = "商品管理")]
public class GoodsServices: IDynamicApiController, ITransient
public class GoodsServices : IDynamicApiController, ITransient
{
IGoodsService _goodsService;
public GoodsServices(IGoodsService goodsService)
{
_goodsService=goodsService;
_goodsService = goodsService;
}
/// <summary>
/// 分页查询
@@ -30,6 +31,29 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsService.GetGoodsPage(dto);
}

/// <summary>
/// 获取商品信息(根据设备id)
/// </summary>
/// <param name="autoKey"></param>
/// <returns></returns>
[HttpGet("/api/goods/GetGoodsListByIds")]
public async Task<object> GetGoodsListByIds(string autoKey)
{
return await _goodsService.GetGoodsListByIds(autoKey);
}

/// <summary>
/// 获取商品分类信息(根据设备id)
/// </summary>
/// <param name="autoKey"></param>
/// <returns></returns>
[HttpGet("/api/goods/GetGoodsClassifyByIds")]
public async Task<object> GetGoodsClassifyByIds(string autoKey)
{
return await _goodsService.GetGoodsClassifyByIds(autoKey);
}

/// <summary>
/// 添加商品
/// </summary>
@@ -148,6 +172,16 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsService.GetGoods(id);
}
/// <summary>
/// 根据ids获取商品信息
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpPost("/api/goods/getgoodsWithids")]
public async Task<List<GoodsInfoView>> GetGoodsWithIds(List<string> ids)
{
return await _goodsService.GetGoodsWithIds(ids);
}
///// <summary>
///// 设备上传商品数据
///// </summary>
@@ -155,7 +189,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
///// <returns></returns>
//Task<bool> SendGoodsInfo(GoodsDatadto goodsDatadto);
[HttpPost("/api/goods/exportgood"), ApiDescriptionSettings(SplitCamelCase = false), NonUnify]
public async Task<bool> ExportGood(IFormFile file)
public async Task<bool> ExportGood(IFormFile file)
{
return await _goodsService.ExportGood(file);
}
@@ -165,7 +199,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
/// </summary>
/// <returns></returns>
[HttpPost("/api/goods/technologytemplateexport"), NonUnify]
public async Task<string> TechnologyTemplateExport(string deviceId)
public async Task<string> TechnologyTemplateExport(string deviceId)
{
return await _goodsService.TechnologyTemplateExport(deviceId);
}
@@ -179,5 +213,78 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsService.DeviceVersionTemplateImport(inputDto);
}

/// <summary>
/// 商品工艺导入
/// </summary>
/// <param name="importDto"></param>
/// <returns></returns>
[HttpPost("/api/goods/goodsTechnologyImport"), NonUnify]
public async Task<bool> GoodsTechnologyImport([FromForm] GoodsTechnologyImportDto importDto)
{
return await _goodsService.GoodsTechnologyImport(importDto);
}

/// <summary>
/// 商品工艺模版导出
/// </summary>
/// <param name="exportDto"></param>
/// <returns></returns>
[HttpPost("/api/goods/goodsTechnologyExport"), NonUnify]
public async Task<string> GoodsTechnologyExport(GoodsTechnologyExportDto exportDto)
{
return await _goodsService.GoodsTechnologyExport(exportDto);
}

/// <summary>
/// 商品工艺导出
/// </summary>
/// <param name="exportDto"></param>
/// <returns></returns>
[HttpPost("/api/goods/goodsSimpleExport"), NonUnify]
public async Task<string> GoodsSimpleExport(GoodsTechnologyExportDto exportDto)
{
return await _goodsService.GoodsSimpleExport(exportDto);
}

/// <summary>
/// 读取上传文件
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goods/getFileToChoose")]
public async Task<List<GoodsChooseDto>> GetFileToChoose([FromForm] GoodsInfoImportDto dto)
{
return await _goodsService.GetFileToChoose(dto);
}


/// <summary>
/// 商品导入
/// </summary>
/// <param name="importDto"></param>
/// <returns></returns>
[HttpPost("/api/goods/goodsImport")]
public async Task<bool> GoodsImport([FromForm] GoodsImportDto importDto)
{
return await _goodsService.GoodsImport(importDto);
}

/// <summary>
/// 下载商品
/// </summary>
/// <param name="exportDto"></param>
/// <returns></returns>
[HttpPost("/api/goods/goodsExport")]
public async Task<string> GoodsExport(GoodsExportDto exportDto)
{
return await _goodsService.GoodsExport(exportDto);
}

[HttpPost("/api/goods/UpdateAction")]
public async Task<bool> UpdateAction()
{
return await _goodsService.UpdateAction();
}
}
}

+ 47
- 1
BPA.SAAS.Manage.Application/DataBase/GoodsTechnologyService.cs View File

@@ -1,5 +1,7 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
using BPA.SAAS.Manage.Application.DataBase.Interface;
using BPA.SAAS.Manage.Core.Base;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;
@@ -77,5 +79,49 @@ namespace BPA.SAAS.Manage.Application.DataBase
{
return await _goodsTechnologyService.GetDeviceTechnology();
}

/// <summary>
/// 更新工艺
/// </summary>
/// <returns></returns>
[HttpGet("/api/goodstechnology/Updatetechnology")]
public async Task<bool> Updatetechnology()
{
return await _goodsTechnologyService.Updatetechnology();
}

/// <summary>
/// 根据设备获取工艺
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[HttpPost("/api/goodstechnology/getDeviceTechnologyaction")]
public async Task<List<DeviceTechnologyActionListView>> GetDeviceTechnologyAction(DeviceQueryDto param)
{
return await _goodsTechnologyService.GetDeviceTechnologyAction(param);
}


/// <summary>
/// 复制设备工艺
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[HttpPost("/api/goodstechnology/CopyTechnologyaction")]
public async Task<bool> CopyTechnologyAction(IputParam param)
{
return await _goodsTechnologyService.CopyTechnologyAction(param);
}

/// <summary>
/// 根据设备获取工艺(分页)
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("/api/goodstechnology/GetGoodsTechnologyPage")]
public async Task<PageUtil> GetGoodsTechnologyPage(GoodsTechnologyQueryDto dto)
{
return await _goodsTechnologyService.GetGoodsTechnologyPage(dto);
}
}
}

+ 5
- 5
BPA.SAAS.Manage.Application/DataBase/GoodsTypeServices.cs View File

@@ -9,7 +9,7 @@ using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Application.DataBase
{
[ApiDescriptionSettings("Goods", Tag = "商品类型管理")]
[ApiDescriptionSettings("Goods", Tag = "工艺分类管理")]
public class GoodsTypeServices: IDynamicApiController, ITransient
{
IGoodsTypeService _goodsTypeService;
@@ -38,7 +38,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
return await _goodsTypeService.GetGoodsTypeList_alm();
}
/// <summary>
/// 添加商品类型
/// 添加工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
@@ -48,7 +48,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
return await _goodsTypeService.AddGoodsType(dto);
}
/// <summary>
/// 更新商品类型
/// 更新工艺分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
@@ -58,7 +58,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
return await _goodsTypeService.UpdateGoodsType(dto);
}
/// <summary>
/// 删除商品类型
/// 删除工艺分类
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
@@ -68,7 +68,7 @@ namespace BPA.SAAS.Manage.Application.DataBase
return await _goodsTypeService.DelGoodsType(Id);
}
/// <summary>
/// 查询商品类型树结构
/// 查询工艺分类树结构
/// </summary>
/// <returns></returns>
[HttpGet("/api/goodstype/tree")]


+ 18
- 0
BPA.SAAS.Manage.Application/DataBase/Interface/IActivationInfoService.cs View File

@@ -0,0 +1,18 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.ActivationInfo;
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.Interface
{
public interface IActivationInfoService
{
Task<PageUtil> GetActivationInfoPage(ActivationInfoQueryDto dto);
Task<bool> UpdateActivationInfo(ActivationInfoUpDto dto);
Task<string> UpdateOfflineKey(OfflineKeyDto dto);
Task<bool> DeleteActivationInfo(string id);
}
}

+ 1
- 1
BPA.SAAS.Manage.Application/DataBase/Interface/IBatchingService.cs View File

@@ -10,7 +10,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
{
public interface IBatchingService
{
Task<PageUtil> GetBatchingList(BatchingListQuery dto);
Task<PageUtil> GetBatchingPage(BatchingListQuery dto);
Task<bool> AddBatching(BatchingInfoDto dto);
Task<bool> UpdateBatching(BatchingInfoDto dto);
Task<bool> BatchDelBatching(List<string> Ids);


+ 6
- 0
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsAttributeService.cs View File

@@ -59,5 +59,11 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// <returns></returns>
Task<List<GoodsAttributeList>> GetByGoodsIdAttribute(string id);
Task<List<GoodsAttributeList>> GetByNameAttribute(string name);
/// <summary>
/// 获取商品属性和属性值
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<List<GoodsAttributeView>> GetGoodsAttributeViewList(string id);
}
}

+ 48
- 0
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsClassifyService.cs View File

@@ -0,0 +1,48 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
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.Interface
{
public interface IGoodsClassifyService
{
/// <summary>
/// 分页获取商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<PageUtil<List<GoodsClassifyDataDto>>> GetGoodsClassifyPage(GoodsClassifyDto dto);

/// <summary>
/// 更新商品分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> UpdateGoodsClassify(GoodsClassifyDataDto dto);

/// <summary>
/// 删除商品分类
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
Task<bool> DeleteGoodsClassify(string ids);

/// <summary>
/// 根据分类获取商品
/// </summary>
/// <param name="classifyId"></param>
/// <returns></returns>
Task<List<RelationGoodsIdDto>> GetRelation(string classifyId);

/// <summary>
/// 设置商品的分类
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> SetRelation(RelationDto dto);
}
}

+ 70
- 3
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsService.cs View File

@@ -1,4 +1,5 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos;
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.DataBase;
@@ -18,6 +19,22 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// <param name="dto"></param>
/// <returns></returns>
Task<PageUtil> GetGoodsPage(GoodsQueryDto dto);


/// <summary>
/// 获取商品信息(根据设备id)
/// </summary>
/// <param name="autoKey"></param>
/// <returns></returns>
Task<object> GetGoodsListByIds(string autoKey);

/// <summary>
/// 获取商品分类信息(根据设备id)
/// </summary>
/// <param name="autoKey"></param>
/// <returns></returns>
Task<object> GetGoodsClassifyByIds(string autoKey);

/// <summary>
/// 添加商品
/// </summary>
@@ -51,13 +68,13 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<bool> AddGoodsUint(GoodsUintDto dto);
Task<bool> AddGoodsUint(GoodsUintDto dto);
/// <summary>
/// 商品配方
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<PageUtil> GetGoodsBomPageAsync(GoodsBomQueryDto dto);
Task<PageUtil> GetGoodsBomPageAsync(GoodsBomQueryDto dto);
/// <summary>
/// 删除商品配方
/// </summary>
@@ -73,6 +90,12 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// <param name="id"></param>
/// <returns></returns>
Task<GoodsInfoBaseView> GetGoods(string id);
/// <summary>
/// 根据ids获取商品信息
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
Task<List<GoodsInfoView>> GetGoodsWithIds(List<string> ids);
///// <summary>
///// 设备上传商品数据
///// </summary>
@@ -92,5 +115,49 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
/// </summary>
/// <returns></returns>
Task<bool> DeviceVersionTemplateImport(DeviceVersionTemplateImportInputDto inputDto);

/// <summary>
/// 商品工艺导入
/// </summary>
/// <param name="importDto"></param>
/// <returns></returns>
Task<bool> GoodsTechnologyImport([FromForm] GoodsTechnologyImportDto importDto);

/// <summary>
/// 商品工艺模版导出
/// </summary>
/// <returns></returns>
Task<string> GoodsTechnologyExport(GoodsTechnologyExportDto exportDto);

/// <summary>
/// 商品工艺导出
/// </summary>
/// <param name="exportDto"></param>
/// <returns></returns>
Task<string> GoodsSimpleExport(GoodsTechnologyExportDto exportDto);

/// <summary>
/// 读取上传文件
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task<List<GoodsChooseDto>> GetFileToChoose([FromForm] GoodsInfoImportDto dto);

/// <summary>
/// 商品导入
/// </summary>
/// <param name="importDto"></param>
/// <returns></returns>
Task<bool> GoodsImport([FromForm] GoodsImportDto importDto);

/// <summary>
/// 下载商品
/// </summary>
/// <param name="exportDto"></param>
/// <returns></returns>
Task<string> GoodsExport(GoodsExportDto exportDto);


Task<bool> UpdateAction();
}
}

+ 12
- 1
BPA.SAAS.Manage.Application/DataBase/Interface/IGoodsTechnologyService.cs View File

@@ -1,4 +1,7 @@
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
using BPA.SAAS.Manage.Application.DataBase.Dtos.Goods;
using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
using BPA.SAAS.Manage.Application.DataBase.Services;
using BPA.SAAS.Manage.Core.Base;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,5 +18,13 @@ namespace BPA.SAAS.Manage.Application.DataBase.Interface
Task<bool> DeleteGoodsTechnologyAction(string id);
Task<bool> DeleteGoodsTechnologyAction(GoodsTechnologDelete dto);
Task<List<DeviceGoodsTechnologyView>> GetDeviceTechnology();

Task<bool> Updatetechnology();

Task<List<DeviceTechnologyActionListView>> GetDeviceTechnologyAction(DeviceQueryDto param);

Task<bool> CopyTechnologyAction(IputParam param);

Task<PageUtil> GetGoodsTechnologyPage(GoodsTechnologyQueryDto dto);
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save