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,6 +1572,7 @@ func (c *ZHHisApiController) GetUploadInfo() {
1572 1572
 		var customs []*models.NewCustom
1573 1573
 
1574 1574
 		for _, item := range prescriptions {
1575
+			tm := time.Unix(item.PreTime, 0)
1575 1576
 			if item.Type == 1 { //药品
1576 1577
 				for _, subItem := range item.HisDoctorAdviceInfo {
1577 1578
 					if len(subItem.BaseDrugLib.MedicalInsuranceNumber) > 0 && subItem.BaseDrugLib.IsUser != 1 {
@@ -1584,6 +1585,7 @@ func (c *ZHHisApiController) GetUploadInfo() {
1584 1585
 							Price:            fmt.Sprintf("%.4f", subItem.Price),
1585 1586
 							MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
1586 1587
 							HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
1588
+							FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1587 1589
 						}
1588 1590
 
1589 1591
 						customs = append(customs, cus)
@@ -1605,6 +1607,7 @@ func (c *ZHHisApiController) GetUploadInfo() {
1605 1607
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1606 1608
 								MedListCodg:      subItem.HisProject.MedicalCode,
1607 1609
 								HospApprFlag:     -1,
1610
+								FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1608 1611
 							}
1609 1612
 							customs = append(customs, cus)
1610 1613
 						}
@@ -1619,6 +1622,7 @@ func (c *ZHHisApiController) GetUploadInfo() {
1619 1622
 								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
1620 1623
 								MedListCodg:      subItem.GoodInfo.MedicalInsuranceNumber,
1621 1624
 								HospApprFlag:     -1,
1625
+								FeeOcurTime:      tm.Format("2006-01-02 15:04:05"),
1622 1626
 							}
1623 1627
 							customs = append(customs, cus)
1624 1628
 						}
@@ -1626,19 +1630,20 @@ func (c *ZHHisApiController) GetUploadInfo() {
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 1649
 		//总页数,向上取整,注意除之前要先转换类型为float64

+ 2 - 0
models/his_models.go View File

@@ -322,6 +322,7 @@ type HisPrescription struct {
322 322
 	Creator                int64                     `gorm:"column:creator" json:"creator" form:"creator"`
323 323
 	Modifier               int64                     `gorm:"column:modifier" json:"modifier" form:"modifier"`
324 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 326
 	BatchNumber            string                    `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
326 327
 	PrescriptionNumber     string                    `gorm:"column:prescription_number" json:"prescription_number" form:"prescription_number"`
327 328
 	Patients               Patients                  `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
@@ -1279,6 +1280,7 @@ type NewCustom struct {
1279 1280
 	MedListCodg      string
1280 1281
 	LmtUsedFlag      int64
1281 1282
 	HospApprFlag     int64
1283
+	FeeOcurTime      string
1282 1284
 }
1283 1285
 
1284 1286
 type HisPsn struct {

+ 1 - 1
service/zh_his_service.go View File

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