add compare interface
Showing
9 changed files
with
1133 additions
and
98 deletions
docs/comparison.yaml
0 → 100644
| 1 | swagger: '2.0' | ||
| 2 | info: | ||
| 3 | title: 接口文档 | ||
| 4 | description: 宝马ocr/biz_logic接口文档 | ||
| 5 | version: 1.0.0 | ||
| 6 | host: staging-bmw-ocr.situdata.com | ||
| 7 | basePath: / | ||
| 8 | tags: | ||
| 9 | - name: info | ||
| 10 | description: 比对信息 | ||
| 11 | schemes: | ||
| 12 | - https | ||
| 13 | security: | ||
| 14 | - OAuth2: [] | ||
| 15 | paths: | ||
| 16 | /api/compare/v1: | ||
| 17 | post: | ||
| 18 | tags: | ||
| 19 | - info | ||
| 20 | summary: POS上传比对信息 | ||
| 21 | consumes: | ||
| 22 | - application/json | ||
| 23 | produces: | ||
| 24 | - application/json | ||
| 25 | parameters: | ||
| 26 | - in: body | ||
| 27 | name: body | ||
| 28 | required: true | ||
| 29 | schema: | ||
| 30 | $ref: '#/definitions/Comparison' | ||
| 31 | responses: | ||
| 32 | 200: | ||
| 33 | description: ok | ||
| 34 | schema: | ||
| 35 | $ref: '#/definitions/ApiResponse' | ||
| 36 | securityDefinitions: | ||
| 37 | OAuth2: | ||
| 38 | type: oauth2 | ||
| 39 | flow: application | ||
| 40 | description: 'This API uses OAuth 2 with the application(clientCredentials) grant | ||
| 41 | flow. | ||
| 42 | |||
| 43 | client_id=sMlciTkppsMzARwHpCVarm5q7DP2Vucj3ny8JFhw | ||
| 44 | |||
| 45 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | ||
| 46 | |||
| 47 | scopes=write | ||
| 48 | |||
| 49 | ' | ||
| 50 | tokenUrl: https://staging-bmw-ocr.situdata.com/api/oauth/token/ | ||
| 51 | scopes: | ||
| 52 | write: Grants write access | ||
| 53 | responses: | ||
| 54 | ErrorResponse: | ||
| 55 | description: 调用异常, 具体情况请参考`HTTP`状态码和`code`字段 | ||
| 56 | schema: | ||
| 57 | $ref: '#/definitions/ApiResponse' | ||
| 58 | NoContent: | ||
| 59 | description: 后台接收请求,但是没有响应内容 | ||
| 60 | schema: | ||
| 61 | $ref: '#/definitions/ApiResponse' | ||
| 62 | definitions: | ||
| 63 | individualCusInfo: | ||
| 64 | type: object | ||
| 65 | required: | ||
| 66 | - applicantType | ||
| 67 | - idType | ||
| 68 | - customerChineseName | ||
| 69 | - idNum | ||
| 70 | - idExpiryDate | ||
| 71 | - dateOfBirth | ||
| 72 | - companyName | ||
| 73 | - registeredCapital | ||
| 74 | - selfEmployedSubType | ||
| 75 | properties: | ||
| 76 | applicantType: | ||
| 77 | description: applicantType | ||
| 78 | type: string | ||
| 79 | example: COAPP | ||
| 80 | enum: | ||
| 81 | - COAPP | ||
| 82 | - CUSTR | ||
| 83 | - GAUTR1 | ||
| 84 | - GAUTR2 | ||
| 85 | idType: | ||
| 86 | description: idType | ||
| 87 | type: string | ||
| 88 | example: ITARI | ||
| 89 | enum: | ||
| 90 | - ITARI | ||
| 91 | - ITHKM | ||
| 92 | - ITPRC | ||
| 93 | - ITPSP | ||
| 94 | - ITRES | ||
| 95 | - ITTID | ||
| 96 | - ITUSC | ||
| 97 | - ITCCU | ||
| 98 | secondIdType: | ||
| 99 | description: secondIdType | ||
| 100 | type: string | ||
| 101 | example: ITARI | ||
| 102 | enum: | ||
| 103 | - ITARI | ||
| 104 | - ITHKM | ||
| 105 | - ITPRC | ||
| 106 | - ITPSP | ||
| 107 | - ITRES | ||
| 108 | - ITTID | ||
| 109 | customerChineseName: | ||
| 110 | description: customerChineseName | ||
| 111 | type: string | ||
| 112 | example: 李四 | ||
| 113 | idNum: | ||
| 114 | description: idNum | ||
| 115 | type: string | ||
| 116 | example: 111111199404251111 | ||
| 117 | secondIdNum: | ||
| 118 | description: secondIdNum | ||
| 119 | type: string | ||
| 120 | example: 111111199404251111 | ||
| 121 | idExpiryDate: | ||
| 122 | description: idExpiryDate | ||
| 123 | type: string | ||
| 124 | format: date | ||
| 125 | example: '2027-04-30' | ||
| 126 | dateOfBirth: | ||
| 127 | description: dateOfBirth | ||
| 128 | type: string | ||
| 129 | format: date | ||
| 130 | example: '2027-04-30' | ||
| 131 | companyName: | ||
| 132 | description: companyName | ||
| 133 | type: string | ||
| 134 | example: 北京思图场景数据科技服务有限公司 | ||
| 135 | registeredCapital: | ||
| 136 | description: registeredCapital | ||
| 137 | type: number | ||
| 138 | format: float | ||
| 139 | example: 1234.56 | ||
| 140 | selfEmployedSubType: | ||
| 141 | description: selfEmployedSubType | ||
| 142 | type: string | ||
| 143 | example: CSIBM | ||
| 144 | enum: | ||
| 145 | - CSIBM | ||
| 146 | - CSOTH | ||
| 147 | - CSSME | ||
| 148 | Comparison: | ||
| 149 | type: object | ||
| 150 | required: | ||
| 151 | - content | ||
| 152 | properties: | ||
| 153 | content: | ||
| 154 | description: 比对内容信息 | ||
| 155 | type: object | ||
| 156 | required: | ||
| 157 | - uniqSeq | ||
| 158 | - applicationId | ||
| 159 | - applicationEntity | ||
| 160 | - customerType | ||
| 161 | - applicationVersion | ||
| 162 | - vehicleStatus | ||
| 163 | - comments | ||
| 164 | - individualCusInfo | ||
| 165 | properties: | ||
| 166 | uniqSeq: | ||
| 167 | description: uniqSeq | ||
| 168 | type: string | ||
| 169 | example: 201809301905121000 | ||
| 170 | applicationId: | ||
| 171 | description: applicationId | ||
| 172 | type: string | ||
| 173 | example: CH-B100000123 | ||
| 174 | applicationEntity: | ||
| 175 | description: applicationEntity | ||
| 176 | type: string | ||
| 177 | example: HIL | ||
| 178 | enum: | ||
| 179 | - AFC | ||
| 180 | - HIL | ||
| 181 | customerType: | ||
| 182 | description: customerType | ||
| 183 | type: string | ||
| 184 | example: TCCOR | ||
| 185 | enum: | ||
| 186 | - TCCOR | ||
| 187 | - TCDAS | ||
| 188 | - TCFRE | ||
| 189 | - TCIAS | ||
| 190 | - TCIND | ||
| 191 | - TCSEP | ||
| 192 | - TCURE | ||
| 193 | applicationVersion: | ||
| 194 | description: applicationVersion | ||
| 195 | type: integer | ||
| 196 | example: 0 | ||
| 197 | vehicleStatus: | ||
| 198 | description: vehicleStatus | ||
| 199 | type: string | ||
| 200 | example: PCUSD | ||
| 201 | enum: | ||
| 202 | - PCUSD | ||
| 203 | - PCNEW | ||
| 204 | comments: | ||
| 205 | description: comments | ||
| 206 | type: array | ||
| 207 | items: | ||
| 208 | type: string | ||
| 209 | individualCusInfo: | ||
| 210 | description: individualCusInfo | ||
| 211 | type: array | ||
| 212 | items: | ||
| 213 | $ref: '#/definitions/individualCusInfo' | ||
| 214 | usedCarInfo: | ||
| 215 | description: usedCarInfo | ||
| 216 | type: object | ||
| 217 | required: | ||
| 218 | - vinNo | ||
| 219 | - manufactureDate | ||
| 220 | - firstRegistrationDate | ||
| 221 | properties: | ||
| 222 | vinNo: | ||
| 223 | description: vinNo | ||
| 224 | type: string | ||
| 225 | example: LBVSFJSDLFJLSDJF | ||
| 226 | manufactureDate: | ||
| 227 | description: manufactureDate | ||
| 228 | type: string | ||
| 229 | format: date | ||
| 230 | example: '2027-04-30' | ||
| 231 | firstRegistrationDate: | ||
| 232 | description: firstRegistrationDate | ||
| 233 | type: string | ||
| 234 | format: date | ||
| 235 | example: '2027-04-30' | ||
| 236 | corporateCusInfo: | ||
| 237 | description: corporateCusInfo | ||
| 238 | type: object | ||
| 239 | required: | ||
| 240 | - customerChineseName | ||
| 241 | - legalRepName | ||
| 242 | - idNum | ||
| 243 | - businessLicenseNo | ||
| 244 | - taxRegistrationCode | ||
| 245 | - incorporationDate | ||
| 246 | - businessLicenseDueDate | ||
| 247 | - capitalRegAmount | ||
| 248 | properties: | ||
| 249 | customerChineseName: | ||
| 250 | description: customerChineseName | ||
| 251 | type: string | ||
| 252 | example: 北京思图场景数据科技服务有限公司 | ||
| 253 | legalRepName: | ||
| 254 | description: legalRepName | ||
| 255 | type: string | ||
| 256 | example: 李六 | ||
| 257 | idNum: | ||
| 258 | description: idNum | ||
| 259 | type: string | ||
| 260 | example: MA007438143XJ1P | ||
| 261 | businessLicenseNo: | ||
| 262 | description: businessLicenseNo | ||
| 263 | type: string | ||
| 264 | example: MA007438143XJ1P | ||
| 265 | taxRegistrationCode: | ||
| 266 | description: taxRegistrationCode | ||
| 267 | type: string | ||
| 268 | example: MA007438143XJ1P | ||
| 269 | incorporationDate: | ||
| 270 | description: incorporationDate | ||
| 271 | type: string | ||
| 272 | format: date | ||
| 273 | example: '2027-04-30' | ||
| 274 | businessLicenseDueDate: | ||
| 275 | description: businessLicenseDueDate | ||
| 276 | type: string | ||
| 277 | format: date | ||
| 278 | example: '2027-04-30' | ||
| 279 | capitalRegAmount: | ||
| 280 | description: capitalRegAmount | ||
| 281 | type: number | ||
| 282 | format: float | ||
| 283 | example: 1234.56 | ||
| 284 | ApiResponse: | ||
| 285 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ||
| 286 | type: object | ||
| 287 | required: | ||
| 288 | - code | ||
| 289 | - msg | ||
| 290 | properties: | ||
| 291 | code: | ||
| 292 | type: integer | ||
| 293 | format: uint8 | ||
| 294 | description: '0: success 1: need login 2: invalid params 3: internal error | ||
| 295 | 4: object not exist 5: async wait 6: no permission 7: illegal operation' | ||
| 296 | example: 0 | ||
| 297 | enum: | ||
| 298 | - 0 | ||
| 299 | - 1 | ||
| 300 | - 2 | ||
| 301 | - 3 | ||
| 302 | - 4 | ||
| 303 | - 5 | ||
| 304 | - 6 | ||
| 305 | - 7 | ||
| 306 | msg: | ||
| 307 | type: string | ||
| 308 | example: success | ||
| 309 | data: | ||
| 310 | type: object |
docs/main_bak.yaml
0 → 100644
| 1 | swagger: '2.0' | ||
| 2 | info: | ||
| 3 | title: 接口文档 | ||
| 4 | description: 宝马ocr/biz_logic接口文档 | ||
| 5 | version: 1.0.0 | ||
| 6 | host: staging-bmw-ocr.situdata.com | ||
| 7 | basePath: / | ||
| 8 | tags: | ||
| 9 | - name: doc | ||
| 10 | description: 文件 | ||
| 11 | schemes: | ||
| 12 | - https | ||
| 13 | - http | ||
| 14 | security: | ||
| 15 | - OAuth2: [] | ||
| 16 | paths: | ||
| 17 | /api/create/v1: | ||
| 18 | post: | ||
| 19 | tags: | ||
| 20 | - doc | ||
| 21 | summary: POS系统上传文件信息 | ||
| 22 | consumes: | ||
| 23 | - application/json | ||
| 24 | produces: | ||
| 25 | - application/json | ||
| 26 | parameters: | ||
| 27 | - in: body | ||
| 28 | name: body | ||
| 29 | required: true | ||
| 30 | schema: | ||
| 31 | $ref: '#/definitions/Doc' | ||
| 32 | responses: | ||
| 33 | 200: | ||
| 34 | description: ok | ||
| 35 | schema: | ||
| 36 | $ref: '#/definitions/ApiResponse' | ||
| 37 | /api/priority/v1: | ||
| 38 | post: | ||
| 39 | tags: | ||
| 40 | - doc | ||
| 41 | summary: GCAP提高申请单对应文件优先级 | ||
| 42 | consumes: | ||
| 43 | - application/json | ||
| 44 | produces: | ||
| 45 | - application/json | ||
| 46 | parameters: | ||
| 47 | - in: body | ||
| 48 | name: body | ||
| 49 | required: true | ||
| 50 | schema: | ||
| 51 | $ref: '#/definitions/Application' | ||
| 52 | responses: | ||
| 53 | 200: | ||
| 54 | description: ok | ||
| 55 | schema: | ||
| 56 | $ref: '#/definitions/ApiResponse' | ||
| 57 | securityDefinitions: | ||
| 58 | OAuth2: | ||
| 59 | type: oauth2 | ||
| 60 | flow: application | ||
| 61 | description: 'This API uses OAuth 2 with the application(clientCredentials) grant | ||
| 62 | flow. | ||
| 63 | |||
| 64 | client_id=sMlciTkppsMzARwHpCVarm5q7DP2Vucj3ny8JFhw | ||
| 65 | |||
| 66 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | ||
| 67 | |||
| 68 | scopes=write | ||
| 69 | |||
| 70 | ' | ||
| 71 | tokenUrl: https://staging-bmw-ocr.situdata.com/api/oauth/token/ | ||
| 72 | scopes: | ||
| 73 | write: Grants write access | ||
| 74 | responses: | ||
| 75 | ErrorResponse: | ||
| 76 | description: 调用异常, 具体情况请参考`HTTP`状态码和`code`字段 | ||
| 77 | schema: | ||
| 78 | $ref: '#/definitions/ApiResponse' | ||
| 79 | NoContent: | ||
| 80 | description: 后台接收请求,但是没有响应内容 | ||
| 81 | schema: | ||
| 82 | $ref: '#/definitions/ApiResponse' | ||
| 83 | definitions: | ||
| 84 | Doc: | ||
| 85 | type: object | ||
| 86 | required: | ||
| 87 | - applicationData | ||
| 88 | - applicantData | ||
| 89 | - document | ||
| 90 | properties: | ||
| 91 | applicationData: | ||
| 92 | description: 申请信息 | ||
| 93 | type: object | ||
| 94 | required: | ||
| 95 | - applicationId | ||
| 96 | properties: | ||
| 97 | applicationId: | ||
| 98 | description: 申请id | ||
| 99 | type: string | ||
| 100 | example: CH-B0011010101 | ||
| 101 | applicantData: | ||
| 102 | description: 申请人信息 | ||
| 103 | type: object | ||
| 104 | required: | ||
| 105 | - mainApplicantName | ||
| 106 | - coApplicantName | ||
| 107 | - guarantor1Name | ||
| 108 | - guarantor2Name | ||
| 109 | properties: | ||
| 110 | mainApplicantName: | ||
| 111 | description: 主申请人 | ||
| 112 | type: string | ||
| 113 | example: 王明阳 | ||
| 114 | coApplicantName: | ||
| 115 | description: 共同申请人 | ||
| 116 | type: string | ||
| 117 | example: 王明月 | ||
| 118 | guarantor1Name: | ||
| 119 | description: 担保人1 | ||
| 120 | type: string | ||
| 121 | example: 王明日 | ||
| 122 | guarantor2Name: | ||
| 123 | description: 担保人2 | ||
| 124 | type: string | ||
| 125 | example: 王明雨 | ||
| 126 | document: | ||
| 127 | description: 文件信息 | ||
| 128 | type: object | ||
| 129 | required: | ||
| 130 | - documentName | ||
| 131 | - documentScheme | ||
| 132 | - businessType | ||
| 133 | - uploadFinishTime | ||
| 134 | - dataSource | ||
| 135 | - metadataVersionId | ||
| 136 | properties: | ||
| 137 | documentName: | ||
| 138 | description: 文件名 | ||
| 139 | type: string | ||
| 140 | example: CH-B0011010101王明阳申请表 | ||
| 141 | documentScheme: | ||
| 142 | description: 文件方案 | ||
| 143 | type: string | ||
| 144 | example: Acceptance | ||
| 145 | enum: | ||
| 146 | - Acceptance | ||
| 147 | - Settlement | ||
| 148 | - Contract Management | ||
| 149 | businessType: | ||
| 150 | description: 业务类型 | ||
| 151 | type: string | ||
| 152 | example: CO00001 | ||
| 153 | enum: | ||
| 154 | - CO00001 | ||
| 155 | - CO00002 | ||
| 156 | uploadFinishTime: | ||
| 157 | description: 上传完成时间 | ||
| 158 | type: string | ||
| 159 | example: '2020-09-01 12:21:11' | ||
| 160 | dataSource: | ||
| 161 | description: 数据源 | ||
| 162 | type: string | ||
| 163 | example: POS | ||
| 164 | enum: | ||
| 165 | - POS | ||
| 166 | - EAPP | ||
| 167 | - Econtract | ||
| 168 | metadataVersionId: | ||
| 169 | description: 元数据版本ID | ||
| 170 | type: string | ||
| 171 | example: '8410480' | ||
| 172 | Application: | ||
| 173 | type: object | ||
| 174 | required: | ||
| 175 | - APPLICATION_INFORMATION | ||
| 176 | properties: | ||
| 177 | APPLICATION_INFORMATION: | ||
| 178 | description: 申请单信息 | ||
| 179 | type: object | ||
| 180 | required: | ||
| 181 | - SUBMIT_DATETIME | ||
| 182 | - STATUS | ||
| 183 | - ENTITY | ||
| 184 | - RATING | ||
| 185 | - APPLICATION_ID | ||
| 186 | - APPLICATION_VERSION | ||
| 187 | - INTERMEDIATE_DECISION | ||
| 188 | properties: | ||
| 189 | SUBMIT_DATETIME: | ||
| 190 | description: 提交时间 | ||
| 191 | type: string | ||
| 192 | example: 2020-07-08 18:33:31+08:00 | ||
| 193 | STATUS: | ||
| 194 | description: 状态 | ||
| 195 | type: integer | ||
| 196 | example: 42 | ||
| 197 | ENTITY: | ||
| 198 | description: 业务类型 | ||
| 199 | type: string | ||
| 200 | example: CO00001 | ||
| 201 | enum: | ||
| 202 | - CO00001 | ||
| 203 | - CO00002 | ||
| 204 | RATING: | ||
| 205 | description: 排名 | ||
| 206 | type: integer | ||
| 207 | example: 4 | ||
| 208 | APPLICATION_ID: | ||
| 209 | description: 申请id | ||
| 210 | type: string | ||
| 211 | example: CH-B0011010101 | ||
| 212 | APPLICATION_VERSION: | ||
| 213 | description: 申请版本 | ||
| 214 | type: integer | ||
| 215 | example: 1 | ||
| 216 | INTERMEDIATE_DECISION: | ||
| 217 | description: '' | ||
| 218 | type: string | ||
| 219 | example: MUW | ||
| 220 | ApiResponse: | ||
| 221 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ||
| 222 | type: object | ||
| 223 | required: | ||
| 224 | - code | ||
| 225 | - msg | ||
| 226 | properties: | ||
| 227 | code: | ||
| 228 | type: integer | ||
| 229 | format: uint8 | ||
| 230 | description: '0: success 1: need login 2: invalid params 3: internal error | ||
| 231 | 4: object not exist 5: async wait 6: no permission 7: illegal operation' | ||
| 232 | example: 0 | ||
| 233 | enum: | ||
| 234 | - 0 | ||
| 235 | - 1 | ||
| 236 | - 2 | ||
| 237 | - 3 | ||
| 238 | - 4 | ||
| 239 | - 5 | ||
| 240 | - 6 | ||
| 241 | - 7 | ||
| 242 | msg: | ||
| 243 | type: string | ||
| 244 | example: success | ||
| 245 | data: | ||
| 246 | type: object |
src/apps/doc/compare_urls.py
0 → 100644
| ... | @@ -984,3 +984,13 @@ IC_RES_MAPPING = { | ... | @@ -984,3 +984,13 @@ IC_RES_MAPPING = { |
| 984 | 0: '伪造证件', | 984 | 0: '伪造证件', |
| 985 | 1: '真实证件', | 985 | 1: '真实证件', |
| 986 | } | 986 | } |
| 987 | |||
| 988 | # ----------------- compare --------------------- | ||
| 989 | ENTITY = ['HIL', 'AFC'] | ||
| 990 | CUSTOMER_TYPE = ['TCCOR', 'TCDAS', 'TCFRE', 'TCIAS', 'TCIND', 'TCSEP', 'TCURE'] | ||
| 991 | VEHICLE_STATUS = ['PCUSD', 'PCNEW'] | ||
| 992 | |||
| 993 | APPLICANT_TYPE = ['COAPP', 'CUSTR', 'GAUTR1', 'GAUTR2'] | ||
| 994 | ID_TYPE = ['ITARI', 'ITHKM', 'ITPRC', 'ITPSP', 'ITRES', 'ITTID', 'ITUSC', 'ITCCU'] | ||
| 995 | SECOND_ID_TYPE = ['ITARI', 'ITHKM', 'ITPRC', 'ITPSP', 'ITRES', 'ITTID'] | ||
| 996 | SUB_TYPE = ['CSIBM', 'CSOTH', 'CSSME'] | ... | ... |
| ... | @@ -27,6 +27,58 @@ def load_data(request, schema): | ... | @@ -27,6 +27,58 @@ def load_data(request, schema): |
| 27 | return request.data | 27 | return request.data |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | usedcar_args = { | ||
| 31 | 'vinNo': fields.Str(required=True, validate=validate.Length(max=128)), | ||
| 32 | "manufactureDate": fields.Date(required=True), | ||
| 33 | "firstRegistrationDate": fields.Date(required=True), | ||
| 34 | } | ||
| 35 | |||
| 36 | corporate_args = { | ||
| 37 | 'customerChineseName': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 38 | 'legalRepName': fields.Str(required=True, validate=validate.Length(max=64)), | ||
| 39 | 'idNum': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 40 | 'businessLicenseNo': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 41 | 'taxRegistrationCode': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 42 | "incorporationDate": fields.Date(required=True), | ||
| 43 | "businessLicenseDueDate": fields.Date(required=True), | ||
| 44 | "capitalRegAmount": fields.Decimal(required=True), # TODO 2位小数限制 | ||
| 45 | } | ||
| 46 | |||
| 47 | individual_args = { | ||
| 48 | 'applicantType': fields.Str(required=True, validate=validate.OneOf(consts.APPLICANT_TYPE)), | ||
| 49 | 'idType': fields.Str(required=True, validate=validate.OneOf(consts.ID_TYPE)), | ||
| 50 | 'secondIdType': fields.Str(required=False, validate=validate.OneOf(consts.SECOND_ID_TYPE)), | ||
| 51 | 'customerChineseName': fields.Str(required=True, validate=validate.Length(max=64)), | ||
| 52 | 'idNum': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 53 | 'secondIdNum': fields.Str(required=False, validate=validate.Length(max=256)), | ||
| 54 | "idExpiryDate": fields.Date(required=True), | ||
| 55 | "dateOfBirth": fields.Date(required=True), | ||
| 56 | 'companyName': fields.Str(required=True, validate=validate.Length(max=256)), | ||
| 57 | "registeredCapital": fields.Decimal(required=True), | ||
| 58 | 'selfEmployedSubType': fields.Str(required=True, validate=validate.OneOf(consts.SUB_TYPE)), | ||
| 59 | } | ||
| 60 | |||
| 61 | compare_content = { | ||
| 62 | 'uniqSeq': fields.Str(required=True, validate=validate.Length(max=128)), | ||
| 63 | 'applicationId': fields.Str(required=True, validate=validate.Length(max=64)), | ||
| 64 | 'applicationEntity': fields.Str(required=True, validate=validate.OneOf(consts.ENTITY)), | ||
| 65 | 'customerType': fields.Str(required=True, validate=validate.OneOf(consts.CUSTOMER_TYPE)), | ||
| 66 | "applicationVersion": fields.Int(required=True), | ||
| 67 | 'vehicleStatus': fields.Str(required=True, validate=validate.OneOf(consts.VEHICLE_STATUS)), | ||
| 68 | |||
| 69 | 'comments': fields.List(fields.Str(required=False), required=True), | ||
| 70 | |||
| 71 | 'individualCusInfo': fields.List(fields.Nested(individual_args), | ||
| 72 | required=True, validate=validate.Length(min=1, max=4)), | ||
| 73 | |||
| 74 | 'usedCarInfo': fields.Nested(usedcar_args, required=False), | ||
| 75 | 'corporateCusInfo': fields.Nested(corporate_args, required=False), | ||
| 76 | } | ||
| 77 | |||
| 78 | compare_args = { | ||
| 79 | 'content': fields.Nested(compare_content, required=True) | ||
| 80 | } | ||
| 81 | |||
| 30 | application_data_args = {'applicationId': fields.Str(required=True, validate=validate.Length(max=64))} | 82 | application_data_args = {'applicationId': fields.Str(required=True, validate=validate.Length(max=64))} |
| 31 | 83 | ||
| 32 | applicant_data_args = { | 84 | applicant_data_args = { |
| ... | @@ -248,6 +300,36 @@ class PriorityDocView(GenericView, DocHandler): | ... | @@ -248,6 +300,36 @@ class PriorityDocView(GenericView, DocHandler): |
| 248 | ''' | 300 | ''' |
| 249 | 301 | ||
| 250 | 302 | ||
| 303 | class CompareView(GenericView): | ||
| 304 | permission_classes = [IsAuthenticated] | ||
| 305 | authentication_classes = [OAuth2AuthenticationWithUser] | ||
| 306 | |||
| 307 | # pos上传比对信息接口 | ||
| 308 | @use_args(compare_args, location='data') | ||
| 309 | def post(self, request, args): | ||
| 310 | self.running_log.info('in') | ||
| 311 | return response.ok() | ||
| 312 | |||
| 313 | post.openapi_doc = ''' | ||
| 314 | tags: [info] | ||
| 315 | summary: POS上传比对信息 | ||
| 316 | consumes: [application/json] | ||
| 317 | produces: [application/json] | ||
| 318 | parameters: | ||
| 319 | - in: body | ||
| 320 | name: body | ||
| 321 | required: true | ||
| 322 | schema: | ||
| 323 | $ref: "#/definitions/Comparison" | ||
| 324 | |||
| 325 | responses: | ||
| 326 | 200: | ||
| 327 | description: ok | ||
| 328 | schema: | ||
| 329 | $ref: '#/definitions/ApiResponse' | ||
| 330 | ''' | ||
| 331 | |||
| 332 | |||
| 251 | class DocView(GenericView, DocHandler): | 333 | class DocView(GenericView, DocHandler): |
| 252 | 334 | ||
| 253 | # 文件列表页 | 335 | # 文件列表页 | ... | ... |
| ... | @@ -21,6 +21,7 @@ urlpatterns = [ | ... | @@ -21,6 +21,7 @@ urlpatterns = [ |
| 21 | path(r'api/user/', include('apps.account.urls')), | 21 | path(r'api/user/', include('apps.account.urls')), |
| 22 | path(r'api/create/', include('apps.doc.create_urls')), | 22 | path(r'api/create/', include('apps.doc.create_urls')), |
| 23 | path(r'api/priority/', include('apps.doc.priority_urls')), | 23 | path(r'api/priority/', include('apps.doc.priority_urls')), |
| 24 | path(r'api/compare/', include('apps.doc.compare_urls')), | ||
| 24 | path(r'api/doc/', include('apps.doc.internal_urls')), | 25 | path(r'api/doc/', include('apps.doc.internal_urls')), |
| 25 | path('api/oauth/', include('oauth2_provider.urls', namespace='oauth2_provider')), | 26 | path('api/oauth/', include('oauth2_provider.urls', namespace='oauth2_provider')), |
| 26 | ] | 27 | ] | ... | ... |
| ... | @@ -7,11 +7,10 @@ info: | ... | @@ -7,11 +7,10 @@ info: |
| 7 | host: "staging-bmw-ocr.situdata.com" | 7 | host: "staging-bmw-ocr.situdata.com" |
| 8 | basePath: "/" | 8 | basePath: "/" |
| 9 | tags: | 9 | tags: |
| 10 | - name: doc | 10 | - name: info |
| 11 | description: 文件 | 11 | description: 比对信息 |
| 12 | schemes: | 12 | schemes: |
| 13 | - "https" | 13 | - "https" |
| 14 | - "http" | ||
| 15 | security: | 14 | security: |
| 16 | - OAuth2: [] | 15 | - OAuth2: [] |
| 17 | ''' | 16 | ''' |
| ... | @@ -48,112 +47,169 @@ NoContent: | ... | @@ -48,112 +47,169 @@ NoContent: |
| 48 | parameters = '' | 47 | parameters = '' |
| 49 | 48 | ||
| 50 | definitions = ''' | 49 | definitions = ''' |
| 51 | Doc: | 50 | individualCusInfo: |
| 52 | type: object | 51 | type: object |
| 53 | required: [applicationData, applicantData, document] | 52 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, companyName, registeredCapital, selfEmployedSubType] |
| 54 | properties: | 53 | properties: |
| 55 | applicationData: | 54 | applicantType: |
| 56 | description: 申请信息 | 55 | description: applicantType |
| 57 | type: object | 56 | type: string |
| 58 | required: [applicationId] | 57 | example: COAPP |
| 59 | properties: | 58 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] |
| 60 | applicationId: | 59 | idType: |
| 61 | description: 申请id | 60 | description: idType |
| 62 | type: string | 61 | type: string |
| 63 | example: CH-B0011010101 | 62 | example: ITARI |
| 64 | applicantData: | 63 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] |
| 65 | description: 申请人信息 | 64 | secondIdType: |
| 66 | type: object | 65 | description: secondIdType |
| 67 | required: [mainApplicantName, coApplicantName, guarantor1Name, guarantor2Name] | 66 | type: string |
| 68 | properties: | 67 | example: ITARI |
| 69 | mainApplicantName: | 68 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] |
| 70 | description: 主申请人 | 69 | customerChineseName: |
| 71 | type: string | 70 | description: customerChineseName |
| 72 | example: 王明阳 | 71 | type: string |
| 73 | coApplicantName: | 72 | example: 李四 |
| 74 | description: 共同申请人 | 73 | idNum: |
| 75 | type: string | 74 | description: idNum |
| 76 | example: 王明月 | 75 | type: string |
| 77 | guarantor1Name: | 76 | example: 111111199404251111 |
| 78 | description: 担保人1 | 77 | secondIdNum: |
| 79 | type: string | 78 | description: secondIdNum |
| 80 | example: 王明日 | 79 | type: string |
| 81 | guarantor2Name: | 80 | example: 111111199404251111 |
| 82 | description: 担保人2 | 81 | idExpiryDate: |
| 83 | type: string | 82 | description: idExpiryDate |
| 84 | example: 王明雨 | 83 | type: string |
| 85 | document: | 84 | format: date |
| 86 | description: 文件信息 | 85 | example: "2027-04-30" |
| 87 | type: object | 86 | dateOfBirth: |
| 88 | required: [documentName, documentScheme, businessType, uploadFinishTime, dataSource, metadataVersionId] | 87 | description: dateOfBirth |
| 89 | properties: | 88 | type: string |
| 90 | documentName: | 89 | format: date |
| 91 | description: 文件名 | 90 | example: "2027-04-30" |
| 92 | type: string | 91 | companyName: |
| 93 | example: CH-B0011010101王明阳申请表 | 92 | description: companyName |
| 94 | documentScheme: | 93 | type: string |
| 95 | description: 文件方案 | 94 | example: 北京思图场景数据科技服务有限公司 |
| 96 | type: string | 95 | registeredCapital: |
| 97 | example: Acceptance | 96 | description: registeredCapital |
| 98 | enum: [Acceptance, Settlement, Contract Management] | 97 | type: number |
| 99 | businessType: | 98 | format: float |
| 100 | description: 业务类型 | 99 | example: 1234.56 |
| 101 | type: string | 100 | selfEmployedSubType: |
| 102 | example: CO00001 | 101 | description: selfEmployedSubType |
| 103 | enum: [CO00001, CO00002] | 102 | type: string |
| 104 | uploadFinishTime: | 103 | example: CSIBM |
| 105 | description: 上传完成时间 | 104 | enum: [CSIBM, CSOTH, CSSME] |
| 106 | type: string | ||
| 107 | example: '2020-09-01 12:21:11' | ||
| 108 | dataSource: | ||
| 109 | description: 数据源 | ||
| 110 | type: string | ||
| 111 | example: POS | ||
| 112 | enum: [POS, EAPP, Econtract] | ||
| 113 | metadataVersionId: | ||
| 114 | description: 元数据版本ID | ||
| 115 | type: string | ||
| 116 | example: '8410480' | ||
| 117 | 105 | ||
| 118 | Application: | 106 | Comparison: |
| 119 | type: object | 107 | type: object |
| 120 | required: [APPLICATION_INFORMATION] | 108 | required: [content] |
| 121 | properties: | 109 | properties: |
| 122 | APPLICATION_INFORMATION: | 110 | content: |
| 123 | description: 申请单信息 | 111 | description: 比对内容信息 |
| 124 | type: object | 112 | type: object |
| 125 | required: [SUBMIT_DATETIME, STATUS, ENTITY, RATING, APPLICATION_ID, APPLICATION_VERSION, INTERMEDIATE_DECISION] | 113 | required: [uniqSeq, applicationId, applicationEntity, customerType, applicationVersion, vehicleStatus, comments, individualCusInfo] |
| 126 | properties: | 114 | properties: |
| 127 | SUBMIT_DATETIME: | 115 | uniqSeq: |
| 128 | description: 提交时间 | 116 | description: uniqSeq |
| 129 | type: string | 117 | type: string |
| 130 | example: 2020-07-08T18:33:31.000+08:00 | 118 | example: 201809301905121000 |
| 131 | STATUS: | 119 | applicationId: |
| 132 | description: 状态 | 120 | description: applicationId |
| 133 | type: integer | ||
| 134 | example: 42 | ||
| 135 | ENTITY: | ||
| 136 | description: 业务类型 | ||
| 137 | type: string | 121 | type: string |
| 138 | example: CO00001 | 122 | example: CH-B100000123 |
| 139 | enum: [CO00001, CO00002] | 123 | applicationEntity: |
| 140 | RATING: | 124 | description: applicationEntity |
| 141 | description: 排名 | ||
| 142 | type: integer | ||
| 143 | example: 4 | ||
| 144 | APPLICATION_ID: | ||
| 145 | description: 申请id | ||
| 146 | type: string | 125 | type: string |
| 147 | example: CH-B0011010101 | 126 | example: HIL |
| 148 | APPLICATION_VERSION: | 127 | enum: [AFC, HIL] |
| 149 | description: 申请版本 | 128 | customerType: |
| 129 | description: customerType | ||
| 130 | type: string | ||
| 131 | example: TCCOR | ||
| 132 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
| 133 | applicationVersion: | ||
| 134 | description: applicationVersion | ||
| 150 | type: integer | 135 | type: integer |
| 151 | example: 1 | 136 | example: 0 |
| 152 | INTERMEDIATE_DECISION: | 137 | vehicleStatus: |
| 153 | description: '' | 138 | description: vehicleStatus |
| 154 | type: string | 139 | type: string |
| 155 | example: MUW | 140 | example: PCUSD |
| 156 | 141 | enum: [PCUSD, PCNEW] | |
| 142 | comments: | ||
| 143 | description: comments | ||
| 144 | type: array | ||
| 145 | items: | ||
| 146 | type: string | ||
| 147 | individualCusInfo: | ||
| 148 | description: individualCusInfo | ||
| 149 | type: array | ||
| 150 | items: | ||
| 151 | $ref: "#/definitions/individualCusInfo" | ||
| 152 | |||
| 153 | usedCarInfo: | ||
| 154 | description: usedCarInfo | ||
| 155 | type: object | ||
| 156 | required: [vinNo, manufactureDate, firstRegistrationDate] | ||
| 157 | properties: | ||
| 158 | vinNo: | ||
| 159 | description: vinNo | ||
| 160 | type: string | ||
| 161 | example: LBVSFJSDLFJLSDJF | ||
| 162 | manufactureDate: | ||
| 163 | description: manufactureDate | ||
| 164 | type: string | ||
| 165 | format: date | ||
| 166 | example: "2027-04-30" | ||
| 167 | firstRegistrationDate: | ||
| 168 | description: firstRegistrationDate | ||
| 169 | type: string | ||
| 170 | format: date | ||
| 171 | example: "2027-04-30" | ||
| 172 | |||
| 173 | corporateCusInfo: | ||
| 174 | description: corporateCusInfo | ||
| 175 | type: object | ||
| 176 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate, capitalRegAmount] | ||
| 177 | properties: | ||
| 178 | customerChineseName: | ||
| 179 | description: customerChineseName | ||
| 180 | type: string | ||
| 181 | example: 北京思图场景数据科技服务有限公司 | ||
| 182 | legalRepName: | ||
| 183 | description: legalRepName | ||
| 184 | type: string | ||
| 185 | example: 李六 | ||
| 186 | idNum: | ||
| 187 | description: idNum | ||
| 188 | type: string | ||
| 189 | example: MA007438143XJ1P | ||
| 190 | businessLicenseNo: | ||
| 191 | description: businessLicenseNo | ||
| 192 | type: string | ||
| 193 | example: MA007438143XJ1P | ||
| 194 | taxRegistrationCode: | ||
| 195 | description: taxRegistrationCode | ||
| 196 | type: string | ||
| 197 | example: MA007438143XJ1P | ||
| 198 | incorporationDate: | ||
| 199 | description: incorporationDate | ||
| 200 | type: string | ||
| 201 | format: date | ||
| 202 | example: "2027-04-30" | ||
| 203 | businessLicenseDueDate: | ||
| 204 | description: businessLicenseDueDate | ||
| 205 | type: string | ||
| 206 | format: date | ||
| 207 | example: "2027-04-30" | ||
| 208 | capitalRegAmount: | ||
| 209 | description: capitalRegAmount | ||
| 210 | type: number | ||
| 211 | format: float | ||
| 212 | example: 1234.56 | ||
| 157 | 213 | ||
| 158 | ApiResponse: | 214 | ApiResponse: |
| 159 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | 215 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ... | ... |
src/common/api_doc_bak.py
0 → 100644
| 1 | base_part = ''' | ||
| 2 | swagger: "2.0" | ||
| 3 | info: | ||
| 4 | title: 接口文档 | ||
| 5 | description: 宝马ocr/biz_logic接口文档 | ||
| 6 | version: 1.0.0 | ||
| 7 | host: "staging-bmw-ocr.situdata.com" | ||
| 8 | basePath: "/" | ||
| 9 | tags: | ||
| 10 | - name: doc | ||
| 11 | description: 文件 | ||
| 12 | schemes: | ||
| 13 | - "https" | ||
| 14 | security: | ||
| 15 | - OAuth2: [] | ||
| 16 | ''' | ||
| 17 | |||
| 18 | # scheme: oauth | ||
| 19 | security_definitions = ''' | ||
| 20 | OAuth2: | ||
| 21 | type: oauth2 | ||
| 22 | flow: application | ||
| 23 | description: > | ||
| 24 | This API uses OAuth 2 with the application(clientCredentials) grant flow. | ||
| 25 | |||
| 26 | client_id=sMlciTkppsMzARwHpCVarm5q7DP2Vucj3ny8JFhw | ||
| 27 | |||
| 28 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | ||
| 29 | |||
| 30 | scopes=write | ||
| 31 | tokenUrl: https://staging-bmw-ocr.situdata.com/api/oauth/token/ | ||
| 32 | scopes: | ||
| 33 | write: Grants write access | ||
| 34 | ''' | ||
| 35 | |||
| 36 | responses = ''' | ||
| 37 | ErrorResponse: | ||
| 38 | description: 调用异常, 具体情况请参考`HTTP`状态码和`code`字段 | ||
| 39 | schema: | ||
| 40 | $ref: '#/definitions/ApiResponse' | ||
| 41 | NoContent: | ||
| 42 | description: 后台接收请求,但是没有响应内容 | ||
| 43 | schema: | ||
| 44 | $ref: '#/definitions/ApiResponse' | ||
| 45 | ''' | ||
| 46 | |||
| 47 | parameters = '' | ||
| 48 | |||
| 49 | definitions = ''' | ||
| 50 | Doc: | ||
| 51 | type: object | ||
| 52 | required: [applicationData, applicantData, document] | ||
| 53 | properties: | ||
| 54 | applicationData: | ||
| 55 | description: 申请信息 | ||
| 56 | type: object | ||
| 57 | required: [applicationId] | ||
| 58 | properties: | ||
| 59 | applicationId: | ||
| 60 | description: 申请id | ||
| 61 | type: string | ||
| 62 | example: CH-B0011010101 | ||
| 63 | applicantData: | ||
| 64 | description: 申请人信息 | ||
| 65 | type: object | ||
| 66 | required: [mainApplicantName, coApplicantName, guarantor1Name, guarantor2Name] | ||
| 67 | properties: | ||
| 68 | mainApplicantName: | ||
| 69 | description: 主申请人 | ||
| 70 | type: string | ||
| 71 | example: 王明阳 | ||
| 72 | coApplicantName: | ||
| 73 | description: 共同申请人 | ||
| 74 | type: string | ||
| 75 | example: 王明月 | ||
| 76 | guarantor1Name: | ||
| 77 | description: 担保人1 | ||
| 78 | type: string | ||
| 79 | example: 王明日 | ||
| 80 | guarantor2Name: | ||
| 81 | description: 担保人2 | ||
| 82 | type: string | ||
| 83 | example: 王明雨 | ||
| 84 | document: | ||
| 85 | description: 文件信息 | ||
| 86 | type: object | ||
| 87 | required: [documentName, documentScheme, businessType, uploadFinishTime, dataSource, metadataVersionId] | ||
| 88 | properties: | ||
| 89 | documentName: | ||
| 90 | description: 文件名 | ||
| 91 | type: string | ||
| 92 | example: CH-B0011010101王明阳申请表 | ||
| 93 | documentScheme: | ||
| 94 | description: 文件方案 | ||
| 95 | type: string | ||
| 96 | example: Acceptance | ||
| 97 | enum: [Acceptance, Settlement, Contract Management] | ||
| 98 | businessType: | ||
| 99 | description: 业务类型 | ||
| 100 | type: string | ||
| 101 | example: CO00001 | ||
| 102 | enum: [CO00001, CO00002] | ||
| 103 | uploadFinishTime: | ||
| 104 | description: 上传完成时间 | ||
| 105 | type: string | ||
| 106 | example: '2020-09-01 12:21:11' | ||
| 107 | dataSource: | ||
| 108 | description: 数据源 | ||
| 109 | type: string | ||
| 110 | example: POS | ||
| 111 | enum: [POS, EAPP, Econtract] | ||
| 112 | metadataVersionId: | ||
| 113 | description: 元数据版本ID | ||
| 114 | type: string | ||
| 115 | example: '8410480' | ||
| 116 | |||
| 117 | Application: | ||
| 118 | type: object | ||
| 119 | required: [APPLICATION_INFORMATION] | ||
| 120 | properties: | ||
| 121 | APPLICATION_INFORMATION: | ||
| 122 | description: 申请单信息 | ||
| 123 | type: object | ||
| 124 | required: [SUBMIT_DATETIME, STATUS, ENTITY, RATING, APPLICATION_ID, APPLICATION_VERSION, INTERMEDIATE_DECISION] | ||
| 125 | properties: | ||
| 126 | SUBMIT_DATETIME: | ||
| 127 | description: 提交时间 | ||
| 128 | type: string | ||
| 129 | example: 2020-07-08T18:33:31.000+08:00 | ||
| 130 | STATUS: | ||
| 131 | description: 状态 | ||
| 132 | type: integer | ||
| 133 | example: 42 | ||
| 134 | ENTITY: | ||
| 135 | description: 业务类型 | ||
| 136 | type: string | ||
| 137 | example: CO00001 | ||
| 138 | enum: [CO00001, CO00002] | ||
| 139 | RATING: | ||
| 140 | description: 排名 | ||
| 141 | type: integer | ||
| 142 | example: 4 | ||
| 143 | APPLICATION_ID: | ||
| 144 | description: 申请id | ||
| 145 | type: string | ||
| 146 | example: CH-B0011010101 | ||
| 147 | APPLICATION_VERSION: | ||
| 148 | description: 申请版本 | ||
| 149 | type: integer | ||
| 150 | example: 1 | ||
| 151 | INTERMEDIATE_DECISION: | ||
| 152 | description: '' | ||
| 153 | type: string | ||
| 154 | example: MUW | ||
| 155 | |||
| 156 | individualCusInfo: | ||
| 157 | type: object | ||
| 158 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, selfEmployedSubType] | ||
| 159 | properties: | ||
| 160 | applicantType: | ||
| 161 | description: applicantType | ||
| 162 | type: string | ||
| 163 | example: COAPP | ||
| 164 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
| 165 | idType: | ||
| 166 | description: idType | ||
| 167 | type: string | ||
| 168 | example: ITARI | ||
| 169 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
| 170 | secondIdType: | ||
| 171 | description: secondIdType | ||
| 172 | type: string | ||
| 173 | example: ITARI | ||
| 174 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] | ||
| 175 | customerChineseName: | ||
| 176 | description: customerChineseName | ||
| 177 | type: string | ||
| 178 | example: 李四 | ||
| 179 | idNum: | ||
| 180 | description: idNum | ||
| 181 | type: string | ||
| 182 | example: 111111199404251111 | ||
| 183 | secondIdNum: | ||
| 184 | description: secondIdNum | ||
| 185 | type: string | ||
| 186 | example: 111111199404251111 | ||
| 187 | idExpiryDate: | ||
| 188 | description: idExpiryDate | ||
| 189 | type: string | ||
| 190 | example: 2027-04-30 | ||
| 191 | dateOfBirth: | ||
| 192 | description: dateOfBirth | ||
| 193 | type: string | ||
| 194 | example: 2027-04-30 | ||
| 195 | selfEmployedSubType: | ||
| 196 | description: selfEmployedSubType | ||
| 197 | type: string | ||
| 198 | example: CSIBM | ||
| 199 | enum: [CSIBM, CSOTH, CSSME] | ||
| 200 | |||
| 201 | Comparison: | ||
| 202 | type: object | ||
| 203 | required: [content] | ||
| 204 | properties: | ||
| 205 | content: | ||
| 206 | description: 比对内容信息 | ||
| 207 | type: object | ||
| 208 | required: [uniqSeq, applicationId, applicationEntity, customerType, applicationVersion, vehicleStatus, comments, individualCusInfo] | ||
| 209 | properties: | ||
| 210 | uniqSeq: | ||
| 211 | description: uniqSeq | ||
| 212 | type: string | ||
| 213 | example: 201809301905121000 | ||
| 214 | applicationId: | ||
| 215 | description: applicationId | ||
| 216 | type: string | ||
| 217 | example: CH-B100000123 | ||
| 218 | applicationEntity: | ||
| 219 | description: applicationEntity | ||
| 220 | type: string | ||
| 221 | example: HIL | ||
| 222 | enum: [AFC, HIL] | ||
| 223 | customerType: | ||
| 224 | description: customerType | ||
| 225 | type: string | ||
| 226 | example: TCCOR | ||
| 227 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
| 228 | applicationVersion: | ||
| 229 | description: applicationVersion | ||
| 230 | type: integer | ||
| 231 | example: 0 | ||
| 232 | vehicleStatus: | ||
| 233 | description: vehicleStatus | ||
| 234 | type: string | ||
| 235 | example: PCUSD | ||
| 236 | enum: [PCUSD, PCNEW] | ||
| 237 | comments: | ||
| 238 | description: comments | ||
| 239 | type: array | ||
| 240 | items: | ||
| 241 | type: string | ||
| 242 | individualCusInfo: | ||
| 243 | description: individualCusInfo | ||
| 244 | type: array | ||
| 245 | items: | ||
| 246 | $ref: "#/definitions/individualCusInfo" | ||
| 247 | |||
| 248 | usedCarInfo: | ||
| 249 | description: usedCarInfo | ||
| 250 | type: object | ||
| 251 | required: [vinNo, manufactureDate, firstRegistrationDate] | ||
| 252 | properties: | ||
| 253 | vinNo: | ||
| 254 | description: vinNo | ||
| 255 | type: string | ||
| 256 | example: LBVSFJSDLFJLSDJF | ||
| 257 | manufactureDate: | ||
| 258 | description: manufactureDate | ||
| 259 | type: string | ||
| 260 | example: 2027-04-30 | ||
| 261 | firstRegistrationDate: | ||
| 262 | description: firstRegistrationDate | ||
| 263 | type: string | ||
| 264 | example: 2027-04-30 | ||
| 265 | |||
| 266 | corporateCusInfo: | ||
| 267 | description: corporateCusInfo | ||
| 268 | type: object | ||
| 269 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate] | ||
| 270 | properties: | ||
| 271 | customerChineseName: | ||
| 272 | description: customerChineseName | ||
| 273 | type: string | ||
| 274 | example: 北京思图场景数据科技服务有限公司 | ||
| 275 | legalRepName: | ||
| 276 | description: legalRepName | ||
| 277 | type: string | ||
| 278 | example: 李六 | ||
| 279 | idNum: | ||
| 280 | description: idNum | ||
| 281 | type: string | ||
| 282 | example: MA007438143XJ1P | ||
| 283 | businessLicenseNo: | ||
| 284 | description: businessLicenseNo | ||
| 285 | type: string | ||
| 286 | example: MA007438143XJ1P | ||
| 287 | taxRegistrationCode: | ||
| 288 | description: taxRegistrationCode | ||
| 289 | type: string | ||
| 290 | example: MA007438143XJ1P | ||
| 291 | incorporationDate: | ||
| 292 | description: incorporationDate | ||
| 293 | type: string | ||
| 294 | example: 2027-04-30 | ||
| 295 | businessLicenseDueDate: | ||
| 296 | description: businessLicenseDueDate | ||
| 297 | type: string | ||
| 298 | example: 2027-04-30 | ||
| 299 | |||
| 300 | ApiResponse: | ||
| 301 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ||
| 302 | type: object | ||
| 303 | required: [code, msg] | ||
| 304 | properties: | ||
| 305 | code: | ||
| 306 | type: integer | ||
| 307 | format: uint8 | ||
| 308 | description: '0: success | ||
| 309 | 1: need login | ||
| 310 | 2: invalid params | ||
| 311 | 3: internal error | ||
| 312 | 4: object not exist | ||
| 313 | 5: async wait | ||
| 314 | 6: no permission | ||
| 315 | 7: illegal operation' | ||
| 316 | example: 0 | ||
| 317 | enum: [0, 1, 2, 3, 4, 5, 6, 7] | ||
| 318 | msg: | ||
| 319 | type: string | ||
| 320 | example: success | ||
| 321 | data: | ||
| 322 | type: object | ||
| 323 | ''' | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -48,7 +48,7 @@ class Command(BaseCommand): | ... | @@ -48,7 +48,7 @@ class Command(BaseCommand): |
| 48 | view_class = view.view_class | 48 | view_class = view.view_class |
| 49 | url_path, path_parameters = pattern[0][0] | 49 | url_path, path_parameters = pattern[0][0] |
| 50 | url_path = unify_url_path_format(url_path) | 50 | url_path = unify_url_path_format(url_path) |
| 51 | if url_path not in ['/api/create/v1', '/api/priority/v1']: | 51 | if url_path not in ['/api/compare/v1']: |
| 52 | continue | 52 | continue |
| 53 | url_path_paramters = getattr(view, 'parameters_doc', None) | 53 | url_path_paramters = getattr(view, 'parameters_doc', None) |
| 54 | if url_path_paramters: | 54 | if url_path_paramters: | ... | ... |
-
Please register or sign in to post a comment