This commit is contained in:
qianhao.xu
2024-04-22 10:36:40 +08:00
parent f1507365ed
commit d688fd7f9b
5 changed files with 50 additions and 16 deletions

View File

@@ -166,6 +166,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_thirty(); QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_thirty();
Console.WriteLine("workorder" + workorder);
return SUCCESS(workorder); return SUCCESS(workorder);
} }

View File

@@ -67,6 +67,7 @@ namespace ZR.Admin.WebApi.Controllers
[ActionPermissionFilter(Permission = "wmsManagement:wmfgentryinspect:list")] [ActionPermissionFilter(Permission = "wmsManagement:wmfgentryinspect:list")]
public IActionResult QueryWmFgentryInspect_first([FromQuery] WmFgentryInspectQueryDto parm) public IActionResult QueryWmFgentryInspect_first([FromQuery] WmFgentryInspectQueryDto parm)
{ {
var response = _WmFgentryInspectService.GetList_first(parm); var response = _WmFgentryInspectService.GetList_first(parm);
return SUCCESS(response); return SUCCESS(response);
} }

View File

@@ -1,4 +1,6 @@
using MiniExcelLibs.Attributes;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Xml.Linq;
namespace ZR.Model.MES.wms.Dto namespace ZR.Model.MES.wms.Dto
{ {
@@ -37,6 +39,10 @@ namespace ZR.Model.MES.wms.Dto
public string Machine { get; set; } public string Machine { get; set; }
public int? ProductionNum { get; set; } public int? ProductionNum { get; set; }
/// <summary>
/// 箱子数量
/// </summary>
public int? Packnum { get; set; }
public string Partnumber { get; set; } public string Partnumber { get; set; }
@@ -72,6 +78,19 @@ namespace ZR.Model.MES.wms.Dto
/// ///
public string Colour { get; set; } public string Colour { get; set; }
public string CreatedBy { get; set; }
public DateTime? CreatedTime { get; set; }
public string UpdatedBy { get; set; }
public DateTime? UpdatedTime { get; set; }
/// <summary>
/// 上件数
/// </summary>
public int PreviousNumber { get; set; }
} }

View File

@@ -276,17 +276,21 @@ namespace ZR.Service.mes.wms
if (isStrict && wmInfo.Remark != "临时") if (isStrict && wmInfo.Remark != "临时")
{ {
//1.2 判断是否检验合格 入库检验 //1.2 判断是否检验合格 入库检验
WmFgentryInspect inspect = Context.Queryable<WmGoodsNowProduction>() string package_no = resultionPackage.PatchCode.Split("_")[1];
.LeftJoin<WmFgentryInspect>((g, f) => g.PackageCode == f.Packcode) var inspect= Context.Queryable<WmFgentryInspect>()
.Where(g => g.PackageCodeClient == resultionPackage.PatchCode) .Where(it => it.Workorder == resultionPackage.WorkoderID)
.Select((g, f) => new WmFgentryInspect() .Where(it => it.Packcode.EndsWith(package_no)).First();
if(inspect == null)
{ {
Result = f.Result return "GP12 异常错误 null ";
}
}).First(); if (inspect.Result == 2)
if (inspect == null || inspect.Result == 2)
{ {
return "该箱号GP12 检验不合格"; return "该箱号GP12 检验不合格,不得入库";
}
if (inspect.Result == 0|| inspect.Result==null)
{
return "该箱号GP12 未检验,不得入库";
} }
// 3.isStrict = TRUE时判断是否是满箱标签 // 3.isStrict = TRUE时判断是否是满箱标签

View File

@@ -101,8 +101,10 @@ namespace ZR.Service.mes.wms
{ {
Workorder = it.Workorder, Workorder = it.Workorder,
ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0), ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0),
// Result= SqlFunc.AggregateSum(it.Result??0), Packnum = SqlFunc.AggregateCount(it.Workorder),
Partnumber = SqlFunc.AggregateMax(it.Partnumber) Partnumber = SqlFunc.AggregateMax(it.Partnumber),
CreatedTime= SqlFunc.AggregateMax(it.CreatedTime),
}) })
.LeftJoin<ProWorkorder_v2>((s, w) => s.Workorder==w.ClientWorkorder) .LeftJoin<ProWorkorder_v2>((s, w) => s.Workorder==w.ClientWorkorder)
.Select((s,w)=>new WmFgentryInspect_parentDto .Select((s,w)=>new WmFgentryInspect_parentDto
@@ -110,9 +112,13 @@ namespace ZR.Service.mes.wms
Workorder= s.Workorder, Workorder= s.Workorder,
ProductionNum=s.ProductionNum, ProductionNum=s.ProductionNum,
Partnumber=s.Partnumber, Partnumber=s.Partnumber,
ProductDescription=w.ProductDescription, CreatedTime = s.CreatedTime,
Packnum = s.Packnum,
ProductDescription =w.ProductDescription,
Specifications=w.Specifications, Specifications=w.Specifications,
PreviousNumber = w.PreviousNumber,
Colour = w.Colour Colour = w.Colour
}) })
.ToList(); .ToList();
@@ -126,7 +132,7 @@ namespace ZR.Service.mes.wms
} }
int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize); //int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
var pageProducts = inspects.Skip((parm.PageNum - 1) * parm.PageSize).Take(parm.PageSize).ToList(); var pageProducts = inspects.Skip((parm.PageNum - 1) * parm.PageSize).Take(parm.PageSize).ToList();
@@ -134,7 +140,8 @@ namespace ZR.Service.mes.wms
{ {
PageSize = parm.PageSize, PageSize = parm.PageSize,
PageIndex = parm.PageNum, PageIndex = parm.PageNum,
TotalPage = totalPages, TotalNum= inspects.Count,
Result = pageProducts Result = pageProducts
}; };