质检报表完善

This commit is contained in:
2024-10-21 18:01:21 +08:00
parent 8ac0824412
commit a96bdb4091
4 changed files with 21 additions and 3 deletions

View File

@@ -103,6 +103,16 @@ public partial class WmsPurchaseQcrecord : BaseEntity<string>
/// 批次
/// </summary>
public string? batchno { get; set; }
/// <summary>
/// 质检人
/// </summary>
public string? checker { get; set; }
/// <summary>
/// 质检时间
/// </summary>
public DateTime? check_time { get; set; }
/// <summary>
///
/// </summary>

View File

@@ -108,6 +108,8 @@ namespace Tnb.WarehouseMgr
wmsPurchaseQcrecord.purchase_prqty = wmsOutsourceD.actual_quantity;
wmsPurchaseQcrecord.purchase_arriveqty = wmsOutsourceD.actual_quantity;
wmsPurchaseQcrecord.result = qcRes;
wmsPurchaseQcrecord.checker = create_id;
wmsPurchaseQcrecord.check_time = DateTime.Now;
await _db.Insertable(wmsPurchaseQcrecord).ExecuteCommandAsync();
}

View File

@@ -108,6 +108,8 @@ namespace Tnb.WarehouseMgr
wmsPurchaseQcrecord.purchase_prqty = wmsPurchaseD.purchase_prqty;
wmsPurchaseQcrecord.purchase_arriveqty = wmsPurchaseD.purchase_arriveqty;
wmsPurchaseQcrecord.result = qcRes;
wmsPurchaseQcrecord.checker = create_id;
wmsPurchaseQcrecord.check_time = DateTime.Now;
await _db.Insertable(wmsPurchaseQcrecord).ExecuteCommandAsync();

View File

@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev;
@@ -76,7 +77,7 @@ namespace Tnb.WarehouseMgr
{
type = JObject.Parse(input.queryJson).Value<string>("type");
material_code = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.material_code));
batchno = JObject.Parse(input.queryJson).Value<string>("batchno");
batchno = JObject.Parse(input.queryJson).Value<string>("code_batch");
material_specification = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.material_specification));
container_no = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.container_no));
if (JObject.Parse(input.queryJson).ContainsKey("time"))
@@ -100,6 +101,7 @@ namespace Tnb.WarehouseMgr
.InnerJoin<BasMaterial>((a, b) => a.material_id == b.id)
.LeftJoin<DictionaryDataEntity>((a, b, c) => c.EnCode == b.unit_id && c.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID)
.LeftJoin<WmsPurchaseD>((a, b, c, d) => d.id == a.ori_detail_id)
.LeftJoin<UserEntity>((a, b, c, d, e) => e.Id == a.checker)
.WhereIF(!string.IsNullOrEmpty(material_specification), (a, b, c, d) => b.material_specification.Contains(material_specification))
.WhereIF(!string.IsNullOrEmpty(batchno), (a, b, c, d) => a.batchno.Contains(batchno))
.WhereIF(!string.IsNullOrEmpty(container_no), (a, b, c, d) => b.material_standard.Contains(container_no))
@@ -107,7 +109,7 @@ namespace Tnb.WarehouseMgr
.WhereIF(!string.IsNullOrEmpty(type), (a, b, c, d) => a.type == type)
.WhereIF(_start_time != 0, (a, b, c, d) => a.create_time >= start_time)
.WhereIF(_end_time != 0, (a, b, c, d) => a.create_time <= end_time)
.Select((a, b, c, d) => new WmsPurchaseQcrecord
.Select((a, b, c, d, e) => new WmsPurchaseQcrecord
{
material_id = a.material_id,
material_code = a.material_code,
@@ -122,7 +124,9 @@ namespace Tnb.WarehouseMgr
result = SqlFunc.IF(a.result.Equals("await") || string.IsNullOrEmpty(a.result)).Return("待检")
.ElseIF(a.result.Equals("vergeOk")).Return("让步接收").ElseIF(a.result.Equals("ok")).Return("合格")
.ElseIF(a.result.Equals("no")).Return("不合格").End(""),
create_time = d.create_time
create_time = d.create_time,
checker = e.RealName,
check_time = a.check_time
}).ToListAsync();
total_qty = data.Count;