|
@@ -2312,7 +2312,17 @@ func (c *SZHisApiController) GetSettleInfo() {
|
2312
|
2312
|
}
|
2313
|
2313
|
customs = append(customs, cus)
|
2314
|
2314
|
|
2315
|
|
- } else if subItem.Type == 3 {
|
|
2315
|
+ }
|
|
2316
|
+
|
|
2317
|
+ }
|
|
2318
|
+ if len(subItem.GoodInfo.MedicalInsuranceNumber) > 0 {
|
|
2319
|
+
|
|
2320
|
+ detItemFeeSumamt, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", subItem.Price*float64(subItem.Count)), 64)
|
|
2321
|
+ //count, _ := strconv.ParseFloat(fmt.Sprintf("%f", subItem.Count), 64)
|
|
2322
|
+ count, _ := strconv.ParseFloat(strconv.FormatInt(subItem.Count, 10), 64)
|
|
2323
|
+ temp := strings.Split(subItem.FeedetlSn, "-")
|
|
2324
|
+ newFl := fmt.Sprintf("%07v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000000)) + "-" + temp[1] + "-" + temp[2]
|
|
2325
|
+ if subItem.Type == 3 {
|
2316
|
2326
|
cus := &models.CustomDetail{
|
2317
|
2327
|
PrescriptionNumber: chrg_bchno,
|
2318
|
2328
|
OrderType: "1",
|
|
@@ -2333,6 +2343,7 @@ func (c *SZHisApiController) GetSettleInfo() {
|
2333
|
2343
|
}
|
2334
|
2344
|
|
2335
|
2345
|
}
|
|
2346
|
+
|
2336
|
2347
|
}
|
2337
|
2348
|
}
|
2338
|
2349
|
//
|
|
@@ -2619,7 +2630,7 @@ func (c *SZHisApiController) GetSettleInfo() {
|
2619
|
2630
|
}
|
2620
|
2631
|
|
2621
|
2632
|
} else {
|
2622
|
|
- if tempOrder.OrderStatus == 4 {
|
|
2633
|
+ if tempOrder.OrderStatus == 1 && tempOrder.IsPre == 1 {
|
2623
|
2634
|
pay_way, _ := c.GetInt64("pay_way")
|
2624
|
2635
|
pay_price, _ := c.GetFloat("pay_price")
|
2625
|
2636
|
pay_card_no := c.GetString("pay_card_no")
|
|
@@ -2779,6 +2790,11 @@ func (c *SZHisApiController) GetSettleInfo() {
|
2779
|
2790
|
return
|
2780
|
2791
|
}
|
2781
|
2792
|
|
|
2793
|
+ } else {
|
|
2794
|
+
|
|
2795
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisOrderNoExistParamWrong)
|
|
2796
|
+ return
|
|
2797
|
+
|
2782
|
2798
|
}
|
2783
|
2799
|
|
2784
|
2800
|
}
|
|
@@ -3108,7 +3124,18 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3108
|
3124
|
}
|
3109
|
3125
|
customs = append(customs, cus)
|
3110
|
3126
|
|
3111
|
|
- } else if subItem.Type == 3 {
|
|
3127
|
+ }
|
|
3128
|
+
|
|
3129
|
+ }
|
|
3130
|
+
|
|
3131
|
+ if len(subItem.GoodInfo.MedicalInsuranceNumber) > 0 {
|
|
3132
|
+
|
|
3133
|
+ detItemFeeSumamt, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", subItem.Price*float64(subItem.Count)), 64)
|
|
3134
|
+ //count, _ := strconv.ParseFloat(fmt.Sprintf("%f", subItem.Count), 64)
|
|
3135
|
+ count, _ := strconv.ParseFloat(strconv.FormatInt(subItem.Count, 10), 64)
|
|
3136
|
+ temp := strings.Split(subItem.FeedetlSn, "-")
|
|
3137
|
+ newFl := fmt.Sprintf("%07v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000000)) + "-" + temp[1] + "-" + temp[2]
|
|
3138
|
+ if subItem.Type == 3 {
|
3112
|
3139
|
cus := &models.CustomDetail{
|
3113
|
3140
|
PrescriptionNumber: chrg_bchno,
|
3114
|
3141
|
OrderType: "1",
|
|
@@ -3129,6 +3156,7 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3129
|
3156
|
}
|
3130
|
3157
|
|
3131
|
3158
|
}
|
|
3159
|
+
|
3132
|
3160
|
}
|
3133
|
3161
|
}
|
3134
|
3162
|
//
|
|
@@ -3227,7 +3255,7 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3227
|
3255
|
SettleAccountsDate: recordDateTime,
|
3228
|
3256
|
Ctime: time.Now().Unix(),
|
3229
|
3257
|
Mtime: time.Now().Unix(),
|
3230
|
|
- Status: 1,
|
|
3258
|
+ Status: 0,
|
3231
|
3259
|
Number: chrg_bchno,
|
3232
|
3260
|
Infcode: 0,
|
3233
|
3261
|
WarnMsg: "",
|
|
@@ -3235,7 +3263,7 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3235
|
3263
|
ErrMsg: "",
|
3236
|
3264
|
RespondTime: "",
|
3237
|
3265
|
InfRefmsgid: "",
|
3238
|
|
- OrderStatus: 4,
|
|
3266
|
+ OrderStatus: 1,
|
3239
|
3267
|
IsMedicineInsurance: 1,
|
3240
|
3268
|
SettleType: settle_accounts_type,
|
3241
|
3269
|
SettleStartTime: start_time,
|
|
@@ -3344,7 +3372,7 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3344
|
3372
|
}
|
3345
|
3373
|
|
3346
|
3374
|
if res.Transreturncode == "00000000" {
|
3347
|
|
- order.OrderStatus = 4
|
|
3375
|
+ order.OrderStatus = 1
|
3348
|
3376
|
order.Status = 1
|
3349
|
3377
|
order.PsnNo = health_card_no
|
3350
|
3378
|
order.Modify = admin_user_id
|
|
@@ -3366,6 +3394,7 @@ func (c *SZHisApiController) GetPreSettleInfo() {
|
3366
|
3394
|
detailStrThree := string(setlDetailThree)
|
3367
|
3395
|
order.SzMedicineInsuranceInfo = detailStrThree
|
3368
|
3396
|
order.Cainfo = result_three
|
|
3397
|
+ order.IsPre = 1
|
3369
|
3398
|
//err = service.UpdataOrderStatusTwo(order.Number, adminUser.CurrentOrgId)
|
3370
|
3399
|
err = service.UpDateOrderTwo(order)
|
3371
|
3400
|
c.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -4765,7 +4794,7 @@ func (c *SZHisApiController) GetDrugList() {
|
4765
|
4794
|
recordDate := time.Unix(item.RecordDate, 0).Format(timeLayout)
|
4766
|
4795
|
|
4767
|
4796
|
detail := &models.DrugDetail{
|
4768
|
|
- MedicalInsuranceNumber: item.SocialSecurityDirectoryCode,
|
|
4797
|
+ MedicalInsuranceNumber: item.MedicalInsuranceNumber,
|
4769
|
4798
|
Code: item.Code,
|
4770
|
4799
|
DrugName: item.DrugName,
|
4771
|
4800
|
DrugSpec: item.DrugSpec,
|