|
@@ -780,12 +780,17 @@ func SetSZDrugMessage(doctor string, doctor_code string, fixmedins_code string)
|
780
|
780
|
}
|
781
|
781
|
|
782
|
782
|
func SzybML009(doctor string, doctor_code string, fixmedins_code string, pro *models.MyHisProject) string {
|
783
|
|
- timeLayout := "20060102"
|
784
|
|
- record_date := time.Unix(pro.RecordDate, 0).Format(timeLayout)
|
785
|
|
- recordDate, _ := strconv.ParseInt(record_date, 10, 64)
|
|
783
|
+ //timeLayout := "20060102"
|
|
784
|
+ //record_date := time.Unix(pro.RecordDate, 0).Format(timeLayout)
|
|
785
|
+ //recordDate, _ := strconv.ParseInt(record_date, 10, 64)
|
786
|
786
|
//生成输入报文
|
787
|
787
|
inputMessage := SetSZDrugMessage(doctor, doctor_code, fixmedins_code)
|
788
|
788
|
|
|
789
|
+ month := time.Unix(1557042972, 0).Format("1")
|
|
790
|
+ year := time.Now().Format("2006")
|
|
791
|
+ month = time.Now().Format("01")
|
|
792
|
+ day := time.Now().Format("02")
|
|
793
|
+
|
789
|
794
|
inputData := make(map[string]interface{})
|
790
|
795
|
inputData["listsize"] = 1
|
791
|
796
|
inputMessage["transType"] = "ML009" // 交易编码
|
|
@@ -798,7 +803,7 @@ func SzybML009(doctor string, doctor_code string, fixmedins_code string, pro *mo
|
798
|
803
|
feedetailInfo["bkf131"] = pro.Category //协议机构项目类别
|
799
|
804
|
feedetailInfo["bkm062"] = strconv.FormatInt(pro.SpecailProject, 10) // 门诊特检项目标识
|
800
|
805
|
feedetailInfo["bka506"] = pro.Price // 协议机构内部项目收费价格
|
801
|
|
- feedetailInfo["aae030"] = recordDate // 备案日期
|
|
806
|
+ feedetailInfo["aae030"] = year + month + day // 备案日期
|
802
|
807
|
feedetailInfo["aae013"] = pro.Remark // 备注
|
803
|
808
|
feedetail = append(feedetail, feedetailInfo)
|
804
|
809
|
|
|
@@ -1439,8 +1444,8 @@ func UpdataOrderStatusSZ(id int64, number string, user_org_id int64) (err error)
|
1439
|
1444
|
|
1440
|
1445
|
func UpdataHisStatusSZ(user_org_id int64, his_mz_number string, his_number string, result string, his_patient_id int64) (err error) {
|
1441
|
1446
|
err = writeDb.Model(&models.HisPatient{}).Where("status = 1 AND user_org_id = ? AND mz_number = ? AND number = ?", user_org_id, his_mz_number, his_number).Updates(map[string]interface{}{"status": 0, "mtime": time.Now().Unix(), "refund_detail": result}).Error
|
1442
|
|
- writeDb.Model(&models.HisPrescription{}).Where("status = 1 AND user_org_id = ? AND his_patient_id = ?", user_org_id, his_patient_id).Updates(map[string]interface{}{"status": 0, "mtime": time.Now().Unix()})
|
1443
|
|
- writeDb.Model(&models.HisPrescriptionInfo{}).Where("status = 1 AND user_org_id = ? AND his_patient_id = ?", user_org_id, his_patient_id).Updates(map[string]interface{}{"status": 0, "mtime": time.Now().Unix()})
|
|
1447
|
+ writeDb.Model(&models.HisPrescription{}).Where("status = 1 AND user_org_id = ? AND his_patient_id = ?", user_org_id, his_patient_id).Updates(map[string]interface{}{"his_patient_id": 0, "mtime": time.Now().Unix()})
|
|
1448
|
+ writeDb.Model(&models.HisPrescriptionInfo{}).Where("status = 1 AND user_org_id = ? AND his_patient_id = ?", user_org_id, his_patient_id).Updates(map[string]interface{}{"his_patient_id": 0, "mtime": time.Now().Unix()})
|
1444
|
1449
|
return
|
1445
|
1450
|
}
|
1446
|
1451
|
|