|
@@ -670,6 +670,10 @@ func (c *HisApiController) GetSettleList() {
|
670
|
670
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisOrderNoExistParamWrong)
|
671
|
671
|
return
|
672
|
672
|
}
|
|
673
|
+ last_order, _ := service.GetLastHisOrderTwo(c.GetAdminUserInfo().CurrentOrgId)
|
|
674
|
+ count, _ := strconv.ParseInt(last_order.FaPiaoNumber, 10, 64)
|
|
675
|
+ new_fapiao_number := strconv.FormatInt(count, 10)
|
|
676
|
+
|
673
|
677
|
struct4101 := service.Struct4101{
|
674
|
678
|
PsnNo: order.PsnNo,
|
675
|
679
|
MdtrtId: order.MdtrtId,
|
|
@@ -689,9 +693,9 @@ func (c *HisApiController) GetSettleList() {
|
689
|
693
|
HiType: order.Insutype,
|
690
|
694
|
Insuplc: miConfig.InsuplcAdmdvs,
|
691
|
695
|
MaindiagFlag: "1",
|
692
|
|
- BillCode: order.FaPiaoCode,
|
|
696
|
+ BillCode: last_order.FaPiaoCode,
|
693
|
697
|
BillNo: order.FaPiaoNumber,
|
694
|
|
- BizSn: order.Number,
|
|
698
|
+ BizSn: new_fapiao_number,
|
695
|
699
|
PsnSelfPay: order.PsnPartAmt,
|
696
|
700
|
PsnOwnPay: order.PsnPartAmt,
|
697
|
701
|
AcctPay: order.AcctPay,
|
|
@@ -705,19 +709,6 @@ func (c *HisApiController) GetSettleList() {
|
705
|
709
|
}
|
706
|
710
|
struct4101.SetlBegnDate = order.SetlTime
|
707
|
711
|
struct4101.SetlEndDate = order.SetlTime
|
708
|
|
- //if order.SettleType == 1 {
|
709
|
|
- // t := time.Unix(int64(order.SettleAccountsDate), 0)
|
710
|
|
- // dateStr := t.Format("2006-01-02")
|
711
|
|
- // struct4101.SetlBegnDate = dateStr
|
712
|
|
- // struct4101.SetlEndDate = dateStr
|
713
|
|
- //} else {
|
714
|
|
- // t := time.Unix(int64(order.SettleStartTime), 0)
|
715
|
|
- // t2 := time.Unix(int64(order.SettleEndTime), 0)
|
716
|
|
- // dateStartStr := t.Format("2006-01-02")
|
717
|
|
- // dateEndStr := t2.Format("2006-01-02")
|
718
|
|
- // struct4101.SetlBegnDate = dateStartStr
|
719
|
|
- // struct4101.SetlEndDate = dateEndStr
|
720
|
|
- //}
|
721
|
712
|
|
722
|
713
|
var rf []CustomFundPay
|
723
|
714
|
json.Unmarshal([]byte(order.SetlDetail), &rf)
|
|
@@ -1143,8 +1134,14 @@ func (c *HisApiController) GetSettleList() {
|
1143
|
1134
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
1144
|
1135
|
return
|
1145
|
1136
|
}
|
1146
|
|
-
|
1147
|
1137
|
if res.Infcode != 0 {
|
|
1138
|
+ order.FaPiaoNumber = new_fapiao_number
|
|
1139
|
+ order.FaPiaoCode = last_order.FaPiaoCode
|
|
1140
|
+ err := service.UpdateOrder(order)
|
|
1141
|
+ if err != nil {
|
|
1142
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1143
|
+ return
|
|
1144
|
+ }
|
1148
|
1145
|
c.ServeSuccessJSON(map[string]interface{}{
|
1149
|
1146
|
"failed_code": -10,
|
1150
|
1147
|
"msg": res.ErrMsg,
|
|
@@ -3818,11 +3815,11 @@ func (c *HisApiController) GetUploadInfo() {
|
3818
|
3815
|
data["doctor_id"] = strconv.FormatInt(roles.AdminUserId, 10)
|
3819
|
3816
|
data["dept"] = strconv.FormatInt(patientPrescription.Departments, 10)
|
3820
|
3817
|
data["fixmedins_code"] = miConfig.Code
|
3821
|
|
- if (department.ID == 0 && adminUser.CurrentOrgId == 9919) || (department.ID == 0 && adminUser.CurrentOrgId == 10106) {
|
3822
|
|
- data["dept_code"] = "15"
|
3823
|
|
- } else {
|
3824
|
|
- data["dept_code"] = department.Number
|
3825
|
|
- }
|
|
3818
|
+ //if (department.ID == 0 && adminUser.CurrentOrgId == 9919) || (department.ID == 0 && adminUser.CurrentOrgId == 10106) {
|
|
3819
|
+ // data["dept_code"] = "15"
|
|
3820
|
+ //} else {
|
|
3821
|
+ data["dept_code"] = department.Number
|
|
3822
|
+ //}
|
3826
|
3823
|
|
3827
|
3824
|
data["insuplc_admdvs"] = his.InsuplcAdmdvs
|
3828
|
3825
|
data["mdtrtarea_admvs"] = miConfig.MdtrtareaAdmvs
|