|
@@ -36,28 +36,18 @@ namespace TEAMModelOS.SDK.Models.Service.BI
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
- /// 計算學校版本公式
|
|
|
+ /// 計算學校版本公式 ※計算邏輯變更:廢止原size+scale判斷邏輯
|
|
|
/// </summary>
|
|
|
public static Edition calSchoolEdition(School school, List<string> services)
|
|
|
{
|
|
|
- int edition = 0;
|
|
|
- if (school.size <= 100 && school.scale == 0)
|
|
|
- {
|
|
|
- edition = 1;
|
|
|
- }
|
|
|
- else if (school.size >= 300 && school.scale >= 500 && school.scale < 100 && services.Contains("YMPCVCIM"))
|
|
|
- {
|
|
|
- edition = 2;
|
|
|
- }
|
|
|
- else if (school.size >= 300 && school.scale >= 1000 && services.Contains("YMPCVCIM") && services.Count > 2)
|
|
|
- {
|
|
|
- edition = 3;
|
|
|
- }
|
|
|
+ int edition = 1;
|
|
|
+ bool adminFlg = (services.Contains("IPDYZYLC")) ? true : false;
|
|
|
+ bool analFlg = (services.Contains("YMPCVCIM")) ? true : false;
|
|
|
+ bool fiveFlg = (services.Contains("YPXSJ6NJ")) ? true : false;
|
|
|
+ if (adminFlg && analFlg && fiveFlg) edition = 3;
|
|
|
+ else if (adminFlg && analFlg) edition = 2;
|
|
|
+ else edition = 1;
|
|
|
|
|
|
- if (edition == 0)
|
|
|
- {
|
|
|
- edition = 1;
|
|
|
- }
|
|
|
if (school.edition != null)
|
|
|
{
|
|
|
school.edition.current = edition;
|
|
@@ -73,7 +63,6 @@ namespace TEAMModelOS.SDK.Models.Service.BI
|
|
|
current = edition,
|
|
|
record = edition
|
|
|
};
|
|
|
-
|
|
|
school.edition = tempEdition;
|
|
|
}
|
|
|
return school.edition;
|