Browse Source

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

csx 3 years ago
parent
commit
72a97b5037
2 changed files with 7 additions and 7 deletions
  1. 6 6
      controllers/sg/his_api_controller.go
  2. 1 1
      service/his_service.go

+ 6 - 6
controllers/sg/his_api_controller.go View File

@@ -996,11 +996,11 @@ func (c *HisApiController) GetSettleList() {
996 996
 
997 997
 func (c *HisApiController) GetBatchSettleList() {
998 998
 	org_id, _ := beego.AppConfig.Int64("org_id")
999
-	stage, _ := c.GetInt64("stage")
1000
-	orders, _ := service.GetAllHisOrderErr(org_id, stage)
999
+	//stage, _ := c.GetInt64("stage")
1000
+	orders, _ := service.GetAllHisOrder(org_id)
1001 1001
 
1002 1002
 	for _, item := range orders {
1003
-		order_id := item.PatientId
1003
+		order_id := item.ID
1004 1004
 		order, _ := service.GetHisOrderByIDTwo(order_id)
1005 1005
 		roles, _ := service.GetDoctorListTwo(c.GetAdminUserInfo().CurrentOrgId)
1006 1006
 		his, _ := service.GetHisPatientByNumber(order.MdtrtId)
@@ -1700,7 +1700,7 @@ func (c *HisApiController) GetBatchSettleList() {
1700 1700
 				ErrMsg:    res.ErrMsg + "解析失败",
1701 1701
 				Status:    1,
1702 1702
 				PatientId: order_id,
1703
-				Stage:     21,
1703
+				Stage:     30,
1704 1704
 			}
1705 1705
 			service.CreateErrMsgLog(errlog)
1706 1706
 			continue
@@ -1714,8 +1714,8 @@ func (c *HisApiController) GetBatchSettleList() {
1714 1714
 				Mtime:     time.Now().Unix(),
1715 1715
 				ErrMsg:    res.ErrMsg,
1716 1716
 				Status:    1,
1717
-				PatientId: item.ID,
1718
-				Stage:     20,
1717
+				PatientId: order_id,
1718
+				Stage:     30,
1719 1719
 			}
1720 1720
 			service.CreateErrMsgLog(errlog)
1721 1721
 			continue

+ 1 - 1
service/his_service.go View File

@@ -1364,7 +1364,7 @@ func GetPsnByPatientId(patient_id int64) (psn models.HisPsn, err error) {
1364 1364
 }
1365 1365
 
1366 1366
 func GetAllHisOrder(org_id int64) (his []*models.HisOrder, err error) {
1367
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND setl_id <> '' AND id >= 2499", org_id).Order("setl_time asc").Find(&his).Error
1367
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND setl_id <> '' AND id > 35355 AND  fa_piao_code <> ''", org_id).Order("setl_time asc").Find(&his).Error
1368 1368
 	return
1369 1369
 }
1370 1370
 func GetAllHisOrderErr(org_id int64, stage int64) (his []*models.HisOrderError, err error) {