From 8f25fecab6e6a79096b9940ab3432401b9045b39 Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期四, 10 七月 2025 18:00:14 +0800
Subject: [PATCH] 首检\巡检\入库检适配
---
MESApplication/bin/Release/net8.0/MESApplication.exe | 0
MES.Service/Modes/MesQaItemsDetectDetail12.cs | 77 +++++++++
MES.Service/service/QC/XJService.cs | 20 +-
MES.Service/util/ResponseResult.cs | 2
MESApplication/Controllers/QC/SJController.cs | 31 +++
MES.Service/service/QC/SJService.cs | 108 ++++++++++---
MESApplication/bin/Release/net8.0/log/2025070917.log | 9 +
MES.Service/service/QC/RKJService.cs | 75 +++++---
MES.Service/Dto/service/SJPageResult.cs | 40 ++--
MESApplication/bin/Release/net8.0/MES.Service.dll | 0
MES.Service/Modes/SJ/MESQMCHECKITEM.cs | 12 +
MES.Service/util/UserUtil.cs | 17 ++
MESApplication/bin/Release/net8.0/MESApplication.dll | 0
MES.Service/Modes/LLJDto.cs | 40 +++++
MESApplication/Controllers/QC/XJController.cs | 8
MES.Service/bin/Release/net8.0/MES.Service.dll | 0
MESApplication/bin/Release/net8.0/MES.Service.pdb | 0
MESApplication/Controllers/QC/RKJController.cs | 28 +++
MES.Service/Dto/service/XJPageResult.cs | 2
MES.Service/bin/Release/net8.0/MES.Service.pdb | 0
MESApplication/bin/Release/net8.0/MESApplication.pdb | 0
MES.Service/Dto/service/QsItem.cs | 4
22 files changed, 377 insertions(+), 96 deletions(-)
diff --git a/MES.Service/Dto/service/QsItem.cs b/MES.Service/Dto/service/QsItem.cs
index 944f631..83f35bd 100644
--- a/MES.Service/Dto/service/QsItem.cs
+++ b/MES.Service/Dto/service/QsItem.cs
@@ -20,7 +20,11 @@
//澶囨敞
public string? Remarks { get; set; }
+ public string? Comments { get; set; }
+
public string? StatusUser { get; set; }
public SJPageResult? Result { get; set; }
+
+ public string? userNo { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Dto/service/SJPageResult.cs b/MES.Service/Dto/service/SJPageResult.cs
index 10a8e96..8ca5e09 100644
--- a/MES.Service/Dto/service/SJPageResult.cs
+++ b/MES.Service/Dto/service/SJPageResult.cs
@@ -3,7 +3,7 @@
namespace MES.Service.Dto.service;
-[SugarTable("QS_ITEM_IPI_REQ")] //鐢ㄤ簬SqlSugar
+[SugarTable("V_MES_SJ")] //鐢ㄤ簬SqlSugar
public class SJPageResult : Page
{
public decimal? Id { get; set; }
@@ -15,11 +15,11 @@
[SugarColumn(ColumnName = "STATUS_DATE")] //鐢ㄤ簬SqlSugar
public DateTime? StatusDate { get; set; }
- [SugarColumn(IsIgnore = true)]
public string? FName { get; set; }
+ public string? Result { get; set; }
[SugarColumn(IsIgnore = true)]
- public string? Result { get; set; }
+ public string? SearchValue { get; set; }
[SugarColumn(ColumnName = "STATUS_USER")] //鐢ㄤ簬SqlSugar
public string? StatusUser { get; set; }
@@ -57,8 +57,8 @@
[SugarColumn(ColumnName = "ITEM_NO")] //鐢ㄤ簬SqlSugar
public string? ItemNo { get; set; }
- //[SugarColumn(ColumnName = "DAA001")] //鐢ㄤ簬SqlSugar
- //public string? daa001 { get; set; }
+ [SugarColumn(ColumnName = "DAA001")] //鐢ㄤ簬SqlSugar
+ public string? daa001 { get; set; }
//LINE
[SugarColumn(ColumnName = "LINE")] //鐢ㄤ簬SqlSugar
@@ -68,21 +68,21 @@
[SugarColumn(ColumnName = "Remarks")] //鐢ㄤ簬SqlSugar
public string? Remarks { get; set; }
- ///// <summary>
- ///// 浜у搧鍚嶇О
- ///// </summary>
- //[SugarColumn(ColumnName = "DAA003")]
- //public string? Daa003 { get; set; }
+ /// <summary>
+ /// 浜у搧鍚嶇О
+ /// </summary>
+ [SugarColumn(ColumnName = "DAA003")]
+ public string? Daa003 { get; set; }
- ///// <summary>
- ///// 浜у搧瑙勬牸
- ///// </summary>
- //[SugarColumn(ColumnName = "DAA004")]
- //public string? Daa004 { get; set; }
+ /// <summary>
+ /// 浜у搧瑙勬牸
+ /// </summary>
+ [SugarColumn(ColumnName = "DAA004")]
+ public string? Daa004 { get; set; }
- ///// <summary>
- ///// 宸ュ崟鏁伴噺
- ///// </summary>
- //[SugarColumn(ColumnName = "DAA008")]
- //public decimal? Daa008 { get; set; }
+ /// <summary>
+ /// 宸ュ崟鏁伴噺
+ /// </summary>
+ [SugarColumn(ColumnName = "DAA008")]
+ public decimal? Daa008 { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Dto/service/XJPageResult.cs b/MES.Service/Dto/service/XJPageResult.cs
index 0f9859d..09cc6c5 100644
--- a/MES.Service/Dto/service/XJPageResult.cs
+++ b/MES.Service/Dto/service/XJPageResult.cs
@@ -8,4 +8,6 @@
public string? result { get; set; }
public string? id { get; set; }
+
+ public string? SearchValue { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Modes/LLJDto.cs b/MES.Service/Modes/LLJDto.cs
new file mode 100644
index 0000000..1dec218
--- /dev/null
+++ b/MES.Service/Modes/LLJDto.cs
@@ -0,0 +1,40 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MES.Service.Modes;
+
+public class LLJDto
+{
+ public string? userNo { get; set; }
+
+ //妫�楠屽崟鍙�
+ public string? releaseNo { get; set; }
+
+ //涓昏〃id
+ public int? gid { get; set; }
+
+ //瀛愯〃id
+ public int? pid { get; set; }
+
+ //瀛欒〃id
+ public int? id { get; set; }
+
+ //澶囨敞
+ public string? Remarks { get; set; }
+
+ //==========================================
+ //宸℃涓诲瓙琛ㄩ渶瑕佺殑鏁版嵁
+ public QsItemOqcReq? from { get; set; }
+
+ public List<MesQaItemsDetectDetail5>? items { get; set; }
+
+ //==========================================
+ //宸℃瀛愬瓩琛ㄩ渶瑕佺殑鏁版嵁
+
+ public MesQaItemsDetectDetail5? ItemXj01 { get; set; }
+
+ public List<MesQaItemsDetectDetail12>? ItemXj02s { get; set; }
+}
diff --git a/MES.Service/Modes/MesQaItemsDetectDetail12.cs b/MES.Service/Modes/MesQaItemsDetectDetail12.cs
new file mode 100644
index 0000000..e206f13
--- /dev/null
+++ b/MES.Service/Modes/MesQaItemsDetectDetail12.cs
@@ -0,0 +1,77 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MES.Service.Modes;
+
+/// <summary>
+/// IQC妫�楠�
+/// </summary>
+[SugarTable("MES_QA_ITEMS_DETECT_DETAIL12")]
+public class MesQaItemsDetectDetail12
+{
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "ID", OracleSequenceName = "SEQ_QM_ID",
+ IsPrimaryKey = true)]
+ public decimal Id { get; set; }
+
+ /// <summary>
+ /// 妫�楠岀粨鏋�
+ /// </summary>
+ [SugarColumn(ColumnName = "FCHECK_RESU")]
+ public string? FcheckResu { get; set; }
+
+ /// <summary>
+ /// 妫�楠岄」鐩�
+ /// </summary>
+ [SugarColumn(ColumnName = "FCHECK_ITEM")]
+ public string? FcheckItem { get; set; }
+
+ /// <summary>
+ /// 妫�楠屽崟鍙�
+ /// </summary>
+ [SugarColumn(ColumnName = "RELEASE_NO")]
+ public string? ReleaseNo { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "MAIN_ID")]
+ public decimal? MainId { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "CREATE_DATE")]
+ public DateTime? CreateDate { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "COMPANY")]
+ public string? Company { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "FACTORY")]
+ public string? Factory { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "FSTAND")]
+ public string? Fstand { get; set; }
+
+ /// <summary>
+ /// 鐢熸垚浜�
+ /// </summary>
+ [SugarColumn(ColumnName = "LASTUPDATE_BY")]
+ public string? LastupdateBy { get; set; }
+
+ /// <summary>
+ /// </summary>
+ [SugarColumn(ColumnName = "CREATE_BY")]
+ public string? CreateBy { get; set; }
+
+ [SugarColumn(IsIgnore = true)] public int? count { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Modes/SJ/MESQMCHECKITEM.cs b/MES.Service/Modes/SJ/MESQMCHECKITEM.cs
new file mode 100644
index 0000000..cea61fd
--- /dev/null
+++ b/MES.Service/Modes/SJ/MESQMCHECKITEM.cs
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MES.Service.Modes.SJ
+{
+ internal class MESQMCHECKITEM
+ {
+ }
+}
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll
index 487e687..435bb10 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb
index 61f58f2..1506228 100644
--- a/MES.Service/bin/Release/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/service/QC/RKJService.cs b/MES.Service/service/QC/RKJService.cs
index 8656f8a..bdcaa01 100644
--- a/MES.Service/service/QC/RKJService.cs
+++ b/MES.Service/service/QC/RKJService.cs
@@ -454,48 +454,61 @@
}
- public List<QsItemOqcReq> getPage(XJPageResult queryObj)
+ public (List<QsItemOqcReq> items, int TotalCount) GetPage(XJPageResult queryObj)
{
var db = SqlSugarHelper.GetInstance();
+ var totalCount = 0;
- return db
- .Queryable<QsItemOqcReq, Womdaa, MesItems, MesInvItemIns, Womdab,
- MesInvTransaction, RKJDaa001>(
- (a, da, b, c, d, ca, m) => new JoinQueryInfos(
- JoinType.Left, da.Daa001 == a.BillNo,
- JoinType.Left, a.ItemId == b.Id,
- JoinType.Left, a.BillNo == c.BillNo,
- JoinType.Left, c.CbillNo == d.Dab001,
- JoinType.Left,
- c.TransctionNo == ca.TransactionNo.ToString() &&
- c.Company == ca.Company && c.Factory == ca.Factory,
- JoinType.Left, c.Id == m.ItemInId && a.ItemNo == m.ItemNo
- ))
- .Select((a, da, b, c, d, ca, m) => new QsItemOqcReq
+ // 鑾峰彇鐢ㄦ埛鍏宠仈鐨勭嚎浣撶紪鍙�
+ string[] lineNo = null;
+ if (!string.IsNullOrEmpty(queryObj.createUser))
+ {
+ lineNo = _baseService.getUserLineNo(queryObj.createUser);
+ }
+
+ var query = db.Queryable<QsItemOqcReq, MesItems, Womdaa>((a, b, da) =>
+ new JoinQueryInfos(
+ JoinType.Left, a.ItemNo == b.ItemNo, // 鍏宠仈鐗╂枡淇℃伅
+ JoinType.Left, a.BillNo == da.Daa001 // 鍏宠仈宸ュ崟淇℃伅
+ ))
+ // 鐢ㄦ埛绾夸綋杩囨护鏉′欢
+ //.WhereIF(lineNo != null && lineNo.Length > 0 && !"PL017".Equals(queryObj.createUser),
+ // (a, b, da) => lineNo.Contains(da.Daa015))
+ // ID绮剧‘鏌ヨ
+ .WhereIF(!string.IsNullOrEmpty(queryObj.id),
+ (a, b, da) => a.Id.ToString() == queryObj.id)
+ // 瀹屾垚鐘舵�佽繃婊�
+ .WhereIF("鏈畬鎴�".Equals(queryObj.result), (a, b, da) => a.FcheckResu == null)
+ .WhereIF(!"鏈畬鎴�".Equals(queryObj.result), (a, b, da) => a.FcheckResu != null)
+ // 鎼滅储鏉′欢锛堢墿鏂欏悕绉�/缂栧彿锛�
+ .WhereIF(!string.IsNullOrEmpty(queryObj.SearchValue),
+ (a, b, da) => b.ItemName.ToLower().Contains(queryObj.SearchValue.ToLower()) ||
+ a.ItemNo.ToLower().Contains(queryObj.SearchValue.ToLower()))
+ // 鏌ヨ瀛楁
+ .Select((a, b, da) => new QsItemOqcReq
{
- BillNo = a.BillNo,
- Remarks = a.Remarks,
Id = a.Id,
+ BillNo = a.BillNo,
+ ItemNo = a.ItemNo,
+ ItemName = b.ItemName,
+ ItemModel = b.ItemModel,
CreateDate = a.CreateDate,
CreateBy = a.CreateBy,
FcheckResu = a.FcheckResu,
- ItemNo = a.ItemNo,
FcheckBy = a.FcheckBy,
FcheckDate = a.FcheckDate,
ReleaseNo = a.ReleaseNo,
- // 娣诲姞鍏朵粬瀛楁
- // 濡傛灉鍦� QsItemOqcReq 涓畾涔変簡棰濆瀛楁锛屽垯闇�瑕佸皢瀹冧滑璧嬪��
- // 渚嬪:
- ItemName = b.ItemName,
- ItemModel = b.ItemModel,
- TaskNo = c.TaskNo,
- CbillNo = c.CbillNo,
- Dab001 = d.Dab001,
- Daa015 = da.Daa015,
- LineNo = c.LineNo,
- Quantity = m.Quantity
- }).OrderBy(a => a.CreateDate, OrderByType.Desc)
- .ToPageList(queryObj.PageIndex, queryObj.Limit);
+ Remarks = a.Remarks,
+ Daa015 = da.Daa015, // 宸ュ崟绾夸綋
+ Fsubmit = a.Fsubmit
+ })
+ // 鎺掑簭
+ .OrderBy(a => a.CreateDate, OrderByType.Desc);
+
+ // 鍒嗛〉鏌ヨ
+ var result = query.ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);
+
+ return (result, totalCount);
}
//鍒犻櫎涓昏〃骞朵笖杩炵骇鍒犻櫎瀛愯〃鍜屽瓩琛�
diff --git a/MES.Service/service/QC/SJService.cs b/MES.Service/service/QC/SJService.cs
index 50e6160..de9da99 100644
--- a/MES.Service/service/QC/SJService.cs
+++ b/MES.Service/service/QC/SJService.cs
@@ -3,6 +3,9 @@
using MES.Service.Modes;
using MES.Service.util;
using SqlSugar;
+using DbType = System.Data.DbType;
+using System.Data;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace MES.Service.service.QC;
@@ -34,7 +37,7 @@
}
//鑾峰彇鎵�鏈夋暟鎹垎椤�
- public List<SJPageResult> getPage(SJPageResult queryObj)
+ public (List<SJPageResult> items, int totalCount) getPage(SJPageResult queryObj)
{
var db = SqlSugarHelper.GetInstance();
@@ -52,15 +55,16 @@
.WhereIF(
StringUtil.IsNotNullOrEmpty(queryObj.Result) &&
"鏈畬鎴�".Equals(queryObj.Result),
- a => a.Remarks == queryObj.Result)
+ a => a.Result == queryObj.Result)
.WhereIF(
StringUtil.IsNotNullOrEmpty(queryObj.Result) &&
!"鏈畬鎴�".Equals(queryObj.Result),
- a => a.Remarks != "鏈畬鎴�")
- .OrderBy(a => a.BillNo, OrderByType.Desc)
- .ToPageList(queryObj.PageIndex, queryObj.Limit);
+ a => a.Result != "鏈畬鎴�")
+ .OrderBy(a => a.BillNo, OrderByType.Desc);
+ var totalCount = data.Count();
+ var items = data.ToPageList(queryObj.PageIndex, queryObj.Limit);
- return data;
+ return (items, totalCount);
}
@@ -223,7 +227,7 @@
item.Items = getQSItems(qsItemIpiReq.Id, null);
var sjPageResult = new SJPageResult
{ Id = item.From.Id, Limit = 1, PageIndex = 1 };
- item.Result = getPage(sjPageResult)[0];
+ item.Result = getPage(sjPageResult).items[0];
return item;
}
@@ -347,28 +351,28 @@
if (icount == 0) return 1;
//瀹為檯涓暟绛変簬鐞嗚涓暟鏃跺妫�楠屽崟杩涜鍒ゅ畾
- if (sum == icount)
- {
- result = 0;
+ //if (sum == icount)
+ //{
+ // result = 0;
- //鑾峰彇杩欎釜妫�楠屽崟涓嬬殑鎵�鏈夊悎鏍肩殑妫�楠岀粨鏋�
- passCount = db.Queryable<QsItemIpiItemDetail>()
- .Where(s => s.Gid == detail.Gid && s.Fstand == "鈭�").Count();
+ // //鑾峰彇杩欎釜妫�楠屽崟涓嬬殑鎵�鏈夊悎鏍肩殑妫�楠岀粨鏋�
+ // passCount = db.Queryable<QsItemIpiItemDetail>()
+ // .Where(s => s.Gid == detail.Gid && s.Fstand == "鈭�").Count();
- //鍚堟牸鐨勬楠岀粨鏋滅瓑浜庢�绘楠屾暟瑙嗕负鍚堟牸
- if (icount == passCount) result = 1;
+ // //鍚堟牸鐨勬楠岀粨鏋滅瓑浜庢�绘楠屾暟瑙嗕负鍚堟牸
+ // if (icount == passCount) result = 1;
- useTransactionWithOracle += SqlSugarHelper.UseTransactionWithOracle(
- db =>
- {
- return db.Updateable<QsItemIpiReq>()
- .SetColumns(s => s.IsPass == result)
- .SetColumns(s => s.StatusUser == detail.CreateBy)
- .SetColumns(s => s.CompleteTime == DateTime.Now)
- .Where(s => s.Id == detail.Gid)
- .ExecuteCommand();
- });
- }
+ // useTransactionWithOracle += SqlSugarHelper.UseTransactionWithOracle(
+ // db =>
+ // {
+ // return db.Updateable<QsItemIpiReq>()
+ // .SetColumns(s => s.IsPass == result)
+ // .SetColumns(s => s.StatusUser == detail.CreateBy)
+ // .SetColumns(s => s.CompleteTime == DateTime.Now)
+ // .Where(s => s.Id == detail.Gid)
+ // .ExecuteCommand();
+ // });
+ //}
return useTransactionWithOracle;
}
@@ -455,4 +459,56 @@
return withOracle;
}
+
+ public bool SJQaSubmit(QsItem item)
+ {
+
+ if (item == null)
+ throw new ArgumentNullException(nameof(item), "璐ㄦ椤规暟鎹笉鑳戒负绌�");
+
+ if (string.IsNullOrWhiteSpace(item.userNo))
+ throw new ArgumentException("鐢ㄦ埛缂栧彿涓嶈兘涓虹┖", nameof(item.userNo));
+
+ var (factory, company) = UserUtil.GetFactory(item.userNo);
+ try
+ {
+ // 瀹氫箟杈撳嚭鍙傛暟
+ var outputResult = new SugarParameter("o_Result", null, DbType.Int32, ParameterDirection.Output,
+ 4000);
+
+ var outputMessage = new SugarParameter("o_Msg", null, DbType.String, ParameterDirection.Output, 4000);
+
+ // 瀹氫箟杈撳叆鍙傛暟
+ var parameters = new List<SugarParameter>
+ {
+
+ new("p_Id", item.gid, DbType.Int32,ParameterDirection.Input),
+ new("p_Flag", 1, DbType.Int32,ParameterDirection.Input),
+ new("p_User", item.userNo, DbType.String, ParameterDirection.Input),
+ outputResult,
+ outputMessage
+ };
+
+ var db = SqlSugarHelper.GetInstance();
+
+ // 浣跨敤 SqlSugar 鎵ц瀛樺偍杩囩▼
+ db.Ado.ExecuteCommand(
+ "BEGIN PRC_WOMDAA_SJ_UPDATE_RES(:p_Id,:p_Flag,:p_User,:o_Result, :o_Msg); END;",
+ parameters.ToArray());
+
+ // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+ var resultValue = outputResult.Value?.ToString();
+ var messageValue = outputMessage.Value?.ToString();
+
+ if ("1".Equals(resultValue)) { throw new Exception(messageValue); }
+ if ("0".Equals(resultValue)) { throw new Exception(messageValue); }
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs
index 9ed2beb..000ce6d 100644
--- a/MES.Service/service/QC/XJService.cs
+++ b/MES.Service/service/QC/XJService.cs
@@ -3,6 +3,7 @@
using MES.Service.Modes;
using MES.Service.util;
using SqlSugar;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace MES.Service.service.QC;
@@ -106,7 +107,7 @@
}).ToList();
}
- public List<QsQaItemXj> getPage(XJPageResult queryObj)
+ public (List<QsQaItemXj> items, int totalCount) getPage(XJPageResult queryObj)
{
var db = SqlSugarHelper.GetInstance();
@@ -114,10 +115,10 @@
string[]? lineNo = null;
- if (StringUtil.IsNotNullOrEmpty(queryObj.createUser))
- lineNo = _baseService.getUserLineNo(queryObj.createUser);
+ //if (StringUtil.IsNotNullOrEmpty(queryObj.createUser))
+ // lineNo = _baseService.getUserLineNo(queryObj.createUser);
- return db
+ var query= db
.Queryable<QsQaItemXj, Womdaa, MesLine,
MesItems>((s, a, c, b) =>
new JoinQueryInfos(
@@ -126,8 +127,8 @@
JoinType.Left, s.ItemId == b.Id
)
)
- .WhereIF(lineNo != null && lineNo.Length > 0,
- (s, a, c, b) => lineNo.Contains(c.LineNo))
+ //.WhereIF(lineNo != null && lineNo.Length > 0,
+ // (s, a, c, b) => lineNo.Contains(c.LineNo))
.WhereIF(
StringUtil.IsNotNullOrEmpty(queryObj.result) &&
"鏈畬鎴�".Equals(queryObj.result),
@@ -152,8 +153,11 @@
FcheckBy = s.FcheckBy,
FcheckResu = s.FcheckResu,
Remarks = s.Remarks
- }).OrderBy(s => s.CreateDate, OrderByType.Desc)
- .ToPageList(queryObj.PageIndex, queryObj.Limit);
+ }).OrderBy(s => s.CreateDate, OrderByType.Desc);
+ var totalCount = query.Count();
+ var items = query.ToPageList(queryObj.PageIndex, queryObj.Limit);
+
+ return (items, totalCount);
}
diff --git a/MES.Service/util/ResponseResult.cs b/MES.Service/util/ResponseResult.cs
index 830da6b..cd81c43 100644
--- a/MES.Service/util/ResponseResult.cs
+++ b/MES.Service/util/ResponseResult.cs
@@ -15,6 +15,8 @@
//杩斿洖鐨勬暟鎹�
public object data { get; set; }
+ public int TotalCount { get; set; } = 0;
+
//澶辫触鐨勮繑鍥炵粨鏋�
public static ResponseResult ResponseError(Exception e)
{
diff --git a/MES.Service/util/UserUtil.cs b/MES.Service/util/UserUtil.cs
new file mode 100644
index 0000000..7908e22
--- /dev/null
+++ b/MES.Service/util/UserUtil.cs
@@ -0,0 +1,17 @@
+锘縰sing MES.Service.DB;
+
+namespace MES.Service.util;
+
+public class UserUtil : RepositoryNoEntity
+{
+ public static (string factory, string company) GetFactory(string user)
+ {
+ var sql =
+ "select t.Ffactory factory, t.Fcompany company from sys_user t where t.fcode = upper(trim('" +
+ user + "'))";
+
+ var sqlQuerySingle = Db.Ado.SqlQuerySingle<dynamic>(sql);
+
+ return (sqlQuerySingle.FACTORY, sqlQuerySingle.COMPANY);
+ }
+}
\ No newline at end of file
diff --git a/MESApplication/Controllers/QC/RKJController.cs b/MESApplication/Controllers/QC/RKJController.cs
index 3aea949..973eab0 100644
--- a/MESApplication/Controllers/QC/RKJController.cs
+++ b/MESApplication/Controllers/QC/RKJController.cs
@@ -135,14 +135,15 @@
try
{
dynamic resultInfos = new ExpandoObject();
- var tbBillList =
- new RKJService().getPage(queryObj);
+ var (items, totalCount) = new RKJService().GetPage(queryObj);
+ var tbBillList = items;
resultInfos.tbBillList = tbBillList;
return new ResponseResult
{
status = 0,
message = "OK",
- data = resultInfos
+ data = resultInfos,
+ TotalCount = totalCount
};
}
catch (Exception ex)
@@ -364,4 +365,25 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ [HttpPost("IqcQaSubmit")]
+ public ResponseResult IqcQaSubmit(RKJDto rkjDto)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "鎻愪氦鎴愬姛",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/MESApplication/Controllers/QC/SJController.cs b/MESApplication/Controllers/QC/SJController.cs
index 107d6b9..b07b575 100644
--- a/MESApplication/Controllers/QC/SJController.cs
+++ b/MESApplication/Controllers/QC/SJController.cs
@@ -41,14 +41,14 @@
try
{
dynamic resultInfos = new ExpandoObject();
- var tbBillList =
- new SJService().getPage(queryObj);
- resultInfos.tbBillList = tbBillList;
+ var (items, totalCount) = new SJService().getPage(queryObj);
+ resultInfos.tbBillList = items;
return new ResponseResult
{
status = 0,
message = "OK",
- data = resultInfos
+ data = resultInfos,
+ TotalCount = totalCount
};
}
catch (Exception ex)
@@ -319,4 +319,27 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ [HttpPost("SJQaSubmit")]
+ public ResponseResult SJQaSubmit([FromBody] QsItem item)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var tbBillList = new SJService();
+ var detail021 = tbBillList.SJQaSubmit(item);
+ resultInfos.tbBillList = detail021;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/MESApplication/Controllers/QC/XJController.cs b/MESApplication/Controllers/QC/XJController.cs
index ef25d6b..6ae5b7b 100644
--- a/MESApplication/Controllers/QC/XJController.cs
+++ b/MESApplication/Controllers/QC/XJController.cs
@@ -236,14 +236,14 @@
try
{
dynamic resultInfos = new ExpandoObject();
- var tbBillList =
- new XJService().getPage(queryObj);
- resultInfos.tbBillList = tbBillList;
+ var (items, totalCount) = new XJService().getPage(queryObj);
+ resultInfos.tbBillList = items;
return new ResponseResult
{
status = 0,
message = "OK",
- data = resultInfos
+ data = resultInfos,
+ TotalCount = totalCount
};
}
catch (Exception ex)
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll
index 487e687..435bb10 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Release/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb
index 61f58f2..1506228 100644
--- a/MESApplication/bin/Release/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll
index 960d029..51a1e1a 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Release/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe
index f152490..26f2875 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Release/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb
index 4e24cea..5a230fd 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/log/2025070917.log b/MESApplication/bin/Release/net8.0/log/2025070917.log
new file mode 100644
index 0000000..3e02843
--- /dev/null
+++ b/MESApplication/bin/Release/net8.0/log/2025070917.log
@@ -0,0 +1,9 @@
+2025-07-09 17:23:16:805 鎺ュ彛寮傚父锛歿"ClassName":"System.NullReferenceException","Message":"Object reference not set to an instance of an object.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at MESApplication.Controllers.QC.SJController.SetQSItems(JObject data) in D:\\VISUAL STUDIOS JOB\\YC\\MESApplication\\Controllers\\QC\\SJController.cs:line 65\r\n at lambda_method403(Closure, Object, Object[])\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147467261,"Source":"MESApplication","WatsonBuckets":null}
+2025-07-09 17:23:16:818 寮傚父鎻愮ず淇℃伅锛�"Object reference not set to an instance of an object."
+==================================================================================================================================
+2025-07-09 17:25:47:183 鎺ュ彛寮傚父锛歿"ClassName":"System.NullReferenceException","Message":"Object reference not set to an instance of an object.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at MESApplication.Controllers.QC.SJController.SetQSItems(JObject data) in D:\\VISUAL STUDIOS JOB\\YC\\MESApplication\\Controllers\\QC\\SJController.cs:line 65\r\n at lambda_method187(Closure, Object, Object[])\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147467261,"Source":"MESApplication","WatsonBuckets":null}
+2025-07-09 17:25:47:187 寮傚父鎻愮ず淇℃伅锛�"Object reference not set to an instance of an object."
+==================================================================================================================================
+2025-07-09 17:38:13:106 鎺ュ彛寮傚父锛歿"ClassName":"System.NullReferenceException","Message":"Object reference not set to an instance of an object.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at MESApplication.Controllers.QC.SJController.SetQSItems(JObject data) in D:\\VISUAL STUDIOS JOB\\YC\\MESApplication\\Controllers\\QC\\SJController.cs:line 65\r\n at lambda_method181(Closure, Object, Object[])\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147467261,"Source":"MESApplication","WatsonBuckets":null}
+2025-07-09 17:38:13:110 寮傚父鎻愮ず淇℃伅锛�"Object reference not set to an instance of an object."
+==================================================================================================================================
--
Gitblit v1.9.3