From f31edb8fa31c6608d34d303e750890f7eea1930b Mon Sep 17 00:00:00 2001
From: sjz <1240968267@qq.com>
Date: 星期二, 26 八月 2025 14:08:02 +0800
Subject: [PATCH] 首检获取检验项目前 删除原有检验项
---
MES.Service/service/SalesReturnNotice/SalesReturnNoticeManager.cs | 1
MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json | 5 -
MES.Service/service/QC/XJService.cs | 13 ++-
MESApplication/bin/Debug/net8.0/MES.Service.pdb | 0
MESApplication/bin/Debug/net8.0/MESApplication.dll | 0
MESApplication/bin/Release/net8.0/MESApplication.deps.json | 5 -
MES.Service/bin/Debug/net8.0/MES.Service.dll | 0
MES.Service/service/QC/SJService.cs | 35 +++++++++++
MES.Service/Modes/QsQaItemXj.cs | 1
MES.Service/service/QC/RKJService.cs | 12 ++-
MESApplication/bin/Debug/net8.0/MES.Service.dll | 0
MES.Service/Dto/service/SJPageResult.cs | 3 +
MES.Service/service/SaleDeliveryNotice/SalesDeliveryNoticeManager.cs | 1
MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0
/dev/null | 0
MES.Service/Modes/SalesOrder/SalesOrder.cs | 8 +-
MESApplication/bin/Debug/net8.0/MESApplication.exe | 0
MES.Service/Modes/QsItemOqcReq.cs | 6 ++
MES.Service/Dto/service/XJPageResult.cs | 1
MES.Service/service/SalesOrder/SalesOrderManager.cs | 30 ++++++++-
MESApplication/bin/Release/net8.0/publish (2).zip | 0
MES.Service/bin/Debug/net8.0/MES.Service.pdb | 0
22 files changed, 94 insertions(+), 27 deletions(-)
diff --git a/MES.Service/Dto/service/SJPageResult.cs b/MES.Service/Dto/service/SJPageResult.cs
index f48f3af..a8f8e48 100644
--- a/MES.Service/Dto/service/SJPageResult.cs
+++ b/MES.Service/Dto/service/SJPageResult.cs
@@ -106,4 +106,7 @@
/// </summary>
[SugarColumn(ColumnName = "LINE_NAME")]
public string? LineName { get; set; }
+
+ //閿�鍞鍗曞彿
+ [SugarColumn(IsIgnore = true)] public string? SaleOrder { 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 09cc6c5..0920893 100644
--- a/MES.Service/Dto/service/XJPageResult.cs
+++ b/MES.Service/Dto/service/XJPageResult.cs
@@ -10,4 +10,5 @@
public string? id { get; set; }
public string? SearchValue { get; set; }
+ public string? statusUser { get; set; } //鐢ㄦ埛缂栫爜
}
\ No newline at end of file
diff --git a/MES.Service/Modes/QsItemOqcReq.cs b/MES.Service/Modes/QsItemOqcReq.cs
index c97a1af..0487518 100644
--- a/MES.Service/Modes/QsItemOqcReq.cs
+++ b/MES.Service/Modes/QsItemOqcReq.cs
@@ -119,6 +119,12 @@
[SugarColumn(ColumnName = "ITEM_ID")]
public decimal? ItemId { get; set; }
+ /// <summary>
+ /// 閿�鍞鍗曞彿
+ /// </summary>
+ [SugarColumn(IsIgnore = true)]
+ public string? SaleOrderNo { get; set; }
+
// 娣诲姞浠ヤ笅瀛楁浠ラ�傚簲鏌ヨ杩斿洖鐨勬暟鎹�
[SugarColumn(IsIgnore = true)] public string? ItemName { get; set; }
diff --git a/MES.Service/Modes/QsQaItemXj.cs b/MES.Service/Modes/QsQaItemXj.cs
index ac83f3c..0b9a227 100644
--- a/MES.Service/Modes/QsQaItemXj.cs
+++ b/MES.Service/Modes/QsQaItemXj.cs
@@ -136,4 +136,5 @@
[SugarColumn(IsIgnore = true)] public string? ItemModel { get; set; }
[SugarColumn(IsIgnore = true)] public string? LineName { get; set; }
[SugarColumn(IsIgnore = true)] public string? CreateUser { get; set; }
+ [SugarColumn(IsIgnore = true)] public string? SaleOrder { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/Modes/SalesOrder/SalesOrder.cs b/MES.Service/Modes/SalesOrder/SalesOrder.cs
index 77fdf73..bd63d0c 100644
--- a/MES.Service/Modes/SalesOrder/SalesOrder.cs
+++ b/MES.Service/Modes/SalesOrder/SalesOrder.cs
@@ -179,22 +179,22 @@
/// 鍙戣揣鏃ユ湡
///</summary>
[SugarColumn(ColumnName = "F_WWC_DATE")]
- public DateTime? FWwcDate { get; set; }
+ public DateTime? F_WWC_DATE { get; set; }
/// <summary>
/// 鏄惁璇勫
///</summary>
[SugarColumn(ColumnName = "F_WWC_CHECKBOX")]
- public string? FWwcCheckbox { get; set; }
+ public string? F_WWC_CHECKBOX { get; set; }
/// <summary>
/// 鎶�鏈瘎瀹�
///</summary>
[SugarColumn(ColumnName = "F_WWC_LARGETEXT")]
- public string? FWwcLargetext { get; set; }
+ public string? F_WWC_LARGETEXT { get; set; }
/// <summary>
/// PMC璇勫
///</summary>
[SugarColumn(ColumnName = "F_WWC_LARGETEXT1")]
- public string? FWwcLargetext1 { get; set; }
+ public string? F_WWC_LARGETEXT1 { get; set; }
/// <summary>
/// 澶囨敞锛堟槑缁嗭級
///</summary>
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll
index abf60e5..7c54ec9 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
index 04ed036..1766f40 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Debug/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 a5aa607..bb14c83 100644
--- a/MES.Service/service/QC/RKJService.cs
+++ b/MES.Service/service/QC/RKJService.cs
@@ -522,13 +522,14 @@
var query = db
- .Queryable<QsItemOqcReq, MesItems, Womdaa, MesLine, SysUser>((a, b,
- da, c, us) =>
+ .Queryable<QsItemOqcReq, MesItems, Womdaa, MesLine, SysUser,Womcaa>((a, b,
+ da, c, us, ca) =>
new JoinQueryInfos(
JoinType.Left, a.ItemNo == b.ItemNo, // 鍏宠仈鐗╂枡淇℃伅
JoinType.Left, a.BillNo == da.Daa001, // 鍏宠仈宸ュ崟淇℃伅
JoinType.Left, da.Daa015 == c.LineNo, // 鍏宠仈宸ュ崟淇℃伅
- JoinType.Left, us.Fcode == a.CreateBy // 鍏宠仈宸ュ崟淇℃伅
+ JoinType.Left, us.Fcode == a.CreateBy, // 鍏宠仈宸ュ崟淇℃伅
+ JoinType.Left, da.Daa021 == ca.Caa020//浠诲姟鍗曪紝鐢ㄤ簬鏌ヨ閿�鍞鍗曞彿
))
// 鐢ㄦ埛绾夸綋杩囨护鏉′欢
//.WhereIF(lineNo != null && lineNo.Length > 0 && !"PL017".Equals(queryObj.createUser),
@@ -548,7 +549,7 @@
.Contains(queryObj.SearchValue.ToLower()) ||
a.ItemNo.ToLower().Contains(queryObj.SearchValue.ToLower()))
// 鏌ヨ瀛楁
- .Select((a, b, da, c, us) => new QsItemOqcReq
+ .Select((a, b, da, c, us, ca) => new QsItemOqcReq
{
Id = a.Id,
BillNo = a.BillNo,
@@ -566,7 +567,8 @@
Daa015 = da.Daa015, // 宸ュ崟绾夸綋
Fsubmit = a.Fsubmit,
Quantity = da.Daa008,
- LineNo = c.LineName
+ LineNo = c.LineName,
+ SaleOrderNo = ca.Caa015
})
// 鎺掑簭
.OrderBy(a => a.CreateDate, OrderByType.Desc);
diff --git a/MES.Service/service/QC/SJService.cs b/MES.Service/service/QC/SJService.cs
index 9b89e5d..6b6cf31 100644
--- a/MES.Service/service/QC/SJService.cs
+++ b/MES.Service/service/QC/SJService.cs
@@ -48,7 +48,12 @@
//if (StringUtil.IsNotNullOrEmpty(queryObj.StatusUser))
// lineNo = _baseService.getUserLineNo(queryObj.StatusUser);
- var data = db.Queryable<SJPageResult>()
+ var data = db.Queryable<SJPageResult, Womdaa, Womcaa> ((a,
+ da,ca) =>
+ new JoinQueryInfos(
+ JoinType.Left, Convert.ToDecimal(a.Pbaid) == da.Id, // 鍏宠仈宸ュ崟淇℃伅
+ JoinType.Left, da.Daa021 == ca.Caa020//浠诲姟鍗曪紝鐢ㄤ簬鏌ヨ閿�鍞鍗曞彿
+ ))
//.WhereIF(lineNo != null && lineNo.Length > 0,
// a => lineNo.Contains(a.line))
.WhereIF(queryObj.Id != null, a => a.Id == queryObj.Id)
@@ -62,6 +67,34 @@
StringUtil.IsNotNullOrEmpty(queryObj.Result) &&
!"鏈畬鎴�".Equals(queryObj.Result),
a => a.FSubmit == "1")
+ .Select((a, da, ca) => new SJPageResult
+ {
+ Id = a.Id,
+ BillNo = a.BillNo,
+ StatusDate = a.StatusDate,
+ FName = a.FName,
+ Result = a.Result,
+ FSubmit = a.FSubmit,
+ FSubmitBy = a.FSubmitBy,
+ FSubmitDate = a.FSubmitDate,
+ MoidNum = a.MoidNum,
+ StatusUser = a.StatusUser,
+ Pbaid = a.Pbaid,
+ CreateTime = a.CreateTime,
+ Comments = a.Comments,
+ ItemMod = a.ItemMod,
+ ItemNo = a.ItemNo,
+ daa001 = a.daa001,
+ line = a.line,
+ Remarks = a.Remarks,
+ Daa003 = a.Daa003,
+ Daa004 = a.Daa004,
+ Daa008 = a.Daa008,
+ LineName = a.LineName,
+
+ // 鏄犲皠棰濆鐨勫瓧娈碉紙閿�鍞鍗曞彿锛�
+ SaleOrder = ca.Caa015
+ })
.OrderBy(a => a.CreateTime, OrderByType.Desc);
var items = data.ToPageList(queryObj.PageIndex, queryObj.Limit,ref totalCount);
diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs
index 54a24cd..5a900e3 100644
--- a/MES.Service/service/QC/XJService.cs
+++ b/MES.Service/service/QC/XJService.cs
@@ -123,12 +123,14 @@
var query = db
.Queryable<QsQaItemXj, Womdaa, MesLine,
- MesItems, SysUser>((s, a, c, b, us) =>
+ MesItems, SysUser,Womcaa,SysDepartment>((s, a, c, b, us,ca,d) =>
new JoinQueryInfos(
JoinType.Inner, s.BillNo == a.Daa001,
JoinType.Left, a.Daa015 == c.LineNo,
JoinType.Left, s.ItemId == b.Id,
- JoinType.Left, us.Fcode == s.CreateBy
+ JoinType.Left, us.Fcode == s.CreateBy,
+ JoinType.Left, ca.Caa020 == a.Daa021,
+ JoinType.Left, d.Departmentcode == c.Departmentcode
)
)
//.WhereIF(lineNo != null && lineNo.Length > 0,
@@ -142,8 +144,8 @@
StringUtil.IsNotNullOrEmpty(queryObj.result) &&
!"鏈畬鎴�".Equals(queryObj.result),
(s, a, c, b, us) => s.SubmitStatus == 1)
- .WhereIF(id > 0, (s, a, c, b, us) => s.Id == id)
- .Select((s, a, c, b, us) => new QsQaItemXj
+ .WhereIF(id > 0, (s, a, c, b, us,ca) => s.Id == id)
+ .Select((s, a, c, b, us,ca) => new QsQaItemXj
{
Daa020 = c.LineNo,
Id = s.Id,
@@ -159,7 +161,8 @@
ItemModel = b.ItemModel,
CheckBy = s.CheckBy,
CheckResult = s.CheckResult,
- Remarks = s.Remarks
+ Remarks = s.Remarks,
+ SaleOrder = ca.Caa015
}).OrderBy(s => s.CreateDate, OrderByType.Desc);
var items = query.ToPageList(queryObj.PageIndex, queryObj.Limit,
ref totalCount);
diff --git a/MES.Service/service/SaleDeliveryNotice/SalesDeliveryNoticeManager.cs b/MES.Service/service/SaleDeliveryNotice/SalesDeliveryNoticeManager.cs
index ac77ea1..495b20e 100644
--- a/MES.Service/service/SaleDeliveryNotice/SalesDeliveryNoticeManager.cs
+++ b/MES.Service/service/SaleDeliveryNotice/SalesDeliveryNoticeManager.cs
@@ -37,6 +37,7 @@
return UpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas) ? 1 : 0;
case "2":
case "4":
+ case "5":
return SaveOrUpdateData(db, mesSalesDelivery, mesSalesDeliveryDatas, erpSalesDeliveryDto.Type)
? 1
: 0;
diff --git a/MES.Service/service/SalesOrder/SalesOrderManager.cs b/MES.Service/service/SalesOrder/SalesOrderManager.cs
index 89ff28b..6ae1bb0 100644
--- a/MES.Service/service/SalesOrder/SalesOrderManager.cs
+++ b/MES.Service/service/SalesOrder/SalesOrderManager.cs
@@ -34,6 +34,7 @@
return UpdateData(db, mesSalesOrder, mesSalesOrderDatas) ? 1 : 0;
case "2":
case "4":
+ case "5":
return SaveOrUpdateData(db, mesSalesOrder, mesSalesOrderDatas, erpSalesOrderDto.Type)
? 1
: 0;
@@ -82,6 +83,23 @@
return result.All(b => b);
}
+ //鑷姩鏄犲皠瀛楁
+ public static void MapProperties<T>(T target, object source)
+ {
+ var targetProps = typeof(T).GetProperties();
+ var sourceProps = source.GetType().GetProperties();
+
+ foreach (var targetProp in targetProps)
+ {
+ var sourceProp = sourceProps.FirstOrDefault(p => p.Name == targetProp.Name && p.PropertyType == targetProp.PropertyType);
+ if (sourceProp != null)
+ {
+ var value = sourceProp.GetValue(source);
+ targetProp.SetValue(target, value);
+ }
+ }
+ }
+
private SalesOrder ConvertErpToSalesOrder(
ErpSalesOrder erpDto1)
{
@@ -99,7 +117,9 @@
return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull
}
var erpDto = erpDto1.OrderDto;
- var salesOrder = new SalesOrder
+ var salesOrder = new SalesOrder();
+ MapProperties(salesOrder, erpDto);
+ /*var salesOrder = new SalesOrder
{
Id = erpDto.Id,
Erpid = erpDto.Erpid,
@@ -143,7 +163,7 @@
//long.Parse()
//Convert.ToDecimal()
//Convert.ToDouble()
- };
+ };*/
var single = base.GetSingle(it => it.Erpid == erpDto.Erpid);
if (single != null) salesOrder.Id = single.Id;
@@ -160,7 +180,9 @@
foreach (var erpDto in erpDtoList.Items)
{
- var salesOrderSub = new SalesOrderDetail
+ var salesOrderSub = new SalesOrderDetail();
+ MapProperties(salesOrderSub, erpDto);
+ /*var salesOrderSub = new SalesOrderDetail
{
Id = erpDto.Id,
Erpid = erpDto.Erpid,
@@ -196,7 +218,7 @@
Fmapid = erpDto.Fmapid,
Fmapname = erpDto.Fmapname,
Fmapspec = erpDto.Fmapspec
- };
+ };*/
var single = _SalesOrderDetailManager.GetSingle(it =>
it.Erpid == salesOrderSub.Erpid);
diff --git a/MES.Service/service/SalesReturnNotice/SalesReturnNoticeManager.cs b/MES.Service/service/SalesReturnNotice/SalesReturnNoticeManager.cs
index 4271008..da78237 100644
--- a/MES.Service/service/SalesReturnNotice/SalesReturnNoticeManager.cs
+++ b/MES.Service/service/SalesReturnNotice/SalesReturnNoticeManager.cs
@@ -34,6 +34,7 @@
return UpdateData(db, mesSalesReturn, mesSalesReturnDatas) ? 1 : 0;
case "2":
case "4":
+ case "5":
return SaveOrUpdateData(db, mesSalesReturn, mesSalesReturnDatas, erpSalesReturnDto.Type)
? 1
: 0;
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index abf60e5..7c54ec9 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
index 04ed036..1766f40 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll
index f357ae0..58aeefd 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe
index 43d7abd..b70ea75 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
index a663a62..3d42834 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/MESApplication.deps.json b/MESApplication/bin/Release/net8.0/MESApplication.deps.json
index 7dc1086..eabfd1f 100644
--- a/MESApplication/bin/Release/net8.0/MESApplication.deps.json
+++ b/MESApplication/bin/Release/net8.0/MESApplication.deps.json
@@ -1887,10 +1887,7 @@
"SqlSugarCore": "5.1.4.158"
},
"runtime": {
- "MES.Service.dll": {
- "assemblyVersion": "1.0.0",
- "fileVersion": "1.0.0.0"
- }
+ "MES.Service.dll": {}
}
},
"Kingdee.CDP.WebApi.SDK/8.0.6.0": {
diff --git "a/MESApplication/bin/Release/net8.0/publish \0502\051.zip" "b/MESApplication/bin/Release/net8.0/publish \0502\051.zip"
new file mode 100644
index 0000000..c1e80d5
--- /dev/null
+++ "b/MESApplication/bin/Release/net8.0/publish \0502\051.zip"
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish.zip b/MESApplication/bin/Release/net8.0/publish.zip
deleted file mode 100644
index a553dd2..0000000
--- a/MESApplication/bin/Release/net8.0/publish.zip
+++ /dev/null
Binary files differ
diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
index 5d6c675..bb41218 100644
--- a/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
+++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json
@@ -1635,10 +1635,7 @@
"SqlSugarCore": "5.1.4.158"
},
"runtime": {
- "MES.Service.dll": {
- "assemblyVersion": "1.0.0",
- "fileVersion": "1.0.0.0"
- }
+ "MES.Service.dll": {}
}
},
"Kingdee.CDP.WebApi.SDK/8.0.6.0": {
--
Gitblit v1.9.3