From 7c67d60d2233f71547bcff90e03f9343dd4f13a2 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期一, 14 四月 2025 14:29:55 +0800
Subject: [PATCH] 1.产品绑定,核对送检
---
service/QC/LljService.cs | 69 +++++++++++++++++++++++++++-------
1 files changed, 55 insertions(+), 14 deletions(-)
diff --git a/service/QC/LljService.cs b/service/QC/LljService.cs
index 63f536d..4838160 100644
--- a/service/QC/LljService.cs
+++ b/service/QC/LljService.cs
@@ -1,9 +1,11 @@
-锘縰sing Microsoft.IdentityModel.Tokens;
+锘縰sing MES.Service.Models;
+using Microsoft.IdentityModel.Tokens;
using NewPdaSqlServer.DB;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
using NewPdaSqlServer.util;
using SqlSugar;
+using static Azure.Core.HttpHeader;
namespace NewPdaSqlServer.service.QC;
@@ -23,16 +25,26 @@
var totalCount = 0;
var pageList = Db.Queryable<LLJView>()
- .WhereIF(
- StringUtil.IsNotNullOrEmpty(queryObj.result) &&
- "鏈畬鎴�".Equals(queryObj.result),
- a => (a.FcheckResu ?? "") == ""|| (a.FcheckResu ?? "") == "妫�楠屼腑")
- .WhereIF(
- StringUtil.IsNotNullOrEmpty(queryObj.result) &&
- !"鏈畬鎴�".Equals(queryObj.result),
- a => !((a.FcheckResu ?? "") == "" || (a.FcheckResu ?? "") == "妫�楠屼腑"))
+ //.WhereIF(
+ // StringUtil.IsNotNullOrEmpty(queryObj.result) &&
+ // "鏈畬鎴�".Equals(queryObj.result),
+ // a => (a.STATUS ?? "") != "宸叉彁浜�")
+ // //a => (a.FcheckResu ?? "") == ""|| (a.FcheckResu ?? "") == "妫�楠屼腑")
+ //.WhereIF(
+ // StringUtil.IsNotNullOrEmpty(queryObj.result) &&
+ // !"鏈畬鎴�".Equals(queryObj.result),
+ // a => (a.STATUS ?? "") == "宸叉彁浜�")
+
+ .WhereIF(!string.IsNullOrWhiteSpace(queryObj.keyword), a =>
+ a.ItemNo.Contains(queryObj.keyword) ||
+ a.ItemName.Contains(queryObj.keyword) ||
+ a.LotNo.Contains(queryObj.keyword) ||
+ a.ReleaseNo.Contains(queryObj.keyword) ||
+ a.SuppName.Contains(queryObj.keyword)
+ )
.WhereIF(UtilityHelper.CheckGuid(parsedGuid),
- a => a.guid == parsedGuid)
+ a => a.guid == parsedGuid )
+ .Where(a => (a.fsubmit ?? 0) == 0)
.OrderByDescending(a => a.CreateDate)
.ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);
@@ -59,7 +71,7 @@
FcheckItem = b.FcheckItem,
FdownAllow = b.FdownAllow,
FcheckLevel = b.FREQUENCY,
- Fstand = Convert.ToInt32(b.FSTAND),
+ Fstand = b.FSTAND,
FupAllow = b.FupAllow,
SampleSizeNo = b.SampleSizeNo,
FenterQty = 0,
@@ -219,7 +231,9 @@
a.FspecRequ,
a.FreQty,
a.CheckQyt,
- a.FcheckResu
+ a.FcheckResu,
+ a.Order,
+ a.Ybsl
}).Select((a, b) => new MesQaItemsDetectDetail5
{
Guid = a.Guid,
@@ -239,8 +253,11 @@
Factory = "1000",
Company = "1000",
FenterQty = SqlFunc.AggregateCount(b.Guid),
- FcheckResu = a.FcheckResu
- }).ToList();
+ FcheckResu = a.FcheckResu,
+ Order = a.Order,
+ Ybsl = a.Ybsl,
+ }).OrderBy(a => a.Order)
+ .ToList();
}
public int SetQSItemDetail(MesQaItemsDetectDetail12 detail)
@@ -313,6 +330,7 @@
commit += db.Updateable<MesQaItemsDetectDetail5>()
.SetColumns(s => s.FcheckResu == result)
.SetColumns(s => s.FenterQty == count)
+ .SetColumns(s => s.FngRate == (s.CheckQyt == 0 ? (decimal?)null : (decimal?)(Convert.ToDouble(noCount) / Convert.ToDouble(count))))
.Where(s => s.Guid == detail.ParentGuid)
.ExecuteCommand();
@@ -706,4 +724,27 @@
return [isNullCount, isNotNullCount];
}
+
+
+
+ //鍒犻櫎鐗瑰緛鍊�
+ public int deleteDetail13(LLJDto dto)
+ {
+ var withOracle = Db.Deleteable<MesQaItemsDetectDetail13>()
+ .Where(s => s.Guid.ToString() == dto.id13)
+ .ExecuteCommand();
+
+ return withOracle;
+ }
+
+ //鏇存柊涓嶅悎鏍兼弿杩�
+ public int updateRemarks(LLJDto dto)
+ {
+ var withOracle = Db.Updateable<MesQaItemsDetect01>()
+ .SetColumns(s => s.Remarks == dto.Remarks)
+ .Where(s => s.Guid.ToString() == dto.gid)
+ .ExecuteCommand();
+
+ return withOracle;
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3