|
@@ -2254,8 +2254,8 @@ func (this *NewDialysisApiController) GetMyInformationFour() {
|
2254
|
2254
|
//OrgId, _ := service.GetCreatByOrgId(orgid)
|
2255
|
2255
|
//fmt.Println("创建者ID", OrgId.Creator)
|
2256
|
2256
|
creatId := adminUserInfo.AdminUser.Id
|
2257
|
|
- fmt.Println("creatid-----------------------------", creatId)
|
2258
|
|
- fmt.Println("当前机构ID信息---------------------", orgid)
|
|
2257
|
+ fmt.Println("creatid", creatId)
|
|
2258
|
+ fmt.Println("当前机构ID信息", orgid)
|
2259
|
2259
|
Username, err := service.GetMyOrgInformationFour(creatId, orgid)
|
2260
|
2260
|
if err != nil {
|
2261
|
2261
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -2371,7 +2371,6 @@ func (this *NewDialysisApiController) GetMyOrgInformation() {
|
2371
|
2371
|
fmt.Println("cretor", creator)
|
2372
|
2372
|
adminInfo := this.GetMobileAdminUserInfo()
|
2373
|
2373
|
appId := adminInfo.App.Id
|
2374
|
|
- //fmt.Println("appid------------------------------------",appId)
|
2375
|
2374
|
information, err := service.GetMyOrgInformation(creator, appId)
|
2376
|
2375
|
if err != nil {
|
2377
|
2376
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -2386,12 +2385,11 @@ func (this *NewDialysisApiController) SaveNameTwo() {
|
2386
|
2385
|
id, _ := this.GetInt64("id")
|
2387
|
2386
|
name := this.GetString("name")
|
2388
|
2387
|
orgid, _ := this.GetInt64("orgid")
|
2389
|
|
- fmt.Println("name------------------", name)
|
2390
|
2388
|
role := models.SgjUserAdminRole{
|
2391
|
2389
|
UserName: name,
|
2392
|
2390
|
}
|
2393
|
2391
|
err := service.SaveNameTwo(id, orgid, &role)
|
2394
|
|
- fmt.Println("err----------------------------------", err)
|
|
2392
|
+ fmt.Println("err", err)
|
2395
|
2393
|
if err != nil {
|
2396
|
2394
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
2397
|
2395
|
return
|
|
@@ -2440,3 +2438,68 @@ func (this *NewDialysisApiController) GetMyMobile() {
|
2440
|
2438
|
"mobile": mobile,
|
2441
|
2439
|
})
|
2442
|
2440
|
}
|
|
2441
|
+
|
|
2442
|
+func (this *NewDialysisApiController) SumitForm() {
|
|
2443
|
+
|
|
2444
|
+ name := this.GetString("name")
|
|
2445
|
+ fmt.Println("姓名", name)
|
|
2446
|
+ mobile := this.GetString("mobile")
|
|
2447
|
+ fmt.Println("mobile", mobile)
|
|
2448
|
+ address := this.GetString("address")
|
|
2449
|
+ fmt.Println("address", address)
|
|
2450
|
+ positon := this.GetString("position")
|
|
2451
|
+ fmt.Println("职位", positon)
|
|
2452
|
+ hospitalName := this.GetString("hospitalName")
|
|
2453
|
+ fmt.Println("医院名称", hospitalName)
|
|
2454
|
+ systemName := this.GetString("systemName")
|
|
2455
|
+ fmt.Println("系统名称", systemName)
|
|
2456
|
+ isUser, _ := this.GetInt64("isUser")
|
|
2457
|
+ fmt.Println("是否使用", isUser)
|
|
2458
|
+ isThink, _ := this.GetInt64("isThink")
|
|
2459
|
+ fmt.Println("是否考虑", isThink)
|
|
2460
|
+ result := this.GetString("result")
|
|
2461
|
+ fmt.Println("result", result)
|
|
2462
|
+ otherRemark := this.GetString("otherRemark")
|
|
2463
|
+ fmt.Println("result", otherRemark)
|
|
2464
|
+ otherMessage := this.GetString("otherMessage")
|
|
2465
|
+ fmt.Println("otherMessage", otherMessage)
|
|
2466
|
+ gift, _ := this.GetInt64("gift")
|
|
2467
|
+ fmt.Println("gift", gift)
|
|
2468
|
+ admininfo := this.GetMobileAdminUserInfo()
|
|
2469
|
+ creator := admininfo.AdminUser.Id
|
|
2470
|
+ fmt.Println("创建者", creator)
|
|
2471
|
+ _, errcode := service.GetActivtyCreator(creator)
|
|
2472
|
+ if errcode == gorm.ErrRecordNotFound {
|
|
2473
|
+ table := models.KyActivityTable{
|
|
2474
|
+ Name: name,
|
|
2475
|
+ Phone: mobile,
|
|
2476
|
+ Address: address,
|
|
2477
|
+ Position: positon,
|
|
2478
|
+ HospitalName: hospitalName,
|
|
2479
|
+ SystemName: systemName,
|
|
2480
|
+ IsUser: isUser,
|
|
2481
|
+ IsThink: isThink,
|
|
2482
|
+ OtherMode: result,
|
|
2483
|
+ OtherRemark: otherRemark,
|
|
2484
|
+ OtherMessage: otherMessage,
|
|
2485
|
+ Gift: gift,
|
|
2486
|
+ AdminUserId: creator,
|
|
2487
|
+ Status: 1,
|
|
2488
|
+ Ctime: time.Now().Unix(),
|
|
2489
|
+ }
|
|
2490
|
+ err := service.CreateTable(&table)
|
|
2491
|
+ if err != nil {
|
|
2492
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
2493
|
+ return
|
|
2494
|
+ }
|
|
2495
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2496
|
+ "table": table,
|
|
2497
|
+ })
|
|
2498
|
+ } else if errcode == nil {
|
|
2499
|
+ this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2500
|
+ this.ServeJSON()
|
|
2501
|
+ return
|
|
2502
|
+ } else {
|
|
2503
|
+ return
|
|
2504
|
+ }
|
|
2505
|
+}
|