diff --git a/DOAN.Admin.WebApi/Controllers/PBL/BillofmaterialsController.cs b/DOAN.Admin.WebApi/Controllers/PBL/BillofmaterialsController.cs
new file mode 100644
index 0000000..7c00f48
--- /dev/null
+++ b/DOAN.Admin.WebApi/Controllers/PBL/BillofmaterialsController.cs
@@ -0,0 +1,102 @@
+using Microsoft.AspNetCore.Mvc;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Service.PBL.IService;
+using DOAN.Admin.WebApi.Filters;
+
+//创建时间:2024-09-23
+namespace DOAN.Admin.WebApi.Controllers.Business
+{
+ ///
+ /// 物料清单
+ ///
+ [Verify]
+ [Route("PBL/Billofmaterials")]
+ public class BillofmaterialsController : BaseController
+ {
+ ///
+ /// 物料清单接口
+ ///
+ private readonly IBillofmaterialsService _BillofmaterialsService;
+
+ public BillofmaterialsController(IBillofmaterialsService BillofmaterialsService)
+ {
+ _BillofmaterialsService = BillofmaterialsService;
+ }
+
+ ///
+ /// 查询物料清单列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "billofmaterials:list")]
+ public IActionResult QueryBillofmaterials([FromQuery] BillofmaterialsQueryDto parm)
+ {
+ var response = _BillofmaterialsService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询物料清单详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "billofmaterials:query")]
+ public IActionResult GetBillofmaterials(int Id)
+ {
+ var response = _BillofmaterialsService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加物料清单
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "billofmaterials:add")]
+ [Log(Title = "物料清单", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddBillofmaterials([FromBody] BillofmaterialsDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _BillofmaterialsService.AddBillofmaterials(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新物料清单
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "billofmaterials:edit")]
+ [Log(Title = "物料清单", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateBillofmaterials([FromBody] BillofmaterialsDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _BillofmaterialsService.UpdateBillofmaterials(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除物料清单
+ ///
+ ///
+ [HttpPost("delete/{ids}")]
+ [ActionPermissionFilter(Permission = "billofmaterials:delete")]
+ [Log(Title = "物料清单", BusinessType = BusinessType.DELETE)]
+ public IActionResult DeleteBillofmaterials([FromRoute]string ids)
+ {
+ var idArr = Tools.SplitAndConvert(ids);
+
+ return ToResponse(_BillofmaterialsService.Delete(idArr));
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Admin.WebApi/Controllers/PBL/InventorylogController.cs b/DOAN.Admin.WebApi/Controllers/PBL/InventorylogController.cs
new file mode 100644
index 0000000..cae5506
--- /dev/null
+++ b/DOAN.Admin.WebApi/Controllers/PBL/InventorylogController.cs
@@ -0,0 +1,102 @@
+using Microsoft.AspNetCore.Mvc;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Service.PBL.IService;
+using DOAN.Admin.WebApi.Filters;
+
+//创建时间:2024-09-23
+namespace DOAN.Admin.WebApi.Controllers.PBL
+{
+ ///
+ /// 库存日志
+ ///
+ [Verify]
+ [Route("PBL/Inventorylog")]
+ public class InventorylogController : BaseController
+ {
+ ///
+ /// 库存日志接口
+ ///
+ private readonly IInventorylogService _InventorylogService;
+
+ public InventorylogController(IInventorylogService InventorylogService)
+ {
+ _InventorylogService = InventorylogService;
+ }
+
+ ///
+ /// 查询库存日志列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "inventorylog:list")]
+ public IActionResult QueryInventorylog([FromQuery] InventorylogQueryDto parm)
+ {
+ var response = _InventorylogService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询库存日志详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "inventorylog:query")]
+ public IActionResult GetInventorylog(string Id)
+ {
+ var response = _InventorylogService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加库存日志
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "inventorylog:add")]
+ [Log(Title = "库存日志", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddInventorylog([FromBody] InventorylogDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _InventorylogService.AddInventorylog(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新库存日志
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "inventorylog:edit")]
+ [Log(Title = "库存日志", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateInventorylog([FromBody] InventorylogDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _InventorylogService.UpdateInventorylog(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除库存日志
+ ///
+ ///
+ [HttpPost("delete/{ids}")]
+ [ActionPermissionFilter(Permission = "inventorylog:delete")]
+ [Log(Title = "库存日志", BusinessType = BusinessType.DELETE)]
+ public IActionResult DeleteInventorylog([FromRoute]string ids)
+ {
+ var idArr = Tools.SplitAndConvert(ids);
+
+ return ToResponse(_InventorylogService.Delete(idArr));
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Admin.WebApi/Controllers/PBL/StoragelocationController.cs b/DOAN.Admin.WebApi/Controllers/PBL/StoragelocationController.cs
new file mode 100644
index 0000000..8717aab
--- /dev/null
+++ b/DOAN.Admin.WebApi/Controllers/PBL/StoragelocationController.cs
@@ -0,0 +1,102 @@
+using Microsoft.AspNetCore.Mvc;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Service.PBL.IService;
+using DOAN.Admin.WebApi.Filters;
+
+//创建时间:2024-09-23
+namespace DOAN.Admin.WebApi.Controllers.Business
+{
+ ///
+ /// 料架表
+ ///
+ [Verify]
+ [Route("PBL/Storagelocation")]
+ public class StoragelocationController : BaseController
+ {
+ ///
+ /// 料架表接口
+ ///
+ private readonly IStoragelocationService _StoragelocationService;
+
+ public StoragelocationController(IStoragelocationService StoragelocationService)
+ {
+ _StoragelocationService = StoragelocationService;
+ }
+
+ ///
+ /// 查询料架表列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "storagelocation:list")]
+ public IActionResult QueryStoragelocation([FromQuery] StoragelocationQueryDto parm)
+ {
+ var response = _StoragelocationService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询料架表详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "storagelocation:query")]
+ public IActionResult GetStoragelocation(int Id)
+ {
+ var response = _StoragelocationService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加料架表
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "storagelocation:add")]
+ [Log(Title = "料架表", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddStoragelocation([FromBody] StoragelocationDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _StoragelocationService.AddStoragelocation(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新料架表
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "storagelocation:edit")]
+ [Log(Title = "料架表", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateStoragelocation([FromBody] StoragelocationDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _StoragelocationService.UpdateStoragelocation(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除料架表
+ ///
+ ///
+ [HttpPost("delete/{ids}")]
+ [ActionPermissionFilter(Permission = "storagelocation:delete")]
+ [Log(Title = "料架表", BusinessType = BusinessType.DELETE)]
+ public IActionResult DeleteStoragelocation([FromRoute]string ids)
+ {
+ var idArr = Tools.SplitAndConvert(ids);
+
+ return ToResponse(_StoragelocationService.Delete(idArr));
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Billofmaterials.cs b/DOAN.Model/PBL/Billofmaterials.cs
new file mode 100644
index 0000000..54e3e27
--- /dev/null
+++ b/DOAN.Model/PBL/Billofmaterials.cs
@@ -0,0 +1,75 @@
+
+namespace DOAN.Model.PBL
+{
+ ///
+ /// 物料清单
+ ///
+ [SugarTable("billofmaterials")]
+ public class Billofmaterials
+ {
+ ///
+ /// Id
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 产品名称
+ ///
+ public string Productname { get; set; }
+
+ ///
+ /// 产品code
+ ///
+ public string Productcode { get; set; }
+
+ ///
+ /// 镜壳name
+ ///
+ [SugarColumn(ColumnName = "mirrorshell_name")]
+ public string MirrorshellName { get; set; }
+
+ ///
+ /// 镜壳code
+ ///
+ [SugarColumn(ColumnName = "mirrorshell_code")]
+ public string MirrorshellCode { get; set; }
+
+ ///
+ /// 镜体name
+ ///
+ [SugarColumn(ColumnName = "mirrorbody_name")]
+ public string MirrorbodyName { get; set; }
+
+ ///
+ /// 镜体code
+ ///
+ [SugarColumn(ColumnName = "mirrorbody_code")]
+ public string MirrorbodyCode { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Dto/BillofmaterialsDto.cs b/DOAN.Model/PBL/Dto/BillofmaterialsDto.cs
new file mode 100644
index 0000000..5fc0679
--- /dev/null
+++ b/DOAN.Model/PBL/Dto/BillofmaterialsDto.cs
@@ -0,0 +1,53 @@
+
+namespace DOAN.Model.PBL.Dto
+{
+ ///
+ /// 物料清单查询对象
+ ///
+ public class BillofmaterialsQueryDto : PagerInfo
+ {
+ public string Productname { get; set; }
+
+ public string Productcode { get; set; }
+
+ public string MirrorshellName { get; set; }
+
+ public string MirrorshellCode { get; set; }
+
+ public string MirrorbodyName { get; set; }
+
+ public string MirrorbodyCode { get; set; }
+ }
+
+ ///
+ /// 物料清单输入输出对象
+ ///
+ public class BillofmaterialsDto
+ {
+ [Required(ErrorMessage = "Id不能为空")]
+ public int Id { get; set; }
+
+ public string Productname { get; set; }
+
+ public string Productcode { get; set; }
+
+ public string MirrorshellName { get; set; }
+
+ public string MirrorshellCode { get; set; }
+
+ public string MirrorbodyName { get; set; }
+
+ public string MirrorbodyCode { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Dto/InventorylogDto.cs b/DOAN.Model/PBL/Dto/InventorylogDto.cs
new file mode 100644
index 0000000..ecdb8f1
--- /dev/null
+++ b/DOAN.Model/PBL/Dto/InventorylogDto.cs
@@ -0,0 +1,39 @@
+
+namespace DOAN.Model.PBL.Dto
+{
+ ///
+ /// 库存日志查询对象
+ ///
+ public class InventorylogQueryDto : PagerInfo
+ {
+ public string RackCode { get; set; }
+
+ public int? Operation { get; set; }
+ }
+
+ ///
+ /// 库存日志输入输出对象
+ ///
+ public class InventorylogDto
+ {
+ [Required(ErrorMessage = "雪花不能为空")]
+ public string Id { get; set; }
+
+ public string RackCode { get; set; }
+
+ public int? Operation { get; set; }
+
+ public int? PackageNum { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Dto/StoragelocationDto.cs b/DOAN.Model/PBL/Dto/StoragelocationDto.cs
new file mode 100644
index 0000000..116534b
--- /dev/null
+++ b/DOAN.Model/PBL/Dto/StoragelocationDto.cs
@@ -0,0 +1,39 @@
+
+namespace DOAN.Model.PBL.Dto
+{
+ ///
+ /// 料架表查询对象
+ ///
+ public class StoragelocationQueryDto : PagerInfo
+ {
+ public string Partnumber { get; set; }
+
+ public string RackCode { get; set; }
+ }
+
+ ///
+ /// 料架表输入输出对象
+ ///
+ public class StoragelocationDto
+ {
+ [Required(ErrorMessage = "Id不能为空")]
+ public int Id { get; set; }
+
+ public string Partnumber { get; set; }
+
+ public string RackCode { get; set; }
+
+ public int? PackageNum { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Inventorylog.cs b/DOAN.Model/PBL/Inventorylog.cs
new file mode 100644
index 0000000..de7c07a
--- /dev/null
+++ b/DOAN.Model/PBL/Inventorylog.cs
@@ -0,0 +1,58 @@
+
+namespace DOAN.Model.PBL
+{
+ ///
+ /// 库存日志
+ ///
+ [SugarTable("inventorylog")]
+ public class Inventorylog
+ {
+ ///
+ /// 雪花
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
+ public string Id { get; set; }
+
+ ///
+ /// 料架号
+ ///
+ [SugarColumn(ColumnName = "rack_code")]
+ public string RackCode { get; set; }
+
+ ///
+ /// 操作(1出、2入库)
+ ///
+ public int? Operation { get; set; }
+
+ ///
+ /// 箱子数
+ ///
+ [SugarColumn(ColumnName = "package_num")]
+ public int? PackageNum { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Model/PBL/Storagelocation.cs b/DOAN.Model/PBL/Storagelocation.cs
new file mode 100644
index 0000000..f185970
--- /dev/null
+++ b/DOAN.Model/PBL/Storagelocation.cs
@@ -0,0 +1,58 @@
+
+namespace DOAN.Model.PBL
+{
+ ///
+ /// 料架表
+ ///
+ [SugarTable("storagelocation")]
+ public class Storagelocation
+ {
+ ///
+ /// Id
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ public string Partnumber { get; set; }
+
+ ///
+ /// 料架号
+ ///
+ [SugarColumn(ColumnName = "rack_code")]
+ public string RackCode { get; set; }
+
+ ///
+ /// 箱子数
+ ///
+ [SugarColumn(ColumnName = "package_num")]
+ public int? PackageNum { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Service/PBL/BillofmaterialsService.cs b/DOAN.Service/PBL/BillofmaterialsService.cs
new file mode 100644
index 0000000..c18ca95
--- /dev/null
+++ b/DOAN.Service/PBL/BillofmaterialsService.cs
@@ -0,0 +1,87 @@
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Repository;
+using DOAN.Service.PBL.IService;
+
+
+namespace DOAN.Service.PBL
+{
+ ///
+ /// 物料清单Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IBillofmaterialsService), ServiceLifetime = LifeTime.Transient)]
+ public class BillofmaterialsService : BaseService, IBillofmaterialsService
+ {
+ ///
+ /// 查询物料清单列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(BillofmaterialsQueryDto parm)
+ {
+ var predicate = QueryExp(parm);
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public Billofmaterials GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加物料清单
+ ///
+ ///
+ ///
+ public Billofmaterials AddBillofmaterials(Billofmaterials model)
+ {
+ return Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改物料清单
+ ///
+ ///
+ ///
+ public int UpdateBillofmaterials(Billofmaterials model)
+ {
+ return Update(model, true);
+ }
+
+ ///
+ /// 查询导出表达式
+ ///
+ ///
+ ///
+ private static Expressionable QueryExp(BillofmaterialsQueryDto parm)
+ {
+ var predicate = Expressionable.Create()
+ .AndIF(!string.IsNullOrEmpty(parm.Productname), it => it.Productname.Contains(parm.Productname))
+ .AndIF(!string.IsNullOrEmpty(parm.Productcode), it => it.Productcode.Contains(parm.Productcode))
+ .AndIF(!string.IsNullOrEmpty(parm.MirrorshellName), it => it.MirrorshellName.Contains(parm.MirrorshellName))
+ .AndIF(!string.IsNullOrEmpty(parm.MirrorshellCode), it => it.MirrorshellCode.Contains(parm.MirrorshellCode))
+ .AndIF(!string.IsNullOrEmpty(parm.MirrorbodyName), it => it.MirrorbodyName.Contains(parm.MirrorbodyName))
+ .AndIF(!string.IsNullOrEmpty(parm.MirrorbodyCode), it => it.MirrorbodyCode.Contains(parm.MirrorbodyCode))
+;
+
+ return predicate;
+ }
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Service/PBL/IService/IBillofmaterialsService.cs b/DOAN.Service/PBL/IService/IBillofmaterialsService.cs
new file mode 100644
index 0000000..896ce98
--- /dev/null
+++ b/DOAN.Service/PBL/IService/IBillofmaterialsService.cs
@@ -0,0 +1,21 @@
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+
+namespace DOAN.Service.PBL.IService
+{
+ ///
+ /// 物料清单service接口
+ ///
+ public interface IBillofmaterialsService : IBaseService
+ {
+ PagedInfo GetList(BillofmaterialsQueryDto parm);
+
+ Billofmaterials GetInfo(int Id);
+
+
+ Billofmaterials AddBillofmaterials(Billofmaterials parm);
+ int UpdateBillofmaterials(Billofmaterials parm);
+
+
+ }
+}
diff --git a/DOAN.Service/PBL/IService/IInventorylogService.cs b/DOAN.Service/PBL/IService/IInventorylogService.cs
new file mode 100644
index 0000000..6df3f4e
--- /dev/null
+++ b/DOAN.Service/PBL/IService/IInventorylogService.cs
@@ -0,0 +1,22 @@
+
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+
+namespace DOAN.Service.PBL.IService
+{
+ ///
+ /// 库存日志service接口
+ ///
+ public interface IInventorylogService : IBaseService
+ {
+ PagedInfo GetList(InventorylogQueryDto parm);
+
+ Inventorylog GetInfo(string Id);
+
+
+ Inventorylog AddInventorylog(Inventorylog parm);
+ int UpdateInventorylog(Inventorylog parm);
+
+
+ }
+}
diff --git a/DOAN.Service/PBL/IService/IStoragelocationService.cs b/DOAN.Service/PBL/IService/IStoragelocationService.cs
new file mode 100644
index 0000000..97fd7b8
--- /dev/null
+++ b/DOAN.Service/PBL/IService/IStoragelocationService.cs
@@ -0,0 +1,21 @@
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+
+namespace DOAN.Service.PBL.IService
+{
+ ///
+ /// 料架表service接口
+ ///
+ public interface IStoragelocationService : IBaseService
+ {
+ PagedInfo GetList(StoragelocationQueryDto parm);
+
+ Storagelocation GetInfo(int Id);
+
+
+ Storagelocation AddStoragelocation(Storagelocation parm);
+ int UpdateStoragelocation(Storagelocation parm);
+
+
+ }
+}
diff --git a/DOAN.Service/PBL/InventorylogService.cs b/DOAN.Service/PBL/InventorylogService.cs
new file mode 100644
index 0000000..e97e7df
--- /dev/null
+++ b/DOAN.Service/PBL/InventorylogService.cs
@@ -0,0 +1,84 @@
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Repository;
+using DOAN.Service.PBL.IService;
+
+
+namespace DOAN.Service.PBL
+{
+ ///
+ /// 库存日志Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IInventorylogService), ServiceLifetime = LifeTime.Transient)]
+ public class InventorylogService : BaseService, IInventorylogService
+ {
+ ///
+ /// 查询库存日志列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(InventorylogQueryDto parm)
+ {
+ var predicate = QueryExp(parm);
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public Inventorylog GetInfo(string Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加库存日志
+ ///
+ ///
+ ///
+ public Inventorylog AddInventorylog(Inventorylog model)
+ {
+ return Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改库存日志
+ ///
+ ///
+ ///
+ public int UpdateInventorylog(Inventorylog model)
+ {
+ return Update(model, true);
+ }
+
+ ///
+ /// 查询导出表达式
+ ///
+ ///
+ ///
+ private static Expressionable QueryExp(InventorylogQueryDto parm)
+ {
+ var predicate = Expressionable.Create()
+ .AndIF(!string.IsNullOrEmpty(parm.RackCode), it => it.RackCode.Contains(parm.RackCode))
+ .AndIF(parm.Operation != null, it => it.Operation == parm.Operation)
+
+ ;
+
+ return predicate;
+ }
+ }
+}
\ No newline at end of file
diff --git a/DOAN.Service/PBL/StoragelocationService.cs b/DOAN.Service/PBL/StoragelocationService.cs
new file mode 100644
index 0000000..0545e2d
--- /dev/null
+++ b/DOAN.Service/PBL/StoragelocationService.cs
@@ -0,0 +1,83 @@
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using DOAN.Model.PBL.Dto;
+using DOAN.Model.PBL;
+using DOAN.Repository;
+using DOAN.Service.PBL.IService;
+
+
+namespace DOAN.Service.PBL
+{
+ ///
+ /// 料架表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IStoragelocationService), ServiceLifetime = LifeTime.Transient)]
+ public class StoragelocationService : BaseService, IStoragelocationService
+ {
+ ///
+ /// 查询料架表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(StoragelocationQueryDto parm)
+ {
+ var predicate = QueryExp(parm);
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public Storagelocation GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加料架表
+ ///
+ ///
+ ///
+ public Storagelocation AddStoragelocation(Storagelocation model)
+ {
+ return Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改料架表
+ ///
+ ///
+ ///
+ public int UpdateStoragelocation(Storagelocation model)
+ {
+ return Update(model, true);
+ }
+
+ ///
+ /// 查询导出表达式
+ ///
+ ///
+ ///
+ private static Expressionable QueryExp(StoragelocationQueryDto parm)
+ {
+ var predicate = Expressionable.Create()
+ .AndIF(!string.IsNullOrEmpty(parm.Partnumber),it=>it.Partnumber.Contains( parm.Partnumber))
+ .AndIF(!string.IsNullOrEmpty(parm.RackCode),it=>it.RackCode.Contains( parm.RackCode))
+ ;
+
+ return predicate;
+ }
+ }
+}
\ No newline at end of file