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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.lilosoft.api.api;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import org.springframework.stereotype.Component;
import retrofit2.http.*;
import java.util.HashMap;
import java.util.Map;
@Component
@RetrofitClient(baseUrl = "${api.baseUrl}", connectTimeoutMs=100000,readTimeoutMs=100000,writeTimeoutMs = 100000)
public interface ApplyApi {
/**
* 获取事项信息
* @param itemCode 事项CODE 必填
* @param type 基本要素:"info",申请材料:"material" 非必填
*/
@GET
HashMap<String, Object> getItemInfoByItemCode(@Url String url,@Query("itemCode") String itemCode, @Query("type") String type);
/**
* 根据事项ID获取表单
* @param itemCode 事项CODE 必填
*/
@GET
HashMap<String, Object> getFormInfo(@Url String url,@Query("itemCode") String itemCode);
/**
* 获取表单字段信息
* @param formId 表单ID 必填
*/
@GET
HashMap<String, Object> getFieldList(@Url String url,@Query("formId") String formId);
/**
* 提交表单 Content-Type:application/x-www-form-urlencoded
* @param map
*/
@POST
@FormUrlEncoded
HashMap<String, Object> saveDataEx(@Url String url,@FieldMap HashMap<String, Object> map);
/**
* 上传材料
* @param file
* @param map
* @return
*/
@POST
@Multipart
HashMap<String, Object> upload(@Url String url,@Part MultipartBody.Part file,@PartMap Map<String, RequestBody> map);
/**
* 网上申报 Content-Type:application/x-www-form-urlencoded
* @param postdata
*/
@POST
@FormUrlEncoded
HashMap<String, Object> webApply(@Url String url,@Field("postdata") String postdata);
}