1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cn.flightfeather.thirdappmodule.httpservice
 
import cn.flightfeather.thirdappmodule.model.bean.BaseResponse
import cn.flightfeather.thirdappmodule.model.bean.NightWorkFileVo
import cn.flightfeather.thirdappmodule.model.bean.NightWorkSummary
import cn.flightfeather.thirdappmodule.util.Constant
import io.reactivex.Observable
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query
 
/**
 * @author riku
 * Date: 2020/12/29
 */
interface NightWorkService {
    @GET("nightwork/record/all")
    fun getRecord(
//            @Query("cityCode") cityCode: String?,
            @Query("districtCode") districtCode: String,
            @Query("page") page: Int,
            @Query("perPage") perPage: Int = Constant.PAGE_SIZE
    ): Observable<Response<BaseResponse<List<NightWorkFileVo>>>>
 
    @GET("nightwork/record")
    fun getNightWorkFile(
            @Query("userId") userId: String,
            @Query("isRead") isRead: Boolean? = null,
            @Query("page") page: Int,
            @Query("perPage") perPage: Int = Constant.PAGE_SIZE
    ): Observable<Response<BaseResponse<List<NightWorkFileVo>>>>
 
    @POST("nightwork/sign")
    fun signFile(
            @Query("userId") userId: String,
            @Query("fileNum") fileNum: String,
            @Query("id") id: Int
    ): Observable<Response<BaseResponse<Int>>>
 
    @GET("nightwork/summary")
    fun getSummary(
//            @Query("cityCode") cityCode: String?,
            @Query("districtCode") districtCode: String
    ): Observable<Response<BaseResponse<NightWorkSummary>>>
}