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