抛光仓库相关功能,未完成(但已部署)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
|
||||
namespace ZR.Service.mes.wms.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表service接口
|
||||
/// </summary>
|
||||
public interface IWmPolishInspectionWorkorderService : IBaseService<WmPolishInspectionWorkorder>
|
||||
{
|
||||
PagedInfo<WmPolishInspectionWorkorderDto> GetList(WmPolishInspectionWorkorderQueryDto parm);
|
||||
|
||||
WmPolishInspectionWorkorder GetInfo(string Id);
|
||||
|
||||
WmPolishInspectionWorkorder AddWmPolishInspectionWorkorder(
|
||||
WmPolishInspectionWorkorder parm
|
||||
);
|
||||
|
||||
int UpdateWmPolishInspectionWorkorder(WmPolishInspectionWorkorder parm);
|
||||
}
|
||||
}
|
||||
21
ZR.Service/mes/wms/IService/IWmPolishWorkorderService.cs
Normal file
21
ZR.Service/mes/wms/IService/IWmPolishWorkorderService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
|
||||
namespace ZR.Service.mes.wms.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// service接口
|
||||
/// </summary>
|
||||
public interface IWmPolishWorkorderService : IBaseService<WmPolishWorkorder>
|
||||
{
|
||||
PagedInfo<WmPolishWorkorderDto> GetList(WmPolishWorkorderQueryDto parm);
|
||||
|
||||
WmPolishWorkorder GetInfo(string Id);
|
||||
|
||||
WmPolishWorkorder AddWmPolishWorkorder(WmPolishWorkorder parm);
|
||||
|
||||
int UpdateWmPolishWorkorder(WmPolishWorkorder parm);
|
||||
|
||||
}
|
||||
}
|
||||
91
ZR.Service/mes/wms/WmPolishInspectionWorkorderService.cs
Normal file
91
ZR.Service/mes/wms/WmPolishInspectionWorkorderService.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using Infrastructure.Attribute;
|
||||
using SqlSugar;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
namespace ZR.Service.mes.wms
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IWmPolishInspectionWorkorderService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class WmPolishInspectionWorkorderService : BaseService<WmPolishInspectionWorkorder>, IWmPolishInspectionWorkorderService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询后道检验工单表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmPolishInspectionWorkorderDto> GetList(WmPolishInspectionWorkorderQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmPolishInspectionWorkorder>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<WmPolishInspectionWorkorder, WmPolishInspectionWorkorderDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public WmPolishInspectionWorkorder GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加后道检验工单表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public WmPolishInspectionWorkorder AddWmPolishInspectionWorkorder(WmPolishInspectionWorkorder model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改后道检验工单表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateWmPolishInspectionWorkorder(WmPolishInspectionWorkorder model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new WmPolishInspectionWorkorder()
|
||||
//{
|
||||
// WorkorderNo = model.WorkorderNo,
|
||||
// Partnumber = model.Partnumber,
|
||||
// BlankNum = model.BlankNum,
|
||||
// Quantity = model.Quantity,
|
||||
// PassNum = model.PassNum,
|
||||
// PolishNum = model.PolishNum,
|
||||
// SandingNum = model.SandingNum,
|
||||
// DiscardNum = model.DiscardNum,
|
||||
// StartTime = model.StartTime,
|
||||
// EndTime = model.EndTime,
|
||||
// Type = model.Type,
|
||||
// Remark = model.Remark,
|
||||
// IsSend = model.IsSend,
|
||||
// Status = model.Status,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ namespace ZR.Service.mes.wms
|
||||
.First();
|
||||
if (material == null)
|
||||
{
|
||||
item.Description = "此毛坯号不在物料清单内!";
|
||||
item.Description = "此零件号不在物料清单内!";
|
||||
continue;
|
||||
}
|
||||
item.Color = material.Color;
|
||||
@@ -209,7 +209,7 @@ namespace ZR.Service.mes.wms
|
||||
Context.Ado.BeginTran();
|
||||
// 零件号检查
|
||||
string partnumber = parm.Partnumber;
|
||||
WmMaterial material = Context
|
||||
/*WmMaterial material = Context
|
||||
.Queryable<WmMaterial>()
|
||||
.Where(it => it.Partnumber == partnumber)
|
||||
.Where(it => it.Type == 1)
|
||||
@@ -219,7 +219,7 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("零件号在物料清单未查到,请到物料清单新增零件号记录");
|
||||
}
|
||||
}*/
|
||||
// 检查是否存在库中
|
||||
WmPolishInventory polishInventory = Context
|
||||
.Queryable<WmPolishInventory>()
|
||||
@@ -313,7 +313,7 @@ namespace ZR.Service.mes.wms
|
||||
Context.Ado.BeginTran();
|
||||
// 零件号检查
|
||||
string partnumber = parm.Partnumber;
|
||||
WmMaterial material = Context
|
||||
/*WmMaterial material = Context
|
||||
.Queryable<WmMaterial>()
|
||||
.Where(it => it.Partnumber == partnumber)
|
||||
.Where(it => it.Type == 1)
|
||||
@@ -323,7 +323,7 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("零件号在物料清单未查到,请到物料清单新增零件号记录");
|
||||
}
|
||||
}*/
|
||||
// 检查是否存在库中
|
||||
WmPolishInventory polishInventory = Context
|
||||
.Queryable<WmPolishInventory>()
|
||||
|
||||
@@ -35,6 +35,10 @@ namespace ZR.Service.mes.wms
|
||||
!string.IsNullOrEmpty(parm.BlankNum),
|
||||
it => it.BlankNum.Contains(parm.BlankNum)
|
||||
)
|
||||
.AndIF(
|
||||
!string.IsNullOrEmpty(parm.Remark),
|
||||
it => it.Remark.Contains(parm.Remark)
|
||||
)
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Code), it => it.Code.Contains(parm.Code))
|
||||
.AndIF(
|
||||
!string.IsNullOrEmpty(parm.FkInventoryId),
|
||||
|
||||
91
ZR.Service/mes/wms/WmPolishWorkorderService.cs
Normal file
91
ZR.Service/mes/wms/WmPolishWorkorderService.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using Infrastructure.Attribute;
|
||||
using SqlSugar;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
namespace ZR.Service.mes.wms
|
||||
{
|
||||
/// <summary>
|
||||
/// Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(
|
||||
ServiceType = typeof(IWmPolishWorkorderService),
|
||||
ServiceLifetime = LifeTime.Transient
|
||||
)]
|
||||
public class WmPolishWorkorderService
|
||||
: BaseService<WmPolishWorkorder>,
|
||||
IWmPolishWorkorderService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<WmPolishWorkorderDto> GetList(WmPolishWorkorderQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<WmPolishWorkorder>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<WmPolishWorkorder, WmPolishWorkorderDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public WmPolishWorkorder GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable().Where(x => x.Id == Id).First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public WmPolishWorkorder AddWmPolishWorkorder(WmPolishWorkorder model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateWmPolishWorkorder(WmPolishWorkorder model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new WmPolishWorkorder()
|
||||
//{
|
||||
// WorkorderNo = model.WorkorderNo,
|
||||
// Partnumber = model.Partnumber,
|
||||
// BlankNum = model.BlankNum,
|
||||
// Quantity = model.Quantity,
|
||||
// PassNum = model.PassNum,
|
||||
// SandingNum = model.SandingNum,
|
||||
// DiscardNum = model.DiscardNum,
|
||||
// StartTime = model.StartTime,
|
||||
// EndTime = model.EndTime,
|
||||
// Type = model.Type,
|
||||
// Remark = model.Remark,
|
||||
// IsSend = model.IsSend,
|
||||
// Status = model.Status,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user