csx 3 anni fa
parent
commit
268d02a57e
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1 1
      controllers/sg/his_api_controller.go
  2. 2 2
      service/his_service.go

+ 1 - 1
controllers/sg/his_api_controller.go Vedi File

@@ -2736,7 +2736,7 @@ func (c *HisApiController) GetCheckAccount() {
2736 2736
 	endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
2737 2737
 	orders, _ := service.GetOrderByTime(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_type)
2738 2738
 
2739
-	orders_two, _ := service.GetOrderByTimeTwo(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_type)
2739
+	orders_two, _ := service.GetOrderByTimeThree(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId, insutype, clr_type)
2740 2740
 
2741 2741
 	var medfee_sumamt float64
2742 2742
 	var acct_pay float64

+ 2 - 2
service/his_service.go Vedi File

@@ -858,11 +858,11 @@ func GetHisOrderInfoByNumber(order_number string) (order []*models.HisOrderInfo,
858 858
 }
859 859
 
860 860
 func GetOrderByTime(start_time int64, end_time int64, org_id int64, insutype string, clr_type string) (orders []*models.HisOrder, err error) {
861
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
861
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
862 862
 	return
863 863
 }
864 864
 
865
-func GetOrderByTimeTwo(start_time int64, end_time int64, org_id int64, insutype string, clr_type string) (orders []*models.HisOrder, err error) {
865
+func GetOrderByTimeThree(start_time int64, end_time int64, org_id int64, insutype string, clr_type string) (orders []*models.HisOrder, err error) {
866 866
 	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1  AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
867 867
 	return
868 868
 }