|
@@ -1070,19 +1070,19 @@ func (c *HisApiController) GetRegisterInfo() {
|
1070
|
1070
|
}
|
1071
|
1071
|
}
|
1072
|
1072
|
|
1073
|
|
-//上传明细----结算
|
|
1073
|
+//上传明细----预结算----确认订单
|
1074
|
1074
|
func (c *HisApiController) GetUploadInfo() {
|
1075
|
1075
|
id, _ := c.GetInt64("id")
|
1076
|
1076
|
record_time := c.GetString("record_time")
|
1077
|
|
- pay_way, _ := c.GetInt64("pay_way")
|
1078
|
|
- pay_price, _ := c.GetFloat("pay_price")
|
1079
|
|
- pay_card_no := c.GetString("pay_card_no")
|
1080
|
|
- discount_price, _ := c.GetFloat("discount_price")
|
1081
|
|
- preferential_price, _ := c.GetFloat("preferential_price")
|
1082
|
|
- reality_price, _ := c.GetFloat("reality_price")
|
1083
|
|
- found_price, _ := c.GetFloat("found_price")
|
1084
|
|
- medical_insurance_price, _ := c.GetFloat("medical_insurance_price")
|
1085
|
|
- private_price, _ := c.GetFloat("private_price")
|
|
1077
|
+ //pay_way, _ := c.GetInt64("pay_way")
|
|
1078
|
+ //pay_price, _ := c.GetFloat("pay_price")
|
|
1079
|
+ //pay_card_no := c.GetString("pay_card_no")
|
|
1080
|
+ //discount_price, _ := c.GetFloat("discount_price")
|
|
1081
|
+ //preferential_price, _ := c.GetFloat("preferential_price")
|
|
1082
|
+ //reality_price, _ := c.GetFloat("reality_price")
|
|
1083
|
+ //found_price, _ := c.GetFloat("found_price")
|
|
1084
|
+ //medical_insurance_price, _ := c.GetFloat("medical_insurance_price")
|
|
1085
|
+ //private_price, _ := c.GetFloat("private_price")
|
1086
|
1086
|
settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
|
1087
|
1087
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
1088
|
1088
|
|
|
@@ -1190,36 +1190,27 @@ func (c *HisApiController) GetUploadInfo() {
|
1190
|
1190
|
|
1191
|
1191
|
if res.Infcode == 0 {
|
1192
|
1192
|
order := &models.HisOrder{
|
1193
|
|
- UserOrgId: adminUser.CurrentOrgId,
|
1194
|
|
- HisPatientId: his.ID,
|
1195
|
|
- PatientId: his.PatientId,
|
1196
|
|
- SettleAccountsDate: recordDateTime,
|
1197
|
|
- Ctime: time.Now().Unix(),
|
1198
|
|
- Mtime: time.Now().Unix(),
|
1199
|
|
- Status: 1,
|
1200
|
|
- Number: chrg_bchno,
|
1201
|
|
- Infcode: res.Infcode,
|
1202
|
|
- WarnMsg: res.WarnMsg,
|
1203
|
|
- Cainfo: res.Cainfo,
|
1204
|
|
- ErrMsg: res.ErrMsg,
|
1205
|
|
- RespondTime: res.RefmsgTime,
|
1206
|
|
- InfRefmsgid: res.InfRefmsgid,
|
1207
|
|
- OrderStatus: 1,
|
1208
|
|
- PayWay: pay_way,
|
1209
|
|
- PayPrice: pay_price,
|
1210
|
|
- PayCardNo: pay_card_no,
|
1211
|
|
- DiscountPrice: discount_price,
|
1212
|
|
- PreferentialPrice: preferential_price,
|
1213
|
|
- RealityPrice: reality_price,
|
1214
|
|
- FoundPrice: found_price,
|
1215
|
|
- MedicalInsurancePrice: medical_insurance_price,
|
1216
|
|
- PrivatePrice: private_price,
|
1217
|
|
- IsMedicineInsurance: 1,
|
1218
|
|
- SettleType: settle_accounts_type,
|
1219
|
|
- SettleStartTime: start_time,
|
1220
|
|
- SettleEndTime: end_time,
|
1221
|
|
- Creator: roles.ID,
|
1222
|
|
- Modify: roles.ID,
|
|
1193
|
+ UserOrgId: adminUser.CurrentOrgId,
|
|
1194
|
+ HisPatientId: his.ID,
|
|
1195
|
+ PatientId: his.PatientId,
|
|
1196
|
+ SettleAccountsDate: recordDateTime,
|
|
1197
|
+ Ctime: time.Now().Unix(),
|
|
1198
|
+ Mtime: time.Now().Unix(),
|
|
1199
|
+ Status: 1,
|
|
1200
|
+ Number: chrg_bchno,
|
|
1201
|
+ Infcode: res.Infcode,
|
|
1202
|
+ WarnMsg: res.WarnMsg,
|
|
1203
|
+ Cainfo: res.Cainfo,
|
|
1204
|
+ ErrMsg: res.ErrMsg,
|
|
1205
|
+ RespondTime: res.RefmsgTime,
|
|
1206
|
+ InfRefmsgid: res.InfRefmsgid,
|
|
1207
|
+ OrderStatus: 1,
|
|
1208
|
+ IsMedicineInsurance: 1,
|
|
1209
|
+ SettleType: settle_accounts_type,
|
|
1210
|
+ SettleStartTime: start_time,
|
|
1211
|
+ SettleEndTime: end_time,
|
|
1212
|
+ Creator: roles.ID,
|
|
1213
|
+ Modify: roles.ID,
|
1223
|
1214
|
}
|
1224
|
1215
|
err = service.CreateOrder(order)
|
1225
|
1216
|
if err != nil {
|
|
@@ -1363,7 +1354,7 @@ func (c *HisApiController) GetUploadInfo() {
|
1363
|
1354
|
Status: 1,
|
1364
|
1355
|
PatientId: id,
|
1365
|
1356
|
RecordTime: recordDateTime,
|
1366
|
|
- Stage: 6,
|
|
1357
|
+ Stage: 7,
|
1367
|
1358
|
}
|
1368
|
1359
|
service.CreateErrMsgLog(errlog)
|
1369
|
1360
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeRegisterRepeatException)
|
|
@@ -1414,7 +1405,8 @@ func (c *HisApiController) GetUploadInfo() {
|
1414
|
1405
|
setlDetail, _ := json.Marshal(res.Output.Setldetail)
|
1415
|
1406
|
detailStr := string(setlDetail)
|
1416
|
1407
|
order.SetlDetail = detailStr
|
1417
|
|
- err = service.UpdataOrderStatusTwo(chrg_bchno, adminUser.CurrentOrgId)
|
|
1408
|
+
|
|
1409
|
+ //err = service.UpdataOrderStatusTwo(chrg_bchno, adminUser.CurrentOrgId)
|
1418
|
1410
|
err = service.UpDateOrder(order)
|
1419
|
1411
|
|
1420
|
1412
|
//订单确认
|
|
@@ -1449,7 +1441,7 @@ func (c *HisApiController) GetUploadInfo() {
|
1449
|
1441
|
Status: 1,
|
1450
|
1442
|
PatientId: id,
|
1451
|
1443
|
RecordTime: recordDateTime,
|
1452
|
|
- Stage: 7,
|
|
1444
|
+ Stage: 8,
|
1453
|
1445
|
}
|
1454
|
1446
|
service.CreateErrMsgLog(errlog)
|
1455
|
1447
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeRegisterRepeatException)
|
|
@@ -1498,16 +1490,18 @@ func (c *HisApiController) GetUploadInfo() {
|
1498
|
1490
|
|
1499
|
1491
|
func (c *HisApiController) GetSettleInfo() {
|
1500
|
1492
|
id, _ := c.GetInt64("id")
|
|
1493
|
+ order_id, _ := c.GetInt64("order_id")
|
|
1494
|
+
|
1501
|
1495
|
record_time := c.GetString("record_time")
|
1502
|
|
- //pay_way, _ := c.GetInt64("pay_way")
|
1503
|
|
- //pay_price, _ := c.GetFloat("pay_price")
|
1504
|
|
- //pay_card_no := c.GetString("pay_card_no")
|
1505
|
|
- //discount_price, _ := c.GetFloat("discount_price")
|
1506
|
|
- //preferential_price, _ := c.GetFloat("preferential_price")
|
1507
|
|
- //reality_price, _ := c.GetFloat("reality_price")
|
1508
|
|
- //found_price, _ := c.GetFloat("found_price")
|
1509
|
|
- //medical_insurance_price, _ := c.GetFloat("medical_insurance_price")
|
1510
|
|
- //private_price, _ := c.GetFloat("private_price")
|
|
1496
|
+ pay_way, _ := c.GetInt64("pay_way")
|
|
1497
|
+ pay_price, _ := c.GetFloat("pay_price")
|
|
1498
|
+ pay_card_no := c.GetString("pay_card_no")
|
|
1499
|
+ discount_price, _ := c.GetFloat("discount_price")
|
|
1500
|
+ preferential_price, _ := c.GetFloat("preferential_price")
|
|
1501
|
+ reality_price, _ := c.GetFloat("reality_price")
|
|
1502
|
+ found_price, _ := c.GetFloat("found_price")
|
|
1503
|
+ medical_insurance_price, _ := c.GetFloat("medical_insurance_price")
|
|
1504
|
+ private_price, _ := c.GetFloat("private_price")
|
1511
|
1505
|
settle_accounts_type, _ := c.GetInt64("settle_accounts_type")
|
1512
|
1506
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
1513
|
1507
|
|
|
@@ -1523,9 +1517,6 @@ func (c *HisApiController) GetSettleInfo() {
|
1523
|
1517
|
|
1524
|
1518
|
var prescriptions []*models.HisPrescription
|
1525
|
1519
|
|
1526
|
|
- //var start_time int64
|
1527
|
|
- //var end_time int64
|
1528
|
|
-
|
1529
|
1520
|
data := make(map[string]interface{})
|
1530
|
1521
|
if settle_accounts_type == 1 { //日结
|
1531
|
1522
|
prescriptions, _ = service.GetHisPrescription(adminUser.CurrentOrgId, id, recordDateTime)
|
|
@@ -1542,14 +1533,12 @@ func (c *HisApiController) GetSettleInfo() {
|
1542
|
1533
|
return
|
1543
|
1534
|
}
|
1544
|
1535
|
recordStartTime := theStartTime.Unix()
|
1545
|
|
- //start_time = recordStartTime
|
1546
|
1536
|
theEndTime, err := time.ParseInLocation(timeLayout+" 15:04:05", end_time_str+" 00:00:00", loc)
|
1547
|
1537
|
if err != nil {
|
1548
|
1538
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
1549
|
1539
|
return
|
1550
|
1540
|
}
|
1551
|
1541
|
recordEndTime := theEndTime.Unix()
|
1552
|
|
- //end_time = recordEndTime
|
1553
|
1542
|
prescriptions, _ = service.GetMonthHisPrescription(adminUser.CurrentOrgId, id, recordStartTime, recordEndTime)
|
1554
|
1543
|
data["pre"] = prescriptions
|
1555
|
1544
|
|
|
@@ -1567,6 +1556,8 @@ func (c *HisApiController) GetSettleInfo() {
|
1567
|
1556
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, id, recordDateTime)
|
1568
|
1557
|
strconv.FormatInt(his.PatientId, 10)
|
1569
|
1558
|
|
|
1559
|
+ order_src, _ := service.GetHisOrderByID(order_id)
|
|
1560
|
+
|
1570
|
1561
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
1571
|
1562
|
if config.IsOpen == 1 { //对接了医保,走医保流程
|
1572
|
1563
|
|
|
@@ -1608,7 +1599,7 @@ func (c *HisApiController) GetSettleInfo() {
|
1608
|
1599
|
api := "http://127.0.0.1:9532/" + "gdyb/eight?cert_no=" + cert_no + "&insutype=" +
|
1609
|
1600
|
insutype + "&psn_no=" + psn_no + "&chrg_bchno=" + chrg_bchno + "&mdtrt_id=" + mdtrt_id +
|
1610
|
1601
|
"&total=" + allTotal + "&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" +
|
1611
|
|
- miConfig.SecretKey + "&med_type=" + strconv.FormatInt(patientPrescription.RegisterType, 10) + "&id_card_type=" + strconv.FormatInt(int64(his.IdCardType), 10)
|
|
1602
|
+ miConfig.SecretKey + "&med_type=" + strconv.FormatInt(patientPrescription.RegisterType, 10) + "&id_card_type=" + strconv.FormatInt(int64(his.IdCardType), 10) + "&fulamt_ownpay_amt=" + strconv.FormatFloat(order_src.FulamtOwnpayAmt, 'E', -1, 64) + "&overlmt_selfpay=" + strconv.FormatFloat(order_src.OverlmtSelfPay, 'E', -1, 64) + "&preselfpay_amt=" + strconv.FormatFloat(order_src.PreselfpayAmt, 'E', -1, 64) + "&inscp_scp_amt=" + strconv.FormatFloat(order_src.InscpScpAmt, 'E', -1, 64)
|
1612
|
1603
|
resp, requestErr := http.Get(api)
|
1613
|
1604
|
if requestErr != nil {
|
1614
|
1605
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -1652,53 +1643,61 @@ func (c *HisApiController) GetSettleInfo() {
|
1652
|
1643
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeRegisterRepeatException)
|
1653
|
1644
|
return
|
1654
|
1645
|
} else {
|
1655
|
|
- order, _ := service.GetHisOrderTwo(adminUser.CurrentOrgId, chrg_bchno, id)
|
1656
|
|
- order.OrderStatus = 2
|
1657
|
|
- order.MdtrtId = res.Output.Setlinfo.MdtrtID
|
1658
|
|
- order.SetlId = res.Output.Setlinfo.SetlID
|
1659
|
|
- order.PsnNo = res.Output.Setlinfo.PsnNo
|
1660
|
|
- order.PsnName = res.Output.Setlinfo.PsnName
|
1661
|
|
- order.PsnCertType = res.Output.Setlinfo.PsnCertType
|
1662
|
|
- order.Certno = res.Output.Setlinfo.Certno
|
1663
|
|
- order.Gend = res.Output.Setlinfo.Gend
|
1664
|
|
- order.Naty = res.Output.Setlinfo.Naty
|
1665
|
|
- order.Age = res.Output.Setlinfo.Age
|
1666
|
|
- order.Insutype = res.Output.Setlinfo.Insutype
|
1667
|
|
- order.PsnType = res.Output.Setlinfo.PsnType
|
1668
|
|
- order.CvlservFlag = res.Output.Setlinfo.CvlservFlag
|
1669
|
|
- order.SetlTime = res.Output.Setlinfo.SetlTime
|
1670
|
|
- order.MdtrtCertType = res.Output.Setlinfo.MdtrtCertType
|
1671
|
|
- order.MedType = res.Output.Setlinfo.MedType
|
1672
|
|
- order.MedfeeSumamt = res.Output.Setlinfo.MedfeeSumamt
|
1673
|
|
- order.FulamtOwnpayAmt = res.Output.Setlinfo.FulamtOwnpayAmt
|
1674
|
|
- order.OverlmtSelfPay = res.Output.Setlinfo.OverlmtSelfpay
|
1675
|
|
- order.PreselfpayAmt = res.Output.Setlinfo.PreselfpayAmt
|
1676
|
|
- order.InscpScpAmt = res.Output.Setlinfo.InscpScpAmt
|
1677
|
|
- order.ActPayDedc = res.Output.Setlinfo.ActPayDedc
|
1678
|
|
- order.HifpPay = res.Output.Setlinfo.HifpPay
|
1679
|
|
- order.CvlservPay = res.Output.Setlinfo.CvlservPay
|
1680
|
|
- order.PoolPropSelfpay = res.Output.Setlinfo.PoolPropSelfpay
|
1681
|
|
- order.HifesPay = res.Output.Setlinfo.HifesPay
|
1682
|
|
- order.HifobPay = res.Output.Setlinfo.HifobPay
|
1683
|
|
- order.MafPay = res.Output.Setlinfo.MafPay
|
1684
|
|
- order.OthPay = res.Output.Setlinfo.OthPay
|
1685
|
|
- order.FundPaySumamt = res.Output.Setlinfo.FundPaySumamt
|
1686
|
|
- order.PsnPartAmt = res.Output.Setlinfo.PsnPartAmt
|
1687
|
|
- order.AcctPay = res.Output.Setlinfo.AcctPay
|
1688
|
|
- order.PsnCashPay = res.Output.Setlinfo.PsnCashPay
|
1689
|
|
- order.HospPartAmt = res.Output.Setlinfo.HospPartAmt
|
1690
|
|
- order.Balc = res.Output.Setlinfo.Balc
|
1691
|
|
- order.AcctMulaidPay = res.Output.Setlinfo.AcctMulaidPay
|
1692
|
|
- order.MedinsSetlId = res.Output.Setlinfo.MedinsSetlID
|
1693
|
|
- order.ClrOptins = res.Output.Setlinfo.ClrOptins
|
1694
|
|
- order.ClrWay = res.Output.Setlinfo.ClrWay
|
1695
|
|
- order.Creator = order.Creator
|
1696
|
|
- order.Modify = roles.ID
|
|
1646
|
+ order_src.OrderStatus = 2
|
|
1647
|
+ order_src.PayWay = pay_way
|
|
1648
|
+ order_src.PayPrice = pay_price
|
|
1649
|
+ order_src.PayCardNo = pay_card_no
|
|
1650
|
+ order_src.DiscountPrice = discount_price
|
|
1651
|
+ order_src.PreferentialPrice = preferential_price
|
|
1652
|
+ order_src.RealityPrice = reality_price
|
|
1653
|
+ order_src.FoundPrice = found_price
|
|
1654
|
+ order_src.MedicalInsurancePrice = medical_insurance_price
|
|
1655
|
+ order_src.PrivatePrice = private_price
|
|
1656
|
+ order_src.MdtrtId = res.Output.Setlinfo.MdtrtID
|
|
1657
|
+ order_src.SetlId = res.Output.Setlinfo.SetlID
|
|
1658
|
+ order_src.PsnNo = res.Output.Setlinfo.PsnNo
|
|
1659
|
+ order_src.PsnName = res.Output.Setlinfo.PsnName
|
|
1660
|
+ order_src.PsnCertType = res.Output.Setlinfo.PsnCertType
|
|
1661
|
+ order_src.Certno = res.Output.Setlinfo.Certno
|
|
1662
|
+ order_src.Gend = res.Output.Setlinfo.Gend
|
|
1663
|
+ order_src.Naty = res.Output.Setlinfo.Naty
|
|
1664
|
+ order_src.Age = res.Output.Setlinfo.Age
|
|
1665
|
+ order_src.Insutype = res.Output.Setlinfo.Insutype
|
|
1666
|
+ order_src.PsnType = res.Output.Setlinfo.PsnType
|
|
1667
|
+ order_src.CvlservFlag = res.Output.Setlinfo.CvlservFlag
|
|
1668
|
+ order_src.SetlTime = res.Output.Setlinfo.SetlTime
|
|
1669
|
+ order_src.MdtrtCertType = res.Output.Setlinfo.MdtrtCertType
|
|
1670
|
+ order_src.MedType = res.Output.Setlinfo.MedType
|
|
1671
|
+ order_src.MedfeeSumamt = res.Output.Setlinfo.MedfeeSumamt
|
|
1672
|
+ order_src.FulamtOwnpayAmt = res.Output.Setlinfo.FulamtOwnpayAmt
|
|
1673
|
+ order_src.OverlmtSelfPay = res.Output.Setlinfo.OverlmtSelfpay
|
|
1674
|
+ order_src.PreselfpayAmt = res.Output.Setlinfo.PreselfpayAmt
|
|
1675
|
+ order_src.InscpScpAmt = res.Output.Setlinfo.InscpScpAmt
|
|
1676
|
+ order_src.ActPayDedc = res.Output.Setlinfo.ActPayDedc
|
|
1677
|
+ order_src.HifpPay = res.Output.Setlinfo.HifpPay
|
|
1678
|
+ order_src.CvlservPay = res.Output.Setlinfo.CvlservPay
|
|
1679
|
+ order_src.PoolPropSelfpay = res.Output.Setlinfo.PoolPropSelfpay
|
|
1680
|
+ order_src.HifesPay = res.Output.Setlinfo.HifesPay
|
|
1681
|
+ order_src.HifobPay = res.Output.Setlinfo.HifobPay
|
|
1682
|
+ order_src.MafPay = res.Output.Setlinfo.MafPay
|
|
1683
|
+ order_src.OthPay = res.Output.Setlinfo.OthPay
|
|
1684
|
+ order_src.FundPaySumamt = res.Output.Setlinfo.FundPaySumamt
|
|
1685
|
+ order_src.PsnPartAmt = res.Output.Setlinfo.PsnPartAmt
|
|
1686
|
+ order_src.AcctPay = res.Output.Setlinfo.AcctPay
|
|
1687
|
+ order_src.PsnCashPay = res.Output.Setlinfo.PsnCashPay
|
|
1688
|
+ order_src.HospPartAmt = res.Output.Setlinfo.HospPartAmt
|
|
1689
|
+ order_src.Balc = res.Output.Setlinfo.Balc
|
|
1690
|
+ order_src.AcctMulaidPay = res.Output.Setlinfo.AcctMulaidPay
|
|
1691
|
+ order_src.MedinsSetlId = res.Output.Setlinfo.MedinsSetlID
|
|
1692
|
+ order_src.ClrOptins = res.Output.Setlinfo.ClrOptins
|
|
1693
|
+ order_src.ClrWay = res.Output.Setlinfo.ClrWay
|
|
1694
|
+ order_src.Creator = order_src.Creator
|
|
1695
|
+ order_src.Modify = roles.ID
|
1697
|
1696
|
setlDetail, _ := json.Marshal(res.Output.Setldetail)
|
1698
|
1697
|
detailStr := string(setlDetail)
|
1699
|
|
- order.SetlDetail = detailStr
|
|
1698
|
+ order_src.SetlDetail = detailStr
|
1700
|
1699
|
err = service.UpdataOrderStatusTwo(chrg_bchno, adminUser.CurrentOrgId)
|
1701
|
|
- err = service.UpDateOrder(order)
|
|
1700
|
+ err = service.UpDateOrder(order_src)
|
1702
|
1701
|
|
1703
|
1702
|
if err == nil {
|
1704
|
1703
|
c.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -2059,11 +2058,36 @@ func (c *HisApiController) GetCheckAccount() {
|
2059
|
2058
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2060
|
2059
|
return
|
2061
|
2060
|
}
|
|
2061
|
+
|
2062
|
2062
|
if res.Infcode == 0 {
|
2063
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
2064
|
|
- "stmt_rslt": res.Output.Stmtinfo.StmtRslt,
|
2065
|
|
- "stmt_rslt_dscr": res.Output.Stmtinfo.StmtRsltDscr,
|
2066
|
|
- })
|
|
2063
|
+ micc := &models.MedicalInsuranceCostCompare{
|
|
2064
|
+ StartTime: startime.Unix(),
|
|
2065
|
+ EndTime: endtime.Unix(),
|
|
2066
|
+ Insutype: insutype,
|
|
2067
|
+ CheckType: 1,
|
|
2068
|
+ Num: fixmedins_setl_cnt,
|
|
2069
|
+ Mtime: time.Now().Unix(),
|
|
2070
|
+ Status: 1,
|
|
2071
|
+ UserOrgId: adminUser.CurrentOrgId,
|
|
2072
|
+ CostTotal: medfee_sumamt,
|
|
2073
|
+ FuncTotal: fund_pay_sumamt,
|
|
2074
|
+ PsnPay: acct_pay,
|
|
2075
|
+ Creator: admin_user_id,
|
|
2076
|
+ Ctime: time.Now().Unix(),
|
|
2077
|
+ }
|
|
2078
|
+
|
|
2079
|
+ err := service.CreateMedicalInsuranceCostCompareRecord(micc)
|
|
2080
|
+
|
|
2081
|
+ if err == nil {
|
|
2082
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
2083
|
+ "stmt_rslt": res.Output.Stmtinfo.StmtRslt,
|
|
2084
|
+ "stmt_rslt_dscr": res.Output.Stmtinfo.StmtRsltDscr,
|
|
2085
|
+ })
|
|
2086
|
+
|
|
2087
|
+ } else {
|
|
2088
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2089
|
+ }
|
|
2090
|
+
|
2067
|
2091
|
} else {
|
2068
|
2092
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2069
|
2093
|
}
|
|
@@ -2214,6 +2238,25 @@ func (c *HisApiController) GetCheckDetailAccount() {
|
2214
|
2238
|
|
2215
|
2239
|
if res.Infcode == 0 {
|
2216
|
2240
|
service.Gdyb9102(baseParams, zip_name, res.Output.FileQuryNo)
|
|
2241
|
+
|
|
2242
|
+ micc := &models.MedicalInsuranceCostCompare{
|
|
2243
|
+ StartTime: startime.Unix(),
|
|
2244
|
+ EndTime: endtime.Unix(),
|
|
2245
|
+ Insutype: "0",
|
|
2246
|
+ CheckType: 2,
|
|
2247
|
+ Num: fixmedins_setl_cnt,
|
|
2248
|
+ Mtime: time.Now().Unix(),
|
|
2249
|
+ Status: 1,
|
|
2250
|
+ UserOrgId: adminUser.CurrentOrgId,
|
|
2251
|
+ CostTotal: medfee_sumamt,
|
|
2252
|
+ FuncTotal: fund_pay_sumamt,
|
|
2253
|
+ PsnPay: psn_cash_pay,
|
|
2254
|
+ Creator: admin_user_id,
|
|
2255
|
+ Ctime: time.Now().Unix(),
|
|
2256
|
+ }
|
|
2257
|
+
|
|
2258
|
+ service.CreateMedicalInsuranceCostCompareRecord(micc)
|
|
2259
|
+
|
2217
|
2260
|
c.ServeSuccessJSON(map[string]interface{}{
|
2218
|
2261
|
"msg": "明细对账成功",
|
2219
|
2262
|
})
|