Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
c263208637
2 changed files with 10 additions and 3 deletions
  1. 8 1
      controllers/zh/zh_his_api_controller.go
  2. 2 2
      service/zh_his_service.go

+ 8 - 1
controllers/zh/zh_his_api_controller.go View File

@@ -1769,12 +1769,19 @@ func (c *ZHHisApiController) ZHRefundDetail() {
1769 1769
 	recordDateTime := theTime.Unix()
1770 1770
 	adminUser := c.GetAdminUserInfo()
1771 1771
 
1772
+	theTimeTwo, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 23:59:59", loc)
1773
+	if err != nil {
1774
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1775
+		return
1776
+	}
1777
+	recordDateTimeTwo := theTimeTwo.Unix()
1778
+
1772 1779
 	//var prescriptions []*models.HisPrescription
1773 1780
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1774 1781
 	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
1775 1782
 
1776 1783
 	if settle_accounts_type == 1 { //日结
1777
-		infos, _ := service.GetZHHisUploadOrderInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
1784
+		infos, _ := service.GetZHHisUploadOrderInfo(adminUser.CurrentOrgId, patient_id, recordDateTime, recordDateTimeTwo)
1778 1785
 		record, _ := service.GetInHospitalRecord(his_patient_id)
1779 1786
 		var isSuccess bool = true
1780 1787
 

+ 2 - 2
service/zh_his_service.go View File

@@ -970,9 +970,9 @@ func GetZHMonthHisUploadPrescription(org_id int64, patient_id int64, start_time
970 970
 	return
971 971
 }
972 972
 
973
-func GetZHHisUploadOrderInfo(org_id int64, patient_id int64, record_date int64) (infos []*models.HisOrderInfo, err error) {
973
+func GetZHHisUploadOrderInfo(org_id int64, patient_id int64, record_date int64, record_end_date int64) (infos []*models.HisOrderInfo, err error) {
974 974
 	err = readDb.Model(&models.HisOrderInfo{}).
975
-		Where("user_org_id = ? AND status = 1 AND upload_date <= ? AND upload_date >= ? AND patient_id = ? ", org_id, record_date, record_date, patient_id).
975
+		Where("user_org_id = ? AND status = 1 AND upload_date <= ? AND upload_date >= ? AND patient_id = ? ", org_id, record_end_date, record_date, patient_id).
976 976
 		Find(&infos).Error
977 977
 	return
978 978
 }