工单从表
This commit is contained in:
parent
d9ac7d6095
commit
89b35f4495
@ -30,9 +30,9 @@ namespace MDM.Model.Plant.Dto
|
||||
|
||||
public string SiteType { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string Address { get; set; }
|
||||
public string? Address { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
|
||||
|
||||
@ -34,12 +34,12 @@ namespace MDM.Model.Plant
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
public string? Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
|
||||
@ -28,18 +28,19 @@ namespace MDM.Model.Process.Dto
|
||||
/// </summary>
|
||||
public class ProcessParameterDto
|
||||
{
|
||||
[Required(ErrorMessage = "工艺参数ID,主键不能为空")]
|
||||
public ProcessParameterDto() { }
|
||||
//工艺参数ID,主键不能为空
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "所属工艺路线code不能为空")]
|
||||
//所属工艺路线code不能为空
|
||||
[ExcelColumn(Name = "工艺编码")]
|
||||
public string FkRoutingCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "所属工序code不能为空")]
|
||||
[ExcelColumn(Name = "工艺编码")]
|
||||
//所属工序code不能为空
|
||||
[ExcelColumn(Name = "工序编码")]
|
||||
public string FkOperationCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "参数名称,如:温度、压力、时间不能为空")]
|
||||
//参数名称,如:温度、压力、时间不能为空
|
||||
[ExcelColumn(Name = "参数编码")]
|
||||
public string ParameterCode { get; set; }
|
||||
[ExcelColumn(Name = "参数名称")]
|
||||
@ -48,7 +49,7 @@ namespace MDM.Model.Process.Dto
|
||||
[ExcelColumn(Name = "参数描述")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等不能为空")]
|
||||
//数据类型:FLOAT, INT, STRING, BOOL, AI(模拟量输入)等不能为空
|
||||
[ExcelColumn(Name = "数据类型")]
|
||||
public string DataType { get; set; }
|
||||
[ExcelColumn(Name = "单位")]
|
||||
|
||||
@ -149,5 +149,19 @@ namespace RIZO.Admin.WebApi.Controllers.Mes.WorkOrderInfo
|
||||
var response = _WorkOrderItemService.GetWorkOrderItemByCode(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动首检校验是否已首检合格
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("getFirstInspectionResult")]
|
||||
[ActionPermissionFilter(Permission = "workorderitem:list")]
|
||||
public string GetFirstInspectionResult([FromBody] string strWorkOrderItemCode)
|
||||
{
|
||||
var response = _WorkOrderItemService.GetFirstInspectionResult(strWorkOrderItemCode);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"dbConfigs": [
|
||||
{
|
||||
//"Conn": "Data Source=139.224.232.211;User ID=root;Password=RIZOtech123;Initial Catalog=ay2509055-guiyang-fluorescence-lmes;Port=3308;",
|
||||
"Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=ay2509055-guiyang-fluorescence-lmes;Port=3306;",
|
||||
"Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=ay2509055-guiyang-fluorescence-lmes;Port=3308;",
|
||||
//"Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=ay2509055-guiyang-fluorescence-lmes;Port=3306;",
|
||||
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
@ -12,8 +12,8 @@
|
||||
//代码生成数据库配置
|
||||
"CodeGenDbConfig": {
|
||||
//代码生成连接字符串,注意{dbName}为固定格式,不要填写数据库名
|
||||
//"Conn": "Data Source=139.224.232.211;User ID=root;Password=RIZOtech123;Initial Catalog={dbName};Port=3308;",
|
||||
"Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog={dbName};Port=3306;",
|
||||
"Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog={dbName};Port=3308;",
|
||||
//"Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog={dbName};Port=3306;",
|
||||
"DbType": 0,
|
||||
"IsAutoCloseConnection": true,
|
||||
"DbName": "ay2509055-guiyang-fluorescence-lmes" //代码生成默认连接数据库,Oracle库是实例的名称
|
||||
|
||||
@ -62,5 +62,14 @@ namespace RIZO.Model.Mes.Dto.WorkOrderInfo
|
||||
public string Character { get; set; }
|
||||
[ExcelColumn(Name = "是否清洗")]
|
||||
public int IfClean { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "是否首检")]
|
||||
public int FirstInspection { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "是否首检合格")]
|
||||
public int FirstInspectionResult { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "首检合格时间")]
|
||||
public DateTime? FirstInspectionTime { get; set; }
|
||||
}
|
||||
}
|
||||
@ -143,6 +143,17 @@ namespace RIZO.Model.Mes.WorkOrderInfo
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "first_Inspection")]
|
||||
public int FirstInspection { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否首检合格(0否,1是)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "first_Inspection_result")]
|
||||
public int FirstInspectionResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首检合格时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "first_Inspection_time")]
|
||||
public DateTime? FirstInspectionTime { get; set; }
|
||||
}
|
||||
}
|
||||
@ -23,6 +23,6 @@ namespace RIZO.Service.Mes.IMesService.WorkOrderInfo
|
||||
|
||||
ApiResult CreateWorkOrderItemBySacnCode(PartsBasketCard partsBasketCard);
|
||||
|
||||
|
||||
string GetFirstInspectionResult(String strWorkOrderItemCode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,5 +214,18 @@ namespace RIZO.Service.Mes.WorkOrderInfo
|
||||
}
|
||||
}
|
||||
|
||||
public string GetFirstInspectionResult(String strWorkOrderItemCode)
|
||||
{
|
||||
string strResult = "首检不合格";
|
||||
var workOrderItem = Queryable().Where(it => it.WorkOrderItemCode == strWorkOrderItemCode).First();
|
||||
if (workOrderItem != null)
|
||||
{
|
||||
if (workOrderItem.FirstInspectionResult != null && workOrderItem.FirstInspectionResult == 1)
|
||||
{
|
||||
strResult = "首检合格";
|
||||
}
|
||||
}
|
||||
return strResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ using RIZO.Repository;
|
||||
using RIZO.Service.Mes.IMesService.MasterData;
|
||||
using RIZO.Service.Mes.IMesService.WorkOrderInfo;
|
||||
using RIZO.Service.Mes.MasterData;
|
||||
using MDM.Services.Process;
|
||||
using MDM.Services.Material;
|
||||
using SqlSugar;
|
||||
using SqlSugar.Extensions;
|
||||
@ -26,7 +27,7 @@ namespace RIZO.Service.Mes.WorkOrderInfo
|
||||
{
|
||||
private WorkOrderItemService workOrderItemService = new WorkOrderItemService();
|
||||
private MaterialListService materialListService = new MaterialListService();
|
||||
|
||||
private ProcessRoutingService processRoutingService = new ProcessRoutingService();
|
||||
/// <summary>
|
||||
/// 查询工单主表列表
|
||||
/// </summary>
|
||||
@ -162,17 +163,22 @@ namespace RIZO.Service.Mes.WorkOrderInfo
|
||||
//{
|
||||
// return ApiResult.Error(400, "扫码数据格式错误,无法解析");
|
||||
//}
|
||||
//根据IDCode解析的数据去检索物料档案
|
||||
//var material = materialListService.Queryable().Where(it => it.Code == flowCard.MaterialCode).First();
|
||||
//if (material != null)
|
||||
//{
|
||||
// //工艺路线防错
|
||||
// //目前情况是工艺路线与物料未绑定
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return ApiResult.Error(400, "零件编码:"+flowCard.MaterialCode+"不存在,请添加");
|
||||
//}
|
||||
|
||||
//工艺路线防错
|
||||
var routing = processRoutingService.Queryable().Where(it => it.FkProductMaterialCode == flowCard.MaterialCode.Trim()).First();
|
||||
if (routing != null)
|
||||
{
|
||||
//目前情况是工艺路线与物料未绑定
|
||||
return ApiResult.Error(400, "零件编码:" + flowCard.MaterialCode + "与工艺路线未绑定,请先绑定");
|
||||
}
|
||||
else
|
||||
{
|
||||
string strRouting = routing.RoutingCode.Trim();
|
||||
if (strRouting != flowCard.ProcessCode.Trim())
|
||||
{
|
||||
return ApiResult.Error(400, "零件编码:" + flowCard.MaterialCode + "的工艺路线是"+routing.RoutingName+"与所选工艺路线不一致,请重新选择工艺路线");
|
||||
}
|
||||
}
|
||||
string strDay = DateTime.Now.ToString("yyyyMMdd");
|
||||
//检验流卡二维码生成的工单是否重复生成
|
||||
var WorkOrder = Queryable()
|
||||
@ -191,10 +197,10 @@ namespace RIZO.Service.Mes.WorkOrderInfo
|
||||
orderInfoNew.ProcessName = flowCard.ProcessName;
|
||||
orderInfoNew.OrderStatus = 1;
|
||||
//根据前端是否能返回UserId
|
||||
//orderInfoNew.CreateBy = parm.UserId;
|
||||
//orderInfoNew.CreateName = parm.UserName;
|
||||
//orderInfoNew.UpdateBy = parm.UserId;
|
||||
//orderInfoNew.UpdateName = parm.UserName;
|
||||
orderInfoNew.CreateBy = flowCard.UserId;
|
||||
orderInfoNew.CreateName = flowCard.UserName;
|
||||
orderInfoNew.UpdateBy = flowCard.UserId;
|
||||
orderInfoNew.UpdateName = flowCard.UserName;
|
||||
orderInfoNew.CreateTime = DateTime.Now;
|
||||
orderInfoNew.UpdateTime = DateTime.Now;
|
||||
int iFlag = Insert(orderInfoNew);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user