12345678910111213141516171819202122232425262728293031323334353637 |
- package controllers
-
- import (
- "XT_New/service"
- "github.com/astaxie/beego"
- )
-
- type HisExportDataController struct {
- BaseAuthAPIController
- }
-
- func HisExportDataApiRegistRouters() {
-
- beego.Router("/api/export", &HisExportDataController{}, "Get:GetExportData")
- }
-
- func (this *HisExportDataController) GetExportData() {
- start_time := this.GetString("start_time")
- start_time = start_time + " 00:00:00"
- end_time := this.GetString("end_time")
- end_time = end_time + " 23:59:59"
-
- type_str := this.GetString("type")
- if type_str == "1" {
- ps, _ := service.GetHisOrderDetailFor310(start_time, end_time, this.GetAdminUserInfo().CurrentOrgId)
- this.ServeSuccessJSON(map[string]interface{}{
- "order": ps,
- })
- } else {
- ps, _ := service.GetHisOrderDetailFor390(start_time, end_time, this.GetAdminUserInfo().CurrentOrgId)
- this.ServeSuccessJSON(map[string]interface{}{
- "order": ps,
- })
- }
-
- }
|