Browse Source

历史排班

28169 1 year ago
parent
commit
cfb912adf8

+ 15 - 0
controllers/his_api_controller.go View File

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
 							service.CreateHisProjectTwo(&p)
3094
 							service.CreateHisProjectTwo(&p)
3080
 							//记录日志
3095
 							//记录日志
3081
 							byterequest, _ := json.Marshal(p)
3096
 							byterequest, _ := json.Marshal(p)

+ 11 - 0
controllers/manager_center_api_controller.go View File

37
 	beego.Router("/api/dictionary/updatechildconfig", &ManagerCenterApiController{}, "Post:UpdateChildConfig")
37
 	beego.Router("/api/dictionary/updatechildconfig", &ManagerCenterApiController{}, "Post:UpdateChildConfig")
38
 	beego.Router("/api/dictionary/deletechildconfig", &ManagerCenterApiController{}, "Post:DeleteChildConfig")
38
 	beego.Router("/api/dictionary/deletechildconfig", &ManagerCenterApiController{}, "Post:DeleteChildConfig")
39
 	beego.Router("/api/dictionary/updatetemplate", &ManagerCenterApiController{}, "Post:UpdateTemplate")
39
 	beego.Router("/api/dictionary/updatetemplate", &ManagerCenterApiController{}, "Post:UpdateTemplate")
40
+	beego.Router("/api/dictionary/getmanageconfiglist", &ManagerCenterApiController{}, "get,post:GetManageConfigList")
40
 
41
 
41
 	//经销商
42
 	//经销商
42
 	beego.Router("/api/stock/dealer/create", &ManagerCenterApiController{}, "post:CreateDealer")
43
 	beego.Router("/api/stock/dealer/create", &ManagerCenterApiController{}, "post:CreateDealer")
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
 // CreateConfig  创建配置信息
695
 // CreateConfig  创建配置信息
685
 func (c *ManagerCenterApiController) CreateConfig() {
696
 func (c *ManagerCenterApiController) CreateConfig() {
686
 	adminUserInfo := c.GetAdminUserInfo()
697
 	adminUserInfo := c.GetAdminUserInfo()

+ 3 - 0
controllers/patient_api_controller.go View File

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

+ 1 - 1
service/common_service.go View File

481
 
481
 
482
 func GetCurentOrgPatients(orgid int64) (patients []*models.BloodXtPatients, err error) {
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
 	return patients, err
485
 	return patients, err
486
 }
486
 }
487
 
487
 

+ 1 - 1
service/dialysis_service.go View File

1848
 	if len(keywords) > 0 {
1848
 	if len(keywords) > 0 {
1849
 		db = db.Where("p.name like ?", likeKey)
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
 	return list, total, err
1853
 	return list, total, err
1854
 }
1854
 }

+ 7 - 0
service/his_service.go View File

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
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
 	return
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
 }
1609
 }
1610
 
1610
 
1611
 func GetPatientByKeyWord(orgID int64, keywords string) (patient []*models.Patients, err error) {
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
 	if len(keywords) > 0 {
1614
 	if len(keywords) > 0 {
1615
 		likekey := "%" + keywords + "%"
1615
 		likekey := "%" + keywords + "%"
1616
 		err = db.Where("name LIKE ? OR dialysis_no LIKE ? ", likekey, likekey).Find(&patient).Error
1616
 		err = db.Where("name LIKE ? OR dialysis_no LIKE ? ", likekey, likekey).Find(&patient).Error

+ 14 - 16
service/sign_service.go View File

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