浏览代码

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

csx 3 年前
父节点
当前提交
75758dd0de
共有 1 个文件被更改,包括 25 次插入2 次删除
  1. 25 2
      controllers/sz/sz_his_api_controller.go

+ 25 - 2
controllers/sz/sz_his_api_controller.go 查看文件

2312
 							}
2312
 							}
2313
 							customs = append(customs, cus)
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
 							cus := &models.CustomDetail{
2326
 							cus := &models.CustomDetail{
2317
 								PrescriptionNumber: chrg_bchno,
2327
 								PrescriptionNumber: chrg_bchno,
2318
 								OrderType:          "1",
2328
 								OrderType:          "1",
2333
 						}
2343
 						}
2334
 
2344
 
2335
 					}
2345
 					}
2346
+
2336
 				}
2347
 				}
2337
 			}
2348
 			}
2338
 			//
2349
 			//
3113
 						}
3124
 						}
3114
 						customs = append(customs, cus)
3125
 						customs = append(customs, cus)
3115
 
3126
 
3116
-					} 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 {
3117
 						cus := &models.CustomDetail{
3139
 						cus := &models.CustomDetail{
3118
 							PrescriptionNumber: chrg_bchno,
3140
 							PrescriptionNumber: chrg_bchno,
3119
 							OrderType:          "1",
3141
 							OrderType:          "1",
3134
 					}
3156
 					}
3135
 
3157
 
3136
 				}
3158
 				}
3159
+
3137
 			}
3160
 			}
3138
 		}
3161
 		}
3139
 		//
3162
 		//