@@ -23,7 +23,5 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.BaseDto | |||
public List<string> DeviceIdList { get; set; } | |||
public List<T> DataInfo { get; set; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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(); | |||
@@ -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); | |||
} | |||
} | |||
} |
@@ -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")); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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> | |||
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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 | |||
}; | |||
} | |||
} | |||
} |
@@ -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(); | |||
@@ -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); | |||
@@ -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> |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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> | |||
/// 添加 | |||
@@ -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) | |||
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
@@ -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; } | |||
} | |||
} |
@@ -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,4 +1,5 @@ | |||
using BPA.SAAS.Manage.Comm.Enum; | |||
using Npoi.Mapper.Attributes; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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; } | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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(); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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")] | |||
@@ -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); | |||
} | |||
} |
@@ -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); | |||
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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(); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |