|
@@ -3065,4 +3065,503 @@ func (this *FunctionBaseAPIController) GetYesterdayEntrylist() {
|
3065
|
3065
|
"userorg":userorg,
|
3066
|
3066
|
"total":total,
|
3067
|
3067
|
})
|
|
3068
|
+}
|
|
3069
|
+
|
|
3070
|
+func (this *FunctionBaseAPIController) GetWeekEntrylist() {
|
|
3071
|
+ range_data := this.GetString("range_data")
|
|
3072
|
+ fmt.Println("本日出库单",range_data)
|
|
3073
|
+ page, _ := this.GetInt64("page", 1)
|
|
3074
|
+ fmt.Println("页面",page)
|
|
3075
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3076
|
+ fmt.Println("limit",limit)
|
|
3077
|
+ if page <= 0 {
|
|
3078
|
+ page = 1
|
|
3079
|
+ }
|
|
3080
|
+ if limit <= 0 {
|
|
3081
|
+ limit = 10
|
|
3082
|
+ }
|
|
3083
|
+ var rangeDate *time.Time
|
|
3084
|
+ var parseDateErr error
|
|
3085
|
+ var rangeTimeStamp int64
|
|
3086
|
+
|
|
3087
|
+ if len(range_data) > 0 {
|
|
3088
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3089
|
+ if parseDateErr != nil {
|
|
3090
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3091
|
+ return
|
|
3092
|
+ }
|
|
3093
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3094
|
+ } else {
|
|
3095
|
+ rangeTimeStamp = 0
|
|
3096
|
+ }
|
|
3097
|
+ now := time.Now().Unix()
|
|
3098
|
+ userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
|
|
3099
|
+ //3代表血透,2//退出登录状态
|
|
3100
|
+ //userorgs, err := service.GetTodayLogout(0, 2)
|
|
3101
|
+ //fmt.Scan("userorgs是什么",userorgs)
|
|
3102
|
+ fmt.Println("userorg是什么",userorg)
|
|
3103
|
+ fmt.Println("err",err)
|
|
3104
|
+ fmt.Println("total是什么",total)
|
|
3105
|
+ if err !=nil{
|
|
3106
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3107
|
+ return
|
|
3108
|
+ }
|
|
3109
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3110
|
+ "userorg":userorg,
|
|
3111
|
+ "total":total,
|
|
3112
|
+ })
|
|
3113
|
+}
|
|
3114
|
+
|
|
3115
|
+func (this *FunctionBaseAPIController) GetMonthEntrylist() {
|
|
3116
|
+ range_data := this.GetString("range_data")
|
|
3117
|
+ fmt.Println("本日出库单",range_data)
|
|
3118
|
+ page, _ := this.GetInt64("page", 1)
|
|
3119
|
+ fmt.Println("页面",page)
|
|
3120
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3121
|
+ fmt.Println("limit",limit)
|
|
3122
|
+ if page <= 0 {
|
|
3123
|
+ page = 1
|
|
3124
|
+ }
|
|
3125
|
+ if limit <= 0 {
|
|
3126
|
+ limit = 10
|
|
3127
|
+ }
|
|
3128
|
+ var rangeDate *time.Time
|
|
3129
|
+ var parseDateErr error
|
|
3130
|
+ var rangeTimeStamp int64
|
|
3131
|
+
|
|
3132
|
+ if len(range_data) > 0 {
|
|
3133
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3134
|
+ if parseDateErr != nil {
|
|
3135
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3136
|
+ return
|
|
3137
|
+ }
|
|
3138
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3139
|
+ } else {
|
|
3140
|
+ rangeTimeStamp = 0
|
|
3141
|
+ }
|
|
3142
|
+ now := time.Now().Unix()
|
|
3143
|
+ userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
|
|
3144
|
+ //3代表血透,2//退出登录状态
|
|
3145
|
+ //userorgs, err := service.GetTodayLogout(0, 2)
|
|
3146
|
+ //fmt.Scan("userorgs是什么",userorgs)
|
|
3147
|
+ fmt.Println("userorg是什么",userorg)
|
|
3148
|
+ fmt.Println("err",err)
|
|
3149
|
+ fmt.Println("total是什么",total)
|
|
3150
|
+ if err !=nil{
|
|
3151
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3152
|
+ return
|
|
3153
|
+ }
|
|
3154
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3155
|
+ "userorg":userorg,
|
|
3156
|
+ "total":total,
|
|
3157
|
+ })
|
|
3158
|
+}
|
|
3159
|
+
|
|
3160
|
+func (this *FunctionBaseAPIController) GetThreeMonthEntrylist() {
|
|
3161
|
+ range_data := this.GetString("range_data")
|
|
3162
|
+ fmt.Println("本日出库单",range_data)
|
|
3163
|
+ page, _ := this.GetInt64("page", 1)
|
|
3164
|
+ fmt.Println("页面",page)
|
|
3165
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3166
|
+ fmt.Println("limit",limit)
|
|
3167
|
+ if page <= 0 {
|
|
3168
|
+ page = 1
|
|
3169
|
+ }
|
|
3170
|
+ if limit <= 0 {
|
|
3171
|
+ limit = 10
|
|
3172
|
+ }
|
|
3173
|
+ var rangeDate *time.Time
|
|
3174
|
+ var parseDateErr error
|
|
3175
|
+ var rangeTimeStamp int64
|
|
3176
|
+
|
|
3177
|
+ if len(range_data) > 0 {
|
|
3178
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3179
|
+ if parseDateErr != nil {
|
|
3180
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3181
|
+ return
|
|
3182
|
+ }
|
|
3183
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3184
|
+ } else {
|
|
3185
|
+ rangeTimeStamp = 0
|
|
3186
|
+ }
|
|
3187
|
+ now := time.Now().Unix()
|
|
3188
|
+ userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
|
|
3189
|
+ //3代表血透,2//退出登录状态
|
|
3190
|
+ //userorgs, err := service.GetTodayLogout(0, 2)
|
|
3191
|
+ //fmt.Scan("userorgs是什么",userorgs)
|
|
3192
|
+ fmt.Println("userorg是什么",userorg)
|
|
3193
|
+ fmt.Println("err",err)
|
|
3194
|
+ fmt.Println("total是什么",total)
|
|
3195
|
+ if err !=nil{
|
|
3196
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3197
|
+ return
|
|
3198
|
+ }
|
|
3199
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3200
|
+ "userorg":userorg,
|
|
3201
|
+ "total":total,
|
|
3202
|
+ })
|
|
3203
|
+}
|
|
3204
|
+
|
|
3205
|
+func (this *FunctionBaseAPIController) GetHalfYearEntrylist() {
|
|
3206
|
+ range_data := this.GetString("range_data")
|
|
3207
|
+ fmt.Println("本日出库单",range_data)
|
|
3208
|
+ page, _ := this.GetInt64("page", 1)
|
|
3209
|
+ fmt.Println("页面",page)
|
|
3210
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3211
|
+ fmt.Println("limit",limit)
|
|
3212
|
+ if page <= 0 {
|
|
3213
|
+ page = 1
|
|
3214
|
+ }
|
|
3215
|
+ if limit <= 0 {
|
|
3216
|
+ limit = 10
|
|
3217
|
+ }
|
|
3218
|
+ var rangeDate *time.Time
|
|
3219
|
+ var parseDateErr error
|
|
3220
|
+ var rangeTimeStamp int64
|
|
3221
|
+
|
|
3222
|
+ if len(range_data) > 0 {
|
|
3223
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3224
|
+ if parseDateErr != nil {
|
|
3225
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3226
|
+ return
|
|
3227
|
+ }
|
|
3228
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3229
|
+ } else {
|
|
3230
|
+ rangeTimeStamp = 0
|
|
3231
|
+ }
|
|
3232
|
+ now := time.Now().Unix()
|
|
3233
|
+ userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
|
|
3234
|
+ //3代表血透,2//退出登录状态
|
|
3235
|
+ //userorgs, err := service.GetTodayLogout(0, 2)
|
|
3236
|
+ //fmt.Scan("userorgs是什么",userorgs)
|
|
3237
|
+ fmt.Println("userorg是什么",userorg)
|
|
3238
|
+ fmt.Println("err",err)
|
|
3239
|
+ fmt.Println("total是什么",total)
|
|
3240
|
+ if err !=nil{
|
|
3241
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3242
|
+ return
|
|
3243
|
+ }
|
|
3244
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3245
|
+ "userorg":userorg,
|
|
3246
|
+ "total":total,
|
|
3247
|
+ })
|
|
3248
|
+}
|
|
3249
|
+
|
|
3250
|
+func (this *FunctionBaseAPIController) GetYearEntrylist() {
|
|
3251
|
+ range_data := this.GetString("range_data")
|
|
3252
|
+ fmt.Println("本日出库单",range_data)
|
|
3253
|
+ page, _ := this.GetInt64("page", 1)
|
|
3254
|
+ fmt.Println("页面",page)
|
|
3255
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3256
|
+ fmt.Println("limit",limit)
|
|
3257
|
+ if page <= 0 {
|
|
3258
|
+ page = 1
|
|
3259
|
+ }
|
|
3260
|
+ if limit <= 0 {
|
|
3261
|
+ limit = 10
|
|
3262
|
+ }
|
|
3263
|
+ var rangeDate *time.Time
|
|
3264
|
+ var parseDateErr error
|
|
3265
|
+ var rangeTimeStamp int64
|
|
3266
|
+
|
|
3267
|
+ if len(range_data) > 0 {
|
|
3268
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3269
|
+ if parseDateErr != nil {
|
|
3270
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3271
|
+ return
|
|
3272
|
+ }
|
|
3273
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3274
|
+ } else {
|
|
3275
|
+ rangeTimeStamp = 0
|
|
3276
|
+ }
|
|
3277
|
+ now := time.Now().Unix()
|
|
3278
|
+ userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
|
|
3279
|
+ //3代表血透,2//退出登录状态
|
|
3280
|
+ //userorgs, err := service.GetTodayLogout(0, 2)
|
|
3281
|
+ //fmt.Scan("userorgs是什么",userorgs)
|
|
3282
|
+ fmt.Println("userorg是什么",userorg)
|
|
3283
|
+ fmt.Println("err",err)
|
|
3284
|
+ fmt.Println("total是什么",total)
|
|
3285
|
+ if err !=nil{
|
|
3286
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3287
|
+ return
|
|
3288
|
+ }
|
|
3289
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3290
|
+ "userorg":userorg,
|
|
3291
|
+ "total":total,
|
|
3292
|
+ })
|
|
3293
|
+}
|
|
3294
|
+
|
|
3295
|
+func (this *FunctionBaseAPIController) GetTodayExitlist() {
|
|
3296
|
+ range_data := this.GetString("range_data")
|
|
3297
|
+ fmt.Println("本日出库单",range_data)
|
|
3298
|
+ page, _ := this.GetInt64("page", 1)
|
|
3299
|
+ fmt.Println("页面",page)
|
|
3300
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3301
|
+ fmt.Println("limit",limit)
|
|
3302
|
+ if page <= 0 {
|
|
3303
|
+ page = 1
|
|
3304
|
+ }
|
|
3305
|
+ if limit <= 0 {
|
|
3306
|
+ limit = 10
|
|
3307
|
+ }
|
|
3308
|
+ var rangeDate *time.Time
|
|
3309
|
+ var parseDateErr error
|
|
3310
|
+ var rangeTimeStamp int64
|
|
3311
|
+
|
|
3312
|
+ if len(range_data) > 0 {
|
|
3313
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3314
|
+ if parseDateErr != nil {
|
|
3315
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3316
|
+ return
|
|
3317
|
+ }
|
|
3318
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3319
|
+ } else {
|
|
3320
|
+ rangeTimeStamp = 0
|
|
3321
|
+ }
|
|
3322
|
+ now := time.Now().Unix()
|
|
3323
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3324
|
+ if err !=nil{
|
|
3325
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3326
|
+ return
|
|
3327
|
+ }
|
|
3328
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3329
|
+ "userorg":userorg,
|
|
3330
|
+ "total":total,
|
|
3331
|
+ })
|
|
3332
|
+}
|
|
3333
|
+
|
|
3334
|
+func (this *FunctionBaseAPIController) GetYesterdayExitlist() {
|
|
3335
|
+ range_data := this.GetString("range_data")
|
|
3336
|
+ fmt.Println("本日出库单",range_data)
|
|
3337
|
+ page, _ := this.GetInt64("page", 1)
|
|
3338
|
+ fmt.Println("页面",page)
|
|
3339
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3340
|
+ fmt.Println("limit",limit)
|
|
3341
|
+ if page <= 0 {
|
|
3342
|
+ page = 1
|
|
3343
|
+ }
|
|
3344
|
+ if limit <= 0 {
|
|
3345
|
+ limit = 10
|
|
3346
|
+ }
|
|
3347
|
+ var rangeDate *time.Time
|
|
3348
|
+ var parseDateErr error
|
|
3349
|
+ var rangeTimeStamp int64
|
|
3350
|
+
|
|
3351
|
+ if len(range_data) > 0 {
|
|
3352
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3353
|
+ if parseDateErr != nil {
|
|
3354
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3355
|
+ return
|
|
3356
|
+ }
|
|
3357
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3358
|
+ } else {
|
|
3359
|
+ rangeTimeStamp = 0
|
|
3360
|
+ }
|
|
3361
|
+ now := time.Now().Unix()
|
|
3362
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3363
|
+ if err !=nil{
|
|
3364
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3365
|
+ return
|
|
3366
|
+ }
|
|
3367
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3368
|
+ "userorg":userorg,
|
|
3369
|
+ "total":total,
|
|
3370
|
+ })
|
|
3371
|
+}
|
|
3372
|
+
|
|
3373
|
+func (this *FunctionBaseAPIController) GetWeekExitlist() {
|
|
3374
|
+ range_data := this.GetString("range_data")
|
|
3375
|
+ fmt.Println("本日出库单",range_data)
|
|
3376
|
+ page, _ := this.GetInt64("page", 1)
|
|
3377
|
+ fmt.Println("页面",page)
|
|
3378
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3379
|
+ fmt.Println("limit",limit)
|
|
3380
|
+ if page <= 0 {
|
|
3381
|
+ page = 1
|
|
3382
|
+ }
|
|
3383
|
+ if limit <= 0 {
|
|
3384
|
+ limit = 10
|
|
3385
|
+ }
|
|
3386
|
+ var rangeDate *time.Time
|
|
3387
|
+ var parseDateErr error
|
|
3388
|
+ var rangeTimeStamp int64
|
|
3389
|
+
|
|
3390
|
+ if len(range_data) > 0 {
|
|
3391
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3392
|
+ if parseDateErr != nil {
|
|
3393
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3394
|
+ return
|
|
3395
|
+ }
|
|
3396
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3397
|
+ } else {
|
|
3398
|
+ rangeTimeStamp = 0
|
|
3399
|
+ }
|
|
3400
|
+ now := time.Now().Unix()
|
|
3401
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3402
|
+ if err !=nil{
|
|
3403
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3404
|
+ return
|
|
3405
|
+ }
|
|
3406
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3407
|
+ "userorg":userorg,
|
|
3408
|
+ "total":total,
|
|
3409
|
+ })
|
|
3410
|
+}
|
|
3411
|
+
|
|
3412
|
+func (this *FunctionBaseAPIController) GetMonthExitlist() {
|
|
3413
|
+ range_data := this.GetString("range_data")
|
|
3414
|
+ fmt.Println("本日出库单",range_data)
|
|
3415
|
+ page, _ := this.GetInt64("page", 1)
|
|
3416
|
+ fmt.Println("页面",page)
|
|
3417
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3418
|
+ fmt.Println("limit",limit)
|
|
3419
|
+ if page <= 0 {
|
|
3420
|
+ page = 1
|
|
3421
|
+ }
|
|
3422
|
+ if limit <= 0 {
|
|
3423
|
+ limit = 10
|
|
3424
|
+ }
|
|
3425
|
+ var rangeDate *time.Time
|
|
3426
|
+ var parseDateErr error
|
|
3427
|
+ var rangeTimeStamp int64
|
|
3428
|
+
|
|
3429
|
+ if len(range_data) > 0 {
|
|
3430
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3431
|
+ if parseDateErr != nil {
|
|
3432
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3433
|
+ return
|
|
3434
|
+ }
|
|
3435
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3436
|
+ } else {
|
|
3437
|
+ rangeTimeStamp = 0
|
|
3438
|
+ }
|
|
3439
|
+ now := time.Now().Unix()
|
|
3440
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3441
|
+ if err !=nil{
|
|
3442
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3443
|
+ return
|
|
3444
|
+ }
|
|
3445
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3446
|
+ "userorg":userorg,
|
|
3447
|
+ "total":total,
|
|
3448
|
+ })
|
|
3449
|
+}
|
|
3450
|
+
|
|
3451
|
+func (this *FunctionBaseAPIController) GetThreeMonthExitlist() {
|
|
3452
|
+ range_data := this.GetString("range_data")
|
|
3453
|
+ fmt.Println("本日出库单",range_data)
|
|
3454
|
+ page, _ := this.GetInt64("page", 1)
|
|
3455
|
+ fmt.Println("页面",page)
|
|
3456
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3457
|
+ fmt.Println("limit",limit)
|
|
3458
|
+ if page <= 0 {
|
|
3459
|
+ page = 1
|
|
3460
|
+ }
|
|
3461
|
+ if limit <= 0 {
|
|
3462
|
+ limit = 10
|
|
3463
|
+ }
|
|
3464
|
+ var rangeDate *time.Time
|
|
3465
|
+ var parseDateErr error
|
|
3466
|
+ var rangeTimeStamp int64
|
|
3467
|
+
|
|
3468
|
+ if len(range_data) > 0 {
|
|
3469
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3470
|
+ if parseDateErr != nil {
|
|
3471
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3472
|
+ return
|
|
3473
|
+ }
|
|
3474
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3475
|
+ } else {
|
|
3476
|
+ rangeTimeStamp = 0
|
|
3477
|
+ }
|
|
3478
|
+ now := time.Now().Unix()
|
|
3479
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3480
|
+ if err !=nil{
|
|
3481
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3482
|
+ return
|
|
3483
|
+ }
|
|
3484
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3485
|
+ "userorg":userorg,
|
|
3486
|
+ "total":total,
|
|
3487
|
+ })
|
|
3488
|
+}
|
|
3489
|
+
|
|
3490
|
+func (this *FunctionBaseAPIController) GetHalfExitlist() {
|
|
3491
|
+ range_data := this.GetString("range_data")
|
|
3492
|
+ fmt.Println("本日出库单",range_data)
|
|
3493
|
+ page, _ := this.GetInt64("page", 1)
|
|
3494
|
+ fmt.Println("页面",page)
|
|
3495
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3496
|
+ fmt.Println("limit",limit)
|
|
3497
|
+ if page <= 0 {
|
|
3498
|
+ page = 1
|
|
3499
|
+ }
|
|
3500
|
+ if limit <= 0 {
|
|
3501
|
+ limit = 10
|
|
3502
|
+ }
|
|
3503
|
+ var rangeDate *time.Time
|
|
3504
|
+ var parseDateErr error
|
|
3505
|
+ var rangeTimeStamp int64
|
|
3506
|
+
|
|
3507
|
+ if len(range_data) > 0 {
|
|
3508
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3509
|
+ if parseDateErr != nil {
|
|
3510
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3511
|
+ return
|
|
3512
|
+ }
|
|
3513
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3514
|
+ } else {
|
|
3515
|
+ rangeTimeStamp = 0
|
|
3516
|
+ }
|
|
3517
|
+ now := time.Now().Unix()
|
|
3518
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3519
|
+ if err !=nil{
|
|
3520
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3521
|
+ return
|
|
3522
|
+ }
|
|
3523
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3524
|
+ "userorg":userorg,
|
|
3525
|
+ "total":total,
|
|
3526
|
+ })
|
|
3527
|
+}
|
|
3528
|
+
|
|
3529
|
+func (this *FunctionBaseAPIController) GetYearExitlist() {
|
|
3530
|
+ range_data := this.GetString("range_data")
|
|
3531
|
+ fmt.Println("本日出库单",range_data)
|
|
3532
|
+ page, _ := this.GetInt64("page", 1)
|
|
3533
|
+ fmt.Println("页面",page)
|
|
3534
|
+ limit, _ := this.GetInt64("limit", 10)
|
|
3535
|
+ fmt.Println("limit",limit)
|
|
3536
|
+ if page <= 0 {
|
|
3537
|
+ page = 1
|
|
3538
|
+ }
|
|
3539
|
+ if limit <= 0 {
|
|
3540
|
+ limit = 10
|
|
3541
|
+ }
|
|
3542
|
+ var rangeDate *time.Time
|
|
3543
|
+ var parseDateErr error
|
|
3544
|
+ var rangeTimeStamp int64
|
|
3545
|
+
|
|
3546
|
+ if len(range_data) > 0 {
|
|
3547
|
+ rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
|
|
3548
|
+ if parseDateErr != nil {
|
|
3549
|
+ this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
|
|
3550
|
+ return
|
|
3551
|
+ }
|
|
3552
|
+ rangeTimeStamp = rangeDate.Unix()
|
|
3553
|
+ } else {
|
|
3554
|
+ rangeTimeStamp = 0
|
|
3555
|
+ }
|
|
3556
|
+ now := time.Now().Unix()
|
|
3557
|
+ userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
|
|
3558
|
+ fmt.Println("错误是什么",err)
|
|
3559
|
+ if err !=nil{
|
|
3560
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
|
|
3561
|
+ return
|
|
3562
|
+ }
|
|
3563
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
3564
|
+ "userorg":userorg,
|
|
3565
|
+ "total":total,
|
|
3566
|
+ })
|
3068
|
3567
|
}
|