|
@@ -160,14 +160,14 @@ func (this *MobileRegistController) CreateOrg() {
|
160
|
160
|
return
|
161
|
161
|
}
|
162
|
162
|
orgPhone := this.GetString("telephone")
|
163
|
|
-
|
164
|
|
- if len(orgPhone) > 0 {
|
165
|
|
- if utils.PhoneRegexp().MatchString(orgPhone) == false {
|
166
|
|
- this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePhone)
|
167
|
|
- this.ServeJSON()
|
168
|
|
- return
|
169
|
|
- }
|
170
|
|
- }
|
|
163
|
+ //
|
|
164
|
+ //if len(orgPhone) > 0 {
|
|
165
|
+ // if utils.PhoneRegexp().MatchString(orgPhone) == false {
|
|
166
|
+ // this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePhone)
|
|
167
|
+ // this.ServeJSON()
|
|
168
|
+ // return
|
|
169
|
+ // }
|
|
170
|
+ //}
|
171
|
171
|
|
172
|
172
|
provinceID := 0
|
173
|
173
|
cityID := 0
|
|
@@ -221,7 +221,9 @@ func (this *MobileRegistController) CreateOrg() {
|
221
|
221
|
ModifyTime: time.Now().Unix(),
|
222
|
222
|
}
|
223
|
223
|
|
224
|
|
- createErr := service.CreateOrg(org, adminUser.Mobile, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
|
|
224
|
+ adminUsers, _ := service.GetAdminUserByUserID(adminUser.Id)
|
|
225
|
+
|
|
226
|
+ createErr := service.CreateOrg(org, adminUsers.Name, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
|
225
|
227
|
|
226
|
228
|
if createErr != nil {
|
227
|
229
|
utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
|
|
@@ -515,7 +517,7 @@ func InitPatientAndSchedule(org *models.Org) {
|
515
|
517
|
|
516
|
518
|
//创建两个血透的虚拟病人到新表
|
517
|
519
|
fmt.Print("patients", patients)
|
518
|
|
- for index, it := range patients {
|
|
520
|
+ for _, it := range patients {
|
519
|
521
|
patientsNew := models.XtPatientsNew{
|
520
|
522
|
UserOrgId: org.Id,
|
521
|
523
|
CreatedTime: time.Now().Unix(),
|
|
@@ -555,13 +557,7 @@ func InitPatientAndSchedule(org *models.Org) {
|
555
|
557
|
TellPhone: it.TellPhone,
|
556
|
558
|
FirstTreatmentDate: it.FirstTreatmentDate,
|
557
|
559
|
ContactName: it.ContactName,
|
558
|
|
- }
|
559
|
|
- if index == 1 {
|
560
|
|
- patientsNew.IsInfectious = 1
|
561
|
|
-
|
562
|
|
- } else {
|
563
|
|
- patientsNew.IsInfectious = 2
|
564
|
|
-
|
|
560
|
+ IsInfectious: it.IsInfectious,
|
565
|
561
|
}
|
566
|
562
|
|
567
|
563
|
service.CreateVMOrgNewPatient(&patientsNew)
|