| | |
| | | public ObservableCollection<PdmBom> BomTree |
| | | { |
| | | get => _bomTree; |
| | | set { |
| | | set |
| | | { |
| | | RaiseAndSetIfChanged(ref _bomTree, value); |
| | | int count = CacheList != null ? CacheList.Count : 0; |
| | | AllBomCount = $"共 {count} 条"; |
| | |
| | | } |
| | | } |
| | | |
| | | 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} 条"; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | 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); |
| | |
| | | { |
| | | 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 |
| | | { |