fix-rs-access.ps1 551 B

123456789
  1. $f='d:\AI开发\CodeBuddy\DRG医保控费预警系统开发项目\src\src\DRG\Profit.cls'
  2. $c=[System.IO.File]::ReadAllText($f)
  3. # 转换 rs.colName 形式为 rs.%Get("colName")
  4. $pat = [regex]'rs\.([a-z][a-zA-Z]+)'
  5. $c2 = $pat.Replace($c, { param($m) 'rs.%Get("' + $m.Groups[1].Value + '")' })
  6. [System.IO.File]::WriteAllText($f, $c2, (New-Object System.Text.UTF8Encoding $false))
  7. $cnt=([regex]::Matches($c2, 'rs\.[a-z]')).Count
  8. Write-Host ('剩余直接 rs.xxx: ' + $cnt)
  9. Write-Host ('rs.%Get 调用总数: ' + ([regex]::Matches($c2, 'rs\.%Get').Count))