def f2_2_9(): monitorType = 10 installInfos = monitorSrv.FindInstallInfos(tunnelId, monitorType, 0) installInfoId = installInfos[0].Key # 1 dates = monitorSrv.QueryMonitorDateRangeCommon(tunnelId, installInfoId, monitorType) endDate = dates[1] # MaxDate startDate = endDate.AddMonths(-1) dataStep = 24 view = _log(monitorSrv.QueryWebView9)(tunnelId, installInfoId, monitorType, startDate, endDate, dataStep) print '\n地質資訊' print view.InstallInfo print '\n天花板變位安裝示意圖' print view.CeilingInstallDiagram print '\n傾斜移角度變化量歷時曲線圖' showChart(view.TimeChart1) print '\n位移變化量歷時曲線圖' showChart(view.TimeChart2) print '\n監測資料' showTable(view.CeilingDefRecords) print '\n各儀器最大變位測值資料' showTable(view.CeilingDefMaxValuesRecords) return view
def f2_2_8(): monitorType = 9 from System import Array from System import DateTime installInfos = TSMS_API.Web.Monitor.Service.FindInstallInfos( tunnelId, monitorType, False) installInfoId = installInfos[0].Key # 1 arrayDates = Array[DateTime]([ TSMS_API.Monitor.Service.GetMicroDispSurveyDate( tunnelId, installInfoId)[0].Value ]) view = _log(monitorSrv.QueryWebView8)(tunnelId, monitorType, installInfoId, arrayDates, 1) print '地質資訊' print view.InstallInfo print '微變位資料' showTable(view.microDispRecords) print '微變位圖' showChart(view.DispChart.XYChart1, attr='XYValues') showChart(view.DefChart.XYChart1, attr='XYValues') return view
def showProject(_WebView7): print _WebView7.Option0RightPic print _WebView7.Option0LeftPic print _WebView7.Option1RightPic print _WebView7.Option1LeftPic if _WebView7.Option2Records: showTable(_WebView7.Option2Records) if _WebView7.Option3Records: showTable(_WebView7.Option3Records) if _WebView7.Option3Chart: showChart(_WebView7.Option3Chart) if _WebView7.Option4Records: showTable(_WebView7.Option4Records)
def f2_2_3(): monitorId = 3 # C1 kws = select(tunnelId, monitorId) view = _log(monitorSrv.QueryWebView3)(**kws) print printBaseInfo(view) print "裂縫擴展測量表:" showTable(view.MonitorCrackData) print print "歷時變位圖:" showChart(view.TimeChart1) print return view
def f2_2_11(): # monitorType = 11 tunnelId = 24 installId = 3 from System import DateTime startDate = DateTime(2017, 2, 6) endDate = DateTime(2018, 2, 6) view = _log(monitorSrv.QueryWebView11)(tunnelId, installId, startDate, endDate) print '\n地質資訊' print view.InstallInfo print '\n監測資料' showTable(view.GeoDefRecords) print '\nGoogle Map 測站資料' showTable(view.GeoDefMarksRecords) print '\n歷時曲線圖(East)' showChart(view.TimeChartEast) print '\n歷時曲線圖(North)' showChart(view.TimeChartNorth) print '\n歷時曲線圖(Up)' showChart(view.TimeChartUp) return view
def f2_2_2(): monitorId = 2 # NRL0001 kws = select(tunnelId, monitorId) view = _log(monitorSrv.QueryWebView2)(**kws) print printBaseInfo(view) print "控制點測量表:" showTable(view.Monitor3DData) print print "歷時曲線圖:" showChart(view.TimeChart1) print print "累積變化量圖:" showChart(view.TimeChart2) print if view.WarningChart: print "警戒值圖形資料:" showChart(view.WarningChart) print print "測值大於警戒值資料表:" showTable(view.WarningData) print return view
def f2_8_2(): # 南港遂道 tunnel = TSMS_API.Web.QueryService.FindTunnelsByEnginerringOffice( enginerringOfficeId)[0] tunnelId = tunnel.Key print '遂道: %s (%d)' % (tunnel.Value, tunnelId) structure = TSMS_API.Web.QueryService.FindStructures(tunnelId)[0] # 南下線 structureId = structure.Key print '結構物: %s (%d)' % (structure.Value, structureId) view = _log(geologySrv.QueryWebView2)(tunnelId) print print "地層資料圖:" print view.RefGeoMap print print "圖例:" print view.RefGeoLegend print select = view.GeologyInfoList[1] # 木山層 print '%s - %s:' % (select.GeoType, select.GeoName) print ' 施工里程 自 %d - 至 %d' % (select.ExcStartSta, select.ExcEndSta) print ' 營運里程 自 %d - 至 %d' % (select.NowStartSta, select.NowEndSta) print print ' 地質資料:' print ' %s' % select.GeoContent print print ' 特殊記事:' print ' %s' % select.SpecialNotes print view2 = _log(geologySrv.QueryWebView2_2)(structureId) print "岩體分類資料圖:" showChart(view2.Chart1) print return view
def showProject(project): print '隧道異狀展開圖' print project.Option0RightPic print project.Option0LeftPic print print '隧道區段分級展開圖' print project.Option1RightPic print project.Option1LeftPic print print '隧道異狀數量百分比圖' showChart(project.Option3Chart) print print '隧道區段異狀分級統計圖' showTable(project.Option2Records) print print '隧道單一區段異狀數量圖' showTable(project.Option4Records) print
def f2_2_10(): monitorType = 8 tunnelId = 2 installInfos = monitorSrv.FindMonitorInstallInfo(tunnelId, monitorType) installInfoId = installInfos[0].Key print(installInfos[0].Value) monitorPoint = monitorSrv.FindMonitorPoint(tunnelId, monitorType, installInfoId) monitorPointId = monitorPoint[0].Key surveyDates = monitorSrv.GetLevelingSurveyDate(tunnelId, installInfoId, monitorPointId) from System.Collections.Generic import List from System import DateTime from System import Array datesList = List[DateTime]() for date in surveyDates: datesList.Add(date.Value) levelingStations = monitorSrv.GetLevelingStation(tunnelId, installInfoId, monitorPointId) startStation = levelingStations[0].Value endStation = levelingStations[len(levelingStations) - 1].Value print(datesList.ToArray()) view = _log(monitorSrv.QueryWebView10)(tunnelId, monitorType, installInfoId, monitorPointId, datesList.ToArray(), startStation, endStation) print '\n地質資訊' print view.InstallInfo print '\n路面沉陷觀測資料' showTable(view.LevelingRecords) print '\n測值大於警戒值總表' showTable(view.WarningRecords) print '\n路面變位速率圖' showChart(view.LevelingChart, attr='XYValues') print '\n歷時變位速率圖' showChart(view.DateLevelingChart1) print '\n歷時變位量圖' showChart(view.DateLevelingChart2) return view
def f2_3_3(): # 導坑 structure = TSMS_API.Web.QueryService.FindStructures(tunnelId)[2] structureId = structure.Key print '結構體名稱: %s (%d)' % (structure.Value, structureId) # 100 年第1階段 proj = TSMS_API.Web.QueryService.FindProjects(structureId)[0] projId = proj.Key print '本期檢測專案: %s (%d)' % (proj.Value, projId) # S001 startSector = TSMS_API.Web.QueryService.FindSectors(structureId)[0] print '區段編號(自): %s (%d)' % (startSector.Value, startSector.Key) # S005 endSector = TSMS_API.Web.QueryService.FindSectors(structureId)[4] print '區段編號(至): %s (%d)' % (endSector.Value, endSector.Key) view = _log(inspectSrv.QueryWebView3)( tunnelId, structureId, projId, startSector.Key, endSector.Key) print print "區段健全度資料表:" showTable(view.TunSectorEvaluationRecord) print print "出露損傷數量百分比圖:" showChart(view.TunInjurePercentCalChart) print print "區段損傷評定資料總表:" showTable(view.RecordData) print if view.RecordDataChart: print "區段損傷評定統計圖:" showChart(view.RecordDataChart) print print "異狀摘要表:" showTable(view.RecordData2) print print "區段出露損傷尺寸統計圖:" for i, r in enumerate(view.RecordData2.Rows): print i + 1, '=>' showChart(r.Chart) print return view
def f2_8_1(): structure = TSMS_API.Web.QueryService.FindStructures(tunnelId)[0] # 南下線 structureId = structure.Key print '結構物: %s (%d)' % (structure.Value, structureId) stationRange = geologySrv.GetStationRange(structureId) print '里程: %f - %f' % (stationRange.Key, stationRange.Value) view = _log(geologySrv.QueryWebView1)(tunnelId, structureId, stationRange.Key, stationRange.Value) print print "營運里程開始:" print view.OpStationStart print print "營運里程結束:" print view.OpStationEnd print print "岩體評分資料列表:" showTable(view.RMRRecord, others=[ ('檔案路徑', 'File'), ]) print print "RMR 趨勢圖:" showChart(view.RMRChart) print print "岩體等級趨勢圖:" showChart(view.RockStyleChart) print print "支撐等級趨勢圖:" showChart(view.SupportVChart) print return view
def f2_2_5(): monitorId = 6 rainInstallId = 1 rainUnitIndex = 1 # OCM3 kws = select(tunnelId, monitorId, 2) kws['rainInstallId'] = rainInstallId kws['rainUnitIndex'] = rainUnitIndex view = _log(monitorSrv.QueryWebView5)(**kws) print print "儀器安裝位置圖1:" print view.RefImg1 print if view.RefImg2: print "儀器安裝位置圖2:" print view.RefImg2 print print "地質資訊:" print view.InstallInfo print print "流量計歷時曲線圖(平均流量):" showChart(view.TimeChart1) print print "流量計歷時曲線圖(平均水深):" showChart(view.TimeChart2) print print "累積流量測量表:" showTable(view.MonitorStackWaterData) print # 20130827 print "每12小時間隔顯示" kws['dataStep'] = 120 view2 = _log(monitorSrv.QueryWebView5)(**kws) print print "儀器安裝位置圖1:" print view2.RefImg1 print if view2.RefImg2: print "儀器安裝位置圖2:" print view2.RefImg2 print print "地質資訊:" print view2.InstallInfo print print "流量計歷時曲線圖(平均流量):" showChart(view2.TimeChart1) print print "流量計歷時曲線圖(平均水深):" showChart(view2.TimeChart2) print print "累積流量測量表:" showTable(view2.MonitorStackWaterData) print print '降雨量資料' showTable(view.RainFallRecords) print print '雨量歷時圖' showChart(view.RainFallChart) print return view
def f2_2_4(): monitorId = 4 rainInstallId = 1 rainUnitIndex = 1 # NWPS1 kws = select(tunnelId, monitorId) kws['chartNum'] = 3 kws['rainInstallId'] = rainInstallId kws['rainUnitIndex'] = rainUnitIndex view = _log(monitorSrv.QueryWebView4)(**kws) print printBaseInfo(view) if view.TimeChart1: print "孔隙水壓歷時曲線圖:" showChart(view.TimeChart1) print if view.TimeChart2: print "單點流量歷時曲線圖:" showChart(view.TimeChart2) print if view.MonitorWaterData: print "孔隙水壓測量表:" showTable(view.MonitorWaterData) print if view.MonitorSingleWaterData: print "單點流量測量表:" showTable(view.MonitorSingleWaterData) print if view.WarningChart: print "警戒值圖形資料:" showChart(view.WarningChart) print if view.WarningData: print "測值大於警戒值資料表:" showTable(view.WarningData) print # 20130827 print "每6小時間隔顯示" kws['dataStep'] = 12 view2 = _log(monitorSrv.QueryWebView4)(**kws) print printBaseInfo(view2) if view2.TimeChart1: print "孔隙水壓歷時曲線圖:" showChart(view2.TimeChart1) print if view2.TimeChart2: print "單點流量歷時曲線圖:" showChart(view2.TimeChart2) print if view2.MonitorWaterData: print "孔隙水壓測量表:" showTable(view2.MonitorWaterData) print if view2.MonitorSingleWaterData: print "單點流量測量表:" showTable(view2.MonitorSingleWaterData) print if view2.WarningChart: print "警戒值圖形資料:" showChart(view2.WarningChart) print print "測值大於警戒值資料表:" showTable(view2.WarningData) print # NWPS2 try: kws = select(tunnelId, monitorId, instInfoN=1) except TSMS_API.Web.QueryService.DataNotExistException, e: print 'NWPS2', 'DataNotExistException', 'passed' # OK.
showTable(view2.WarningData) print # NWPS2 try: kws = select(tunnelId, monitorId, instInfoN=1) except TSMS_API.Web.QueryService.DataNotExistException, e: print 'NWPS2', 'DataNotExistException', 'passed' # OK. print print '降雨量資料' showTable(view.RainFallRecords) print print '雨量歷時圖' showChart(view.RainFallChart) print return view def f2_2_5(): monitorId = 6 rainInstallId = 1 rainUnitIndex = 1 # OCM3 kws = select(tunnelId, monitorId, 2) kws['rainInstallId'] = rainInstallId kws['rainUnitIndex'] = rainUnitIndex view = _log(monitorSrv.QueryWebView5)(**kws)