csx 3 vuotta sitten
vanhempi
commit
bfb97808f5
2 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 3 1
      controllers/sg/his_api_controller.go
  2. 5 0
      service/his_service.go

+ 3 - 1
controllers/sg/his_api_controller.go Näytä tiedosto

@@ -2736,10 +2736,12 @@ 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)
2740
+
2739 2741
 	var medfee_sumamt float64
2740 2742
 	var acct_pay float64
2741 2743
 	var fund_pay_sumamt float64
2742
-	fixmedins_setl_cnt := int64(len(orders))
2744
+	fixmedins_setl_cnt := int64(len(orders_two))
2743 2745
 	for _, item := range orders {
2744 2746
 		medfee_sumamt = medfee_sumamt + item.MedfeeSumamt
2745 2747
 		acct_pay = acct_pay + item.AcctPay

+ 5 - 0
service/his_service.go Näytä tiedosto

@@ -862,6 +862,11 @@ func GetOrderByTime(start_time int64, end_time int64, org_id int64, insutype str
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) {
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
+	return
868
+}
869
+
865 870
 func GetOrderByTimeTwo(start_time int64, end_time int64, org_id int64) (orders []*models.HisOrder, err error) {
866 871
 	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 >= ? ", org_id, end_time, start_time).Find(&orders).Error
867 872
 	return