|
@@ -13113,19 +13113,28 @@ func (c *HisApiController) Post3202() {
|
13113
|
13113
|
var medfee_sumamt float64
|
13114
|
13114
|
var acct_pay float64
|
13115
|
13115
|
var fund_pay_sumamt float64
|
|
13116
|
+
|
|
13117
|
+ var medfee_sumamt_str string
|
|
13118
|
+ var acct_pay_str string
|
|
13119
|
+ var fund_pay_sumamt_str string
|
13116
|
13120
|
for _, item := range orders {
|
13117
|
|
- medfee_sumamt = medfee_sumamt + item.MedfeeSumamt
|
13118
|
|
- acct_pay = acct_pay + item.AcctPay
|
13119
|
|
- fund_pay_sumamt = fund_pay_sumamt + item.FundPaySumamt
|
|
13121
|
+ medfee_sumamt_str = fmt.Sprintf("%.4f", medfee_sumamt+item.MedfeeSumamt)
|
|
13122
|
+ acct_pay_str = fmt.Sprintf("%.4f", acct_pay+item.AcctPay)
|
|
13123
|
+ fund_pay_sumamt_str = fmt.Sprintf("%.4f", fund_pay_sumamt+item.FundPaySumamt)
|
|
13124
|
+
|
13120
|
13125
|
}
|
13121
|
13126
|
|
13122
|
13127
|
var medfee_sumamt_two float64
|
13123
|
13128
|
var acct_pay_two float64
|
13124
|
13129
|
var fund_pay_sumamt_two float64
|
|
13130
|
+
|
|
13131
|
+ var medfee_sumamt_two_str string
|
|
13132
|
+ var acct_pay_two_str string
|
|
13133
|
+ var fund_pay_sumamt_two_str string
|
13125
|
13134
|
for _, item := range orders_two {
|
13126
|
|
- medfee_sumamt_two = medfee_sumamt_two + item.MedfeeSumamt
|
13127
|
|
- acct_pay_two = acct_pay_two + item.AcctPay
|
13128
|
|
- fund_pay_sumamt_two = fund_pay_sumamt_two + item.FundPaySumamt
|
|
13135
|
+ medfee_sumamt_two_str = fmt.Sprintf("%.4f", medfee_sumamt_two+item.MedfeeSumamt)
|
|
13136
|
+ acct_pay_two_str = fmt.Sprintf("%.4f", acct_pay_two+item.AcctPay)
|
|
13137
|
+ fund_pay_sumamt_two_str = fmt.Sprintf("%.4f", fund_pay_sumamt_two+item.FundPaySumamt)
|
13129
|
13138
|
}
|
13130
|
13139
|
|
13131
|
13140
|
|
|
@@ -13139,9 +13148,13 @@ func (c *HisApiController) Post3202() {
|
13139
|
13148
|
if config.IsOpen == 1 {
|
13140
|
13149
|
var bps []models.BusinessParams
|
13141
|
13150
|
var bp models.BusinessParams
|
13142
|
|
- bp.MedfeeSumamt = medfee_sumamt
|
13143
|
|
- bp.AcctPay = acct_pay
|
13144
|
|
- bp.FundPaySumamt = fund_pay_sumamt
|
|
13151
|
+ ms, _ := strconv.ParseFloat(medfee_sumamt_str, 64)
|
|
13152
|
+ ap, _ := strconv.ParseFloat(acct_pay_str, 64)
|
|
13153
|
+ fp, _ := strconv.ParseFloat(fund_pay_sumamt_str, 64)
|
|
13154
|
+
|
|
13155
|
+ bp.MedfeeSumamt = ms
|
|
13156
|
+ bp.AcctPay = ap
|
|
13157
|
+ bp.FundPaySumamt = fp
|
13145
|
13158
|
bp.Insutype = "390"
|
13146
|
13159
|
bp.StmtBegndate = start_time
|
13147
|
13160
|
bp.ClrType = clr_type
|
|
@@ -13149,10 +13162,14 @@ func (c *HisApiController) Post3202() {
|
13149
|
13162
|
bp.StmtEnddate = end_time
|
13150
|
13163
|
bps = append(bps, bp)
|
13151
|
13164
|
|
|
13165
|
+ mst, _ := strconv.ParseFloat(medfee_sumamt_two_str, 64)
|
|
13166
|
+ apt, _ := strconv.ParseFloat(acct_pay_two_str, 64)
|
|
13167
|
+ fpt, _ := strconv.ParseFloat(fund_pay_sumamt_two_str, 64)
|
|
13168
|
+
|
13152
|
13169
|
var bp2 models.BusinessParams
|
13153
|
|
- bp2.MedfeeSumamt = medfee_sumamt_two
|
13154
|
|
- bp2.AcctPay = acct_pay_two
|
13155
|
|
- bp2.FundPaySumamt = fund_pay_sumamt_two
|
|
13170
|
+ bp2.MedfeeSumamt = mst
|
|
13171
|
+ bp2.AcctPay = apt
|
|
13172
|
+ bp2.FundPaySumamt = fpt
|
13156
|
13173
|
bp2.Insutype = "310"
|
13157
|
13174
|
bp2.StmtBegndate = start_time
|
13158
|
13175
|
bp2.StmtEnddate = end_time
|
|
@@ -13189,8 +13206,6 @@ func (c *HisApiController) Post3202() {
|
13189
|
13206
|
|
13190
|
13207
|
respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
13191
|
13208
|
userJSONBytes, _ := json.Marshal(respJSON)
|
13192
|
|
- fmt.Println("log")
|
13193
|
|
- fmt.Println(string(userJSONBytes))
|
13194
|
13209
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
13195
|
13210
|
utils.ErrorLog("解析失败:%v", err)
|
13196
|
13211
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|