|
@@ -797,6 +797,8 @@ func (c *PublicApiController) GetBaiLinExportData() {
|
797
|
797
|
|
798
|
798
|
func (c *HisApiController) GetHisUnChargePatientList() {
|
799
|
799
|
record_date := c.GetString("record_date")
|
|
800
|
+ sch_type, _ := c.GetInt64("sch_type")
|
|
801
|
+
|
800
|
802
|
timeLayout := "2006-01-02"
|
801
|
803
|
loc, _ := time.LoadLocation("Local")
|
802
|
804
|
theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
|
@@ -808,7 +810,7 @@ func (c *HisApiController) GetHisUnChargePatientList() {
|
808
|
810
|
adminInfo := c.GetAdminUserInfo()
|
809
|
811
|
var tempPatients []*service.NewTempPatients
|
810
|
812
|
//tempPatients, _ := service.GetAllChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
811
|
|
- tempPatients, _ = service.GetNewAllUnChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
|
813
|
+ tempPatients, _ = service.GetNewAllUnChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime, sch_type)
|
812
|
814
|
var patients []*service.NewTempPatients
|
813
|
815
|
var patients_two []*service.NewTempPatients
|
814
|
816
|
|
|
@@ -6201,6 +6203,7 @@ func (c *HisApiController) GetHisOrderList() {
|
6201
|
6203
|
charge_type, _ := c.GetInt64("charge_type", 0)
|
6202
|
6204
|
sch_type, _ := c.GetInt64("sch_type", 0)
|
6203
|
6205
|
zone_type, _ := c.GetInt64("zone_type", 0)
|
|
6206
|
+ med_type, _ := c.GetInt64("med_type", 0)
|
6204
|
6207
|
|
6205
|
6208
|
timeLayout := "2006-01-02"
|
6206
|
6209
|
loc, _ := time.LoadLocation("Local")
|
|
@@ -6227,7 +6230,7 @@ func (c *HisApiController) GetHisOrderList() {
|
6227
|
6230
|
|
6228
|
6231
|
adminUser := c.GetAdminUserInfo()
|
6229
|
6232
|
org_id := adminUser.CurrentOrgId
|
6230
|
|
- order, err, total := service.GetHisOrderList(org_id, page, limit, startTime, endTime, types, keywords, p_type, sort_type, start_time, end_time, charge_type, sch_type, zone_type)
|
|
6233
|
+ order, err, total := service.GetHisOrderList(org_id, page, limit, startTime, endTime, types, keywords, p_type, sort_type, start_time, end_time, charge_type, sch_type, zone_type, med_type)
|
6231
|
6234
|
|
6232
|
6235
|
for _, item := range order {
|
6233
|
6236
|
info, _ := service.GetHisPrescriptionByPatientID(item.PatientId, item.UserOrgId)
|
|
@@ -6797,6 +6800,26 @@ func (c *HisApiController) GetUploadInfo() {
|
6797
|
6800
|
|
6798
|
6801
|
dec_way := c.GetString("dec_way") //是否使用押金支付bool类型
|
6799
|
6802
|
tmp_decimal := c.GetString("tmp_decimal")
|
|
6803
|
+
|
|
6804
|
+ //last_order, _ := service.GetLastHisOrderThree(c.GetAdminUserInfo().CurrentOrgId)
|
|
6805
|
+ max_order, _ := service.GetLastHisOrderTwo(c.GetAdminUserInfo().CurrentOrgId)
|
|
6806
|
+ count, _ := strconv.ParseInt(max_order.FaPiaoNumber, 10, 64)
|
|
6807
|
+ fmt.Println(count)
|
|
6808
|
+ var zero string
|
|
6809
|
+ number := count + 1
|
|
6810
|
+ if number >= 1000 {
|
|
6811
|
+ zero = "0000" + strconv.FormatInt(number, 10)
|
|
6812
|
+ } else if number >= 10000 {
|
|
6813
|
+ zero = "000" + strconv.FormatInt(number, 10)
|
|
6814
|
+ } else if number >= 100000 {
|
|
6815
|
+ zero = "00" + strconv.FormatInt(number, 10)
|
|
6816
|
+ } else if number >= 1000000 {
|
|
6817
|
+ zero = "0" + strconv.FormatInt(number, 10)
|
|
6818
|
+ } else {
|
|
6819
|
+ zero = strconv.FormatInt(number, 10)
|
|
6820
|
+ }
|
|
6821
|
+ fapiao_number = zero
|
|
6822
|
+
|
6800
|
6823
|
var decimal float64 //本次使用的押金
|
6801
|
6824
|
var errmsg error
|
6802
|
6825
|
tx := service.XTWriteDB().Begin() //开了事务
|
|
@@ -7690,6 +7713,7 @@ func (this *HisApiController) GetHisDayPrescription() {
|
7690
|
7713
|
func (c *HisApiController) GetHisChargePatientList() {
|
7691
|
7714
|
record_date := c.GetString("record_date")
|
7692
|
7715
|
order_status, _ := c.GetInt64("type")
|
|
7716
|
+ sch_type, _ := c.GetInt64("sch_type")
|
7693
|
7717
|
|
7694
|
7718
|
timeLayout := "2006-01-02"
|
7695
|
7719
|
loc, _ := time.LoadLocation("Local")
|
|
@@ -7703,9 +7727,9 @@ func (c *HisApiController) GetHisChargePatientList() {
|
7703
|
7727
|
var tempPatients []*service.NewTempPatients
|
7704
|
7728
|
//tempPatients, _ := service.GetAllChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
7705
|
7729
|
if order_status != 2 {
|
7706
|
|
- tempPatients, _ = service.GetNewAllUnChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
|
7730
|
+ tempPatients, _ = service.GetNewAllUnChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime, sch_type)
|
7707
|
7731
|
} else {
|
7708
|
|
- tempPatients, _ = service.GetNewAllChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime)
|
|
7732
|
+ tempPatients, _ = service.GetNewAllChargeHisPatientList(adminInfo.CurrentOrgId, "", recordDateTime, sch_type)
|
7709
|
7733
|
}
|
7710
|
7734
|
|
7711
|
7735
|
var patients []*service.NewTempPatients
|
|
@@ -8867,8 +8891,9 @@ func (c *HisApiController) GetFaPiaoData() {
|
8867
|
8891
|
admin, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, adminUser.AdminUser.Id)
|
8868
|
8892
|
|
8869
|
8893
|
c.ServeSuccessJSON(map[string]interface{}{
|
8870
|
|
- "order_number": order.Number, //业务流水号
|
8871
|
|
- "id_card_no": his.IdCardNo, //社会保障号
|
|
8894
|
+ "order_number": order.Number, //业务流水号
|
|
8895
|
+ "id_card_no": his.IdCardNo, //社会保障号
|
|
8896
|
+ "patient": patient,
|
8872
|
8897
|
"department_name": department.Name, //科室
|
8873
|
8898
|
"number": his.Number, //门诊号
|
8874
|
8899
|
"date": order.SettleAccountsDate, //结算日期
|