12345678910111213141516171819202122232425262728293031323334353637 |
- package Account
- import (
- "ERP_user/conf"
- "ERP_user/logs"
- "strings"
- )
- var ERP_Sys_prefix = make([]string, 0)
- var ERP_Sys_List = map[string]string{}
- func init() {
- ERP_Sys_List = make(map[string]string)
- if len(conf.ERP_Sys) > 0 {
- logs.Println("=========== 初始化系统信息 =========")
- // 除开用户系统的其他系统前缀
- sysList := strings.Split(conf.ERP_Sys, ",")
- for _, v := range sysList {
- k := strings.Split(v, "|")[0]
- ERP_Sys_List[k] = strings.Split(v, "|")[1]
- if k == conf.ERP_ACCOUNT_Sys {
- continue
- }
- // ERP_Sys_prefix ["ERP_AMS","ERP_"]
- ERP_Sys_prefix = append(ERP_Sys_prefix, k)
- }
- }
- }
- func Get_Sys_Name(code string) string {
- if v, ok := ERP_Sys_List[code]; ok {
- return v
- } else {
- return code
- }
- }
|