Ver código fonte

耗材参数

XMLWAN 3 anos atrás
pai
commit
605308b085

+ 6 - 2
controllers/his_project_api_controller.go Ver arquivo

@@ -118,6 +118,7 @@ func (this *HisProjectApiController) SaveProject() {
118 118
 	execution_frequency := this.GetString("execution_frequency")
119 119
 	number_days := this.GetString("number_days")
120 120
 	total := this.GetString("total")
121
+	category, _ := this.GetInt64("category")
121 122
 	adminUserInfo := this.GetAdminUserInfo()
122 123
 	orgId := adminUserInfo.CurrentOrgId
123 124
 	hisProject := models.XtHisProject{
@@ -152,6 +153,7 @@ func (this *HisProjectApiController) SaveProject() {
152 153
 		ExecutionFrequency:        execution_frequency,
153 154
 		NumberDays:                number_days,
154 155
 		Total:                     total,
156
+		Category:                  category,
155 157
 	}
156 158
 	//查询项目名称是否存在
157 159
 	_, errcode := service.GetHisProjectIsExist(project_name, orgId)
@@ -181,9 +183,9 @@ func (this *HisProjectApiController) GetProjectList() {
181 183
 	is_charge, _ := this.GetInt64("is_charge")
182 184
 
183 185
 	is_start, _ := this.GetInt64("is_start")
184
-
185 186
 	keyword := this.GetString("keyword")
186
-	projecList, total, err := service.GetHisProjectList(orgId, limit, page, is_charge, is_start, keyword)
187
+	is_mark, _ := this.GetInt64("is_mark")
188
+	projecList, total, err := service.GetHisProjectList(orgId, limit, page, is_charge, is_start, keyword, is_mark)
187 189
 	if err != nil {
188 190
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateConfig)
189 191
 		return
@@ -239,6 +241,7 @@ func (this *HisProjectApiController) UpdatedProject() {
239 241
 	delivery_way := this.GetString("delivery_way")
240 242
 	execution_frequency := this.GetString("execution_frequency")
241 243
 	number_days := this.GetString("number_days")
244
+	category, _ := this.GetInt64("category")
242 245
 	total := this.GetString("total")
243 246
 	hisProject := models.XtHisProject{
244 247
 		ProjectName:               project_name,
@@ -270,6 +273,7 @@ func (this *HisProjectApiController) UpdatedProject() {
270 273
 		ExecutionFrequency:        execution_frequency,
271 274
 		NumberDays:                number_days,
272 275
 		Total:                     total,
276
+		Category:                  category,
273 277
 	}
274 278
 
275 279
 	err := service.UpdatedProject(id, &hisProject)

+ 221 - 178
controllers/manager_center_api_controller.go Ver arquivo

@@ -127,58 +127,69 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
127 127
 	is_statistics_work, _ := c.GetInt64("is_statistics_work")
128 128
 	is_charge_use, _ := c.GetInt64("is_charge_use")
129 129
 	dealer, _ := c.GetInt64("dealer")
130
+	prescription_mark, _ := c.GetInt64("prescription_mark")
131
+	social_security_directory_code := c.GetString("social_security_directory_code")
132
+	record_date := c.GetString("record_date")
133
+	timeLayout := "2006-01-02"
134
+	loc, _ := time.LoadLocation("Local")
135
+	theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
136
+	drug_remark := c.GetString("drug_remark")
130 137
 	adminInfo := c.GetAdminUserInfo()
131 138
 
132 139
 	drugLib := &models.BaseDrugLib{
133
-		DrugName:               drug_name,
134
-		Pinyin:                 pinyin,
135
-		Wubi:                   wubi,
136
-		DrugAlias:              drug_alias,
137
-		DrugAliasPinyin:        drug_alias_pinyin,
138
-		DrugAliasWubi:          drug_alias_wubi,
139
-		DrugCategory:           drug_category,
140
-		DrugSpec:               drug_spec,
141
-		DrugType:               drug_type,
142
-		DrugStockLimit:         drug_stock_limit,
143
-		DrugOriginPlace:        drug_origin_place,
144
-		MedicalInsuranceLevel:  medical_insurance_level,
145
-		DrugDosageForm:         drug_dosage_form,
146
-		MaxUnit:                max_unit,
147
-		MinUnit:                min_unit,
148
-		UnitMatrixing:          unit_matrixing,
149
-		RetailPrice:            retail_price,
150
-		LastPrice:              last_price,
151
-		DrugControl:            drug_control,
152
-		Number:                 number,
153
-		DrugClassify:           drug_classify,
154
-		DrugDose:               drug_dose,
155
-		DrugDoseUnit:           drug_dose_unit,
156
-		MedicalInsuranceNumber: medical_insurance_number,
157
-		Manufacturer:           manufacturer,
158
-		PharmacologyCategory:   pharmacology_category,
159
-		StatisticsCategory:     statistics_category,
160
-		Code:                   code,
161
-		IsSpecialDiseases:      is_special_diseases,
162
-		IsRecord:               is_record,
163
-		Agent:                  agent,
164
-		DrugStatus:             drug_status,
165
-		LimitRemark:            limit_remark,
166
-		DeliveryWay:            delivery_way,
167
-		ExecutionFrequency:     execution_frequency,
168
-		SingleDose:             single_dose,
169
-		PrescribingNumber:      prescribing_number,
170
-		Label:                  label,
171
-		Sort:                   sort,
172
-		IsUseDoctorAdvice:      is_use_doctor_advice,
173
-		IsDefault:              is_default,
174
-		IsChargePredict:        is_charge_predict,
175
-		IsStatisticsWork:       is_statistics_work,
176
-		IsChargeUse:            is_charge_use,
177
-		OrgId:                  adminInfo.CurrentOrgId,
178
-		Status:                 1,
179
-		Ctime:                  time.Now().Unix(),
180
-		Mtime:                  time.Now().Unix(),
181
-		Dealer:                 dealer,
140
+		DrugName:                    drug_name,
141
+		Pinyin:                      pinyin,
142
+		Wubi:                        wubi,
143
+		DrugAlias:                   drug_alias,
144
+		DrugAliasPinyin:             drug_alias_pinyin,
145
+		DrugAliasWubi:               drug_alias_wubi,
146
+		DrugCategory:                drug_category,
147
+		DrugSpec:                    drug_spec,
148
+		DrugType:                    drug_type,
149
+		DrugStockLimit:              drug_stock_limit,
150
+		DrugOriginPlace:             drug_origin_place,
151
+		MedicalInsuranceLevel:       medical_insurance_level,
152
+		DrugDosageForm:              drug_dosage_form,
153
+		MaxUnit:                     max_unit,
154
+		MinUnit:                     min_unit,
155
+		UnitMatrixing:               unit_matrixing,
156
+		RetailPrice:                 retail_price,
157
+		LastPrice:                   last_price,
158
+		DrugControl:                 drug_control,
159
+		Number:                      number,
160
+		DrugClassify:                drug_classify,
161
+		DrugDose:                    drug_dose,
162
+		DrugDoseUnit:                drug_dose_unit,
163
+		MedicalInsuranceNumber:      medical_insurance_number,
164
+		Manufacturer:                manufacturer,
165
+		PharmacologyCategory:        pharmacology_category,
166
+		StatisticsCategory:          statistics_category,
167
+		Code:                        code,
168
+		IsSpecialDiseases:           is_special_diseases,
169
+		IsRecord:                    is_record,
170
+		Agent:                       agent,
171
+		DrugStatus:                  drug_status,
172
+		LimitRemark:                 limit_remark,
173
+		DeliveryWay:                 delivery_way,
174
+		ExecutionFrequency:          execution_frequency,
175
+		SingleDose:                  single_dose,
176
+		PrescribingNumber:           prescribing_number,
177
+		Label:                       label,
178
+		Sort:                        sort,
179
+		IsUseDoctorAdvice:           is_use_doctor_advice,
180
+		IsDefault:                   is_default,
181
+		IsChargePredict:             is_charge_predict,
182
+		IsStatisticsWork:            is_statistics_work,
183
+		IsChargeUse:                 is_charge_use,
184
+		OrgId:                       adminInfo.CurrentOrgId,
185
+		Status:                      1,
186
+		Ctime:                       time.Now().Unix(),
187
+		Mtime:                       time.Now().Unix(),
188
+		Dealer:                      dealer,
189
+		PrescriptionMark:            prescription_mark,
190
+		SocialSecurityDirectoryCode: social_security_directory_code,
191
+		RecordDate:                  theTime.Unix(),
192
+		DrugRemark:                  drug_remark,
182 193
 	}
183 194
 
184 195
 	total := service.FindAllDrugLibRecordTotal(adminInfo.CurrentOrgId)
@@ -257,61 +268,72 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
257 268
 	drug_code := c.GetString("drug_code")
258 269
 	//unit := c.GetString("unit")
259 270
 	dealer, _ := c.GetInt64("dealer")
271
+	prescription_mark, _ := c.GetInt64("prescription_mark")
272
+	social_security_directory_code := c.GetString("social_security_directory_code")
273
+	record_date := c.GetString("record_date")
274
+	timeLayout := "2006-01-02"
275
+	loc, _ := time.LoadLocation("Local")
276
+	theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
277
+	drug_remark := c.GetString("drug_remark")
260 278
 	adminInfo := c.GetAdminUserInfo()
261 279
 	drug, _ := service.FindBaseDrugLibRecord(adminInfo.CurrentOrgId, id)
262 280
 
263 281
 	drugLib := &models.BaseDrugLib{
264
-		ID:                     id,
265
-		DrugName:               drug_name,
266
-		Pinyin:                 pinyin,
267
-		Wubi:                   wubi,
268
-		DrugAlias:              drug_alias,
269
-		DrugAliasPinyin:        drug_alias_pinyin,
270
-		DrugAliasWubi:          drug_alias_wubi,
271
-		DrugCategory:           drug_category,
272
-		DrugSpec:               drug_spec,
273
-		DrugType:               drug_type,
274
-		DrugStockLimit:         drug_stock_limit,
275
-		DrugOriginPlace:        drug_origin_place,
276
-		MedicalInsuranceLevel:  medical_insurance_level,
277
-		DrugDosageForm:         drug_dosage_form,
278
-		MaxUnit:                max_unit,
279
-		MinUnit:                min_unit,
280
-		UnitMatrixing:          unit_matrixing,
281
-		RetailPrice:            retail_price,
282
-		LastPrice:              last_price,
283
-		DrugControl:            drug_control,
284
-		Number:                 number,
285
-		DrugClassify:           drug_classify,
286
-		DrugDose:               drug_dose,
287
-		DrugDoseUnit:           drug_dose_unit,
288
-		MedicalInsuranceNumber: medical_insurance_number,
289
-		Manufacturer:           manufacturer,
290
-		PharmacologyCategory:   pharmacology_category,
291
-		StatisticsCategory:     statistics_category,
292
-		Code:                   code,
293
-		IsSpecialDiseases:      is_special_diseases,
294
-		IsRecord:               is_record,
295
-		Agent:                  agent,
296
-		DrugStatus:             drug_status,
297
-		LimitRemark:            limit_remark,
298
-		DeliveryWay:            delivery_way,
299
-		ExecutionFrequency:     execution_frequency,
300
-		SingleDose:             single_dose,
301
-		PrescribingNumber:      prescribing_number,
302
-		Label:                  label,
303
-		Sort:                   sort,
304
-		IsUseDoctorAdvice:      is_use_doctor_advice,
305
-		IsDefault:              is_default,
306
-		IsChargePredict:        is_charge_predict,
307
-		IsStatisticsWork:       is_statistics_work,
308
-		IsChargeUse:            is_charge_use,
309
-		OrgId:                  adminInfo.CurrentOrgId,
310
-		Status:                 1,
311
-		Ctime:                  drug.Ctime,
312
-		Mtime:                  time.Now().Unix(),
313
-		DrugCode:               drug_code,
314
-		Dealer:                 dealer,
282
+		ID:                          id,
283
+		DrugName:                    drug_name,
284
+		Pinyin:                      pinyin,
285
+		Wubi:                        wubi,
286
+		DrugAlias:                   drug_alias,
287
+		DrugAliasPinyin:             drug_alias_pinyin,
288
+		DrugAliasWubi:               drug_alias_wubi,
289
+		DrugCategory:                drug_category,
290
+		DrugSpec:                    drug_spec,
291
+		DrugType:                    drug_type,
292
+		DrugStockLimit:              drug_stock_limit,
293
+		DrugOriginPlace:             drug_origin_place,
294
+		MedicalInsuranceLevel:       medical_insurance_level,
295
+		DrugDosageForm:              drug_dosage_form,
296
+		MaxUnit:                     max_unit,
297
+		MinUnit:                     min_unit,
298
+		UnitMatrixing:               unit_matrixing,
299
+		RetailPrice:                 retail_price,
300
+		LastPrice:                   last_price,
301
+		DrugControl:                 drug_control,
302
+		Number:                      number,
303
+		DrugClassify:                drug_classify,
304
+		DrugDose:                    drug_dose,
305
+		DrugDoseUnit:                drug_dose_unit,
306
+		MedicalInsuranceNumber:      medical_insurance_number,
307
+		Manufacturer:                manufacturer,
308
+		PharmacologyCategory:        pharmacology_category,
309
+		StatisticsCategory:          statistics_category,
310
+		Code:                        code,
311
+		IsSpecialDiseases:           is_special_diseases,
312
+		IsRecord:                    is_record,
313
+		Agent:                       agent,
314
+		DrugStatus:                  drug_status,
315
+		LimitRemark:                 limit_remark,
316
+		DeliveryWay:                 delivery_way,
317
+		ExecutionFrequency:          execution_frequency,
318
+		SingleDose:                  single_dose,
319
+		PrescribingNumber:           prescribing_number,
320
+		Label:                       label,
321
+		Sort:                        sort,
322
+		IsUseDoctorAdvice:           is_use_doctor_advice,
323
+		IsDefault:                   is_default,
324
+		IsChargePredict:             is_charge_predict,
325
+		IsStatisticsWork:            is_statistics_work,
326
+		IsChargeUse:                 is_charge_use,
327
+		OrgId:                       adminInfo.CurrentOrgId,
328
+		Status:                      1,
329
+		Ctime:                       drug.Ctime,
330
+		Mtime:                       time.Now().Unix(),
331
+		DrugCode:                    drug_code,
332
+		Dealer:                      dealer,
333
+		PrescriptionMark:            prescription_mark,
334
+		SocialSecurityDirectoryCode: social_security_directory_code,
335
+		RecordDate:                  theTime.Unix(),
336
+		DrugRemark:                  drug_remark,
315 337
 	}
316 338
 
317 339
 	err := service.UpdateBaseDrugLib(drugLib)
@@ -484,6 +506,9 @@ func (c *ManagerCenterApiController) GetBaseDrugLibList() {
484 506
 	is_use, _ := c.GetInt64("is_use", 0)
485 507
 	is_charge, _ := c.GetInt64("is_charge", 0)
486 508
 	is_inject, _ := c.GetInt64("is_inject", 0)
509
+	manufacturer, _ := c.GetInt64("manufacturer")
510
+	is_record, _ := c.GetInt64("is_record")
511
+
487 512
 	keyword := c.GetString("keyword")
488 513
 	adminInfo := c.GetAdminUserInfo()
489 514
 
@@ -493,7 +518,7 @@ func (c *ManagerCenterApiController) GetBaseDrugLibList() {
493 518
 	if limit <= 0 {
494 519
 		limit = 10
495 520
 	}
496
-	list, total, _ := service.GetBaseDrugLibList(adminInfo.CurrentOrgId, keyword, page, limit, is_use, is_charge, is_inject)
521
+	list, total, _ := service.GetBaseDrugLibList(adminInfo.CurrentOrgId, keyword, page, limit, is_use, is_charge, is_inject, manufacturer, is_record)
497 522
 
498 523
 	c.ServeSuccessJSON(map[string]interface{}{
499 524
 		"list":  list,
@@ -742,6 +767,7 @@ func (c *ManagerCenterApiController) UpdateChildConfig() {
742 767
 	dataconfig.UpdatedTime = time.Now().Format("2006-01-02 15:04:05")
743 768
 	dataconfig.Remark = string(dataBody["remark"].(string))
744 769
 	dataconfig.Order = int64(dataBody["orders"].(float64))
770
+	dataconfig.Code = string(dataBody["code"].(string))
745 771
 	fmt.Println("dataconfitg------", dataconfig.Order)
746 772
 	//if dataBody["orders"] != nil {
747 773
 	//	dataconfig.Order = int64(dataBody["orders"].(float64))
@@ -859,6 +885,8 @@ func (c *ManagerCenterApiController) CreateChildConfig() {
859 885
 	dataconfig.CreatedTime = time.Now().Format("2006-01-02 15:04:05")
860 886
 	dataconfig.UpdatedTime = time.Now().Format("2006-01-02 15:04:05")
861 887
 	dataconfig.Remark = string(dataBody["remark"].(string))
888
+	dataconfig.Code = string(dataBody["code"].(string))
889
+	fmt.Println("3444444444", dataconfig.Code)
862 890
 	if dataBody["order"] != nil {
863 891
 		dataconfig.Order = int64(dataBody["order"].(float64))
864 892
 	} else {
@@ -1015,6 +1043,7 @@ func dictionaryConfigChildFormData(dataconfig *models.DictionaryDataconfig, data
1015 1043
 			return
1016 1044
 		}
1017 1045
 		dataconfig.Content = content
1046
+
1018 1047
 	} else {
1019 1048
 		if configBody["parent_id"] == nil || reflect.TypeOf(configBody["parent_id"]).String() != "float64" {
1020 1049
 			utils.ErrorLog("module")
@@ -1041,6 +1070,7 @@ func dictionaryConfigChildFormData(dataconfig *models.DictionaryDataconfig, data
1041 1070
 			return
1042 1071
 		}
1043 1072
 		dataconfig.Name = name
1073
+
1044 1074
 	}
1045 1075
 	return
1046 1076
 }
@@ -1407,6 +1437,9 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1407 1437
 	agent := c.GetString("agent")
1408 1438
 	good_number := c.GetString("good_number")
1409 1439
 
1440
+	social_security_directory_code := c.GetString("social_security_directory_code")
1441
+	production_type := c.GetString("production_type")
1442
+	special_medical := c.GetString("special_medical")
1410 1443
 	adminUserInfo := c.GetAdminUserInfo()
1411 1444
 
1412 1445
 	totals := service.FindGoodInfoByName(specification_name, adminUserInfo.CurrentOrgId, good_id)
@@ -1420,43 +1453,46 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1420 1453
 	code = "24000000" + code
1421 1454
 
1422 1455
 	goodInfo := models.GoodInfo{
1423
-		GoodCode:               code,
1424
-		SpecificationName:      specification_name,
1425
-		GoodTypeId:             good_id,
1426
-		GoodUnit:               good_unit,
1427
-		BuyPrice:               buy_price,
1428
-		SellPrice:              sell_price,
1429
-		Remark:                 remark,
1430
-		Ctime:                  time.Now().Unix(),
1431
-		Manufacturer:           manufacturer,
1432
-		Dealer:                 dealer,
1433
-		ExpiryDateWarnDayCount: expiry_date_warn_day_count,
1434
-		StockWarnCount:         stock_warn_count,
1435
-		IsReuse:                is_reuse,
1436
-		Status:                 1,
1437
-		OrgId:                  adminUserInfo.CurrentOrgId,
1438
-		Creater:                adminUserInfo.AdminUser.Id,
1439
-		GoodName:               good_name,
1440
-		Pinyin:                 pinyin,
1441
-		Wubi:                   wubi,
1442
-		GoodKind:               good_kind,
1443
-		MedicalInsuranceNumber: medical_insurance_number,
1444
-		IsSpecialDiseases:      is_special_diseases,
1445
-		IsRecord:               is_record,
1446
-		StatisticsCategory:     statistics_category,
1447
-		GoodStatus:             good_status,
1448
-		DefaultCount:           default_count,
1449
-		Sign:                   sign,
1450
-		IsDefault:              is_default,
1451
-		IsChargeUse:            is_charge_use,
1452
-		IsChargePredict:        is_charge_predict,
1453
-		IsStatisticsWork:       is_statistics_work,
1454
-		Sort:                   sort,
1455
-		IsDoctorUse:            is_doctor_use,
1456
-		Agent:                  agent,
1457
-		GoodNumber:             good_number,
1458
-		MedicalInsuranceLevel:  medical_insurance_level,
1459
-		RetailPrice:            retail_price,
1456
+		GoodCode:                    code,
1457
+		SpecificationName:           specification_name,
1458
+		GoodTypeId:                  good_id,
1459
+		GoodUnit:                    good_unit,
1460
+		BuyPrice:                    buy_price,
1461
+		SellPrice:                   sell_price,
1462
+		Remark:                      remark,
1463
+		Ctime:                       time.Now().Unix(),
1464
+		Manufacturer:                manufacturer,
1465
+		Dealer:                      dealer,
1466
+		ExpiryDateWarnDayCount:      expiry_date_warn_day_count,
1467
+		StockWarnCount:              stock_warn_count,
1468
+		IsReuse:                     is_reuse,
1469
+		Status:                      1,
1470
+		OrgId:                       adminUserInfo.CurrentOrgId,
1471
+		Creater:                     adminUserInfo.AdminUser.Id,
1472
+		GoodName:                    good_name,
1473
+		Pinyin:                      pinyin,
1474
+		Wubi:                        wubi,
1475
+		GoodKind:                    good_kind,
1476
+		MedicalInsuranceNumber:      medical_insurance_number,
1477
+		IsSpecialDiseases:           is_special_diseases,
1478
+		IsRecord:                    is_record,
1479
+		StatisticsCategory:          statistics_category,
1480
+		GoodStatus:                  good_status,
1481
+		DefaultCount:                default_count,
1482
+		Sign:                        sign,
1483
+		IsDefault:                   is_default,
1484
+		IsChargeUse:                 is_charge_use,
1485
+		IsChargePredict:             is_charge_predict,
1486
+		IsStatisticsWork:            is_statistics_work,
1487
+		Sort:                        sort,
1488
+		IsDoctorUse:                 is_doctor_use,
1489
+		Agent:                       agent,
1490
+		GoodNumber:                  good_number,
1491
+		MedicalInsuranceLevel:       medical_insurance_level,
1492
+		RetailPrice:                 retail_price,
1493
+		SocialSecurityDirectoryCode: social_security_directory_code,
1494
+		ProductionType:              production_type,
1495
+		SpecialMedical:              special_medical,
1460 1496
 	}
1461 1497
 	err, goodInfos := service.AddSigleGoodInfo(&goodInfo)
1462 1498
 	if err == nil {
@@ -1507,47 +1543,53 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1507 1543
 	agent := c.GetString("agent")
1508 1544
 	good_number := c.GetString("good_number")
1509 1545
 
1546
+	social_security_directory_code := c.GetString("social_security_directory_code")
1547
+	production_type := c.GetString("production_type")
1548
+	special_medical := c.GetString("special_medical")
1510 1549
 	adminUserInfo := c.GetAdminUserInfo()
1511 1550
 
1512 1551
 	goodInfo := models.GoodInfo{
1513
-		ID:                     id,
1514
-		GoodCode:               code,
1515
-		SpecificationName:      specification_name,
1516
-		GoodTypeId:             good_id,
1517
-		GoodUnit:               good_unit,
1518
-		BuyPrice:               buy_price,
1519
-		SellPrice:              sell_price,
1520
-		Remark:                 remark,
1521
-		Mtime:                  time.Now().Unix(),
1522
-		Manufacturer:           manufacturer,
1523
-		Dealer:                 dealer,
1524
-		ExpiryDateWarnDayCount: expiry_date_warn_day_count,
1525
-		StockWarnCount:         stock_warn_count,
1526
-		IsReuse:                is_reuse,
1527
-		Status:                 1,
1528
-		OrgId:                  adminUserInfo.CurrentOrgId,
1529
-		Modifier:               adminUserInfo.AdminUser.Id,
1530
-		GoodName:               good_name,
1531
-		Pinyin:                 pinyin,
1532
-		Wubi:                   wubi,
1533
-		GoodKind:               good_kind,
1534
-		MedicalInsuranceNumber: medical_insurance_number,
1535
-		IsSpecialDiseases:      is_special_diseases,
1536
-		IsRecord:               is_record,
1537
-		StatisticsCategory:     statistics_category,
1538
-		GoodStatus:             good_status,
1539
-		DefaultCount:           default_count,
1540
-		Sign:                   sign,
1541
-		IsDefault:              is_default,
1542
-		IsChargeUse:            is_charge_use,
1543
-		IsChargePredict:        is_charge_predict,
1544
-		IsStatisticsWork:       is_statistics_work,
1545
-		Sort:                   sort,
1546
-		IsDoctorUse:            is_doctor_use,
1547
-		Agent:                  agent,
1548
-		GoodNumber:             good_number,
1549
-		MedicalInsuranceLevel:  medical_insurance_level,
1550
-		RetailPrice:            retail_price,
1552
+		ID:                          id,
1553
+		GoodCode:                    code,
1554
+		SpecificationName:           specification_name,
1555
+		GoodTypeId:                  good_id,
1556
+		GoodUnit:                    good_unit,
1557
+		BuyPrice:                    buy_price,
1558
+		SellPrice:                   sell_price,
1559
+		Remark:                      remark,
1560
+		Mtime:                       time.Now().Unix(),
1561
+		Manufacturer:                manufacturer,
1562
+		Dealer:                      dealer,
1563
+		ExpiryDateWarnDayCount:      expiry_date_warn_day_count,
1564
+		StockWarnCount:              stock_warn_count,
1565
+		IsReuse:                     is_reuse,
1566
+		Status:                      1,
1567
+		OrgId:                       adminUserInfo.CurrentOrgId,
1568
+		Modifier:                    adminUserInfo.AdminUser.Id,
1569
+		GoodName:                    good_name,
1570
+		Pinyin:                      pinyin,
1571
+		Wubi:                        wubi,
1572
+		GoodKind:                    good_kind,
1573
+		MedicalInsuranceNumber:      medical_insurance_number,
1574
+		IsSpecialDiseases:           is_special_diseases,
1575
+		IsRecord:                    is_record,
1576
+		StatisticsCategory:          statistics_category,
1577
+		GoodStatus:                  good_status,
1578
+		DefaultCount:                default_count,
1579
+		Sign:                        sign,
1580
+		IsDefault:                   is_default,
1581
+		IsChargeUse:                 is_charge_use,
1582
+		IsChargePredict:             is_charge_predict,
1583
+		IsStatisticsWork:            is_statistics_work,
1584
+		Sort:                        sort,
1585
+		IsDoctorUse:                 is_doctor_use,
1586
+		Agent:                       agent,
1587
+		GoodNumber:                  good_number,
1588
+		MedicalInsuranceLevel:       medical_insurance_level,
1589
+		RetailPrice:                 retail_price,
1590
+		SpecialMedical:              special_medical,
1591
+		SocialSecurityDirectoryCode: social_security_directory_code,
1592
+		ProductionType:              production_type,
1551 1593
 	}
1552 1594
 
1553 1595
 	totals := service.FindGoodInfoByNameOne(specification_name, adminUserInfo.CurrentOrgId, good_id, id)
@@ -1572,9 +1614,10 @@ func (c *ManagerCenterApiController) GetGoodInfoList() {
1572 1614
 	is_use, _ := c.GetInt64("is_use")
1573 1615
 	is_charge, _ := c.GetInt64("is_charge")
1574 1616
 	good_kind, _ := c.GetInt64("good_kind")
1575
-
1617
+	is_mark, _ := c.GetInt64("is_mark")
1618
+	manufacturer, _ := c.GetInt64("manufacturer")
1576 1619
 	adminUserInfo := c.GetAdminUserInfo()
1577
-	goodInfos, total, err := service.FindGoodInfoList(adminUserInfo.CurrentOrgId, page, limit, keyword, is_use, is_charge, good_kind)
1620
+	goodInfos, total, err := service.FindGoodInfoList(adminUserInfo.CurrentOrgId, page, limit, keyword, is_use, is_charge, good_kind, is_mark, manufacturer)
1578 1621
 	if err == nil {
1579 1622
 		c.ServeSuccessJSON(map[string]interface{}{
1580 1623
 			"list":  goodInfos,

+ 8 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go Ver arquivo

@@ -419,6 +419,8 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
419 419
 			newprescribe.Dialyzer = dialysisSolution.Dialyzer
420 420
 			newprescribe.ReplacementTotal = dialysisSolution.ReplacementTotal
421 421
 			newprescribe.DialyzerPerfusionApparatus = dialysisSolution.DialyzerPerfusionApparatus
422
+			newprescribe.DialysisIrrigation = dialysisSolution.DialysisIrrigation
423
+			newprescribe.DialysisDialyszers = dialysisSolution.DialysisDialyszers
422 424
 			newprescribe.BodyFluidOther = dialysisSolution.BodyFluidOther
423 425
 			newprescribe.TargetKtv = dialysisSolution.TargetKtv
424 426
 
@@ -475,6 +477,8 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
475 477
 				newprescribe.Dialyzer = lastDialysisPrescribe.Dialyzer
476 478
 				newprescribe.ReplacementTotal = lastDialysisPrescribe.ReplacementTotal
477 479
 				newprescribe.DialyzerPerfusionApparatus = lastDialysisPrescribe.DialyzerPerfusionApparatus
480
+				newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
481
+				newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
478 482
 				newprescribe.BodyFluidOther = lastDialysisPrescribe.BodyFluidOther
479 483
 				newprescribe.TargetKtv = lastDialysisPrescribe.TargetKtv
480 484
 				newprescribe.CreatedTime = time.Now().Unix()
@@ -483,6 +487,7 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
483 487
 				newprescribe.DewaterAmount = dewater_amount
484 488
 				newprescribe.TargetUltrafiltration = dewater_amount
485 489
 				newprescribe.Status = 1
490
+
486 491
 				err := service.AddSigleRecord(&newprescribe)
487 492
 				if err != nil {
488 493
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
@@ -526,6 +531,8 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
526 531
 				newprescribe.Dialyzer = system_dialysisPrescribe.Dialyzer
527 532
 				newprescribe.ReplacementTotal = system_dialysisPrescribe.ReplacementTotal
528 533
 				newprescribe.DialyzerPerfusionApparatus = system_dialysisPrescribe.DialyzerPerfusionApparatus
534
+				newprescribe.DialysisIrrigation = system_dialysisPrescribe.DialysisIrrigation
535
+				newprescribe.DialysisDialyszers = system_dialysisPrescribe.DialysisDialyszers
529 536
 				newprescribe.BodyFluidOther = system_dialysisPrescribe.BodyFluidOther
530 537
 				newprescribe.TargetKtv = system_dialysisPrescribe.TargetKtv
531 538
 				newprescribe.CreatedTime = time.Now().Unix()
@@ -534,6 +541,7 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
534 541
 				newprescribe.DewaterAmount = dewater_amount
535 542
 				newprescribe.TargetUltrafiltration = dewater_amount
536 543
 				newprescribe.Status = 1
544
+
537 545
 				fmt.Println(newprescribe.DewaterAmount)
538 546
 				fmt.Println(newprescribe.TargetUltrafiltration)
539 547
 

+ 6 - 1
controllers/mobile_api_controllers/dialysis_api_controller.go Ver arquivo

@@ -3081,9 +3081,14 @@ func (c *DialysisAPIController) GetSchedule() {
3081 3081
 
3082 3082
 func (c *DialysisAPIController) GetPatientId() {
3083 3083
 	id, _ := c.GetInt64("id")
3084
+	fmt.Println("id223333444444", id)
3084 3085
 	patientId, _ := service.GetPatientId(id)
3086
+	//获取该患者的所有传染病
3087
+	list, err := service.GetPatientInfectious(id)
3088
+	fmt.Println("err222222222", err)
3085 3089
 	c.ServeSuccessJSON(map[string]interface{}{
3086
-		"patient": patientId,
3090
+		"patient":       patientId,
3091
+		"infectioulist": list,
3087 3092
 	})
3088 3093
 }
3089 3094
 

+ 6 - 0
controllers/mobile_api_controllers/patient_api_controller.go Ver arquivo

@@ -1636,6 +1636,8 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1636 1636
 		newprescribe.DewaterAmount = dewater_amount
1637 1637
 		newprescribe.TargetUltrafiltration = dewater_amount
1638 1638
 		newprescribe.Status = 1
1639
+		newprescribe.DialysisDialyszers = dialysisSolution.DialysisDialyszers
1640
+		newprescribe.DialysisIrrigation = dialysisSolution.DialysisIrrigation
1639 1641
 
1640 1642
 		err := service.AddSigleRecord(&newprescribe)
1641 1643
 		if err != nil {
@@ -1691,6 +1693,8 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1691 1693
 			newprescribe.DewaterAmount = dewater_amount
1692 1694
 			newprescribe.TargetUltrafiltration = dewater_amount
1693 1695
 			newprescribe.Status = 1
1696
+			newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
1697
+			newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
1694 1698
 			err := service.AddSigleRecord(&newprescribe)
1695 1699
 			if err != nil {
1696 1700
 				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
@@ -1743,6 +1747,8 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1743 1747
 			newprescribe.DewaterAmount = dewater_amount
1744 1748
 			newprescribe.TargetUltrafiltration = dewater_amount
1745 1749
 			newprescribe.Status = 1
1750
+			newprescribe.DialysisDialyszers = system_dialysisPrescribe.DialysisDialyszers
1751
+			newprescribe.DialysisIrrigation = system_dialysisPrescribe.DialysisIrrigation
1746 1752
 			err := service.AddSigleRecord(&newprescribe)
1747 1753
 			if err != nil {
1748 1754
 				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)

+ 148 - 18
controllers/role_controller.go Ver arquivo

@@ -1,6 +1,7 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"fmt"
4 5
 	"github.com/jinzhu/gorm"
5 6
 	"strconv"
6 7
 	"strings"
@@ -25,9 +26,9 @@ func RoleAPIControllerRegistRouters() {
25 26
 	beego.Router("/api/adminmain", &RoleAPIController{}, "get:AdminMainView")
26 27
 	beego.Router("/api/admins", &RoleAPIController{}, "get:Admins")
27 28
 	beego.Router("/api/admin/addinit", &RoleAPIController{}, "get:AddAdminInitData")
28
-	beego.Router("/api/admin/add", &RoleAPIController{}, "post:AddAdmin")
29
+	beego.Router("/api/admin/add", &RoleAPIController{}, "get:AddAdmin")
29 30
 	beego.Router("/api/admin/editinit", &RoleAPIController{}, "get:EditAdminInitData")
30
-	beego.Router("/api/admin/edit", &RoleAPIController{}, "post:EditAdmin")
31
+	beego.Router("/api/admin/edit", &RoleAPIController{}, "get:EditAdmin")
31 32
 	beego.Router("/api/admin/setstatus", &RoleAPIController{}, "post:AdminSetStatus")
32 33
 
33 34
 	beego.Router("/api/admin/specialpermission/initdata", &RoleAPIController{}, "get:SpecialPermissionInitData")
@@ -912,7 +913,44 @@ func (this *RoleAPIController) AddAdmin() {
912 913
 	user_title_name := this.GetString("user_title_name")
913 914
 	department := this.GetString("department")
914 915
 	department_id, _ := this.GetInt64("department_id")
916
+
917
+	sex, _ := this.GetInt64("sex")
918
+
919
+	age, _ := this.GetInt64("age")
920
+	nation := this.GetString("nation")
921
+	card_type, _ := this.GetInt64("card_type")
922
+	id_card := this.GetString("id_card")
923
+	education, _ := this.GetInt64("education")
924
+	study_major_name := this.GetString("study_major_name")
925
+	work_major_name := this.GetString("work_major_name")
926
+	role_type, _ := this.GetInt64("role_type")
927
+	medical_code := this.GetString("medical_code")
928
+	doctor_code := this.GetString("doctor_code")
929
+	licensing, _ := this.GetInt64("licensing")
930
+	job_number := this.GetString("job_number")
931
+
932
+	prescription_qualification_identification, _ := this.GetInt64("prescription_qualification_identification")
933
+	identification_outpatients, _ := this.GetInt64("identification_outpatients")
934
+	timeLayout := "2006-01-02"
935
+	loc, _ := time.LoadLocation("Local")
936
+	start_time := this.GetString("start_time")
937
+
938
+	theStartTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
939
+
940
+	medical_range_code, _ := this.GetInt64("medical_range_code")
941
+	medical_level, _ := this.GetInt64("medical_level")
942
+	medical_type_job, _ := this.GetInt64("medical_type_job")
943
+	pharmacist_registration_number := this.GetString("pharmacist_registration_number")
944
+	doctor_range_code, _ := this.GetInt64("doctor_range_code")
945
+	doctor_level, _ := this.GetInt64("doctor_level")
946
+	doctor_type_job, _ := this.GetInt64("doctor_type_job")
947
+	doctor_number := this.GetString("doctor_number")
948
+	outpatient_illnessCategory := this.GetString("outpatient_illnessCategory")
949
+	is_active, _ := this.GetInt64("is_active")
950
+	active_status, _ := this.GetInt64("active_status")
951
+	fmt.Println("active_status", active_status)
915 952
 	if len(mobile) == 0 || len(name) == 0 || (userType != 2 && userType != 3 && userType != 4) || len(roleIds) <= 0 {
953
+
916 954
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
917 955
 		return
918 956
 	}
@@ -924,7 +962,7 @@ func (this *RoleAPIController) AddAdmin() {
924 962
 		return
925 963
 	} else {
926 964
 		if adminUser == nil { //新增账号和用户
927
-			_, password, createErr := service.CreateGeneralAdminUser(adminUserInfo.CurrentOrgId, adminUserInfo.CurrentAppId, mobile, name, user_title_name, roleIds, userType, userTitle, department_id, department)
965
+			_, 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)
928 966
 			if createErr != nil {
929 967
 				//beego.Error("创建管理员失败:", createErr)
930 968
 				this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
@@ -941,24 +979,50 @@ func (this *RoleAPIController) AddAdmin() {
941 979
 		} else {
942 980
 
943 981
 			total, _ := service.FindAdminUserByID(adminUser.Id, adminUserInfo.CurrentOrgId)
944
-
945 982
 			if total <= 0 {
946 983
 				//新增用户
947 984
 				app_role := &models.App_Role{
948
-					AdminUserId:   adminUser.Id,
949
-					OrgId:         adminUserInfo.CurrentOrgId,
950
-					AppId:         adminUserInfo.CurrentAppId,
951
-					Avatar:        "",
952
-					UserName:      name,
953
-					UserTitleName: user_title_name,
954
-					Status:        1,
955
-					UserType:      int8(userType),
956
-					UserTitle:     int8(userTitle),
957
-					CreateTime:    time.Now().Unix(),
958
-					ModifyTime:    time.Now().Unix(),
959
-					RoleIds:       roleIds,
960
-					Department:    department,
961
-					DepartmentId:  department_id,
985
+					AdminUserId:                             adminUser.Id,
986
+					OrgId:                                   adminUserInfo.CurrentOrgId,
987
+					AppId:                                   adminUserInfo.CurrentAppId,
988
+					Avatar:                                  "",
989
+					UserName:                                name,
990
+					UserTitleName:                           user_title_name,
991
+					Status:                                  1,
992
+					UserType:                                int8(userType),
993
+					UserTitle:                               int8(userTitle),
994
+					CreateTime:                              time.Now().Unix(),
995
+					ModifyTime:                              time.Now().Unix(),
996
+					RoleIds:                                 roleIds,
997
+					Department:                              department,
998
+					DepartmentId:                            department_id,
999
+					Sex:                                     sex,
1000
+					Age:                                     age,
1001
+					Nation:                                  nation,
1002
+					CardType:                                card_type,
1003
+					IdCard:                                  id_card,
1004
+					Education:                               education,
1005
+					StudyMajorName:                          study_major_name,
1006
+					WorkMajorName:                           work_major_name,
1007
+					RoleType:                                role_type,
1008
+					MedicalCode:                             medical_code,
1009
+					DoctorCode:                              doctor_code,
1010
+					Licensing:                               licensing,
1011
+					JobNumber:                               job_number,
1012
+					PrescriptionQualificationIdentification: prescription_qualification_identification,
1013
+					IdentificationOutpatients:               identification_outpatients,
1014
+					StartTime:                               theStartTime.Unix(),
1015
+					MedicalRangeCode:                        medical_range_code,
1016
+					MedicalLevel:                            medical_level,
1017
+					MedicalTypeJob:                          medical_type_job,
1018
+					PharmacistRegistrationNumber:            pharmacist_registration_number,
1019
+					DoctorRangeCode:                         doctor_range_code,
1020
+					DoctorLevel:                             doctor_level,
1021
+					DoctorTypeJob:                           doctor_type_job,
1022
+					DoctorNumber:                            doctor_number,
1023
+					OutpatientIllnesscategory:               outpatient_illnessCategory,
1024
+					IsActive:                                is_active,
1025
+					ActiveStatus:                            active_status,
962 1026
 				}
963 1027
 				err := service.CreateUserRole(app_role)
964 1028
 				if err != nil {
@@ -1062,8 +1126,44 @@ func (this *RoleAPIController) EditAdmin() {
1062 1126
 	department := this.GetString("department")
1063 1127
 	department_id, _ := this.GetInt64("department_id")
1064 1128
 	sort, _ := this.GetInt64("sort")
1129
+
1130
+	age, _ := this.GetInt64("age")
1131
+	nation := this.GetString("nation")
1132
+	card_type, _ := this.GetInt64("card_type")
1133
+	id_card := this.GetString("id_card")
1134
+	education, _ := this.GetInt64("education")
1135
+	study_major_name := this.GetString("study_major_name")
1136
+	work_major_name := this.GetString("work_major_name")
1137
+	role_type, _ := this.GetInt64("role_type")
1138
+	medical_code := this.GetString("medical_code")
1139
+	doctor_code := this.GetString("doctor_code")
1140
+	licensing, _ := this.GetInt64("licensing")
1141
+	job_number := this.GetString("job_number")
1142
+
1143
+	prescription_qualification_identification, _ := this.GetInt64("prescription_qualification_identification")
1144
+	identification_outpatients, _ := this.GetInt64("identification_outpatients")
1145
+	timeLayout := "2006-01-02"
1146
+	loc, _ := time.LoadLocation("Local")
1147
+	start_time := this.GetString("start_time")
1148
+	fmt.Println("start_time22222222222", start_time)
1149
+	theStartTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
1150
+
1151
+	medical_range_code, _ := this.GetInt64("medical_range_code")
1152
+	medical_level, _ := this.GetInt64("medical_level")
1153
+	medical_type_job, _ := this.GetInt64("medical_type_job")
1154
+	pharmacist_registration_number := this.GetString("pharmacist_registration_number")
1155
+	doctor_range_code, _ := this.GetInt64("doctor_range_code")
1156
+	doctor_level, _ := this.GetInt64("doctor_level")
1157
+	doctor_type_job, _ := this.GetInt64("doctor_type_job")
1158
+	doctor_number := this.GetString("doctor_number")
1159
+	outpatient_illnessCategory := this.GetString("outpatient_illnessCategory")
1160
+	is_active, _ := this.GetInt64("is_active")
1161
+	active_status, _ := this.GetInt64("active_status")
1162
+
1065 1163
 	_, titleExist := models.UserTitle[userTitle]
1164
+	fmt.Println(titleExist)
1066 1165
 	if adminUserId <= 0 || len(name) == 0 || (userType != 2 && userType != 3 && userType != 4) || !titleExist || len(roleIds) <= 0 {
1166
+		fmt.Println("进来了吗")
1067 1167
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1068 1168
 		return
1069 1169
 	}
@@ -1088,12 +1188,42 @@ func (this *RoleAPIController) EditAdmin() {
1088 1188
 	appRole.UserTitleName = user_title_name
1089 1189
 	appRole.ModifyTime = time.Now().Unix()
1090 1190
 	appRole.Sort = sort
1191
+	appRole.Age = age
1192
+	appRole.Nation = nation
1193
+	appRole.CardType = card_type
1194
+	appRole.IdCard = id_card
1195
+	appRole.Education = education
1196
+	appRole.StudyMajorName = study_major_name
1197
+	appRole.WorkMajorName = work_major_name
1198
+	appRole.RoleType = role_type
1199
+	appRole.MedicalCode = medical_code
1200
+	appRole.DoctorCode = doctor_code
1201
+	appRole.Licensing = licensing
1202
+	appRole.JobNumber = job_number
1203
+	appRole.PrescriptionQualificationIdentification = prescription_qualification_identification
1204
+	appRole.IdentificationOutpatients = identification_outpatients
1205
+	appRole.StartTime = theStartTime.Unix()
1206
+	appRole.MedicalCode = medical_code
1207
+	appRole.MedicalRangeCode = medical_range_code
1208
+	appRole.MedicalLevel = medical_level
1209
+	appRole.MedicalTypeJob = medical_type_job
1210
+	appRole.PharmacistRegistrationNumber = pharmacist_registration_number
1211
+	appRole.DoctorRangeCode = doctor_range_code
1212
+	appRole.DoctorLevel = doctor_level
1213
+	appRole.DoctorTypeJob = doctor_type_job
1214
+	appRole.DoctorNumber = doctor_number
1215
+	appRole.OutpatientIllnesscategory = outpatient_illnessCategory
1216
+	appRole.IsActive = is_active
1217
+	appRole.ActiveStatus = active_status
1091 1218
 	saveErr := service.SaveAppRole(appRole)
1092 1219
 	if saveErr != nil {
1093 1220
 		//beego.Error("修改App_Role失败:", saveErr)
1094 1221
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDBUpdate)
1095 1222
 
1096 1223
 	} else {
1224
+		this.ServeSuccessJSON(map[string]interface{}{
1225
+			"approle": appRole,
1226
+		})
1097 1227
 		this.ServeSuccessJSON(nil)
1098 1228
 	}
1099 1229
 }

+ 1 - 0
models/data_models.go Ver arquivo

@@ -64,6 +64,7 @@ type DictionaryDataconfig struct {
64 64
 	Title          string `gorm:"column:title" json:"title" form:"title"`
65 65
 	Content        string `gorm:"column:content" json:"content" form:"content"`
66 66
 	Order          int64  `gorm:"column:orders" json:"orders" form:"orders"`
67
+	Code           string `gorm:"column:code" json:"code" form:"code"`
67 68
 }
68 69
 
69 70
 func (DictionaryDataconfig) TableName() string {

+ 56 - 51
models/drug.go Ver arquivo

@@ -1,57 +1,62 @@
1 1
 package models
2 2
 
3 3
 type BaseDrugLib struct {
4
-	ID                     int64   `gorm:"column:id" json:"id" form:"id"`
5
-	DrugName               string  `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
6
-	Pinyin                 string  `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
7
-	Wubi                   string  `gorm:"column:wubi" json:"wubi" form:"wubi"`
8
-	DrugAlias              string  `gorm:"column:drug_alias" json:"drug_alias" form:"drug_alias"`
9
-	DrugAliasPinyin        string  `gorm:"column:drug_alias_pinyin" json:"drug_alias_pinyin" form:"drug_alias_pinyin"`
10
-	DrugAliasWubi          string  `gorm:"column:drug_alias_wubi" json:"drug_alias_wubi" form:"drug_alias_wubi"`
11
-	DrugCategory           int64   `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
12
-	DrugSpec               string  `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
13
-	DrugType               int64   `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
14
-	DrugStockLimit         string  `gorm:"column:drug_stock_limit" json:"drug_stock_limit" form:"drug_stock_limit"`
15
-	DrugOriginPlace        string  `gorm:"column:drug_origin_place" json:"drug_origin_place" form:"drug_origin_place"`
16
-	DrugDosageForm         int64   `gorm:"column:drug_dosage_form" json:"drug_dosage_form" form:"drug_dosage_form"`
17
-	MedicalInsuranceLevel  int64   `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
18
-	MaxUnit                string  `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
19
-	MinUnit                string  `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
20
-	UnitMatrixing          string  `gorm:"column:unit_matrixing" json:"unit_matrixing" form:"unit_matrixing"`
21
-	RetailPrice            float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
22
-	LastPrice              float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
23
-	DrugControl            int64   `gorm:"column:drug_control" json:"drug_control" form:"drug_control"`
24
-	Number                 string  `gorm:"column:number" json:"number" form:"number"`
25
-	DrugClassify           string  `gorm:"column:drug_classify" json:"drug_classify" form:"drug_classify"`
26
-	DrugDose               float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
27
-	DrugDoseUnit           int64   `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
28
-	MedicalInsuranceNumber string  `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
29
-	Manufacturer           int64   `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
30
-	PharmacologyCategory   int64   `gorm:"column:pharmacology_category" json:"pharmacology_category" form:"pharmacology_category"`
31
-	StatisticsCategory     int64   `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
32
-	Code                   string  `gorm:"column:code" json:"code" form:"code"`
33
-	IsSpecialDiseases      int64   `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
34
-	IsRecord               int64   `gorm:"column:is_record" json:"is_record" form:"is_record"`
35
-	Agent                  string  `gorm:"column:agent" json:"agent" form:"agent"`
36
-	DrugStatus             string  `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
37
-	LimitRemark            string  `gorm:"column:limit_remark" json:"limit_remark" form:"limit_remark"`
38
-	DeliveryWay            string  `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
39
-	ExecutionFrequency     string  `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
40
-	SingleDose             float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
41
-	PrescribingNumber      float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
42
-	Label                  int64   `gorm:"column:label" json:"label" form:"label"`
43
-	Sort                   int64   `gorm:"column:sort" json:"sort" form:"sort"`
44
-	IsUseDoctorAdvice      int64   `gorm:"column:is_use_doctor_advice" json:"is_use_doctor_advice" form:"is_use_doctor_advice"`
45
-	IsDefault              int64   `gorm:"column:is_default" json:"is_default" form:"is_default"`
46
-	IsChargePredict        int64   `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
47
-	IsStatisticsWork       int64   `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
48
-	IsChargeUse            int64   `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
49
-	Status                 int64   `gorm:"column:status" json:"status" form:"status"`
50
-	Ctime                  int64   `gorm:"column:ctime" json:"ctime" form:"ctime"`
51
-	Mtime                  int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
52
-	OrgId                  int64   `gorm:"column:org_id" json:"org_id" form:"org_id"`
53
-	DrugCode               string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
54
-	Dealer                 int64   `gorm:"column:dealer" json:"dealer" form:"dealer"`
4
+	ID                          int64   `gorm:"column:id" json:"id" form:"id"`
5
+	DrugName                    string  `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
6
+	Pinyin                      string  `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
7
+	Wubi                        string  `gorm:"column:wubi" json:"wubi" form:"wubi"`
8
+	DrugAlias                   string  `gorm:"column:drug_alias" json:"drug_alias" form:"drug_alias"`
9
+	DrugAliasPinyin             string  `gorm:"column:drug_alias_pinyin" json:"drug_alias_pinyin" form:"drug_alias_pinyin"`
10
+	DrugAliasWubi               string  `gorm:"column:drug_alias_wubi" json:"drug_alias_wubi" form:"drug_alias_wubi"`
11
+	DrugCategory                int64   `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
12
+	DrugSpec                    string  `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
13
+	DrugType                    int64   `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
14
+	DrugStockLimit              string  `gorm:"column:drug_stock_limit" json:"drug_stock_limit" form:"drug_stock_limit"`
15
+	DrugOriginPlace             string  `gorm:"column:drug_origin_place" json:"drug_origin_place" form:"drug_origin_place"`
16
+	DrugDosageForm              int64   `gorm:"column:drug_dosage_form" json:"drug_dosage_form" form:"drug_dosage_form"`
17
+	MedicalInsuranceLevel       int64   `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
18
+	MaxUnit                     string  `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
19
+	MinUnit                     string  `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
20
+	UnitMatrixing               string  `gorm:"column:unit_matrixing" json:"unit_matrixing" form:"unit_matrixing"`
21
+	RetailPrice                 float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
22
+	LastPrice                   float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
23
+	DrugControl                 int64   `gorm:"column:drug_control" json:"drug_control" form:"drug_control"`
24
+	Number                      string  `gorm:"column:number" json:"number" form:"number"`
25
+	DrugClassify                string  `gorm:"column:drug_classify" json:"drug_classify" form:"drug_classify"`
26
+	DrugDose                    float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
27
+	DrugDoseUnit                int64   `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
28
+	MedicalInsuranceNumber      string  `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
29
+	Manufacturer                int64   `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
30
+	PharmacologyCategory        int64   `gorm:"column:pharmacology_category" json:"pharmacology_category" form:"pharmacology_category"`
31
+	StatisticsCategory          int64   `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
32
+	Code                        string  `gorm:"column:code" json:"code" form:"code"`
33
+	IsSpecialDiseases           int64   `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
34
+	IsRecord                    int64   `gorm:"column:is_record" json:"is_record" form:"is_record"`
35
+	Agent                       string  `gorm:"column:agent" json:"agent" form:"agent"`
36
+	DrugStatus                  string  `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
37
+	LimitRemark                 string  `gorm:"column:limit_remark" json:"limit_remark" form:"limit_remark"`
38
+	DeliveryWay                 string  `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
39
+	ExecutionFrequency          string  `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
40
+	SingleDose                  float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
41
+	PrescribingNumber           float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
42
+	Label                       int64   `gorm:"column:label" json:"label" form:"label"`
43
+	Sort                        int64   `gorm:"column:sort" json:"sort" form:"sort"`
44
+	IsUseDoctorAdvice           int64   `gorm:"column:is_use_doctor_advice" json:"is_use_doctor_advice" form:"is_use_doctor_advice"`
45
+	IsDefault                   int64   `gorm:"column:is_default" json:"is_default" form:"is_default"`
46
+	IsChargePredict             int64   `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
47
+	IsStatisticsWork            int64   `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
48
+	IsChargeUse                 int64   `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
49
+	Status                      int64   `gorm:"column:status" json:"status" form:"status"`
50
+	Ctime                       int64   `gorm:"column:ctime" json:"ctime" form:"ctime"`
51
+	Mtime                       int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
52
+	OrgId                       int64   `gorm:"column:org_id" json:"org_id" form:"org_id"`
53
+	DrugCode                    string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
54
+	Dealer                      int64   `gorm:"column:dealer" json:"dealer" form:"dealer"`
55
+	PrescriptionMark            int64   `gorm:"column:prescription_mark" json:"prescription_mark" form:"prescription_mark"`
56
+	RecordDate                  int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
57
+	DrugRemark                  string  `gorm:"column:drug_remark" json:"drug_remark" form:"drug_remark"`
58
+	SocialSecurityDirectoryCode string  `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
59
+	IsMark                      int64   `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
55 60
 	//MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
56 61
 }
57 62
 

+ 49 - 45
models/good_models.go Ver arquivo

@@ -22,51 +22,55 @@ func (GoodsType) TableName() string {
22 22
 }
23 23
 
24 24
 type GoodInfo struct {
25
-	ID                     int64     `gorm:"column:id" json:"id" form:"id"`
26
-	GoodCode               string    `gorm:"column:good_code" json:"good_code" form:"good_code"`
27
-	SpecificationName      string    `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
28
-	GoodTypeId             int64     `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
29
-	GoodUnit               int64     `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
30
-	BuyPrice               float64   `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
31
-	SellPrice              float64   `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
32
-	Remark                 string    `gorm:"column:remark" json:"remark" form:"remark"`
33
-	Ctime                  int64     `gorm:"column:ctime" json:"ctime" form:"ctime"`
34
-	Mtime                  int64     `gorm:"column:mtime" json:"mtime" form:"mtime"`
35
-	Manufacturer           int64     `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
36
-	Dealer                 int64     `gorm:"column:dealer" json:"dealer" form:"dealer"`
37
-	ExpiryDateWarnDayCount int64     `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
38
-	StockWarnCount         int64     `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
39
-	IsReuse                int64     `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
40
-	Status                 int64     `gorm:"column:status" json:"status" form:"status"`
41
-	FilmArea               string    `gorm:"column:film_area" json:"film_area" form:"film_area"`
42
-	IsUse                  int64     `gorm:"column:is_use" json:"is_use" form:"is_use"`
43
-	FilmMaterialQuality    string    `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
44
-	OrgId                  int64     `gorm:"column:org_id" json:"org_id" form:"org_id"`
45
-	Modifier               int64     `gorm:"column:modifier" json:"modifier" form:"modifier"`
46
-	Creater                int64     `gorm:"column:creater" json:"creater" form:"creater"`
47
-	GoodName               string    `gorm:"column:good_name" json:"good_name" form:"good_name"`
48
-	Pinyin                 string    `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
49
-	Wubi                   string    `gorm:"column:wubi" json:"wubi" form:"wubi"`
50
-	GoodKind               int64     `gorm:"column:good_kind" json:"good_kind" form:"good_kind"`
51
-	MedicalInsuranceLevel  int64     `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
52
-	RetailPrice            float64   `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
53
-	MedicalInsuranceNumber string    `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
54
-	IsSpecialDiseases      int64     `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
55
-	IsRecord               int64     `gorm:"column:is_record" json:"is_record" form:"is_record"`
56
-	StatisticsCategory     int64     `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
57
-	GoodStatus             string    `gorm:"column:good_status" json:"good_status" form:"good_status"`
58
-	DefaultCount           int64     `gorm:"column:default_count" json:"default_count" form:"default_count"`
59
-	Sign                   int64     `gorm:"column:sign" json:"sign" form:"sign"`
60
-	IsDefault              int64     `gorm:"column:is_default" json:"is_default" form:"is_default"`
61
-	IsChargeUse            int64     `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
62
-	IsChargePredict        int64     `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
63
-	IsStatisticsWork       int64     `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
64
-	Sort                   int64     `gorm:"column:sort" json:"sort" form:"sort"`
65
-	IsDoctorUse            int64     `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
66
-	Agent                  string    `gorm:"column:agent" json:"agent" form:"agent"`
67
-	GoodNumber             string    `gorm:"column:good_number" json:"good_number" form:"good_number"`
68
-	GoodsType              GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
69
-	CommdityCode           string    `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
25
+	ID                          int64     `gorm:"column:id" json:"id" form:"id"`
26
+	GoodCode                    string    `gorm:"column:good_code" json:"good_code" form:"good_code"`
27
+	SpecificationName           string    `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
28
+	GoodTypeId                  int64     `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
29
+	GoodUnit                    int64     `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
30
+	BuyPrice                    float64   `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
31
+	SellPrice                   float64   `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
32
+	Remark                      string    `gorm:"column:remark" json:"remark" form:"remark"`
33
+	Ctime                       int64     `gorm:"column:ctime" json:"ctime" form:"ctime"`
34
+	Mtime                       int64     `gorm:"column:mtime" json:"mtime" form:"mtime"`
35
+	Manufacturer                int64     `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
36
+	Dealer                      int64     `gorm:"column:dealer" json:"dealer" form:"dealer"`
37
+	ExpiryDateWarnDayCount      int64     `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
38
+	StockWarnCount              int64     `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
39
+	IsReuse                     int64     `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
40
+	Status                      int64     `gorm:"column:status" json:"status" form:"status"`
41
+	FilmArea                    string    `gorm:"column:film_area" json:"film_area" form:"film_area"`
42
+	IsUse                       int64     `gorm:"column:is_use" json:"is_use" form:"is_use"`
43
+	FilmMaterialQuality         string    `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
44
+	OrgId                       int64     `gorm:"column:org_id" json:"org_id" form:"org_id"`
45
+	Modifier                    int64     `gorm:"column:modifier" json:"modifier" form:"modifier"`
46
+	Creater                     int64     `gorm:"column:creater" json:"creater" form:"creater"`
47
+	GoodName                    string    `gorm:"column:good_name" json:"good_name" form:"good_name"`
48
+	Pinyin                      string    `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
49
+	Wubi                        string    `gorm:"column:wubi" json:"wubi" form:"wubi"`
50
+	GoodKind                    int64     `gorm:"column:good_kind" json:"good_kind" form:"good_kind"`
51
+	MedicalInsuranceLevel       int64     `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
52
+	RetailPrice                 float64   `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
53
+	MedicalInsuranceNumber      string    `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
54
+	IsSpecialDiseases           int64     `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
55
+	IsRecord                    int64     `gorm:"column:is_record" json:"is_record" form:"is_record"`
56
+	StatisticsCategory          int64     `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
57
+	GoodStatus                  string    `gorm:"column:good_status" json:"good_status" form:"good_status"`
58
+	DefaultCount                int64     `gorm:"column:default_count" json:"default_count" form:"default_count"`
59
+	Sign                        int64     `gorm:"column:sign" json:"sign" form:"sign"`
60
+	IsDefault                   int64     `gorm:"column:is_default" json:"is_default" form:"is_default"`
61
+	IsChargeUse                 int64     `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
62
+	IsChargePredict             int64     `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
63
+	IsStatisticsWork            int64     `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
64
+	Sort                        int64     `gorm:"column:sort" json:"sort" form:"sort"`
65
+	IsDoctorUse                 int64     `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
66
+	Agent                       string    `gorm:"column:agent" json:"agent" form:"agent"`
67
+	GoodNumber                  string    `gorm:"column:good_number" json:"good_number" form:"good_number"`
68
+	GoodsType                   GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
69
+	CommdityCode                string    `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
70
+	SocialSecurityDirectoryCode string    `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
71
+	ProductionType              string    `gorm:"column:production_type" json:"production_type" form:"production_type"`
72
+	SpecialMedical              string    `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
73
+	IsMark                      int64     `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
70 74
 }
71 75
 
72 76
 func (GoodInfo) TableName() string {

+ 2 - 0
models/his_models.go Ver arquivo

@@ -39,6 +39,8 @@ type XtHisProject struct {
39 39
 	DeliveryWay               string  `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
40 40
 	NumberDays                string  `gorm:"column:number_days" json:"number_days" form:"number_days"`
41 41
 	Total                     string  `gorm:"column:total" json:"total" form:"total"`
42
+	Category                  int64   `gorm:"column:category" json:"category" form:"category"`
43
+	IsMark                    int64   `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
42 44
 }
43 45
 
44 46
 func (XtHisProject) TableName() string {

+ 27 - 0
models/role_models.go Ver arquivo

@@ -63,6 +63,33 @@ type App_Role struct {
63 63
 	IsSort          int64  `gorm:"column:is_sort" json:"is_sort" form:"is_sort"`
64 64
 	DepartmentId    int64  `gorm:"column:department_id" json:"department_id" form:"department_id"`
65 65
 	Department      string `gorm:"column:department" json:"department" form:"department"`
66
+
67
+	Age                                     int64  `gorm:"column:age" json:"age" form:"age"`
68
+	Nation                                  string `gorm:"column:nation" json:"nation" form:"nation"`
69
+	CardType                                int64  `gorm:"column:card_type" json:"card_type" form:"card_type"`
70
+	IdCard                                  string `gorm:"column:id_card" json:"id_card" form:"id_card"`
71
+	Education                               int64  `gorm:"column:education" json:"education" form:"education"`
72
+	StudyMajorName                          string `gorm:"column:study_major_name" json:"study_major_name" form:"study_major_name"`
73
+	WorkMajorName                           string `gorm:"column:work_major_name" json:"work_major_name" form:"work_major_name"`
74
+	RoleType                                int64  `gorm:"column:role_type" json:"role_type" form:"role_type"`
75
+	MedicalCode                             string `gorm:"column:medical_code" json:"medical_code" form:"medical_code"`
76
+	DoctorCode                              string `gorm:"column:doctor_code" json:"doctor_code" form:"doctor_code"`
77
+	Licensing                               int64  `gorm:"column:licensing" json:"licensing" form:"licensing"`
78
+	JobNumber                               string `gorm:"column:job_number" json:"job_number" form:"job_number"`
79
+	PrescriptionQualificationIdentification int64  `gorm:"column:prescription_qualification_identification" json:"prescription_qualification_identification" form:"prescription_qualification_identification"`
80
+	IdentificationOutpatients               int64  `gorm:"column:identification_outpatients" json:"identification_outpatients" form:"identification_outpatients"`
81
+	StartTime                               int64  `gorm:"column:start_time" json:"start_time" form:"start_time"`
82
+	MedicalRangeCode                        int64  `gorm:"column:medical_range_code" json:"medical_range_code" form:"medical_range_code"`
83
+	MedicalLevel                            int64  `gorm:"column:medical_level" json:"medical_level" form:"medical_level"`
84
+	MedicalTypeJob                          int64  `gorm:"column:medical_type_job" json:"medical_type_job" form:"medical_type_job"`
85
+	PharmacistRegistrationNumber            string `gorm:"column:pharmacist_registration_number" json:"pharmacist_registration_number" form:"pharmacist_registration_number"`
86
+	DoctorRangeCode                         int64  `gorm:"column:doctor_range_code" json:"doctor_range_code" form:"doctor_range_code"`
87
+	DoctorLevel                             int64  `gorm:"column:doctor_level" json:"doctor_level" form:"doctor_level"`
88
+	DoctorTypeJob                           int64  `gorm:"column:doctor_type_job" json:"doctor_type_job" form:"doctor_type_job"`
89
+	DoctorNumber                            string `gorm:"column:doctor_number" json:"doctor_number" form:"doctor_number"`
90
+	OutpatientIllnesscategory               string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"`
91
+	IsActive                                int64  `gorm:"column:is_active" json:"is_active" form:"is_active"`
92
+	ActiveStatus                            int64  `gorm:"column:active_status" json:"active_status" form:"active_status"`
66 93
 }
67 94
 
68 95
 func (App_Role) TableName() string {

+ 6 - 0
service/device_service.go Ver arquivo

@@ -714,3 +714,9 @@ func GetPatientId(id int64) (models.XtPatientsNew, error) {
714 714
 	err := XTReadDB().Model(&patientsNew).Where("blood_id = ? and status = 1", id).Find(&patientsNew).Error
715 715
 	return patientsNew, err
716 716
 }
717
+
718
+func GetPatientInfectious(id int64) (infectious []*models.InfectiousDiseases, err error) {
719
+
720
+	err = XTReadDB().Where("patient_id=? and status=1", id).Find(&infectious).Error
721
+	return infectious, err
722
+}

+ 6 - 3
service/his_project_service.go Ver arquivo

@@ -28,7 +28,7 @@ func CreateHisProject(project *models.XtHisProject) error {
28 28
 	return err
29 29
 }
30 30
 
31
-func GetHisProjectList(orgid int64, limit int64, page int64, charge int64, start int64, keyword string) (hisproject []*models.XtHisProject, total int64, err error) {
31
+func GetHisProjectList(orgid int64, limit int64, page int64, charge int64, start int64, keyword string, isMark int64) (hisproject []*models.XtHisProject, total int64, err error) {
32 32
 	offset := (page - 1) * limit
33 33
 	likeKey := "%" + keyword + "%"
34 34
 	db := XTReadDB().Table("xt_his_project as x").Where("x.status = 1")
@@ -44,7 +44,10 @@ func GetHisProjectList(orgid int64, limit int64, page int64, charge int64, start
44 44
 	if len(keyword) > 0 {
45 45
 		db = db.Where("x.project_name like ?", likeKey)
46 46
 	}
47
-	err = db.Select("x.id,x.project_name,x.pinyin,x.wubi,x.price,x.unit,x.cost_classify,x.executive_section,x.medical_coverage,x.statistical_classification,x.disease_directory,x.is_record,x.medical_code,x.tube_color,x.medical_status,x.remark,x.sign,x.default_number,x.is_default,x.is_charge,x.is_estimate,x.is_workload,x.sort,x.doctor_advice,x.user_org_id,x.status,x.created_time").Count(&total).Offset(offset).Limit(limit).Find(&hisproject).Error
47
+	if isMark > 0 {
48
+		db = db.Where("x.is_mark = ?", isMark)
49
+	}
50
+	err = db.Select("x.id,x.project_name,x.pinyin,x.wubi,x.price,x.unit,x.cost_classify,x.executive_section,x.medical_coverage,x.statistical_classification,x.disease_directory,x.is_record,x.medical_code,x.tube_color,x.medical_status,x.remark,x.sign,x.default_number,x.is_default,x.is_charge,x.is_estimate,x.is_workload,x.sort,x.doctor_advice,x.user_org_id,x.status,x.created_time,x.is_mark").Count(&total).Offset(offset).Limit(limit).Find(&hisproject).Error
48 51
 	return hisproject, total, err
49 52
 }
50 53
 
@@ -56,7 +59,7 @@ func GetProjectDetail(id int64) (models.XtHisProject, error) {
56 59
 
57 60
 func UpdatedProject(id int64, pro *models.XtHisProject) error {
58 61
 
59
-	err := XTWriteDB().Model(&pro).Where("id=?", id).Updates(map[string]interface{}{"project_name": pro.ProjectName, "pinyin": pro.Pinyin, "wubi": pro.Pinyin, "price": pro.Price, "unit": pro.Unit, "cost_classify": pro.CostClassify, "executive_section": pro.ExecutiveSection, "medical_coverage": pro.MedicalCoverage, "statistical_classification": pro.StatisticalClassification, "disease_directory": pro.DiseaseDirectory, "is_record": pro.IsRecord, "medical_code": pro.MedicalCode, "tube_color": pro.TubeColor, "medical_status": pro.MedicalStatus, "remark": pro.Remark, "sign": pro.Sign, "default_number": pro.DefaultNumber, "is_default": pro.IsDefault, "is_charge": pro.IsCharge, "is_estimate": pro.IsEstimate, "is_workload": pro.IsWorkload, "sort": pro.Sort, "doctor_advice": pro.DoctorAdvice, "single_dose": pro.SingleDose, "execution_frequency": pro.ExecutionFrequency, "delivery_way": pro.DeliveryWay, "number_days": pro.NumberDays, "total": pro.Total, "updated_time": pro.UpdatedTime}).Error
62
+	err := XTWriteDB().Model(&pro).Where("id=?", id).Updates(map[string]interface{}{"project_name": pro.ProjectName, "pinyin": pro.Pinyin, "wubi": pro.Pinyin, "price": pro.Price, "unit": pro.Unit, "cost_classify": pro.CostClassify, "executive_section": pro.ExecutiveSection, "medical_coverage": pro.MedicalCoverage, "statistical_classification": pro.StatisticalClassification, "disease_directory": pro.DiseaseDirectory, "is_record": pro.IsRecord, "medical_code": pro.MedicalCode, "tube_color": pro.TubeColor, "medical_status": pro.MedicalStatus, "remark": pro.Remark, "sign": pro.Sign, "default_number": pro.DefaultNumber, "is_default": pro.IsDefault, "is_charge": pro.IsCharge, "is_estimate": pro.IsEstimate, "is_workload": pro.IsWorkload, "sort": pro.Sort, "doctor_advice": pro.DoctorAdvice, "single_dose": pro.SingleDose, "execution_frequency": pro.ExecutionFrequency, "delivery_way": pro.DeliveryWay, "number_days": pro.NumberDays, "total": pro.Total, "updated_time": pro.UpdatedTime, "category": pro.Category}).Error
60 63
 	return err
61 64
 }
62 65
 

+ 9 - 3
service/manage_center_service.go Ver arquivo

@@ -134,7 +134,7 @@ func UpdateDictionaryTemplate(dataconfig *models.DictionaryDataconfig) (err erro
134 134
 }
135 135
 
136 136
 func UpdateDictionaryChildConfig(dataconfig *models.DictionaryDataconfig) (err error) {
137
-	err = readDb.Model(&models.DictionaryDataconfig{}).Where("id =?", dataconfig.ID).Update(map[string]interface{}{"name": dataconfig.Name, "update_time": dataconfig.UpdatedTime, "remark": dataconfig.Remark, "orders": dataconfig.Order}).Error
137
+	err = readDb.Model(&models.DictionaryDataconfig{}).Where("id =?", dataconfig.ID).Update(map[string]interface{}{"name": dataconfig.Name, "update_time": dataconfig.UpdatedTime, "remark": dataconfig.Remark, "orders": dataconfig.Order, "code": dataconfig.Code}).Error
138 138
 	return
139 139
 }
140 140
 
@@ -168,7 +168,7 @@ func FindBaseDrugLibRecord(org_id int64, id int64) (lib models.BaseDrugLib, err
168 168
 	return
169 169
 }
170 170
 
171
-func GetBaseDrugLibList(org_id int64, keyword string, page int64, limit int64, is_use int64, is_charge int64, is_inject int64) (list []*models.BaseDrugLib, total int64, err error) {
171
+func GetBaseDrugLibList(org_id int64, keyword string, page int64, limit int64, is_use int64, is_charge int64, is_inject int64, manufacturer int64, isRecord int64) (list []*models.BaseDrugLib, total int64, err error) {
172 172
 
173 173
 	db := readDb.Model(&models.BaseDrugLib{}).Where("org_id = ?  AND status = 1", org_id)
174 174
 	if len(keyword) != 0 {
@@ -194,7 +194,6 @@ func GetBaseDrugLibList(org_id int64, keyword string, page int64, limit int64, i
194 194
 		} else {
195 195
 			db = db.Where("find_in_set('收费',drug_status) = 0")
196 196
 		}
197
-
198 197
 	}
199 198
 
200 199
 	if is_inject != 0 {
@@ -207,6 +206,13 @@ func GetBaseDrugLibList(org_id int64, keyword string, page int64, limit int64, i
207 206
 		}
208 207
 
209 208
 	}
209
+
210
+	if manufacturer > 0 {
211
+		db = db.Where("manufacturer = ?", manufacturer)
212
+	}
213
+	if isRecord > 0 {
214
+		db = db.Where("is_mark = ?", isRecord)
215
+	}
210 216
 	offset := (page - 1) * limit
211 217
 
212 218
 	err = db.Count(&total).Offset(offset).Limit(limit).Order("ctime desc").Find(&list).Error

+ 80 - 2
service/role_service.go Ver arquivo

@@ -131,7 +131,9 @@ type AdminUserManageViewModel struct {
131 131
 	TitleName       string `gorm:"-" json:"title_name"`
132 132
 	IsSubSuperAdmin bool   `gorm:"-" json:"is_sub_super_admin"`
133 133
 	//mobile          string `gorm:"-" json:"mobile"`
134
-	Sort int `gorm:"sort" json:"sort"`
134
+	Sort     int `gorm:"sort" json:"sort"`
135
+	IsMark   int `gorm:"is_mark" json:"is_mark"`
136
+	UserType int `gorm:"user_type" json:"user_type"`
135 137
 }
136 138
 
137 139
 func GetAdminUsersAndLoginInfo(orgID int64, appID int64, page int, count int) ([]*AdminUserManageViewModel, int, error) {
@@ -142,7 +144,7 @@ func GetAdminUsersAndLoginInfo(orgID int64, appID int64, page int, count int) ([
142 144
 		page = 1
143 145
 	}
144 146
 	var viewModels []*AdminUserManageViewModel = make([]*AdminUserManageViewModel, 0)
145
-	rows, err := readUserDb.Raw("SELECT u_a_r.admin_user_id, u_a_r.user_name, u_a_r.user_title, u_l.ip, u_l.ctime, u_a_r.status,u_a_r.avatar,u_a_r.role_ids,u_a_r.sort FROM sgj_user_admin_role AS u_a_r   LEFT JOIN (SELECT * FROM (SELECT admin_user_id, org_id, app_id, ip, ctime FROM sgj_user_admin_login_log WHERE org_id = ? AND app_id = ?  ORDER BY ctime DESC) AS t GROUP BY admin_user_id) AS u_l  ON u_a_r.org_id = u_l.org_id AND u_a_r.app_id = u_l.app_id AND u_a_r.admin_user_id = u_l.admin_user_id WHERE u_a_r.org_id = ? AND u_a_r.app_id = ? GROUP BY u_a_r.admin_user_id  LIMIT ? OFFSET ?;", orgID, appID, orgID, appID, count, (page-1)*count).Rows()
147
+	rows, err := readUserDb.Raw("SELECT u_a_r.admin_user_id, u_a_r.user_name, u_a_r.user_title, u_l.ip, u_l.ctime, u_a_r.status,u_a_r.avatar,u_a_r.role_ids,u_a_r.sort,u_a_r.is_mark,u_a_r.user_type FROM sgj_user_admin_role AS u_a_r   LEFT JOIN (SELECT * FROM (SELECT admin_user_id, org_id, app_id, ip, ctime FROM sgj_user_admin_login_log WHERE org_id = ? AND app_id = ?  ORDER BY ctime DESC) AS t GROUP BY admin_user_id) AS u_l  ON u_a_r.org_id = u_l.org_id AND u_a_r.app_id = u_l.app_id AND u_a_r.admin_user_id = u_l.admin_user_id WHERE u_a_r.org_id = ? AND u_a_r.app_id = ? GROUP BY u_a_r.admin_user_id  LIMIT ? OFFSET ?;", orgID, appID, orgID, appID, count, (page-1)*count).Rows()
146 148
 	defer rows.Close()
147 149
 	if err != nil {
148 150
 		if err == gorm.ErrRecordNotFound {
@@ -310,6 +312,82 @@ func IsUserSuperAdminWithMobile(mobile string) (bool, error) {
310 312
 	return user.IsSuperAdmin, nil
311 313
 }
312 314
 
315
+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) {
316
+	now := time.Now().Unix()
317
+	tx := writeUserDb.Begin()
318
+	var adminUser models.AdminUser
319
+	err := readUserDb.Where("mobile = ? AND status = 1", mobile).First(&adminUser).Error
320
+	password := ""
321
+	if err != nil {
322
+		if err != gorm.ErrRecordNotFound {
323
+			return nil, "", err
324
+		} else {
325
+			password = utils.RandomNumberString(6)
326
+			adminUser.Mobile = mobile
327
+			adminUser.Password = utils.String2md5(password)
328
+			adminUser.IsSuperAdmin = false
329
+			adminUser.Status = 1
330
+			adminUser.CreateTime = now
331
+			adminUser.ModifyTime = now
332
+			if createErr := tx.Create(&adminUser).Error; createErr != nil {
333
+				tx.Rollback()
334
+				return nil, "", createErr
335
+			}
336
+		}
337
+	}
338
+	app_role := models.App_Role{
339
+		AdminUserId:                             adminUser.Id,
340
+		OrgId:                                   orgID,
341
+		AppId:                                   appID,
342
+		Avatar:                                  "",
343
+		UserName:                                name,
344
+		UserTitleName:                           userTitle,
345
+		UserTitle:                               int8(user_title),
346
+		UserType:                                int8(user_type),
347
+		Status:                                  1,
348
+		CreateTime:                              now,
349
+		ModifyTime:                              now,
350
+		RoleIds:                                 roleIds,
351
+		IsSort:                                  1,
352
+		Department:                              deapartment_name,
353
+		DepartmentId:                            department_id,
354
+		Sex:                                     sex,
355
+		Age:                                     age,
356
+		Nation:                                  nation,
357
+		CardType:                                card_type,
358
+		IdCard:                                  idCard,
359
+		Education:                               education,
360
+		StudyMajorName:                          studyMajorName,
361
+		WorkMajorName:                           workMajorName,
362
+		RoleType:                                roletype,
363
+		MedicalCode:                             medicalCode,
364
+		DoctorCode:                              doctorcode,
365
+		Licensing:                               licensing,
366
+		JobNumber:                               jobnumber,
367
+		PharmacistRegistrationNumber:            pharmacistRegistrationNumber,
368
+		IdentificationOutpatients:               identificationOutpatients,
369
+		StartTime:                               startime,
370
+		MedicalRangeCode:                        medicalRangeCode,
371
+		MedicalLevel:                            medicalLevel,
372
+		MedicalTypeJob:                          medicalTypeJob,
373
+		DoctorNumber:                            doctorNumber,
374
+		OutpatientIllnesscategory:               outpatientIllnessCategory,
375
+		IsActive:                                isActive,
376
+		ActiveStatus:                            activeStatus,
377
+		PrescriptionQualificationIdentification: prescriptionQualificationIdentification,
378
+		DoctorRangeCode:                         doctorRangeCode,
379
+		DoctorTypeJob:                           doctorTypeJob,
380
+		DoctorLevel:                             doctorLevel,
381
+	}
382
+	if createApp_RoleErr := tx.Create(&app_role).Error; createApp_RoleErr != nil {
383
+		tx.Rollback()
384
+		return nil, "", createApp_RoleErr
385
+	}
386
+
387
+	tx.Commit()
388
+	return &adminUser, password, nil
389
+}
390
+
313 391
 func CreateGeneralAdminUser(orgID int64, appID int64, mobile string, name string, userTitle string, roleIds string, user_type int, user_title int, department_id int64, deapartment_name string) (*models.AdminUser, string, error) {
314 392
 	now := time.Now().Unix()
315 393
 	tx := writeUserDb.Begin()

+ 44 - 35
service/stock_service.go Ver arquivo

@@ -204,40 +204,43 @@ func AddSigleGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
204 204
 func ModifyGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
205 205
 
206 206
 	err := writeDb.Model(&models.GoodInfo{}).Where("id = ? AND status = 1", goodInfo.ID).Updates(map[string]interface{}{
207
-		"good_type_id":               goodInfo.GoodTypeId,
208
-		"modifier":                   goodInfo.Modifier,
209
-		"mtime":                      time.Now().Unix(),
210
-		"remark":                     goodInfo.Remark,
211
-		"specification_name":         goodInfo.SpecificationName,
212
-		"good_unit":                  goodInfo.GoodUnit,
213
-		"buy_price":                  goodInfo.BuyPrice,
214
-		"sell_price":                 goodInfo.SellPrice,
215
-		"manufacturer":               goodInfo.Manufacturer,
216
-		"dealer":                     goodInfo.Dealer,
217
-		"expiry_date_warn_day_count": goodInfo.ExpiryDateWarnDayCount,
218
-		"stock_warn_count":           goodInfo.StockWarnCount,
219
-		"is_reuse":                   goodInfo.IsReuse,
220
-		"good_name":                  goodInfo.GoodName,
221
-		"pinyin":                     goodInfo.Pinyin,
222
-		"wubi":                       goodInfo.Wubi,
223
-		"good_kind":                  goodInfo.GoodKind,
224
-		"medical_insurance_level":    goodInfo.MedicalInsuranceLevel,
225
-		"retail_price":               goodInfo.RetailPrice,
226
-		"medical_insurance_number":   goodInfo.MedicalInsuranceNumber,
227
-		"is_special_diseases":        goodInfo.IsSpecialDiseases,
228
-		"is_record":                  goodInfo.IsRecord,
229
-		"statistics_category":        goodInfo.StatisticsCategory,
230
-		"good_status":                goodInfo.GoodStatus,
231
-		"default_count":              goodInfo.DefaultCount,
232
-		"sign":                       goodInfo.Sign,
233
-		"is_default":                 goodInfo.IsDefault,
234
-		"is_charge_use":              goodInfo.IsChargeUse,
235
-		"is_charge_predict":          goodInfo.IsChargePredict,
236
-		"is_statistics_work":         goodInfo.IsStatisticsWork,
237
-		"sort":                       goodInfo.Sort,
238
-		"is_doctor_use":              goodInfo.IsDoctorUse,
239
-		"agent":                      goodInfo.Agent,
240
-		"good_number":                goodInfo.GoodNumber,
207
+		"good_type_id":                   goodInfo.GoodTypeId,
208
+		"modifier":                       goodInfo.Modifier,
209
+		"mtime":                          time.Now().Unix(),
210
+		"remark":                         goodInfo.Remark,
211
+		"specification_name":             goodInfo.SpecificationName,
212
+		"good_unit":                      goodInfo.GoodUnit,
213
+		"buy_price":                      goodInfo.BuyPrice,
214
+		"sell_price":                     goodInfo.SellPrice,
215
+		"manufacturer":                   goodInfo.Manufacturer,
216
+		"dealer":                         goodInfo.Dealer,
217
+		"expiry_date_warn_day_count":     goodInfo.ExpiryDateWarnDayCount,
218
+		"stock_warn_count":               goodInfo.StockWarnCount,
219
+		"is_reuse":                       goodInfo.IsReuse,
220
+		"good_name":                      goodInfo.GoodName,
221
+		"pinyin":                         goodInfo.Pinyin,
222
+		"wubi":                           goodInfo.Wubi,
223
+		"good_kind":                      goodInfo.GoodKind,
224
+		"medical_insurance_level":        goodInfo.MedicalInsuranceLevel,
225
+		"retail_price":                   goodInfo.RetailPrice,
226
+		"medical_insurance_number":       goodInfo.MedicalInsuranceNumber,
227
+		"is_special_diseases":            goodInfo.IsSpecialDiseases,
228
+		"is_record":                      goodInfo.IsRecord,
229
+		"statistics_category":            goodInfo.StatisticsCategory,
230
+		"good_status":                    goodInfo.GoodStatus,
231
+		"default_count":                  goodInfo.DefaultCount,
232
+		"sign":                           goodInfo.Sign,
233
+		"is_default":                     goodInfo.IsDefault,
234
+		"is_charge_use":                  goodInfo.IsChargeUse,
235
+		"is_charge_predict":              goodInfo.IsChargePredict,
236
+		"is_statistics_work":             goodInfo.IsStatisticsWork,
237
+		"sort":                           goodInfo.Sort,
238
+		"is_doctor_use":                  goodInfo.IsDoctorUse,
239
+		"agent":                          goodInfo.Agent,
240
+		"good_number":                    goodInfo.GoodNumber,
241
+		"social_security_directory_code": goodInfo.SocialSecurityDirectoryCode,
242
+		"special_medical":                goodInfo.SpecialMedical,
243
+		"production_type":                goodInfo.ProductionType,
241 244
 	}).Error
242 245
 
243 246
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})
@@ -250,7 +253,7 @@ func ModifyGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
250 253
 
251 254
 }
252 255
 
253
-func FindGoodInfoList(orgId int64, page int64, limit int64, keyword string, is_use int64, is_charge int64, good_kind int64) (list []*models.GoodInfo, total int64, err error) {
256
+func FindGoodInfoList(orgId int64, page int64, limit int64, keyword string, is_use int64, is_charge int64, good_kind int64, is_mark int64, manufacturer int64) (list []*models.GoodInfo, total int64, err error) {
254 257
 	offset := (page - 1) * limit
255 258
 	db := readDb.Model(&models.GoodInfo{})
256 259
 	db = db.Where("org_id = ? AND status = 1", orgId)
@@ -277,6 +280,12 @@ func FindGoodInfoList(orgId int64, page int64, limit int64, keyword string, is_u
277 280
 			db = db.Where(" good_kind = ?", good_kind)
278 281
 		}
279 282
 
283
+		if is_mark > 0 {
284
+			db = db.Where("is_mark = ?", is_mark)
285
+		}
286
+		if manufacturer > 0 {
287
+			db = db.Where("manufacturer = ?", manufacturer)
288
+		}
280 289
 	}
281 290
 
282 291
 	err = db.Count(&total).Offset(offset).Limit(limit).Order("ctime desc").Find(&list).Error