GP12触摸屏,油漆实验室改动提交
This commit is contained in:
@@ -33,23 +33,20 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询原材料记录表
|
/// 查询原材料记录表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="starttime">开始时间</param>
|
/// <param name="startDate">开始时间</param>
|
||||||
/// <param name="endTime">结束时间</param>
|
/// <param name="endDate">结束时间</param>
|
||||||
/// <param name="workorderid">批次号</param>
|
/// <param name="batchNumber">批次号</param>
|
||||||
/// <param name="partnumber">颜色代码</param>
|
/// <param name="productDescription">描述</param>
|
||||||
|
/// <param name="colorCode">颜色代码</param>
|
||||||
/// <param name="pageNum">页号</param>
|
/// <param name="pageNum">页号</param>
|
||||||
/// <param name="pageSize">页大小</param>
|
/// <param name="pageSize">页大小</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("getrawmateriallist")]
|
[HttpGet("getrawmateriallist")]
|
||||||
public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, string workorderid,string partnumber,string description, int pageNum, int pageSize)
|
public IActionResult GetRawMateriallist(DateTime startDate, DateTime endDate, string batchNumber, string colorCode, string productDescription, int pageNum, int pageSize)
|
||||||
{
|
{
|
||||||
//starttime = starttime.AddHours(8);
|
(List<PLRawMaterial>, int) list = plRawMaterialService.GetRawMaterialTable(startDate, endDate, batchNumber, colorCode, productDescription, pageNum, pageSize);
|
||||||
//endTime = endTime.AddHours(8);
|
|
||||||
|
|
||||||
// 时间要增加,8个小时
|
return ToResponse(new ApiResult(200, "success", list));
|
||||||
(List<PLRawMaterial>, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, workorderid, partnumber, description, pageNum, pageSize);
|
|
||||||
|
|
||||||
return ToResponse(new ApiResult(200, "success", lst));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -61,9 +58,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
|
|||||||
public IActionResult AddRawMateriallist(int num)
|
public IActionResult AddRawMateriallist(int num)
|
||||||
{
|
{
|
||||||
|
|
||||||
int ret = plRawMaterialService.AddRawMaterialRecords(1, 5);
|
int result = plRawMaterialService.AddRawMaterialRecords(1, 5);
|
||||||
|
|
||||||
return ToResponse(new ApiResult(200, "success", ret));
|
return ToResponse(new ApiResult(200, "success", result));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -131,5 +128,19 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
|
|||||||
|
|
||||||
return pLRawMaterial;
|
return pLRawMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据传入数据查询物料信息,下拉填写
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="query"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("QueryMaterialOptions")]
|
||||||
|
public IActionResult QueryMaterialOptions(string query)
|
||||||
|
{
|
||||||
|
|
||||||
|
var result = plRawMaterialService.QueryMaterialOptions(query);
|
||||||
|
|
||||||
|
return ToResponse(new ApiResult(200, "success", result));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -599,17 +599,13 @@ namespace ZR.Service.Business
|
|||||||
public string ScanInnerLabel(QcGp12LabelScanDto data)
|
public string ScanInnerLabel(QcGp12LabelScanDto data)
|
||||||
{
|
{
|
||||||
DateTime nowTime = DateTime.Now;
|
DateTime nowTime = DateTime.Now;
|
||||||
// 标签防错
|
// 标签防错 (内标签零件号)
|
||||||
string partNumber = DoAnalyzePartnumber(data.Label);
|
string partNumber = DoAnalyzePartnumber(data.Label);
|
||||||
if (partNumber != data.PartNumber)
|
// 内标签包含外标签
|
||||||
|
if (!partNumber.Contains(data.PartNumber))
|
||||||
{
|
{
|
||||||
return "内标签零件号与外箱标签不一致!";
|
return "内标签零件号与外箱标签不一致!";
|
||||||
}
|
}
|
||||||
/* int qt = DoAnalyzeQuantity(data.Label);
|
|
||||||
if (qt >= 6)
|
|
||||||
{
|
|
||||||
return "该标签可能为外箱标签!";
|
|
||||||
}*/
|
|
||||||
bool hasAny = Context
|
bool hasAny = Context
|
||||||
.Queryable<QcGp12RecordLabelScan>()
|
.Queryable<QcGp12RecordLabelScan>()
|
||||||
.Where(it => it.Label == data.Label)
|
.Where(it => it.Label == data.Label)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using ZR.Model;
|
||||||
using ZR.Model.MES.ql;
|
using ZR.Model.MES.ql;
|
||||||
|
using ZR.Model.MES.wms.Dto;
|
||||||
|
|
||||||
|
|
||||||
namespace ZR.Service.mes.ql.IService
|
namespace ZR.Service.mes.ql.IService
|
||||||
@@ -15,5 +17,12 @@ namespace ZR.Service.mes.ql.IService
|
|||||||
|
|
||||||
public int UpdateRawMaterialRecords(List<PLRawMaterial> list);
|
public int UpdateRawMaterialRecords(List<PLRawMaterial> list);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据查询条件,获取物料下拉信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="query"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<WmMaterialSelectOptions> QueryMaterialOptions(string query);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Infrastructure.Attribute;
|
using Aliyun.OSS;
|
||||||
|
using Infrastructure.Attribute;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using System;
|
using System;
|
||||||
using ZR.Model.MES.ql;
|
using ZR.Model.MES.ql;
|
||||||
|
using ZR.Model.MES.wms;
|
||||||
|
using ZR.Model.MES.wms.Dto;
|
||||||
using ZR.Service.mes.ql.IService;
|
using ZR.Service.mes.ql.IService;
|
||||||
|
|
||||||
namespace ZR.Service.mes.ql
|
namespace ZR.Service.mes.ql
|
||||||
@@ -97,6 +100,8 @@ namespace ZR.Service.mes.ql
|
|||||||
//return (Context.Queryable<PLRawMaterial>().Where(it => it.Id > 0).ToList(),100);
|
//return (Context.Queryable<PLRawMaterial>().Where(it => it.Id > 0).ToList(),100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新数据记录
|
/// 更新数据记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -134,5 +139,31 @@ namespace ZR.Service.mes.ql
|
|||||||
UpdatedTime = DateTime.Now,
|
UpdatedTime = DateTime.Now,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<WmMaterialSelectOptions> QueryMaterialOptions(string query)
|
||||||
|
{
|
||||||
|
var predicate = Expressionable
|
||||||
|
.Create<WmMaterial>()
|
||||||
|
.Or(it => it.Partnumber.Contains(query))
|
||||||
|
.Or(it => it.Description.Contains(query))
|
||||||
|
.Or(it => it.ProductName.Contains(query))
|
||||||
|
.And(it => it.Type == 1)
|
||||||
|
.And(it => it.Status == 1);
|
||||||
|
List<WmMaterialSelectOptions> options = Context
|
||||||
|
.Queryable<WmMaterial>()
|
||||||
|
.Where(predicate.ToExpression())
|
||||||
|
.Select(
|
||||||
|
(it) =>
|
||||||
|
new WmMaterialSelectOptions
|
||||||
|
{
|
||||||
|
Key = it.Id,
|
||||||
|
Label = "[ " + it.Partnumber + " ] " + it.Description,
|
||||||
|
Value = it.Description
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.Take(10)
|
||||||
|
.ToList();
|
||||||
|
return options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user