瀏覽代碼

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

csx 3 年之前
父節點
當前提交
928216d9b8
共有 1 個文件被更改,包括 14 次插入14 次删除
  1. 14 14
      controllers/zh/zh_his_api_controller.go

+ 14 - 14
controllers/zh/zh_his_api_controller.go 查看文件

1086
 
1086
 
1087
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
1087
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
1088
 
1088
 
1089
-	allTotal := fmt.Sprintf("%.2f", order.MedfeeSumamt)
1089
+	allTotal := fmt.Sprintf("%.4f", order.MedfeeSumamt)
1090
 	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
1090
 	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
1091
 
1091
 
1092
 	var rf []*ResultFive
1092
 	var rf []*ResultFive
1406
 						//var randNum int
1406
 						//var randNum int
1407
 						//randNum = rand.Intn(10000) + 1000
1407
 						//randNum = rand.Intn(10000) + 1000
1408
 						cus := &models.NewCustom{
1408
 						cus := &models.NewCustom{
1409
-							DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*subItem.PrescribingNumber),
1410
-							Cut:              fmt.Sprintf("%.2f", subItem.PrescribingNumber),
1409
+							DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*subItem.PrescribingNumber),
1410
+							Cut:              fmt.Sprintf("%.4f", subItem.PrescribingNumber),
1411
 							FeedetlSn:        subItem.FeedetlSn,
1411
 							FeedetlSn:        subItem.FeedetlSn,
1412
-							Price:            fmt.Sprintf("%.2f", subItem.Price),
1412
+							Price:            fmt.Sprintf("%.4f", subItem.Price),
1413
 							MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
1413
 							MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
1414
 							HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
1414
 							HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
1415
 						}
1415
 						}
1427
 						if len(subItem.HisProject.MedicalCode) > 0 {
1427
 						if len(subItem.HisProject.MedicalCode) > 0 {
1428
 							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
1428
 							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
1429
 							cus := &models.NewCustom{
1429
 							cus := &models.NewCustom{
1430
-								DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*cnt),
1431
-								Cut:              fmt.Sprintf("%.2f", cnt),
1430
+								DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*cnt),
1431
+								Cut:              fmt.Sprintf("%.4f", cnt),
1432
 								FeedetlSn:        subItem.FeedetlSn,
1432
 								FeedetlSn:        subItem.FeedetlSn,
1433
-								Price:            fmt.Sprintf("%.2f", float64(subItem.Price)),
1433
+								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1434
 								MedListCodg:      subItem.HisProject.MedicalCode,
1434
 								MedListCodg:      subItem.HisProject.MedicalCode,
1435
 								HospApprFlag:     -1,
1435
 								HospApprFlag:     -1,
1436
 							}
1436
 							}
1441
 							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
1441
 							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
1442
 
1442
 
1443
 							cus := &models.NewCustom{
1443
 							cus := &models.NewCustom{
1444
-								DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*cnt),
1445
-								Cut:              fmt.Sprintf("%.2f", cnt),
1444
+								DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*cnt),
1445
+								Cut:              fmt.Sprintf("%.4f", cnt),
1446
 								FeedetlSn:        subItem.FeedetlSn,
1446
 								FeedetlSn:        subItem.FeedetlSn,
1447
-								Price:            fmt.Sprintf("%.2f", float64(subItem.Price)),
1447
+								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1448
 								MedListCodg:      subItem.GoodInfo.MedicalInsuranceNumber,
1448
 								MedListCodg:      subItem.GoodInfo.MedicalInsuranceNumber,
1449
 								HospApprFlag:     -1,
1449
 								HospApprFlag:     -1,
1450
 							}
1450
 							}
1457
 			for _, subItem := range item.HisAdditionalCharge {
1457
 			for _, subItem := range item.HisAdditionalCharge {
1458
 				if len(subItem.XtHisAddtionConfig.Code) > 0 {
1458
 				if len(subItem.XtHisAddtionConfig.Code) > 0 {
1459
 					cus := &models.NewCustom{
1459
 					cus := &models.NewCustom{
1460
-						DetItemFeeSumamt: fmt.Sprintf("%.2f", subItem.Price*float64(subItem.Count)),
1461
-						Cut:              fmt.Sprintf("%.2f", float64(subItem.Count)),
1460
+						DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*float64(subItem.Count)),
1461
+						Cut:              fmt.Sprintf("%.4f", float64(subItem.Count)),
1462
 						FeedetlSn:        subItem.FeedetlSn,
1462
 						FeedetlSn:        subItem.FeedetlSn,
1463
-						Price:            fmt.Sprintf("%.2f", float64(subItem.Price)),
1463
+						Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1464
 						MedListCodg:      subItem.XtHisAddtionConfig.Code,
1464
 						MedListCodg:      subItem.XtHisAddtionConfig.Code,
1465
 						HospApprFlag:     -1,
1465
 						HospApprFlag:     -1,
1466
 					}
1466
 					}
1638
 						total = total + (subItem.Price * float64(subItem.Count))
1638
 						total = total + (subItem.Price * float64(subItem.Count))
1639
 					}
1639
 					}
1640
 				}
1640
 				}
1641
-				allTotal := fmt.Sprintf("%.2f", total)
1641
+				allTotal := fmt.Sprintf("%.4f", total)
1642
 				totals, _ := strconv.ParseFloat(allTotal, 64)
1642
 				totals, _ := strconv.ParseFloat(allTotal, 64)
1643
 
1643
 
1644
 				order := &models.HisOrder{
1644
 				order := &models.HisOrder{