From 31a636e735a0addc56e4f4527f500b7aa0874eb5 Mon Sep 17 00:00:00 2001
From: chr <chr@mailcom>
Date: 星期五, 03 一月 2025 11:21:46 +0800
Subject: [PATCH] 改了一大堆;
---
PdmSwPlugin.PDM/Model/PdmControlModel.cs | 39 ++++++++++++++++++++++-----------------
1 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/PdmSwPlugin.PDM/Model/PdmControlModel.cs b/PdmSwPlugin.PDM/Model/PdmControlModel.cs
index 7a71c9c..648c70a 100644
--- a/PdmSwPlugin.PDM/Model/PdmControlModel.cs
+++ b/PdmSwPlugin.PDM/Model/PdmControlModel.cs
@@ -44,7 +44,8 @@
public ObservableCollection<PdmBom> BomTree
{
get => _bomTree;
- set {
+ set
+ {
RaiseAndSetIfChanged(ref _bomTree, value);
int count = CacheList != null ? CacheList.Count : 0;
AllBomCount = $"鍏� {count} 鏉�";
@@ -52,8 +53,9 @@
}
}
- public void RefreshSelectedBomCount() {
- int count = CacheList != null ? CacheList.Where(e=>e.selected).Count() : 0;
+ public void RefreshSelectedBomCount()
+ {
+ int count = CacheList != null ? CacheList.Where(e => e.selected).Count() : 0;
SelectedBomCount = $"宸查�変腑 {count} 鏉�";
}
@@ -93,7 +95,7 @@
private Dictionary<string, BomInfo> GetBomsFromWeb(HttpClient Client, PdmBomParam param)
{
Result<Dictionary<string, BomInfo>> result =
- Client.PostSyncAction<Dictionary<string, BomInfo>>(param, "wpf/bom/openApi/bomInfo2");
+ Client.PostSyncAction<Dictionary<string, BomInfo>>(param, "wpf/bom/openApi/bomInfo3");
Dictionary<string, BomInfo> bomInfo = result.HandleResult();
return bomInfo;
}
@@ -113,7 +115,7 @@
allModels = models
};
Result<Dictionary<string, BomInfo>> result =
- Client.PostSyncAction<Dictionary<string, BomInfo>>(param, "wpf/bom/openApi/bomInfo2");
+ Client.PostSyncAction<Dictionary<string, BomInfo>>(param, "wpf/bom/openApi/bomInfo3");
Dictionary<string, BomInfo> bomInfos = result.HandleResult();
Dictionary<string, DrawInfo> drawInfos = new Dictionary<string, DrawInfo>();
FillBomInfo(BomTree.ToList(), bomInfos, drawInfos);
@@ -143,19 +145,22 @@
{
info = bomInfos[partModel];
bom.inDb = true;
- //bom.BomInfo = info;
- bom.BomInfo.id = info.id;
- bom.BomInfo.bomVersion = info.bomVersion;
- bom.BomInfo.checkStatus = info.checkStatus;
- bom.BomInfo.checkUserId = info.checkUserId;
- bom.BomInfo.checkUserName = info.checkUserName;
+ if (!string.IsNullOrEmpty(info.id))
+ {
+ //bom.BomInfo = info;
+ bom.BomInfo.id = info.id;
+ bom.BomInfo.bomVersion = info.bomVersion;
+ bom.BomInfo.checkStatus = info.checkStatus;
+ bom.BomInfo.checkUserId = info.checkUserId;
+ bom.BomInfo.checkUserName = info.checkUserName;
- bom.BomInfo.status = info.status;
- bom.BomInfo.requestUserId = info.requestUserId;
- bom.BomInfo.requestUser = info.requestUser;
- bom.BomInfo.auditUserId = info.auditUserId;
- bom.BomInfo.auditUser = info.auditUser;
-
+ bom.BomInfo.status = info.status;
+ bom.BomInfo.requestUserId = info.requestUserId;
+ bom.BomInfo.requestUser = info.requestUser;
+ bom.BomInfo.auditUserId = info.auditUserId;
+ bom.BomInfo.auditUser = info.auditUser;
+ }
+ bom.BomInfo.inKeeDeeDb = info.inKeeDeeDb;
}
else
{
--
Gitblit v1.9.1