28169 3 週間 前
コミット
b4a0cf7084

BIN
XT_New.exe ファイルの表示


+ 10 - 10
controllers/base_api_controller.go ファイルの表示

@@ -72,10 +72,10 @@ func (this *BaseAuthAPIController) Prepare() {
72 72
 	this.BaseAPIController.Prepare()
73 73
 	if this.GetAdminUserInfo() == nil {
74 74
 		var userAdmin models.AdminUser
75
-		userAdmin.Id = 3207
75
+		userAdmin.Id = 2301
76 76
 		userAdmin.Mobile = "13318599895"
77 77
 
78
-		userAdmin.Id = 3207 //4,809
78
+		userAdmin.Id = 2301 //4,809
79 79
 		userAdmin.Mobile = "12222222222"
80 80
 		userAdmin.IsSuperAdmin = true
81 81
 		userAdmin.Status = 1
@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10751 //机构id
86
+		subscibe.OrgId = 10164 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,8 +93,8 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10751 //机构id小英9675或4
97
-		adminUserInfo.CurrentAppId = 18734 //4
96
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
97
+		adminUserInfo.CurrentAppId = 12123 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
100 100
 		this.SetSession("admin_user_info", &adminUserInfo)
@@ -318,10 +318,10 @@ func (this *BaseServeAPIController) Prepare() {
318 318
 	this.BaseAPIController.Prepare()
319 319
 	if this.GetAdminUserInfo() == nil {
320 320
 		var userAdmin models.AdminUser
321
-		userAdmin.Id = 3207
321
+		userAdmin.Id = 2301
322 322
 		userAdmin.Mobile = "13318599895"
323 323
 
324
-		userAdmin.Id = 3207 //4,809
324
+		userAdmin.Id = 2301 //4,809
325 325
 		userAdmin.Mobile = "12222222222"
326 326
 		userAdmin.IsSuperAdmin = false
327 327
 		userAdmin.Status = 1
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10751 //机构id小英9675或4
332
+		subscibe.OrgId = 10164 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,8 +339,8 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10751 //机构id小英9675或4
343
-		adminUserInfo.CurrentAppId = 18734 //4
342
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
343
+		adminUserInfo.CurrentAppId = 12123 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes
346 346
 		this.SetSession("admin_user_info", &adminUserInfo)

+ 23 - 7
controllers/his_project_api_controller.go ファイルの表示

@@ -856,14 +856,22 @@ func (this *HisProjectApiController) SaveDePartment() {
856 856
 
857 857
 	name := this.GetString("name")
858 858
 	number := this.GetString("number")
859
+	department_type := this.GetString("department_type")
860
+	lender := this.GetString("lender")
861
+	phone := this.GetString("phone")
862
+	start_time := this.GetString("start_time")
859 863
 	adminUserInfo := this.GetAdminUserInfo()
860 864
 	orgId := adminUserInfo.CurrentOrgId
861 865
 	department := models.XtHisDepartment{
862
-		Name:        name,
863
-		Number:      number,
864
-		UserOrgId:   orgId,
865
-		CreatedTime: time.Now().Unix(),
866
-		Status:      1,
866
+		Name:           name,
867
+		Number:         number,
868
+		UserOrgId:      orgId,
869
+		CreatedTime:    time.Now().Unix(),
870
+		Status:         1,
871
+		DepartmentType: department_type,
872
+		Lender:         lender,
873
+		Phone:          phone,
874
+		StartTime:      start_time,
867 875
 	}
868 876
 	err := service.CreateDePartment(&department)
869 877
 	if err != nil {
@@ -918,9 +926,17 @@ func (this *HisProjectApiController) UpdatedDeparment() {
918 926
 	id, _ := this.GetInt64("id")
919 927
 	name := this.GetString("name")
920 928
 	number := this.GetString("number")
929
+	department_type := this.GetString("department_type")
930
+	lender := this.GetString("lender")
931
+	phone := this.GetString("phone")
932
+	start_time := this.GetString("start_time")
921 933
 	department := models.XtHisDepartment{
922
-		Name:   name,
923
-		Number: number,
934
+		Name:           name,
935
+		Number:         number,
936
+		DepartmentType: department_type,
937
+		Lender:         lender,
938
+		Phone:          phone,
939
+		StartTime:      start_time,
924 940
 	}
925 941
 	err := service.UpdatedDepartment(id, &department)
926 942
 	if err != nil {

+ 9 - 0
controllers/manage_api_controller.go ファイルの表示

@@ -252,6 +252,9 @@ func (this *MachineApiController) SaveManageInfo() {
252 252
 	treat_types := dataBody["treat_type"].([]interface{})
253 253
 	revers := int64(dataBody["revers_mode"].(float64))
254 254
 	zone_id := int64(dataBody["zone_id"].(float64))
255
+	home_address := dataBody["home_address"].(string)
256
+
257
+	home_setting := dataBody["home_setting"].(string)
255 258
 	ids := make([]int64, 0)
256 259
 	for _, treat := range treat_types {
257 260
 		id := int64(treat.(float64))
@@ -295,6 +298,8 @@ func (this *MachineApiController) SaveManageInfo() {
295 298
 		Status:              1,
296 299
 		Ctime:               time.Now().Unix(),
297 300
 		UserOrgId:           orgid,
301
+		HomeAddress:         home_address,
302
+		HomeSetting:         home_setting,
298 303
 	}
299 304
 	err = service.CreateMacher(addmacher)
300 305
 	if err != nil {
@@ -375,6 +380,8 @@ func (this *MachineApiController) UpdateMachineInfo() {
375 380
 	user_year := dataBody["user_year"].(string)
376 381
 	work_time := dataBody["work_time"].(string)
377 382
 	treat_types := dataBody["treat_type"].([]interface{})
383
+	home_address := dataBody["home_address"].(string)
384
+	home_setting := dataBody["home_setting"].(string)
378 385
 	ids := make([]int64, 0)
379 386
 	for _, treat := range treat_types {
380 387
 		id := int64(treat.(float64))
@@ -412,6 +419,8 @@ func (this *MachineApiController) UpdateMachineInfo() {
412 419
 		UserYear:            user_year,
413 420
 		WorkTime:            work_time,
414 421
 		ZoneId:              zone_id,
422
+		HomeAddress:         home_address,
423
+		HomeSetting:         home_setting,
415 424
 	}
416 425
 	err = service.UpdateMachine(id, orgid, &addmacher)
417 426
 	errors := service.UpdateTreatMode(id, orgid, ids)

+ 4 - 1
controllers/manager_center_api_controller.go ファイルの表示

@@ -1614,7 +1614,7 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1614 1614
 	good_id, _ := c.GetInt64("good_id", 0)
1615 1615
 	specification_name := c.GetString("specification_name")
1616 1616
 	register_number := c.GetString("register_number")
1617
-
1617
+	register_number_name := c.GetString("register_number_name")
1618 1618
 	good_unit, _ := c.GetInt64("good_unit", -1)
1619 1619
 	buy_price, _ := c.GetFloat("buy_price", 0)
1620 1620
 	sell_price, _ := c.GetFloat("sell_price", 0)
@@ -1752,6 +1752,7 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1752 1752
 		IsShow:                      is_show,
1753 1753
 		IsZeroFlag:                  is_zero_flag,
1754 1754
 		SplitOfNumber:               split_of_number,
1755
+		RegisterNumberName:          register_number_name,
1755 1756
 	}
1756 1757
 	err, goodInfos := service.AddSigleGoodInfo(&goodInfo)
1757 1758
 	if err == nil {
@@ -1824,6 +1825,7 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1824 1825
 	is_show, _ := c.GetInt64("is_show")
1825 1826
 	is_zero_flag, _ := c.GetInt64("is_zero_flag")
1826 1827
 	split_of_number, _ := c.GetInt64("split_of_number")
1828
+	register_number_name := c.GetString("register_number_name")
1827 1829
 	// 创建一个拼音转换器
1828 1830
 	p := pinyin.NewArgs()
1829 1831
 
@@ -1901,6 +1903,7 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1901 1903
 		IsShow:                      is_show,
1902 1904
 		IsZeroFlag:                  is_zero_flag,
1903 1905
 		SplitOfNumber:               split_of_number,
1906
+		RegisterNumberName:          register_number_name,
1904 1907
 	}
1905 1908
 
1906 1909
 	totals := service.FindGoodInfoByNameOne(specification_name, adminUserInfo.CurrentOrgId, good_id, id, good_name)

+ 9 - 7
controllers/pharmacy_controller.go ファイルの表示

@@ -1227,6 +1227,8 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1227 1227
 
1228 1228
 	recordDate, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
1229 1229
 
1230
+	baseDrug, _ := service.GetBaseDrugMedical(drug_id)
1231
+
1230 1232
 	//盘亏
1231 1233
 	if ord_total > new_total {
1232 1234
 
@@ -1266,7 +1268,7 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1266 1268
 			StockMaxNumber:     stock_max_number,
1267 1269
 			StockMinNumber:     stock_min_number,
1268 1270
 			MinCount:           0,
1269
-			MinUnit:            drugWarehouseInfoOne.MinUnit,
1271
+			MinUnit:            baseDrug.MinUnit,
1270 1272
 			LastStockMaxNumber: last_stock_max_number,
1271 1273
 			LastStockMinNumber: last_stock_min_number,
1272 1274
 			InventoryType:      11,
@@ -1307,8 +1309,8 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1307 1309
 			CancelOutDetailId:       0,
1308 1310
 			ExpireDate:              drugWarehouseInfoOne.ExpiryDate,
1309 1311
 			ProductDate:             0,
1310
-			MaxUnit:                 drugWarehouseInfoOne.MaxUnit,
1311
-			MinUnit:                 drugWarehouseInfoOne.MinUnit,
1312
+			MaxUnit:                 baseDrug.MinUnit,
1313
+			MinUnit:                 baseDrug.MinUnit,
1312 1314
 			StorehouseId:            storehouse_id,
1313 1315
 			OverCount:               sum_count,
1314 1316
 		}
@@ -1327,7 +1329,7 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1327 1329
 		inventory := models.XtDrugInventory{
1328 1330
 			DrugName:           base.DrugName,
1329 1331
 			SpecificationName:  specification_name,
1330
-			WarehousingUnit:    drugWarehouseInfoOne.MaxUnit,
1332
+			WarehousingUnit:    drugWarehouseInfoOne.MinUnit,
1331 1333
 			Count:              consumable_count,
1332 1334
 			LastPrice:          drugWarehouseInfoOne.Price,
1333 1335
 			RetailPrice:        drugWarehouseInfoOne.RetailPrice,
@@ -1358,7 +1360,7 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1358 1360
 			StockMaxNumber:     stock_max_number,
1359 1361
 			StockMinNumber:     stock_min_number,
1360 1362
 			MinCount:           0,
1361
-			MinUnit:            drugWarehouseInfoOne.MinUnit,
1363
+			MinUnit:            baseDrug.MinUnit,
1362 1364
 			LastStockMaxNumber: last_stock_max_number,
1363 1365
 			LastStockMinNumber: last_stock_min_number,
1364 1366
 			InventoryType:      10,
@@ -1399,8 +1401,8 @@ func (this *PharmacyController) UpdateDrugInventoryWarehouseInfo() {
1399 1401
 			CancelOutDetailId:       0,
1400 1402
 			ExpireDate:              drugWarehouseInfoOne.ExpiryDate,
1401 1403
 			ProductDate:             0,
1402
-			MaxUnit:                 drugWarehouseInfoOne.MaxUnit,
1403
-			MinUnit:                 drugWarehouseInfoOne.MinUnit,
1404
+			MaxUnit:                 baseDrug.MinUnit,
1405
+			MinUnit:                 baseDrug.MinUnit,
1404 1406
 			StorehouseId:            storehouse_id,
1405 1407
 			OverCount:               sum_count,
1406 1408
 		}

+ 33 - 2
controllers/role_controller.go ファイルの表示

@@ -2,11 +2,12 @@ package controllers
2 2
 
3 3
 import (
4 4
 	"fmt"
5
-	"github.com/jinzhu/gorm"
6 5
 	"strconv"
7 6
 	"strings"
8 7
 	"time"
9 8
 
9
+	"github.com/jinzhu/gorm"
10
+
10 11
 	"XT_New/enums"
11 12
 	"XT_New/models"
12 13
 	"XT_New/service"
@@ -1136,6 +1137,17 @@ func (this *RoleAPIController) AddAdmin() {
1136 1137
 	outpatient_illnessCategory := this.GetString("outpatient_illnessCategory")
1137 1138
 	is_active, _ := this.GetInt64("is_active")
1138 1139
 	active_status, _ := this.GetInt64("active_status")
1140
+
1141
+	birth := this.GetString("birth")
1142
+	theBirthTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", birth+" 00:00:00", loc)
1143
+
1144
+	work_address := this.GetString("work_address")
1145
+
1146
+	work_start_time := this.GetString("work_start_time")
1147
+	workStartTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", work_start_time+" 00:00:00", loc)
1148
+
1149
+	work_end_time := this.GetString("work_end_time")
1150
+	workEndTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", work_end_time+" 00:00:00", loc)
1139 1151
 	fmt.Println("active_status", active_status)
1140 1152
 	if len(mobile) == 0 || len(name) == 0 || (userType != 2 && userType != 3 && userType != 4) || len(roleIds) <= 0 {
1141 1153
 
@@ -1150,7 +1162,7 @@ func (this *RoleAPIController) AddAdmin() {
1150 1162
 		return
1151 1163
 	} else {
1152 1164
 		if adminUser == nil { //新增账号和用户
1153
-			_, password, createErr := service.CreateGeneralAdminUserOne(adminUserInfo.CurrentOrgId, adminUserInfo.CurrentAppId, mobile, name, user_title_name, roleIds, userType, userTitle, department_id, department, sex, age, nation, card_type, id_card, education, study_major_name, work_major_name, role_type, medical_code, doctor_code, licensing, job_number, prescription_qualification_identification, identification_outpatients, theStartTime.Unix(), medical_range_code, medical_level, medical_type_job, pharmacist_registration_number, doctor_range_code, doctor_level, doctor_type_job, doctor_number, outpatient_illnessCategory, is_active, active_status)
1165
+			_, password, createErr := service.CreateGeneralAdminUserOne(adminUserInfo.CurrentOrgId, adminUserInfo.CurrentAppId, mobile, name, user_title_name, roleIds, userType, userTitle, department_id, department, sex, age, nation, card_type, id_card, education, study_major_name, work_major_name, role_type, medical_code, doctor_code, licensing, job_number, prescription_qualification_identification, identification_outpatients, theStartTime.Unix(), medical_range_code, medical_level, medical_type_job, pharmacist_registration_number, doctor_range_code, doctor_level, doctor_type_job, doctor_number, outpatient_illnessCategory, is_active, active_status, work_address, theBirthTime.Unix(), workStartTime.Unix(), workEndTime.Unix())
1154 1166
 			if createErr != nil {
1155 1167
 				//beego.Error("创建管理员失败:", createErr)
1156 1168
 				this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
@@ -1211,6 +1223,10 @@ func (this *RoleAPIController) AddAdmin() {
1211 1223
 					OutpatientIllnesscategory:               outpatient_illnessCategory,
1212 1224
 					IsActive:                                is_active,
1213 1225
 					ActiveStatus:                            active_status,
1226
+					Birth:                                   theBirthTime.Unix(),
1227
+					WorkAddress:                             work_address,
1228
+					WorkStartTime:                           workStartTime.Unix(),
1229
+					WorkEndTime:                             workEndTime.Unix(),
1214 1230
 				}
1215 1231
 				err := service.CreateUserRole(app_role)
1216 1232
 				if err != nil {
@@ -1348,6 +1364,17 @@ func (this *RoleAPIController) EditAdmin() {
1348 1364
 	is_active, _ := this.GetInt64("is_active")
1349 1365
 	active_status, _ := this.GetInt64("active_status")
1350 1366
 
1367
+	birth := this.GetString("birth")
1368
+	theBirthTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", birth+" 00:00:00", loc)
1369
+
1370
+	work_address := this.GetString("work_address")
1371
+
1372
+	work_start_time := this.GetString("work_start_time")
1373
+	workStartTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", work_start_time+" 00:00:00", loc)
1374
+
1375
+	work_end_time := this.GetString("work_end_time")
1376
+	workEndTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", work_end_time+" 00:00:00", loc)
1377
+
1351 1378
 	_, titleExist := models.UserTitle[userTitle]
1352 1379
 	fmt.Println(titleExist)
1353 1380
 	if adminUserId <= 0 || len(name) == 0 || (userType != 2 && userType != 3 && userType != 4) || !titleExist || len(roleIds) <= 0 {
@@ -1405,6 +1432,10 @@ func (this *RoleAPIController) EditAdmin() {
1405 1432
 	appRole.IsActive = is_active
1406 1433
 	appRole.ActiveStatus = active_status
1407 1434
 	appRole.Sex = sex
1435
+	appRole.Birth = theBirthTime.Unix()
1436
+	appRole.WorkStartTime = workStartTime.Unix()
1437
+	appRole.WorkEndTime = workEndTime.Unix()
1438
+	appRole.WorkAddress = work_address
1408 1439
 	saveErr := service.SaveAppRole(appRole)
1409 1440
 	if saveErr != nil {
1410 1441
 		//beego.Error("修改App_Role失败:", saveErr)

+ 4 - 0
models/device_models.go ファイルの表示

@@ -315,6 +315,8 @@ type DeviceAddmachers struct {
315 315
 	DeviceMode          string `gorm:"column:device_mode" json:"device_mode" form:"device_mode"`
316 316
 	Number              string `gorm:"column:number" json:"number" form:"number"`
317 317
 	EquimentId          int64  `gorm:"column:equiment_id" json:"equiment_id" form:"equiment_id"`
318
+	HomeAddress         string `gorm:"column:home_address" json:"home_address" form:"home_address"`
319
+	HomeSetting         string `gorm:"column:home_setting" json:"home_setting" form:"home_setting"`
318 320
 }
319 321
 
320 322
 type DeviceAddmacher struct {
@@ -349,6 +351,8 @@ type DeviceAddmacher struct {
349 351
 	Mtime               int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
350 352
 	ZoneId              int64  `gorm:"column:zone_id" json:"zone_id" form:"zone_id"`
351 353
 	BedId               int64  `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
354
+	HomeAddress         string `gorm:"column:home_address" json:"home_address" form:"home_address"`
355
+	HomeSetting         string `gorm:"column:home_setting" json:"home_setting" form:"home_setting"`
352 356
 }
353 357
 
354 358
 func (DeviceAddmacher) TableName() string {

+ 1 - 0
models/good_models.go ファイルの表示

@@ -108,6 +108,7 @@ type GoodInfo struct {
108 108
 	IsZeroFlag                  int64                `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
109 109
 	SplitOfNumber               int64                `gorm:"column:split_of_number" json:"split_of_number" form:"split_of_number"`
110 110
 	ZuobiaoId                   string               `gorm:"column:zuobiao_id" json:"zuobiao_id" form:"zuobiao_id"`
111
+	RegisterNumberName          string               `gorm:"column:register_number_name" json:"register_number_name" form:"register_number_name"`
111 112
 
112 113
 	WarehousingInfoOne []*StartWarehousingInfo `gorm:"json:"warehouse_info"` //期间增加
113 114
 

+ 11 - 7
models/his_models.go ファイルの表示

@@ -81,13 +81,17 @@ func (XtHisProjectTeam) TableName() string {
81 81
 }
82 82
 
83 83
 type XtHisDepartment struct {
84
-	ID          int64  `gorm:"column:id" json:"id" form:"id"`
85
-	Name        string `gorm:"column:name" json:"name" form:"name"`
86
-	Number      string `gorm:"column:number" json:"number" form:"number"`
87
-	UserOrgId   int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
88
-	Status      int64  `gorm:"column:status" json:"status" form:"status"`
89
-	CreatedTime int64  `gorm:"column:created_time" json:"created_time" form:"created_time"`
90
-	UpdatedTime int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
84
+	ID             int64  `gorm:"column:id" json:"id" form:"id"`
85
+	Name           string `gorm:"column:name" json:"name" form:"name"`
86
+	Number         string `gorm:"column:number" json:"number" form:"number"`
87
+	UserOrgId      int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
88
+	Status         int64  `gorm:"column:status" json:"status" form:"status"`
89
+	CreatedTime    int64  `gorm:"column:created_time" json:"created_time" form:"created_time"`
90
+	UpdatedTime    int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
91
+	DepartmentType string `gorm:"column:department_type" json:"department_type" form:"department_type"`
92
+	Lender         string `gorm:"column:lender" json:"lender" form:"lender"`
93
+	Phone          string `gorm:"column:phone" json:"phone" form:"phone"`
94
+	StartTime      string `gorm:"column:start_time" json:"start_time" form:"start_time"`
91 95
 }
92 96
 
93 97
 func (XtHisDepartment) TableName() string {

+ 4 - 0
models/role_models.go ファイルの表示

@@ -90,6 +90,10 @@ type App_Role struct {
90 90
 	OutpatientIllnesscategory               string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"`
91 91
 	IsActive                                int64  `gorm:"column:is_active" json:"is_active" form:"is_active"`
92 92
 	ActiveStatus                            int64  `gorm:"column:active_status" json:"active_status" form:"active_status"`
93
+	Birth                                   int64  `gorm:"column:birth" json:"birth" form:"birth"`
94
+	WorkAddress                             string `gorm:"column:work_address" json:"work_address" form:"work_address"`
95
+	WorkStartTime                           int64  `gorm:"column:work_start_time" json:"work_start_time" form:"work_start_time"`
96
+	WorkEndTime                             int64  `gorm:"column:work_end_time" json:"work_end_time" form:"work_end_time"`
93 97
 }
94 98
 
95 99
 func (App_Role) TableName() string {

+ 1 - 1
service/device_service.go ファイルの表示

@@ -725,7 +725,7 @@ func GetMachineDetail(id int64, orgid int64) (models.DeviceAddmachers, error) {
725 725
 	db := readUserDb.Table("xt_device_addmacher as a").Where("a.status =1")
726 726
 	d := readUserDb.Table("xt_device_mode as d")
727 727
 	fmt.Print("d", d)
728
-	err := db.Select("a.id,a.serial_number,a.device_type,a.bed_number,a.device_name,a.manufacture_factory,a.service_manufacturer,a.unit_type as device_mode,a.use_section,a.section_number,a.buy_date,a.install_date,a.start_date,a.maintenace_engineer,a.telephone,a.guarantee_date,a.machine_status,a.user_total,a.disinfection_mode,a.remarks,a.rubbish_date,a.rubbish_reason,a.user_year,a.work_time,a.revers_mode,a.user_org_id,a.status,a.ctime,a.mtime,a.zone_id,a.bed_id").Joins("left join xt_device_mode as d on d.id = a.unit_type ").Where("a.id = ? and a.user_org_id = ?", id, orgid).Find(&addmacher).Error
728
+	err := db.Select("a.id,a.serial_number,a.device_type,a.bed_number,a.device_name,a.manufacture_factory,a.service_manufacturer,a.unit_type as device_mode,a.use_section,a.section_number,a.buy_date,a.install_date,a.start_date,a.maintenace_engineer,a.telephone,a.guarantee_date,a.machine_status,a.user_total,a.disinfection_mode,a.remarks,a.rubbish_date,a.rubbish_reason,a.user_year,a.work_time,a.revers_mode,a.user_org_id,a.status,a.ctime,a.mtime,a.zone_id,a.bed_id,a.home_address,a.home_setting").Joins("left join xt_device_mode as d on d.id = a.unit_type ").Where("a.id = ? and a.user_org_id = ?", id, orgid).Find(&addmacher).Error
729 729
 	return addmacher, err
730 730
 }
731 731
 

+ 1 - 1
service/his_project_service.go ファイルの表示

@@ -148,7 +148,7 @@ func GetDepartMentDetail(id int64) (models.XtHisDepartment, error) {
148 148
 
149 149
 func UpdatedDepartment(id int64, department *models.XtHisDepartment) error {
150 150
 
151
-	err := XTWriteDB().Model(&department).Where("id=? and status = 1", id).Updates(map[string]interface{}{"name": department.Name, "number": department.Number, "updated_time": time.Now().Unix()}).Error
151
+	err := XTWriteDB().Model(&department).Where("id=? and status = 1", id).Updates(map[string]interface{}{"name": department.Name, "number": department.Number, "updated_time": time.Now().Unix(), "department_type": department.DepartmentType, "lender": department.Lender, "phone": department.Phone, "start_time": department.StartTime}).Error
152 152
 	return err
153 153
 }
154 154
 

+ 1 - 1
service/manage_service.go ファイルの表示

@@ -54,7 +54,7 @@ func CreateMacher(machers *models.DeviceAddmacher) error {
54 54
 
55 55
 func UpdateMachine(id int64, orgid int64, addmacher *models.DeviceAddmacher) error {
56 56
 
57
-	err := writeUserDb.Model(&addmacher).Where("id = ? AND user_org_id = ? AND status = ?", id, orgid, 1).Updates(map[string]interface{}{"serial_number": addmacher.SerialNumber, "device_type": addmacher.DeviceType, "bed_number": addmacher.BedNumber, "device_name": addmacher.DeviceName, "manufacture_factory": addmacher.ManufactureFactory, "service_manufacturer": addmacher.ServiceManufacturer, "unit_type": addmacher.UnitType, "use_section": addmacher.UseSection, "section_number": addmacher.SectionNumber, "buy_date": addmacher.BuyDate, "install_date": addmacher.InstallDate, "start_date": addmacher.StartDate, "maintenace_engineer": addmacher.MaintenaceEngineer, "telephone": addmacher.Telephone, "guarantee_date": addmacher.GuaranteeDate, "machine_status": addmacher.MachineStatus, "user_total": addmacher.UserTotal, "remarks": addmacher.Remarks, "rubbish_date": addmacher.RubbishDate, "rubbish_reason": addmacher.RubbishReason, "user_year": addmacher.UserYear, "work_time": addmacher.WorkTime, "bed_id": addmacher.BedId, "disinfection_mode": addmacher.DisinfectionMode, "revers_mode": addmacher.ReversMode, "mtime": time.Now().Unix(), "zone_id": addmacher.ZoneId}).Error
57
+	err := writeUserDb.Model(&addmacher).Where("id = ? AND user_org_id = ? AND status = ?", id, orgid, 1).Updates(map[string]interface{}{"serial_number": addmacher.SerialNumber, "device_type": addmacher.DeviceType, "bed_number": addmacher.BedNumber, "device_name": addmacher.DeviceName, "manufacture_factory": addmacher.ManufactureFactory, "service_manufacturer": addmacher.ServiceManufacturer, "unit_type": addmacher.UnitType, "use_section": addmacher.UseSection, "section_number": addmacher.SectionNumber, "buy_date": addmacher.BuyDate, "install_date": addmacher.InstallDate, "start_date": addmacher.StartDate, "maintenace_engineer": addmacher.MaintenaceEngineer, "telephone": addmacher.Telephone, "guarantee_date": addmacher.GuaranteeDate, "machine_status": addmacher.MachineStatus, "user_total": addmacher.UserTotal, "remarks": addmacher.Remarks, "rubbish_date": addmacher.RubbishDate, "rubbish_reason": addmacher.RubbishReason, "user_year": addmacher.UserYear, "work_time": addmacher.WorkTime, "bed_id": addmacher.BedId, "disinfection_mode": addmacher.DisinfectionMode, "revers_mode": addmacher.ReversMode, "mtime": time.Now().Unix(), "zone_id": addmacher.ZoneId, "home_address": addmacher.HomeAddress, "home_setting": addmacher.HomeSetting}).Error
58 58
 
59 59
 	return err
60 60
 

+ 9 - 3
service/role_service.go ファイルの表示

@@ -1,8 +1,6 @@
1 1
 package service
2 2
 
3 3
 import (
4
-	"XT_New/models"
5
-	"XT_New/utils"
6 4
 	"database/sql"
7 5
 	"encoding/json"
8 6
 	"fmt"
@@ -10,6 +8,9 @@ import (
10 8
 	"strings"
11 9
 	"time"
12 10
 
11
+	"XT_New/models"
12
+	"XT_New/utils"
13
+
13 14
 	"github.com/jinzhu/gorm"
14 15
 )
15 16
 
@@ -328,7 +329,7 @@ func IsUserSuperAdminWithMobile(mobile string) (bool, error) {
328 329
 	return user.IsSuperAdmin, nil
329 330
 }
330 331
 
331
-func CreateGeneralAdminUserOne(orgID int64, appID int64, mobile string, name string, userTitle string, roleIds string, user_type int, user_title int, department_id int64, deapartment_name string, sex int64, age int64, nation string, card_type int64, idCard string, education int64, studyMajorName string, workMajorName string, roletype int64, medicalCode string, doctorcode string, licensing int64, jobnumber string, prescriptionQualificationIdentification int64, identificationOutpatients int64, startime int64, medicalRangeCode int64, medicalLevel int64, medicalTypeJob int64, pharmacistRegistrationNumber string, doctorRangeCode int64, doctorLevel int64, doctorTypeJob int64, doctorNumber string, outpatientIllnessCategory string, isActive int64, activeStatus int64) (*models.AdminUser, string, error) {
332
+func CreateGeneralAdminUserOne(orgID int64, appID int64, mobile string, name string, userTitle string, roleIds string, user_type int, user_title int, department_id int64, deapartment_name string, sex int64, age int64, nation string, card_type int64, idCard string, education int64, studyMajorName string, workMajorName string, roletype int64, medicalCode string, doctorcode string, licensing int64, jobnumber string, prescriptionQualificationIdentification int64, identificationOutpatients int64, startime int64, medicalRangeCode int64, medicalLevel int64, medicalTypeJob int64, pharmacistRegistrationNumber string, doctorRangeCode int64, doctorLevel int64, doctorTypeJob int64, doctorNumber string, outpatientIllnessCategory string, isActive int64, activeStatus int64, word_address string, birth int64, word_start_time int64, work_end_time int64) (*models.AdminUser, string, error) {
332 333
 	now := time.Now().Unix()
333 334
 	tx := writeUserDb.Begin()
334 335
 	var adminUser models.AdminUser
@@ -345,6 +346,7 @@ func CreateGeneralAdminUserOne(orgID int64, appID int64, mobile string, name str
345 346
 			adminUser.Status = 1
346 347
 			adminUser.CreateTime = now
347 348
 			adminUser.ModifyTime = now
349
+
348 350
 			if createErr := tx.Create(&adminUser).Error; createErr != nil {
349 351
 				tx.Rollback()
350 352
 				return nil, "", createErr
@@ -394,6 +396,10 @@ func CreateGeneralAdminUserOne(orgID int64, appID int64, mobile string, name str
394 396
 		DoctorRangeCode:                         doctorRangeCode,
395 397
 		DoctorTypeJob:                           doctorTypeJob,
396 398
 		DoctorLevel:                             doctorLevel,
399
+		WorkStartTime:                           word_start_time,
400
+		Birth:                                   birth,
401
+		WorkEndTime:                             work_end_time,
402
+		WorkAddress:                             word_address,
397 403
 	}
398 404
 	if createApp_RoleErr := tx.Create(&app_role).Error; createApp_RoleErr != nil {
399 405
 		tx.Rollback()

+ 1 - 0
service/stock_service.go ファイルの表示

@@ -281,6 +281,7 @@ func ModifyGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
281 281
 		"is_show":                        goodInfo.IsShow,
282 282
 		"is_zero_flag":                   goodInfo.IsZeroFlag,
283 283
 		"split_of_number":                goodInfo.SplitOfNumber,
284
+		"register_number_name":           goodInfo.RegisterNumberName,
284 285
 	}).Error
285 286
 
286 287
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})