Browse Source

历史排班

28169 1 year ago
parent
commit
cfb912adf8

+ 15 - 0
controllers/his_api_controller.go View File

@@ -3076,6 +3076,21 @@ func (c *HisApiController) CreateHisPrescription() {
3076 3076
 
3077 3077
 							}
3078 3078
 
3079
+							if adminInfo.CurrentOrgId == 9671 || adminInfo.CurrentOrgId == 10265 {
3080
+
3081
+								if p.Type == 3 {
3082
+									//查询该耗材是否停用
3083
+									goodInfoSeven, _ := service.GetGoodByIdIsStop(p.ProjectId, adminInfo.CurrentOrgId)
3084
+									//表示该耗材已经停用,不能保存
3085
+									if goodInfoSeven.ID == 0 {
3086
+										goodInfoOne, _ := service.GetGoodInformationByGoodIdOne(p.ProjectId)
3087
+										c.ServeDynamicFailJsonSend(goodInfoOne.GoodName + "耗材已经停用,保存失败!")
3088
+										return
3089
+									}
3090
+								}
3091
+
3092
+							}
3093
+
3079 3094
 							service.CreateHisProjectTwo(&p)
3080 3095
 							//记录日志
3081 3096
 							byterequest, _ := json.Marshal(p)

+ 11 - 0
controllers/manager_center_api_controller.go View File

@@ -37,6 +37,7 @@ func ManagerCenterRegistRouters() {
37 37
 	beego.Router("/api/dictionary/updatechildconfig", &ManagerCenterApiController{}, "Post:UpdateChildConfig")
38 38
 	beego.Router("/api/dictionary/deletechildconfig", &ManagerCenterApiController{}, "Post:DeleteChildConfig")
39 39
 	beego.Router("/api/dictionary/updatetemplate", &ManagerCenterApiController{}, "Post:UpdateTemplate")
40
+	beego.Router("/api/dictionary/getmanageconfiglist", &ManagerCenterApiController{}, "get,post:GetManageConfigList")
40 41
 
41 42
 	//经销商
42 43
 	beego.Router("/api/stock/dealer/create", &ManagerCenterApiController{}, "post:CreateDealer")
@@ -681,6 +682,16 @@ func (c *ManagerCenterApiController) GetConfigList() {
681 682
 
682 683
 }
683 684
 
685
+func (c *ManagerCenterApiController) GetManageConfigList() {
686
+	adminUserInfo := c.GetAdminUserInfo()
687
+	configList, _ := service.GetConfigList(adminUserInfo.CurrentOrgId)
688
+	fmt.Println("configListwowowowowowowowowowowowo", configList)
689
+	c.ServeSuccessJSON(map[string]interface{}{
690
+		"configlist": configList,
691
+	})
692
+	return
693
+}
694
+
684 695
 // CreateConfig  创建配置信息
685 696
 func (c *ManagerCenterApiController) CreateConfig() {
686 697
 	adminUserInfo := c.GetAdminUserInfo()

+ 3 - 0
controllers/patient_api_controller.go View File

@@ -722,6 +722,7 @@ func (c *PatientApiController) EditLapseto() {
722 722
 	end_time := c.GetString("end_time")
723 723
 	timeLayout := "2006-01-02"
724 724
 	loc, _ := time.LoadLocation("Local")
725
+
725 726
 	var startTime int64
726 727
 	if len(start_time) > 0 {
727 728
 		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
@@ -778,6 +779,7 @@ func (c *PatientApiController) EditLapseto() {
778 779
 		return
779 780
 	}
780 781
 	lapsetoTime, _ := patientBody["lapseto_time"].(string)
782
+
781 783
 	//if len(lapsetoTime) == 0 {
782 784
 	//	utils.ErrorLog("len(lapsetoTime) == 0")
783 785
 	//	c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotSelectLapsetoTime)
@@ -793,6 +795,7 @@ func (c *PatientApiController) EditLapseto() {
793 795
 	//}
794 796
 
795 797
 	lapsetoTimeUnix, err := time.ParseInLocation(timeLayout, lapsetoTime, loc)
798
+
796 799
 	//if err != nil {
797 800
 	//	utils.ErrorLog("lapsetoTimeUnix")
798 801
 	//	c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotSelectLapsetoTime)

+ 1 - 1
service/common_service.go View File

@@ -481,7 +481,7 @@ func GetDialysisAgeData(orgID int64, lapsetotype int64, sourcetype int64) (count
481 481
 
482 482
 func GetCurentOrgPatients(orgid int64) (patients []*models.BloodXtPatients, err error) {
483 483
 
484
-	err = XTReadDB().Where("user_org_id = ? and status =1 and lapseto = 1", orgid).Order("created_time desc").Find(&patients).Error
484
+	err = XTReadDB().Where("user_org_id = ? and status =1", orgid).Order("created_time desc").Find(&patients).Error
485 485
 	return patients, err
486 486
 }
487 487
 

+ 1 - 1
service/dialysis_service.go View File

@@ -1848,7 +1848,7 @@ func GetSchedulePrintList(page int64, limit int64, schedulType int64, partitionT
1848 1848
 	if len(keywords) > 0 {
1849 1849
 		db = db.Where("p.name like ?", likeKey)
1850 1850
 	}
1851
-	err = db.Count(&total).Select("x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.status,p.name").Offset(limit * (page - 1)).Limit(limit).Order("x.schedule_date desc").Find(&list).Error
1851
+	err = db.Count(&total).Select("x.id,x.user_org_id,x.partition_id,x.bed_id,x.patient_id,x.schedule_date,x.schedule_type,x.schedule_week,x.mode_id,x.status,p.name").Offset(limit * (page - 1)).Limit(limit).Order("x.schedule_date desc").Find(&list).Error
1852 1852
 
1853 1853
 	return list, total, err
1854 1854
 }

+ 7 - 0
service/his_service.go View File

@@ -2817,3 +2817,10 @@ func GetChargeHisPatientList(org_id int64, record_date int64) (order []*HisOrder
2817 2817
 	err = readDb.Model(&models.HisOrder{}).Preload("Patients", "status = 1").Where("settle_accounts_date = ? and user_org_id = ? AND status = 1 and order_status = 2", record_date, org_id).Find(&order).Error
2818 2818
 	return
2819 2819
 }
2820
+
2821
+func GetGoodByIdIsStop(good_id int64, org_id int64) (models.GoodInfoSeven, error) {
2822
+
2823
+	goodInfoSeven := models.GoodInfoSeven{}
2824
+	err = XTReadDB().Where("org_id = ? and status = 1 and find_in_set('停用',good_status) = 0 and id =?", org_id, good_id).Find(&goodInfoSeven).Error
2825
+	return goodInfoSeven, err
2826
+}

+ 2 - 2
service/patient_service.go View File

@@ -1609,8 +1609,8 @@ func MobileGetMonitorsWithPatient(orgID int64, keyword string, page int) ([]*mod
1609 1609
 }
1610 1610
 
1611 1611
 func GetPatientByKeyWord(orgID int64, keywords string) (patient []*models.Patients, err error) {
1612
-	db := readDb.Model(&models.Patients{}).Where("user_org_id=? and status=1 and lapseto = 1", orgID)
1613
-	fmt.Println("keywords22222223322332322332322323323", keywords)
1612
+	db := readDb.Model(&models.Patients{}).Where("user_org_id=? and status=1", orgID)
1613
+
1614 1614
 	if len(keywords) > 0 {
1615 1615
 		likekey := "%" + keywords + "%"
1616 1616
 		err = db.Where("name LIKE ? OR dialysis_no LIKE ? ", likekey, likekey).Find(&patient).Error

+ 14 - 16
service/sign_service.go View File

@@ -273,15 +273,13 @@ func CreateUploadPact(contractcode string, contractname string, signcount int64,
273 273
 
274 274
 	maprequest := make(map[string]interface{})
275 275
 
276
-	//maprequest["contractCode"] = "102020620701056856"
277
-
278 276
 	maprequest["contractName"] = "电脑购买交易合同"
279 277
 
280 278
 	maprequest["signCount"] = 10
281 279
 
282 280
 	maprequest["docName"] = "日本员工保密协议"
283 281
 
284
-	file := "C:/Users/28169/Desktop/打印单.pdf"
282
+	file := "C:/Users/28169/Desktop/2.pdf"
285 283
 
286 284
 	fileBytes, err := ioutil.ReadFile(file) // 读取file
287 285
 
@@ -481,7 +479,7 @@ func AddContractSignatory(contractId string, signers string, contract models.New
481 479
 	signFiles := make(map[string]interface{})
482 480
 
483 481
 	//创建合同返回
484
-	signFiles["docId"] = "158027977441935904"
482
+	signFiles["docId"] = "158807311102510183"
485 483
 
486 484
 	inputDataArr := make([]map[string]interface{}, 0)
487 485
 
@@ -491,8 +489,8 @@ func AddContractSignatory(contractId string, signers string, contract models.New
491 489
 		xySignControls["key"] = "1"
492 490
 		xySignControls["type"] = "autograph"
493 491
 		xySignControls["pageNum"] = 1
494
-		xySignControls["positionX"] = "100F"
495
-		xySignControls["positionY"] = "100F"
492
+		xySignControls["positionX"] = "120F"
493
+		xySignControls["positionY"] = "120F"
496 494
 		inputDataArr = append(inputDataArr, xySignControls)
497 495
 
498 496
 	}
@@ -503,7 +501,7 @@ func AddContractSignatory(contractId string, signers string, contract models.New
503 501
 		keywordSignControls["key"] = "2"
504 502
 		keywordSignControls["type"] = "date"
505 503
 		keywordSignControls["pageNum"] = 1
506
-		keywordSignControls["keyword"] = "护士"
504
+		keywordSignControls["keyword"] = "王志文"
507 505
 		keywordSignControls["offsetX"] = "100F"
508 506
 		keywordSignControls["offsetY"] = "100F"
509 507
 		inputDataArrTwo = append(inputDataArrTwo, keywordSignControls)
@@ -528,7 +526,7 @@ func AddContractSignatory(contractId string, signers string, contract models.New
528 526
 	inputDataArrFour = append(inputDataArrFour, signersFiles)
529 527
 
530 528
 	maprequest := make(map[string]interface{})
531
-	maprequest["contractId"] = "158027977441935903"
529
+	maprequest["contractId"] = "158807311102510182"
532 530
 	maprequest["signers"] = inputDataArrFour
533 531
 
534 532
 	byterequest, _ := json.Marshal(maprequest)
@@ -605,21 +603,21 @@ func CreateBackStageSign(contractId string, signers string) string {
605 603
 
606 604
 	fmt.Println("signContorlwqowowo", signControl)
607 605
 	signFiles["signControl"] = signControl
608
-	signFiles["docId"] = "158027977441935904"
606
+	signFiles["docId"] = "158807311102510183"
609 607
 	inputDataArrThree := make([]map[string]interface{}, 0)
610 608
 	inputDataArrThree = append(inputDataArrThree, signFiles)
611 609
 
612 610
 	signer := make(map[string]interface{})
613 611
 
614 612
 	//添加合同签署人接口返回
615
-	signer["signerId"] = "158028978169315875"
613
+	signer["signerId"] = "158807462500107405"
616 614
 	signer["isUserWishes"] = true
617 615
 	signer["userWishesWay"] = 1
618
-	signer["codeNumber"] = "msg202308311013481137884"
619
-	signer["verifyCode"] = "488164"
616
+	signer["codeNumber"] = "msg202309081937527315153"
617
+	signer["verifyCode"] = "252234"
620 618
 	signer["signFiles"] = inputDataArrThree
621 619
 	maprequest := make(map[string]interface{})
622
-	maprequest["contractId"] = "158027977441935903"
620
+	maprequest["contractId"] = "158807311102510182"
623 621
 	maprequest["signer"] = signer
624 622
 
625 623
 	byterequest, _ := json.Marshal(maprequest)
@@ -665,7 +663,7 @@ func GetVerificationCode() string {
665 663
 	serviceCode := beego.AppConfig.String("serviceCode")
666 664
 
667 665
 	maprequest := make(map[string]interface{})
668
-	maprequest["contractId"] = "158027977441935903"
666
+	maprequest["contractId"] = "158807311102510182"
669 667
 	maprequest["userId"] = "PBRLMBFVIRR3BV8JGGOX9C7N"
670 668
 
671 669
 	byterequest, _ := json.Marshal(maprequest)
@@ -1165,7 +1163,7 @@ func GetContractId() string {
1165 1163
 	serviceCode := beego.AppConfig.String("serviceCode")
1166 1164
 
1167 1165
 	maprequest := make(map[string]interface{})
1168
-	maprequest["contractId"] = "158027977441935903"
1166
+	maprequest["contractId"] = "158799561907766048"
1169 1167
 	maprequest["responseContractFile"] = true
1170 1168
 
1171 1169
 	fmt.Println("request23222222222222222", maprequest)
@@ -1261,7 +1259,7 @@ func GetEnterPriseDetail() (string, string) {
1261 1259
 	serviceCode := beego.AppConfig.String("serviceCode")
1262 1260
 
1263 1261
 	maprequest := make(map[string]interface{})
1264
-	maprequest["contractId"] = "158027977441935903"
1262
+	maprequest["contractId"] = "158807311102510182"
1265 1263
 
1266 1264
 	byterequest, _ := json.Marshal(maprequest)
1267 1265
 	reader := bytes.NewReader(byterequest)