28169 před 2 měsíci
rodič
revize
4a20715214

+ 14 - 13
controllers/patient_dataconfig_api_controller.go Zobrazit soubor

@@ -1,10 +1,6 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
-	"XT_New/enums"
5
-	"XT_New/models"
6
-	"XT_New/service"
7
-	"XT_New/utils"
8 4
 	"encoding/json"
9 5
 	"fmt"
10 6
 	"reflect"
@@ -12,6 +8,11 @@ import (
12 8
 	"strings"
13 9
 	"time"
14 10
 
11
+	"XT_New/enums"
12
+	"XT_New/models"
13
+	"XT_New/service"
14
+	"XT_New/utils"
15
+
15 16
 	"github.com/astaxie/beego"
16 17
 )
17 18
 
@@ -1049,15 +1050,15 @@ func (this *PatientDataConfigAPIController) ModifyCourse() {
1049 1050
 	checkDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", record_time_str)
1050 1051
 
1051 1052
 	adminUserInfo := this.GetAdminUserInfo()
1052
-	patient, getPatientErr := service.GetPatientByID(adminUserInfo.CurrentOrgId, patientID)
1053
-	if getPatientErr != nil {
1054
-		this.ErrorLog("获取患者信息失败:%v", getPatientErr)
1055
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1056
-		return
1057
-	} else if patient == nil {
1058
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
1059
-		return
1060
-	}
1053
+	//patient, getPatientErr := service.GetPatientByID(adminUserInfo.CurrentOrgId, patientID)
1054
+	//if getPatientErr != nil {
1055
+	//	this.ErrorLog("获取患者信息失败:%v", getPatientErr)
1056
+	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
1057
+	//	return
1058
+	//} else if patient == nil {
1059
+	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
1060
+	//	return
1061
+	//}
1061 1062
 
1062 1063
 	now := time.Now().Unix()
1063 1064
 

+ 23 - 22
models/new_stock_models.go Zobrazit soubor

@@ -265,28 +265,28 @@ func (VmNewStockFlowTwenty) TableName() string {
265 265
 }
266 266
 
267 267
 type GoodInfoTwenty struct {
268
-	ID                int64                `gorm:"column:id" json:"id" form:"id"`
269
-	SpecificationName string               `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
270
-	GoodTypeId        int64                `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
271
-	BuyPrice          float64              `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
272
-	Manufacturer      int64                `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
273
-	Dealer            int64                `gorm:"column:dealer" json:"dealer" form:"dealer"`
274
-	Status            int64                `gorm:"column:status" json:"status" form:"status"`
275
-	OrgId             int64                `gorm:"column:org_id" json:"org_id" form:"org_id"`
276
-	GoodName          string               `gorm:"column:good_name" json:"good_name" form:"good_name"`
277
-	RetailPrice       float64              `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
278
-	PackingUnit       string               `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
279
-	PackingPrice      float64              `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
280
-	GoodNumber        string               `gorm:"column:good_number" json:"good_number" form:"good_number"`
281
-	StWarehousingInfo []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
282
-
283
-	WarehousingInfoOne     []*StartWarehousingInfo `gorm:"json:"warehouse_info"` //期间增加
284
-	WarehousingInfoStart   []*StartWarehousingInfo `gorm:"json:"warehouse_info_start"`
285
-	WarehousingInfoEnd     []*StartWarehousingInfo `gorm:"json:"warehouse_info_end"`
286
-	WarehouseOutInfoEnd    []*VmStockFlowTwenty
287
-	WarehouseOutInfoStart  []*VmStockFlowTwenty
288
-	WarehouseInfoEnd       []*VmStockFlowTwenty //期末入库量
289
-	StartFlowWarehouseInfo []*VmStockFlowTwenty //本期增加
268
+	ID                          int64                   `gorm:"column:id" json:"id" form:"id"`
269
+	SpecificationName           string                  `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
270
+	GoodTypeId                  int64                   `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
271
+	BuyPrice                    float64                 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
272
+	Manufacturer                int64                   `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
273
+	Dealer                      int64                   `gorm:"column:dealer" json:"dealer" form:"dealer"`
274
+	Status                      int64                   `gorm:"column:status" json:"status" form:"status"`
275
+	OrgId                       int64                   `gorm:"column:org_id" json:"org_id" form:"org_id"`
276
+	GoodName                    string                  `gorm:"column:good_name" json:"good_name" form:"good_name"`
277
+	RetailPrice                 float64                 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
278
+	PackingUnit                 string                  `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
279
+	PackingPrice                float64                 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
280
+	GoodNumber                  string                  `gorm:"column:good_number" json:"good_number" form:"good_number"`
281
+	SocialSecurityDirectoryCode string                  `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
282
+	StWarehousingInfo           []*StWarehousingInfo    `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
283
+	WarehousingInfoOne          []*StartWarehousingInfo `gorm:"json:"warehouse_info"` //期间增加
284
+	WarehousingInfoStart        []*StartWarehousingInfo `gorm:"json:"warehouse_info_start"`
285
+	WarehousingInfoEnd          []*StartWarehousingInfo `gorm:"json:"warehouse_info_end"`
286
+	WarehouseOutInfoEnd         []*VmStockFlowTwenty
287
+	WarehouseOutInfoStart       []*VmStockFlowTwenty
288
+	WarehouseInfoEnd            []*VmStockFlowTwenty //期末入库量
289
+	StartFlowWarehouseInfo      []*VmStockFlowTwenty //本期增加
290 290
 
291 291
 	StWarehousingInfoTwo  []*StWarehousingInfoOne  `gorm:"json:"new_warehouse_info_start"` //期间增加
292 292
 	WarehouseOutInfoTenty []*WarehouseOutInfoTenty `gorm:"json:"new_warehouse_out_info"`   //减少
@@ -416,6 +416,7 @@ type VmBaseDrugTwenty struct {
416 416
 	Ctime                            int64             `gorm:"column:ctime" json:"ctime" form:"ctime"`
417 417
 	Mtime                            int64             `gorm:"column:mtime" json:"mtime" form:"mtime"`
418 418
 	OrgId                            int64             `gorm:"column:org_id" json:"org_id" form:"org_id"`
419
+	MedicalInsuranceNumber           string            `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
419 420
 	DrugFlowWarehouseInfo            []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_flow_info"`
420 421
 	DrugActFlowWarehouseInfo         []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_act_flow_info"`
421 422
 	DrugWarehouseInfoStart           []*DrugFlowTwenty //期初入库结余

+ 1 - 1
service/mobile_dialysis_service.go Zobrazit soubor

@@ -2384,7 +2384,7 @@ func MobileGetDialysisSolutionByModeId(orgID int64, patientID int64, mode_id int
2384 2384
 	// cur_date := time.Now().Format("2006-01-02")
2385 2385
 	key := strconv.FormatInt(orgID, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_solution"
2386 2386
 	dialysis_solution_str, _ := redis.Get(key).Result()
2387
-
2387
+	redis.Set(key, "", time.Second*60)
2388 2388
 	if len(dialysis_solution_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
2389 2389
 		err := readDb.Model(&models.DialysisSolution{}).Where("patient_id = ? and user_org_id = ? and status = 1 AND mode_id = ? and solution_status=1", patientID, orgID, mode_id).Last(&record).Error
2390 2390
 		if err != nil {

+ 1 - 0
service/patient_dataconfig_service.go Zobrazit soubor

@@ -9,6 +9,7 @@ import (
9 9
 )
10 10
 
11 11
 func GetPatientByID(orgID int64, patientID int64) (*models.Patients, error) {
12
+
12 13
 	var patient models.Patients
13 14
 	err := readDb.Model(&models.Patients{}).Where("id = ? and user_org_id=? and status=1 and lapseto = 1", patientID, orgID).First(&patient).Error
14 15
 	if err != nil {