Browse Source

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

csx 3 years ago
parent
commit
dc3008ea56
3 changed files with 21 additions and 14 deletions
  1. 18 13
      controllers/zh/zh_his_api_controller.go
  2. 2 0
      models/his_models.go
  3. 1 1
      service/zh_his_service.go

+ 18 - 13
controllers/zh/zh_his_api_controller.go View File

1572
 		var customs []*models.NewCustom
1572
 		var customs []*models.NewCustom
1573
 
1573
 
1574
 		for _, item := range prescriptions {
1574
 		for _, item := range prescriptions {
1575
+			tm := time.Unix(item.PreTime, 0)
1575
 			if item.Type == 1 { //药品
1576
 			if item.Type == 1 { //药品
1576
 				for _, subItem := range item.HisDoctorAdviceInfo {
1577
 				for _, subItem := range item.HisDoctorAdviceInfo {
1577
 					if len(subItem.BaseDrugLib.MedicalInsuranceNumber) > 0 && subItem.BaseDrugLib.IsUser != 1 {
1578
 					if len(subItem.BaseDrugLib.MedicalInsuranceNumber) > 0 && subItem.BaseDrugLib.IsUser != 1 {
1584
 							Price:            fmt.Sprintf("%.4f", subItem.Price),
1585
 							Price:            fmt.Sprintf("%.4f", subItem.Price),
1585
 							MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
1586
 							MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
1586
 							HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
1587
 							HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
1588
+							FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1587
 						}
1589
 						}
1588
 
1590
 
1589
 						customs = append(customs, cus)
1591
 						customs = append(customs, cus)
1605
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1607
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1606
 								MedListCodg:      subItem.HisProject.MedicalCode,
1608
 								MedListCodg:      subItem.HisProject.MedicalCode,
1607
 								HospApprFlag:     -1,
1609
 								HospApprFlag:     -1,
1610
+								FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1608
 							}
1611
 							}
1609
 							customs = append(customs, cus)
1612
 							customs = append(customs, cus)
1610
 						}
1613
 						}
1619
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1622
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1620
 								MedListCodg:      subItem.GoodInfo.MedicalInsuranceNumber,
1623
 								MedListCodg:      subItem.GoodInfo.MedicalInsuranceNumber,
1621
 								HospApprFlag:     -1,
1624
 								HospApprFlag:     -1,
1625
+								FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1622
 							}
1626
 							}
1623
 							customs = append(customs, cus)
1627
 							customs = append(customs, cus)
1624
 						}
1628
 						}
1626
 				}
1630
 				}
1627
 			}
1631
 			}
1628
 
1632
 
1629
-			for _, subItem := range item.HisAdditionalCharge {
1630
-				if len(subItem.XtHisAddtionConfig.Code) > 0 {
1631
-					cus := &models.NewCustom{
1632
-						DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*float64(subItem.Count)),
1633
-						Cut:              fmt.Sprintf("%.4f", float64(subItem.Count)),
1634
-						FeedetlSn:        subItem.FeedetlSn,
1635
-						Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1636
-						MedListCodg:      subItem.XtHisAddtionConfig.Code,
1637
-						HospApprFlag:     -1,
1638
-					}
1639
-					customs = append(customs, cus)
1640
-				}
1641
-			}
1633
+			//for _, subItem := range item.HisAdditionalCharge {
1634
+			//	if len(subItem.XtHisAddtionConfig.Code) > 0 {
1635
+			//		cus := &models.NewCustom{
1636
+			//			DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*float64(subItem.Count)),
1637
+			//			Cut:              fmt.Sprintf("%.4f", float64(subItem.Count)),
1638
+			//			FeedetlSn:        subItem.FeedetlSn,
1639
+			//			Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1640
+			//			MedListCodg:      subItem.XtHisAddtionConfig.Code,
1641
+			//			HospApprFlag:     -1,
1642
+			//
1643
+			//		}
1644
+			//		customs = append(customs, cus)
1645
+			//	}
1646
+			//}
1642
 		}
1647
 		}
1643
 
1648
 
1644
 		//总页数,向上取整,注意除之前要先转换类型为float64
1649
 		//总页数,向上取整,注意除之前要先转换类型为float64

+ 2 - 0
models/his_models.go View File

322
 	Creator                int64                     `gorm:"column:creator" json:"creator" form:"creator"`
322
 	Creator                int64                     `gorm:"column:creator" json:"creator" form:"creator"`
323
 	Modifier               int64                     `gorm:"column:modifier" json:"modifier" form:"modifier"`
323
 	Modifier               int64                     `gorm:"column:modifier" json:"modifier" form:"modifier"`
324
 	OrderStatus            int64                     `gorm:"column:order_status" json:"order_status" form:"order_status"`
324
 	OrderStatus            int64                     `gorm:"column:order_status" json:"order_status" form:"order_status"`
325
+	PreTime                int64                     `gorm:"column:pre_time" json:"pre_time" form:"pre_time"`
325
 	BatchNumber            string                    `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
326
 	BatchNumber            string                    `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
326
 	PrescriptionNumber     string                    `gorm:"column:prescription_number" json:"prescription_number" form:"prescription_number"`
327
 	PrescriptionNumber     string                    `gorm:"column:prescription_number" json:"prescription_number" form:"prescription_number"`
327
 	Patients               Patients                  `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
328
 	Patients               Patients                  `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
1279
 	MedListCodg      string
1280
 	MedListCodg      string
1280
 	LmtUsedFlag      int64
1281
 	LmtUsedFlag      int64
1281
 	HospApprFlag     int64
1282
 	HospApprFlag     int64
1283
+	FeeOcurTime      string
1282
 }
1284
 }
1283
 
1285
 
1284
 type HisPsn struct {
1286
 type HisPsn struct {

+ 1 - 1
service/zh_his_service.go View File

580
 		feedetailInfo["mdtrt_id"] = mdtrtId // 就诊 ID(来自2201接口返回)
580
 		feedetailInfo["mdtrt_id"] = mdtrtId // 就诊 ID(来自2201接口返回)
581
 		feedetailInfo["psn_no"] = psnNo     // 人员编号 (来自1101接口返回)
581
 		feedetailInfo["psn_no"] = psnNo     // 人员编号 (来自1101接口返回)
582
 		feedetailInfo["med_type"] = med_type
582
 		feedetailInfo["med_type"] = med_type
583
-		feedetailInfo["fee_ocur_time"] = timeFormatOne               // 费用发生时间
583
+		feedetailInfo["fee_ocur_time"] = item.FeeOcurTime            // 费用发生时间
584
 		feedetailInfo["med_list_codg"] = item.MedListCodg            // 医疗目录编码
584
 		feedetailInfo["med_list_codg"] = item.MedListCodg            // 医疗目录编码
585
 		feedetailInfo["medins_list_codg"] = fixmedins_code           // 医药机构目录编码
585
 		feedetailInfo["medins_list_codg"] = fixmedins_code           // 医药机构目录编码
586
 		feedetailInfo["det_item_fee_sumamt"] = item.DetItemFeeSumamt // 明细项目费用总额
586
 		feedetailInfo["det_item_fee_sumamt"] = item.DetItemFeeSumamt // 明细项目费用总额