抛光仓库相关功能,未完成(但已部署)
This commit is contained in:
parent
512231d555
commit
73fce84068
@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
//创建时间:2024-07-30
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表
|
||||
/// </summary>
|
||||
// [Verify]
|
||||
[Route("/mes/wm/WmPolishInspectionWorkorder")]
|
||||
public class WmPolishInspectionWorkorderController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表接口
|
||||
/// </summary>
|
||||
private readonly IWmPolishInspectionWorkorderService _WmPolishInspectionWorkorderService;
|
||||
|
||||
public WmPolishInspectionWorkorderController(IWmPolishInspectionWorkorderService WmPolishInspectionWorkorderService)
|
||||
{
|
||||
_WmPolishInspectionWorkorderService = WmPolishInspectionWorkorderService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询后道检验工单表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:list")]
|
||||
public IActionResult QueryWmPolishInspectionWorkorder([FromQuery] WmPolishInspectionWorkorderQueryDto parm)
|
||||
{
|
||||
var response = _WmPolishInspectionWorkorderService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询后道检验工单表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:query")]
|
||||
public IActionResult GetWmPolishInspectionWorkorder(string Id)
|
||||
{
|
||||
var response = _WmPolishInspectionWorkorderService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmPolishInspectionWorkorder>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加后道检验工单表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:add")]
|
||||
[Log(Title = "后道检验工单表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmPolishInspectionWorkorder([FromBody] WmPolishInspectionWorkorderDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishInspectionWorkorder>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmPolishInspectionWorkorderService.AddWmPolishInspectionWorkorder(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新后道检验工单表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:edit")]
|
||||
[Log(Title = "后道检验工单表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmPolishInspectionWorkorder([FromBody] WmPolishInspectionWorkorderDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishInspectionWorkorder>().ToUpdate(HttpContext);
|
||||
var response = _WmPolishInspectionWorkorderService.UpdateWmPolishInspectionWorkorder(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除后道检验工单表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishinspectionworkorder:delete")]
|
||||
[Log(Title = "后道检验工单表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmPolishInspectionWorkorder(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmPolishInspectionWorkorderService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
//创建时间:2024-07-30
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
// [Verify]
|
||||
[Route("/mes/wm/WmPolishWorkorder")]
|
||||
public class WmPolishWorkorderController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口
|
||||
/// </summary>
|
||||
private readonly IWmPolishWorkorderService _WmPolishWorkorderService;
|
||||
|
||||
public WmPolishWorkorderController(IWmPolishWorkorderService WmPolishWorkorderService)
|
||||
{
|
||||
_WmPolishWorkorderService = WmPolishWorkorderService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishworkorder:list")]
|
||||
public IActionResult QueryWmPolishWorkorder([FromQuery] WmPolishWorkorderQueryDto parm)
|
||||
{
|
||||
var response = _WmPolishWorkorderService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishworkorder:query")]
|
||||
public IActionResult GetWmPolishWorkorder(string Id)
|
||||
{
|
||||
var response = _WmPolishWorkorderService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmPolishWorkorder>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishworkorder:add")]
|
||||
[Log(Title = "", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmPolishWorkorder([FromBody] WmPolishWorkorderDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishWorkorder>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmPolishWorkorderService.AddWmPolishWorkorder(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishworkorder:edit")]
|
||||
[Log(Title = "", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmPolishWorkorder([FromBody] WmPolishWorkorderDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmPolishWorkorder>().ToUpdate(HttpContext);
|
||||
var response = _WmPolishWorkorderService.UpdateWmPolishWorkorder(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmpolishworkorder:delete")]
|
||||
[Log(Title = "", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmPolishWorkorder(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmPolishWorkorderService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@
|
||||
"Expire": 10080 //jwt登录过期时间(分)【7天】
|
||||
},
|
||||
"InjectClass": [ "ZR.Repository", "ZR.Service", "ZR.Tasks" ], //自动注入类
|
||||
"ShowDbLog": true,//是否打印db日志
|
||||
"ShowDbLog": false,//是否打印db日志
|
||||
"InitDb": false, //是否初始化db
|
||||
"DemoMode": false, //是否演示模式
|
||||
"Upload": {
|
||||
|
||||
74
ZR.Model/MES/wms/Dto/WmPolishInspectionWorkorderDto.cs
Normal file
74
ZR.Model/MES/wms/Dto/WmPolishInspectionWorkorderDto.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.wms.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表查询对象
|
||||
/// </summary>
|
||||
public class WmPolishInspectionWorkorderQueryDto : PagerInfo
|
||||
{
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
public List<DateTime?> OrderTimeList { get; set; }
|
||||
|
||||
public int? Type { get; set; }
|
||||
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后道检验工单表输入输出对象
|
||||
/// </summary>
|
||||
public class WmPolishInspectionWorkorderDto
|
||||
{
|
||||
[Required(ErrorMessage = "工单主键不能为空")]
|
||||
public string Id { get; set; }
|
||||
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
public int? PassNum { get; set; }
|
||||
|
||||
public int? PolishNum { get; set; }
|
||||
|
||||
public int? SandingNum { get; set; }
|
||||
|
||||
public int? DiscardNum { get; set; }
|
||||
|
||||
public DateTime? OrderTime { get; set; }
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public int? Type { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ namespace ZR.Model.MES.wms.Dto
|
||||
public string Code { get; set; }
|
||||
public string BlankNum { get; set; }
|
||||
public string Partnumber { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public int? ChangeType { get; set; }
|
||||
public DateTime? StartActionTime { get; set; }
|
||||
public DateTime? EndActionTime { get; set; }
|
||||
|
||||
72
ZR.Model/MES/wms/Dto/WmPolishWorkorderDto.cs
Normal file
72
ZR.Model/MES/wms/Dto/WmPolishWorkorderDto.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.wms.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询对象
|
||||
/// </summary>
|
||||
public class WmPolishWorkorderQueryDto : PagerInfo
|
||||
{
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
public List<DateTime?> OrderTimeList { get; set; }
|
||||
|
||||
public int? Type { get; set; }
|
||||
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入输出对象
|
||||
/// </summary>
|
||||
public class WmPolishWorkorderDto
|
||||
{
|
||||
[Required(ErrorMessage = "工单主键不能为空")]
|
||||
public string Id { get; set; }
|
||||
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
public int? PassNum { get; set; }
|
||||
|
||||
public int? SandingNum { get; set; }
|
||||
|
||||
public int? DiscardNum { get; set; }
|
||||
|
||||
public DateTime? OrderTime { get; set; }
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public int? Type { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
126
ZR.Model/MES/wms/WmPolishInspectionWorkorder.cs
Normal file
126
ZR.Model/MES/wms/WmPolishInspectionWorkorder.cs
Normal file
@ -0,0 +1,126 @@
|
||||
|
||||
namespace ZR.Model.MES.wms
|
||||
{
|
||||
/// <summary>
|
||||
/// 后道检验工单表
|
||||
/// </summary>
|
||||
[SugarTable("wm_polish_inspection_workorder")]
|
||||
public class WmPolishInspectionWorkorder
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "workorder_no")]
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 零件号
|
||||
/// </summary>
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 毛坯号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "blank_num")]
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总零件数
|
||||
/// </summary>
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 合格
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "pass_num")]
|
||||
public int? PassNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 抛光
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "polish_num")]
|
||||
public int? PolishNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打磨
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "sanding_num")]
|
||||
public int? SandingNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报废
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "discard_num")]
|
||||
public int? DiscardNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "order_time")]
|
||||
public DateTime? OrderTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "start_time")]
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "end_time")]
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单类别 1-手动 2-自动
|
||||
/// </summary>
|
||||
public int? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库数据是否同步 0-未发送同步数据 1-发送同步数据
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_send")]
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0-未执行 1-执行中 2-已完成
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
120
ZR.Model/MES/wms/WmPolishWorkorder.cs
Normal file
120
ZR.Model/MES/wms/WmPolishWorkorder.cs
Normal file
@ -0,0 +1,120 @@
|
||||
|
||||
namespace ZR.Model.MES.wms
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarTable("wm_polish_workorder")]
|
||||
public class WmPolishWorkorder
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "workorder_no")]
|
||||
public string WorkorderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 零件号
|
||||
/// </summary>
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 毛坯号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "blank_num")]
|
||||
public string BlankNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总零件数
|
||||
/// </summary>
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 合格
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "pass_num")]
|
||||
public int? PassNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打磨
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "sanding_num")]
|
||||
public int? SandingNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报废
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "discard_num")]
|
||||
public int? DiscardNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "order_time")]
|
||||
public DateTime? OrderTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "start_time")]
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "end_time")]
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单类别 1-手动 2-自动
|
||||
/// </summary>
|
||||
public int? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库数据是否同步 0-未发送同步数据 1-发送同步数据
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_send")]
|
||||
public int? IsSend { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0-未执行 1-执行中 2-已完成
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,9 @@ using ZR.Model.MES.pro;
|
||||
using ZR.Model.MES.qc;
|
||||
using ZR.Model.MES.qc.DTO;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.qc.IService;
|
||||
using ZR.Service.mes.wms;
|
||||
|
||||
namespace ZR.Service.mes.qc
|
||||
{
|
||||
@ -1336,12 +1338,12 @@ namespace ZR.Service.mes.qc
|
||||
polishPassNumber = polishNumber - 0;
|
||||
}
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
/* Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"打印工单{workorder_id} 一次合格数{OnePassNumber}=计划数{workorder.PreviousNumber}-----所有缺陷数{list?.sum} ");
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"打印工单{workorder_id} 计算抛光合格{polishPassNumber}=首检的抛光{polishNumber}-----抛光缺陷项{polish_defect_Number?.sum}");
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"打印工单{workorder_id} 包装投入数{OnePassNumber + polishPassNumber}");
|
||||
Console.WriteLine($"打印工单{workorder_id} 包装投入数{OnePassNumber + polishPassNumber}");*/
|
||||
|
||||
|
||||
|
||||
@ -3206,13 +3208,26 @@ namespace ZR.Service.mes.qc
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 产线报表生成后自动化操作
|
||||
// 1.抛光品入库
|
||||
try
|
||||
{
|
||||
WmPolishInventoryService wmPolishInventoryService = new WmPolishInventoryService();
|
||||
WmPolishInventory warehousingInfo = new()
|
||||
{
|
||||
Partnumber = workorder_item.FinishedPartNumber,
|
||||
Type = workorder_item.Remark1.Contains("返工") ? 2 : 1,
|
||||
Quantity = paoguang_by_first,
|
||||
ActionTime = DateTime.Now.ToLocalTime(),
|
||||
CreatedBy = "包装" + team + "组",
|
||||
Remark = "首检抛光自动入库。来源工单号:[" + workorder_item.ClientWorkorder + "]"
|
||||
};
|
||||
wmPolishInventoryService.DoWmPolishWarehousing(warehousingInfo);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user