init
This commit is contained in:
parent
a7f14f1e3e
commit
e970123827
102
DOAN.Admin.WebApi/Controllers/PBL/BillofmaterialsController.cs
Normal file
102
DOAN.Admin.WebApi/Controllers/PBL/BillofmaterialsController.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("PBL/Billofmaterials")]
|
||||
public class BillofmaterialsController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单接口
|
||||
/// </summary>
|
||||
private readonly IBillofmaterialsService _BillofmaterialsService;
|
||||
|
||||
public BillofmaterialsController(IBillofmaterialsService BillofmaterialsService)
|
||||
{
|
||||
_BillofmaterialsService = BillofmaterialsService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料清单列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "billofmaterials:list")]
|
||||
public IActionResult QueryBillofmaterials([FromQuery] BillofmaterialsQueryDto parm)
|
||||
{
|
||||
var response = _BillofmaterialsService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料清单详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "billofmaterials:query")]
|
||||
public IActionResult GetBillofmaterials(int Id)
|
||||
{
|
||||
var response = _BillofmaterialsService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<BillofmaterialsDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加物料清单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "billofmaterials:add")]
|
||||
[Log(Title = "物料清单", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddBillofmaterials([FromBody] BillofmaterialsDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Billofmaterials>().ToCreate(HttpContext);
|
||||
|
||||
var response = _BillofmaterialsService.AddBillofmaterials(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新物料清单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "billofmaterials:edit")]
|
||||
[Log(Title = "物料清单", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateBillofmaterials([FromBody] BillofmaterialsDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Billofmaterials>().ToUpdate(HttpContext);
|
||||
var response = _BillofmaterialsService.UpdateBillofmaterials(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除物料清单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "billofmaterials:delete")]
|
||||
[Log(Title = "物料清单", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteBillofmaterials([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_BillofmaterialsService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
102
DOAN.Admin.WebApi/Controllers/PBL/InventorylogController.cs
Normal file
102
DOAN.Admin.WebApi/Controllers/PBL/InventorylogController.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("PBL/Inventorylog")]
|
||||
public class InventorylogController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志接口
|
||||
/// </summary>
|
||||
private readonly IInventorylogService _InventorylogService;
|
||||
|
||||
public InventorylogController(IInventorylogService InventorylogService)
|
||||
{
|
||||
_InventorylogService = InventorylogService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询库存日志列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:list")]
|
||||
public IActionResult QueryInventorylog([FromQuery] InventorylogQueryDto parm)
|
||||
{
|
||||
var response = _InventorylogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询库存日志详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:query")]
|
||||
public IActionResult GetInventorylog(string Id)
|
||||
{
|
||||
var response = _InventorylogService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<InventorylogDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:add")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddInventorylog([FromBody] InventorylogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Inventorylog>().ToCreate(HttpContext);
|
||||
|
||||
var response = _InventorylogService.AddInventorylog(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:edit")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateInventorylog([FromBody] InventorylogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Inventorylog>().ToUpdate(HttpContext);
|
||||
var response = _InventorylogService.UpdateInventorylog(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:delete")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteInventorylog([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<string>(ids);
|
||||
|
||||
return ToResponse(_InventorylogService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
102
DOAN.Admin.WebApi/Controllers/PBL/StoragelocationController.cs
Normal file
102
DOAN.Admin.WebApi/Controllers/PBL/StoragelocationController.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("PBL/Storagelocation")]
|
||||
public class StoragelocationController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表接口
|
||||
/// </summary>
|
||||
private readonly IStoragelocationService _StoragelocationService;
|
||||
|
||||
public StoragelocationController(IStoragelocationService StoragelocationService)
|
||||
{
|
||||
_StoragelocationService = StoragelocationService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询料架表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "storagelocation:list")]
|
||||
public IActionResult QueryStoragelocation([FromQuery] StoragelocationQueryDto parm)
|
||||
{
|
||||
var response = _StoragelocationService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询料架表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "storagelocation:query")]
|
||||
public IActionResult GetStoragelocation(int Id)
|
||||
{
|
||||
var response = _StoragelocationService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<StoragelocationDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加料架表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "storagelocation:add")]
|
||||
[Log(Title = "料架表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddStoragelocation([FromBody] StoragelocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Storagelocation>().ToCreate(HttpContext);
|
||||
|
||||
var response = _StoragelocationService.AddStoragelocation(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新料架表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "storagelocation:edit")]
|
||||
[Log(Title = "料架表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateStoragelocation([FromBody] StoragelocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Storagelocation>().ToUpdate(HttpContext);
|
||||
var response = _StoragelocationService.UpdateStoragelocation(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除料架表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "storagelocation:delete")]
|
||||
[Log(Title = "料架表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteStoragelocation([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_StoragelocationService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
75
DOAN.Model/PBL/Billofmaterials.cs
Normal file
75
DOAN.Model/PBL/Billofmaterials.cs
Normal file
@ -0,0 +1,75 @@
|
||||
|
||||
namespace DOAN.Model.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单
|
||||
/// </summary>
|
||||
[SugarTable("billofmaterials")]
|
||||
public class Billofmaterials
|
||||
{
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string Productname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品code
|
||||
/// </summary>
|
||||
public string Productcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 镜壳name
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "mirrorshell_name")]
|
||||
public string MirrorshellName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 镜壳code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "mirrorshell_code")]
|
||||
public string MirrorshellCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 镜体name
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "mirrorbody_name")]
|
||||
public string MirrorbodyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 镜体code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "mirrorbody_code")]
|
||||
public string MirrorbodyCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
53
DOAN.Model/PBL/Dto/BillofmaterialsDto.cs
Normal file
53
DOAN.Model/PBL/Dto/BillofmaterialsDto.cs
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
namespace DOAN.Model.PBL.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单查询对象
|
||||
/// </summary>
|
||||
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; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物料清单输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
39
DOAN.Model/PBL/Dto/InventorylogDto.cs
Normal file
39
DOAN.Model/PBL/Dto/InventorylogDto.cs
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
namespace DOAN.Model.PBL.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志查询对象
|
||||
/// </summary>
|
||||
public class InventorylogQueryDto : PagerInfo
|
||||
{
|
||||
public string RackCode { get; set; }
|
||||
|
||||
public int? Operation { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 库存日志输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
39
DOAN.Model/PBL/Dto/StoragelocationDto.cs
Normal file
39
DOAN.Model/PBL/Dto/StoragelocationDto.cs
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
namespace DOAN.Model.PBL.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表查询对象
|
||||
/// </summary>
|
||||
public class StoragelocationQueryDto : PagerInfo
|
||||
{
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string RackCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 料架表输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
58
DOAN.Model/PBL/Inventorylog.cs
Normal file
58
DOAN.Model/PBL/Inventorylog.cs
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
namespace DOAN.Model.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志
|
||||
/// </summary>
|
||||
[SugarTable("inventorylog")]
|
||||
public class Inventorylog
|
||||
{
|
||||
/// <summary>
|
||||
/// 雪花
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 料架号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "rack_code")]
|
||||
public string RackCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作(1出、2入库)
|
||||
/// </summary>
|
||||
public int? Operation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱子数
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "package_num")]
|
||||
public int? PackageNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
58
DOAN.Model/PBL/Storagelocation.cs
Normal file
58
DOAN.Model/PBL/Storagelocation.cs
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
namespace DOAN.Model.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表
|
||||
/// </summary>
|
||||
[SugarTable("storagelocation")]
|
||||
public class Storagelocation
|
||||
{
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 零件号
|
||||
/// </summary>
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 料架号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "rack_code")]
|
||||
public string RackCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱子数
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "package_num")]
|
||||
public int? PackageNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
87
DOAN.Service/PBL/BillofmaterialsService.cs
Normal file
87
DOAN.Service/PBL/BillofmaterialsService.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IBillofmaterialsService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class BillofmaterialsService : BaseService<Billofmaterials>, IBillofmaterialsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询物料清单列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<BillofmaterialsDto> GetList(BillofmaterialsQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<Billofmaterials, BillofmaterialsDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public Billofmaterials GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加物料清单
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public Billofmaterials AddBillofmaterials(Billofmaterials model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改物料清单
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateBillofmaterials(Billofmaterials model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<Billofmaterials> QueryExp(BillofmaterialsQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<Billofmaterials>()
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
DOAN.Service/PBL/IService/IBillofmaterialsService.cs
Normal file
21
DOAN.Service/PBL/IService/IBillofmaterialsService.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
|
||||
namespace DOAN.Service.PBL.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料清单service接口
|
||||
/// </summary>
|
||||
public interface IBillofmaterialsService : IBaseService<Billofmaterials>
|
||||
{
|
||||
PagedInfo<BillofmaterialsDto> GetList(BillofmaterialsQueryDto parm);
|
||||
|
||||
Billofmaterials GetInfo(int Id);
|
||||
|
||||
|
||||
Billofmaterials AddBillofmaterials(Billofmaterials parm);
|
||||
int UpdateBillofmaterials(Billofmaterials parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
22
DOAN.Service/PBL/IService/IInventorylogService.cs
Normal file
22
DOAN.Service/PBL/IService/IInventorylogService.cs
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
|
||||
namespace DOAN.Service.PBL.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志service接口
|
||||
/// </summary>
|
||||
public interface IInventorylogService : IBaseService<Inventorylog>
|
||||
{
|
||||
PagedInfo<InventorylogDto> GetList(InventorylogQueryDto parm);
|
||||
|
||||
Inventorylog GetInfo(string Id);
|
||||
|
||||
|
||||
Inventorylog AddInventorylog(Inventorylog parm);
|
||||
int UpdateInventorylog(Inventorylog parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
21
DOAN.Service/PBL/IService/IStoragelocationService.cs
Normal file
21
DOAN.Service/PBL/IService/IStoragelocationService.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
|
||||
namespace DOAN.Service.PBL.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表service接口
|
||||
/// </summary>
|
||||
public interface IStoragelocationService : IBaseService<Storagelocation>
|
||||
{
|
||||
PagedInfo<StoragelocationDto> GetList(StoragelocationQueryDto parm);
|
||||
|
||||
Storagelocation GetInfo(int Id);
|
||||
|
||||
|
||||
Storagelocation AddStoragelocation(Storagelocation parm);
|
||||
int UpdateStoragelocation(Storagelocation parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
84
DOAN.Service/PBL/InventorylogService.cs
Normal file
84
DOAN.Service/PBL/InventorylogService.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IInventorylogService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class InventorylogService : BaseService<Inventorylog>, IInventorylogService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询库存日志列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<InventorylogDto> GetList(InventorylogQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<Inventorylog, InventorylogDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public Inventorylog GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加库存日志
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public Inventorylog AddInventorylog(Inventorylog model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改库存日志
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateInventorylog(Inventorylog model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<Inventorylog> QueryExp(InventorylogQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<Inventorylog>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.RackCode), it => it.RackCode.Contains(parm.RackCode))
|
||||
.AndIF(parm.Operation != null, it => it.Operation == parm.Operation)
|
||||
|
||||
;
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
83
DOAN.Service/PBL/StoragelocationService.cs
Normal file
83
DOAN.Service/PBL/StoragelocationService.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 料架表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IStoragelocationService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class StoragelocationService : BaseService<Storagelocation>, IStoragelocationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询料架表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<StoragelocationDto> GetList(StoragelocationQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<Storagelocation, StoragelocationDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public Storagelocation GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加料架表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public Storagelocation AddStoragelocation(Storagelocation model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改料架表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateStoragelocation(Storagelocation model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<Storagelocation> QueryExp(StoragelocationQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<Storagelocation>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Partnumber),it=>it.Partnumber.Contains( parm.Partnumber))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.RackCode),it=>it.RackCode.Contains( parm.RackCode))
|
||||
;
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user