111
This commit is contained in:
parent
f1507365ed
commit
d688fd7f9b
@ -166,6 +166,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_thirty();
|
||||
|
||||
Console.WriteLine("workorder" + workorder);
|
||||
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
|
||||
@ -67,6 +67,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmfgentryinspect:list")]
|
||||
public IActionResult QueryWmFgentryInspect_first([FromQuery] WmFgentryInspectQueryDto parm)
|
||||
{
|
||||
|
||||
var response = _WmFgentryInspectService.GetList_first(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ZR.Model.MES.wms.Dto
|
||||
{
|
||||
@ -37,6 +39,10 @@ namespace ZR.Model.MES.wms.Dto
|
||||
public string Machine { get; set; }
|
||||
|
||||
public int? ProductionNum { get; set; }
|
||||
/// <summary>
|
||||
/// 箱子数量
|
||||
/// </summary>
|
||||
public int? Packnum { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
@ -72,6 +78,19 @@ namespace ZR.Model.MES.wms.Dto
|
||||
///
|
||||
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; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -276,17 +276,21 @@ namespace ZR.Service.mes.wms
|
||||
if (isStrict && wmInfo.Remark != "临时")
|
||||
{
|
||||
//1.2 判断是否检验合格 入库检验
|
||||
WmFgentryInspect inspect = Context.Queryable<WmGoodsNowProduction>()
|
||||
.LeftJoin<WmFgentryInspect>((g, f) => g.PackageCode == f.Packcode)
|
||||
.Where(g => g.PackageCodeClient == resultionPackage.PatchCode)
|
||||
.Select((g, f) => new WmFgentryInspect()
|
||||
{
|
||||
Result = f.Result
|
||||
|
||||
}).First();
|
||||
if (inspect == null || inspect.Result == 2)
|
||||
string package_no = resultionPackage.PatchCode.Split("_")[1];
|
||||
var inspect= Context.Queryable<WmFgentryInspect>()
|
||||
.Where(it => it.Workorder == resultionPackage.WorkoderID)
|
||||
.Where(it => it.Packcode.EndsWith(package_no)).First();
|
||||
if(inspect == null)
|
||||
{
|
||||
return "该箱号GP12 检验不合格";
|
||||
return "GP12 异常错误 null ";
|
||||
}
|
||||
if (inspect.Result == 2)
|
||||
{
|
||||
return "该箱号GP12 检验不合格,不得入库";
|
||||
}
|
||||
if (inspect.Result == 0|| inspect.Result==null)
|
||||
{
|
||||
return "该箱号GP12 未检验,不得入库";
|
||||
}
|
||||
|
||||
// 3.isStrict = TRUE时判断是否是满箱标签
|
||||
|
||||
@ -101,18 +101,24 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
Workorder = it.Workorder,
|
||||
ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0),
|
||||
// Result= SqlFunc.AggregateSum(it.Result??0),
|
||||
Partnumber = SqlFunc.AggregateMax(it.Partnumber)
|
||||
})
|
||||
Packnum = SqlFunc.AggregateCount(it.Workorder),
|
||||
Partnumber = SqlFunc.AggregateMax(it.Partnumber),
|
||||
CreatedTime= SqlFunc.AggregateMax(it.CreatedTime),
|
||||
|
||||
})
|
||||
.LeftJoin<ProWorkorder_v2>((s, w) => s.Workorder==w.ClientWorkorder)
|
||||
.Select((s,w)=>new WmFgentryInspect_parentDto
|
||||
{
|
||||
Workorder= s.Workorder,
|
||||
ProductionNum=s.ProductionNum,
|
||||
Partnumber=s.Partnumber,
|
||||
ProductDescription=w.ProductDescription,
|
||||
CreatedTime = s.CreatedTime,
|
||||
Packnum = s.Packnum,
|
||||
ProductDescription =w.ProductDescription,
|
||||
Specifications=w.Specifications,
|
||||
PreviousNumber = w.PreviousNumber,
|
||||
Colour = w.Colour
|
||||
|
||||
})
|
||||
.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();
|
||||
|
||||
@ -134,7 +140,8 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
PageSize = parm.PageSize,
|
||||
PageIndex = parm.PageNum,
|
||||
TotalPage = totalPages,
|
||||
TotalNum= inspects.Count,
|
||||
|
||||
Result = pageProducts
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user