tmp_check.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import os
  2. # Check remaining gaps
  3. w_paths = [
  4. r'E:\workspace\dan\cfc\cfc-frontend\pages\wisdom\cognitive-report.vue',
  5. r'E:\workspace\dan\cfc\cfc-frontend\pages\wisdom\articles.vue',
  6. r'E:\workspace\dan\cfc\cfc-frontend\pages\wisdom\article-detail.vue',
  7. ]
  8. for p in w_paths:
  9. exists = os.path.exists(p)
  10. print(os.path.basename(p) + ': ' + ('EXISTS' if exists else 'MISSING'))
  11. # DanAssessmentResult
  12. path = r'E:\workspace\dan\cfc\cfc-backend\src\main\java\com\etotem\cfc\entity\DanAssessmentResult.java'
  13. with open(path, 'r', encoding='utf-8') as f:
  14. content = f.read()
  15. for kw in ['emotion', 'resilience', 'stress', 'selfAwareness', 'subScores', 'EMI']:
  16. if kw in content:
  17. print('DanAssessmentResult has: ' + kw)
  18. # Schema
  19. schema = r'E:\workspace\dan\cfc\cfc-backend\src\main\resources\schema.sql'
  20. if os.path.exists(schema):
  21. print('schema.sql: EXISTS')
  22. else:
  23. print('schema.sql: MISSING')
  24. # family_member_attributes table
  25. for root, dirs, files in os.walk(r'E:\workspace\dan\cfc\cfc-backend\src\main\resources'):
  26. for f in files:
  27. if f.endswith('.sql'):
  28. fpath = os.path.join(root, f)
  29. with open(fpath, 'r', encoding='utf-8') as fh:
  30. content = fh.read()
  31. if 'family_member_attribute' in content:
  32. print(f + ' contains family_member_attribute')
  33. if 'zodiac_config' in content:
  34. print(f + ' contains zodiac_config')
  35. # user-edit
  36. uedit = r'E:\workspace\dan\cfc\cfc-frontend\pages\user-edit\user-edit.vue'
  37. if os.path.exists(uedit):
  38. with open(uedit, 'r', encoding='utf-8') as f:
  39. content = f.read()
  40. for kw in ['birth_date', 'birth_hour', 'birth', 'blood_type']:
  41. if kw in content:
  42. print('user-edit.vue has: ' + kw)
  43. if 'birth_date' not in content and 'birth' not in content:
  44. print('user-edit.vue: MISSING birth fields')