Selaa lähdekoodia

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

csx 4 vuotta sitten
vanhempi
commit
d36077bbd2
4 muutettua tiedostoa jossa 41 lisäystä ja 7 poistoa
  1. 1 1
      conf/app.conf
  2. 29 0
      controllers/sg/his_api_controller.go
  3. 6 6
      service/gdyb_service.go
  4. 5 0
      service/his_service.go

+ 1 - 1
conf/app.conf Näytä tiedosto

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9532
3
-runmode = prod
3
+runmode = dev
4 4
 
5 5
 #
6 6
 copyrequestbody = true

+ 29 - 0
controllers/sg/his_api_controller.go Näytä tiedosto

@@ -2007,6 +2007,34 @@ func (c *HisApiController) GetUploadInfo() {
2007 2007
 	var start_time int64
2008 2008
 	var end_time int64
2009 2009
 
2010
+	//if adminUser.CurrentOrgId == 10106{
2011
+	//	if len(fapiao_code) == 0{
2012
+	//		fapiao_code = "144072080589"
2013
+	//	}
2014
+	//	if len(fapiao_number) == 0{
2015
+	//		order, _ := service.GetLastHisOrder(adminUser.CurrentOrgId)
2016
+	//		if order.ID == 0{
2017
+	//			fapiao_number = "00001520"
2018
+	//		}else{
2019
+	//			//fapiao_code = "00001520"
2020
+	//			fpNumber, _ := strconv.Atoi(order.FaPiaoNumber)
2021
+	//			var zero string
2022
+	//			if fpNumber >= 1000{
2023
+	//				zero = "0000" + strconv.Itoa(fpNumber)
2024
+	//			}else if fpNumber >= 10000{
2025
+	//				zero = "000" + strconv.Itoa(fpNumber)
2026
+	//			} else if fpNumber >= 100000{
2027
+	//				zero = "00" + strconv.Itoa(fpNumber)
2028
+	//			} else if fpNumber >= 1000000{
2029
+	//				zero = "0" + strconv.Itoa(fpNumber)
2030
+	//			}else {
2031
+	//				zero =  strconv.Itoa(fpNumber)
2032
+	//			}
2033
+	//			fapiao_number = zero
2034
+	//		}
2035
+	//	}
2036
+	//}
2037
+
2010 2038
 	data := make(map[string]interface{})
2011 2039
 	if settle_accounts_type == 1 { //日结
2012 2040
 		prescriptions, _ = service.GetHisPrescription(adminUser.CurrentOrgId, id, recordDateTime)
@@ -2336,6 +2364,7 @@ func (c *HisApiController) GetUploadInfo() {
2336 2364
 					order.HifesPay = res.Output.Setlinfo.HifesPay
2337 2365
 					order.HifobPay = res.Output.Setlinfo.HifobPay
2338 2366
 					order.MafPay = res.Output.Setlinfo.MafPay
2367
+					order.HifmiPay = res.Output.Setlinfo.HifmiPay
2339 2368
 					order.OthPay = res.Output.Setlinfo.OthPay
2340 2369
 					order.FundPaySumamt = res.Output.Setlinfo.FundPaySumamt
2341 2370
 					order.PsnPartAmt = res.Output.Setlinfo.PsnPartAmt

+ 6 - 6
service/gdyb_service.go Näytä tiedosto

@@ -234,17 +234,17 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
234 234
 	nonce := GetRandomString(32)
235 235
 	timestamp := time.Now().Unix()
236 236
 	signature := setSignature(timestamp, nonce, secret_key)
237
-	tempTime := time.Unix(timestamp, 0)
238
-	timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
237
+	//tempTime := time.Unix(timestamp, 0)
238
+	//timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
239 239
 
240 240
 	// 生成输入报文
241 241
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
242 242
 	input := make(map[string]interface{})
243 243
 	inputData := make(map[string]interface{})
244
-	inputMessage["infno"] = "2201"        // 交易编码
245
-	inputData["psn_no"] = psnNo           // 人员编号 (来自1101接口返回)
246
-	inputData["insutype"] = insutype      // 险种类型(来自1101接口返回)
247
-	inputData["begntime"] = timeFormatOne // 开始时间
244
+	inputMessage["infno"] = "2201"                // 交易编码
245
+	inputData["psn_no"] = psnNo                   // 人员编号 (来自1101接口返回)
246
+	inputData["insutype"] = insutype              // 险种类型(来自1101接口返回)
247
+	inputData["begntime"] = "2021-03-28 12:20:30" // 开始时间
248 248
 
249 249
 	//if id_card_type == 1 {
250 250
 	//	inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型

+ 5 - 0
service/his_service.go Näytä tiedosto

@@ -1193,3 +1193,8 @@ func GetDeviceNumberByID(bed_id int64, org_id int64) (device_number models.Devic
1193 1193
 func UpdateHisPatientStatus(his *models.VMHisPatient) {
1194 1194
 	writeDb.Save(&his)
1195 1195
 }
1196
+
1197
+func GetLastHisOrder(org_id int64) (his models.HisOrder, err error) {
1198
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2", org_id).Last(&his).Error
1199
+	return
1200
+}