触摸屏GP12
This commit is contained in:
@@ -125,11 +125,18 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public IActionResult ScanInnerLabel([FromBody] QcGp12LabelScanDto parm)
|
public IActionResult ScanInnerLabel([FromBody] QcGp12LabelScanDto parm)
|
||||||
{
|
{
|
||||||
var modal = parm.Adapt<QcGp12LabelScanDto>().ToCreate(HttpContext);
|
try
|
||||||
|
{
|
||||||
|
var modal = parm.Adapt<QcGp12LabelScanDto>().ToCreate(HttpContext);
|
||||||
|
|
||||||
var response = _QcGp12Service.ScanInnerLabel(modal);
|
var response = _QcGp12Service.ScanInnerLabel(modal);
|
||||||
|
|
||||||
return SUCCESS(response);
|
return SUCCESS(response);
|
||||||
|
}catch(Exception ex)
|
||||||
|
{
|
||||||
|
return SUCCESS("请刷新页面");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -548,12 +548,24 @@ namespace ZR.Service.Business
|
|||||||
DateTime nowTime = DateTime.Now;
|
DateTime nowTime = DateTime.Now;
|
||||||
// 标签防错
|
// 标签防错
|
||||||
string partNumber = DoAnalyzePartnumber(data.Label);
|
string partNumber = DoAnalyzePartnumber(data.Label);
|
||||||
|
|
||||||
if (partNumber != data.PartNumber)
|
if (partNumber != data.PartNumber)
|
||||||
{
|
{
|
||||||
return "内标签零件号与外箱标签不一致!";
|
return "内标签零件号与外箱标签不一致!";
|
||||||
}
|
}
|
||||||
|
int qt = DoAnalyzeQuantity(data.Label);
|
||||||
|
if (qt >= 6)
|
||||||
|
{
|
||||||
|
return "该标签可能为外箱标签!";
|
||||||
|
}
|
||||||
|
bool hasAny = Context
|
||||||
|
.Queryable<QcGp12RecordLabelScan>()
|
||||||
|
.Where(it => it.Label == data.Label)
|
||||||
|
.Any();
|
||||||
|
if (hasAny)
|
||||||
|
{
|
||||||
|
return "重复扫码!";
|
||||||
|
}
|
||||||
|
// 标签录入
|
||||||
int sort = 0;
|
int sort = 0;
|
||||||
QcGp12RecordLabelScan labelScan = Context
|
QcGp12RecordLabelScan labelScan = Context
|
||||||
.Queryable<QcGp12RecordLabelScan>()
|
.Queryable<QcGp12RecordLabelScan>()
|
||||||
|
|||||||
Reference in New Issue
Block a user