Browse Source

库存流水展示

XMLWAN 2 years ago
parent
commit
e9878eda84

+ 3 - 2
controllers/dialysis_api_controller.go View File

@@ -582,7 +582,7 @@ func (c *DialysisApiController) PostPrescription() {
582 582
 			if filedConfig.ID > 0 {
583 583
 				str = dialyzerPerfusionApparatus
584 584
 			} else {
585
-				str = dialysis_dialyszers + "/" + dialysis_irrigation + "/" + dialysis_strainer
585
+				str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
586 586
 			}
587 587
 			service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
588 588
 		}
@@ -858,7 +858,8 @@ func (c *DialysisApiController) PostSoulution() {
858 858
 		if filedConfig.ID > 0 {
859 859
 			str = dialyzerPerfusionApparatus
860 860
 		} else {
861
-			str = dialysis_dialyszers + "/" + dialysis_irrigation + "/" + dialysis_strainer
861
+			str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
862
+
862 863
 		}
863 864
 		service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
864 865
 	}

+ 1 - 1
controllers/his_api_controller.go View File

@@ -2389,7 +2389,7 @@ func (c *HisApiController) CreateHisPrescription() {
2389 2389
 						//如果历史数和当前数据不想等才进行退库出库
2390 2390
 						if out_count != parseIntCount {
2391 2391
 							service.ConsumablePrescriptionDelivery(adminInfo.CurrentOrgId, item.PatientId, item.RecordDate, &dialyPrepareOne, &lastOut, creater, parseIntCount)
2392
-							fmt.Println("9999999----------------------------------------")
2392
+
2393 2393
 							service.UpdateAutomaticReduce(item.PatientId, item.RecordDate, item.ProjectId, item.ID)
2394 2394
 							detail := models.AutomaticReduceDetail{
2395 2395
 								WarehouseOutId:          0,

+ 3 - 2
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -1490,7 +1490,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1490 1490
 		if filedConfig.ID > 0 {
1491 1491
 			str = dialyzerPerfusionApparatus
1492 1492
 		} else {
1493
-			str = dialysis_dialyszers + "/" + dialysis_irrigation + "/" + dialysis_strainer
1493
+			str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
1494 1494
 		}
1495 1495
 		service.ModifyScheduleMode(mode_id, id, recordDate.Unix(), adminUserInfo.Org.Id, str)
1496 1496
 	}
@@ -3031,7 +3031,7 @@ func (c *DialysisAPIController) PostSolution() {
3031 3031
 		if filedConfig.ID > 0 {
3032 3032
 			str = dialyzerPerfusionApparatus
3033 3033
 		} else {
3034
-			str = dialysis_dialyszers + "/" + dialysis_irrigation + "/" + dialysis_strainer
3034
+			str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
3035 3035
 		}
3036 3036
 		service.ModifyScheduleMode(mode_id, patient.ID, recordDate.Unix(), adminUserInfo.Org.Id, str)
3037 3037
 	}
@@ -4573,6 +4573,7 @@ func (c *DialysisAPIController) CreateRemindDoctorAdvice() {
4573 4573
 	}
4574 4574
 
4575 4575
 	if len(advices) > 0 {
4576
+
4576 4577
 		list, err := service.CreateMGroupAdvice(adminUserInfo.Org.Id, advices, groupNo)
4577 4578
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(RecordDate, 10) + ":doctor_advices"
4578 4579
 		redis := service.RedisClient()

+ 13 - 3
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -3640,7 +3640,6 @@ func (c *PatientApiController) CreateGroupAdvice() {
3640 3640
 			return
3641 3641
 		}
3642 3642
 		advice_date, _ := dataBody["advice_date"].(string)
3643
-		fmt.Println("advice_date----------------------------------", advice_date)
3644 3643
 
3645 3644
 		var advicedateunix int64
3646 3645
 		if len(advice_date) > 0 {
@@ -3674,12 +3673,16 @@ func (c *PatientApiController) CreateGroupAdvice() {
3674 3673
 			return
3675 3674
 		}
3676 3675
 		startTime, _ := dataBody["start_time"].(string)
3676
+
3677 3677
 		if len(startTime) == 0 {
3678 3678
 			utils.ErrorLog("len(start_time) == 0")
3679 3679
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3680 3680
 			return
3681 3681
 		}
3682 3682
 		theTime, err = time.ParseInLocation(timeLayout+" 15:04:05", startTime, loc)
3683
+
3684
+		theTimeOne, _ := time.ParseInLocation("2006-01-02 15:04:05", startTime2+" 00:00:00", loc)
3685
+
3683 3686
 		if err != nil {
3684 3687
 			utils.ErrorLog(err.Error())
3685 3688
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -3707,8 +3710,15 @@ func (c *PatientApiController) CreateGroupAdvice() {
3707 3710
 			advice.Remark = Remark
3708 3711
 			advice.AdviceType = adviceType
3709 3712
 			advice.StartTime = StartTime
3710
-			advice.AdviceDate = AdviceDate
3711
-			advice.RecordDate = RecordDate
3713
+			if adminUserInfo.Org.Id == 10340 {
3714
+				advice.AdviceDate = AdviceDate
3715
+				advice.RecordDate = RecordDate
3716
+			}
3717
+			if adminUserInfo.Org.Id != 10340 {
3718
+				advice.AdviceDate = theTimeOne.Unix()
3719
+				advice.RecordDate = theTimeOne.Unix()
3720
+			}
3721
+
3712 3722
 			advice.Status = 1
3713 3723
 			advice.CreatedTime = time.Now().Unix()
3714 3724
 			advice.UpdatedTime = time.Now().Unix()

+ 15 - 0
controllers/patient_api_controller.go View File

@@ -1470,6 +1470,7 @@ func (c *PatientApiController) CreateGroupAdvice() {
1470 1470
 					child.PatientId = patientInfo.ID
1471 1471
 					child.AdviceDoctor = adminUserInfo.AdminUser.Id
1472 1472
 					child.IsSettle = 2
1473
+
1473 1474
 					if childMap["advice_name"] == nil || reflect.TypeOf(childMap["advice_name"]).String() != "string" {
1474 1475
 						utils.ErrorLog("child advice_name")
1475 1476
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -1535,6 +1536,20 @@ func (c *PatientApiController) CreateGroupAdvice() {
1535 1536
 
1536 1537
 					child.DeliveryWay = advice.DeliveryWay
1537 1538
 					child.ExecutionFrequency = advice.ExecutionFrequency
1539
+
1540
+					if adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10340 || adminUserInfo.CurrentOrgId == 9671 {
1541
+						if child.PrescribingNumber == 0 {
1542
+							child.PrescribingNumber = 1
1543
+						}
1544
+						//查询该患者今日有没有双人核对
1545
+						check, _ := service.MobileGetDoubleCheckSix(adminUserInfo.CurrentOrgId, patientInfo.ID, child.AdviceDate)
1546
+
1547
+						if check.ID > 0 {
1548
+							child.Checker = check.Modifier
1549
+							child.CheckState = 1
1550
+							child.CheckTime = time.Now().Unix()
1551
+						}
1552
+					}
1538 1553
 					advice.Children = append(advice.Children, &child)
1539 1554
 				}
1540 1555
 			}

+ 1 - 1
routers/router.go View File

@@ -11,7 +11,7 @@ import (
11 11
 func init() {
12 12
 	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
13 13
 		//AllowAllOrigins:  true,
14
-		AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://localhost:9529", "http://localhost:9531", "http://xt.test.shengws.com", "http://new_mobile.test.sgjyun.com", "https://xt.test.shengws.com", "http://xt.test.sgjyun.com", "https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com", "https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com", "http://mobile.sgjyun.com", "http://mobile.kuyicloud.com"},
14
+		AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://localhost:9529", "http://localhost:9531", "http://xt.test.shengws.com", "http://new_mobile.test.sgjyun.com", "https://api.xt.test.sgjyun.com", "https://xt.test.shengws.com", "http://xt.test.sgjyun.com", "https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com", "https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com", "http://mobile.sgjyun.com", "http://mobile.kuyicloud.com"},
15 15
 		//AllowOrigins:     []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://xt.test.shengws.com","https://xt.test.shengws.com", "http://xt.test.sgjyun.com","https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com","https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com","http://mobile.sgjyun.com","http://mobile.kuyicloud.com"},
16 16
 		AllowMethods:     []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
17 17
 		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission", "KyToken"},