02829c89 by 周伟奇

fix vino

1 parent a6d6598e
...@@ -1194,8 +1194,9 @@ UC_ORDER = ('vinNo', 'manufactureDate', 'firstRegistrationDate') ...@@ -1194,8 +1194,9 @@ UC_ORDER = ('vinNo', 'manufactureDate', 'firstRegistrationDate')
1194 CO_ORDER = ('customerType', 'customerChineseName', 'legalRepName', 'idNum', 'businessLicenseNo', 'taxRegistrationCode', 1194 CO_ORDER = ('customerType', 'customerChineseName', 'legalRepName', 'idNum', 'businessLicenseNo', 'taxRegistrationCode',
1195 'incorporationDate', 'businessLicenseDueDate', 'capitalRegAmount') 1195 'incorporationDate', 'businessLicenseDueDate', 'capitalRegAmount')
1196 1196
1197 PREFIX_MVC = 'GB' 1197 PREFIX_MVC = 'G'
1198 PREFIX_DL = 'DL' 1198 PREFIX_DL = 'V'
1199 SPLIT = ';'
1199 1200
1200 # --------------- DDA 保存图片 -------------------- 1201 # --------------- DDA 保存图片 --------------------
1201 DDA_FIELD = 'DDA' 1202 DDA_FIELD = 'DDA'
......
...@@ -261,39 +261,27 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id): ...@@ -261,39 +261,27 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
261 dl_find, dl_vinos = usedcar_info_compare(order_usedcar_info, ocr_res_dict, consts.DL_OCR_FIELD, 261 dl_find, dl_vinos = usedcar_info_compare(order_usedcar_info, ocr_res_dict, consts.DL_OCR_FIELD,
262 consts.PCUSD_DL, res_set) 262 consts.PCUSD_DL, res_set)
263 263
264 # if mvc_find is True and dl_find is False:
265 # vino = dl_vinos[-1] if len(dl_vinos) > 0 else ''
266 # order_usedcar_info[consts.PCUSD_MVC[0][0]] = '{0}: {1}'.format(consts.PREFIX_MVC, vino)
267 # order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N
268 # elif mvc_find is False and dl_find is True:
269 # vino = mvc_vinos[-1] if len(mvc_vinos) > 0 else ''
270 # order_usedcar_info[consts.PCUSD_MVC[0][0]] = '{0}: {1}'.format(consts.PREFIX_DL, vino)
271 # order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N
272 # elif mvc_find is False and dl_find is False:
273 # vino_list = []
274 # mvc_vino = mvc_vinos[-1] if len(mvc_vinos) > 0 else ''
275 # dl_vino = dl_vinos[-1] if len(dl_vinos) > 0 else ''
276 # vino_list.append('{0}: {1}'.format(consts.PREFIX_MVC, mvc_vino))
277 # vino_list.append(dl_vinos[-1])
278 # vino = '、'.join('{0}: {1}'.format(consts.PREFIX_DL, dl_vino))
279 # order_usedcar_info[consts.PCUSD_MVC[0][0]] = vino
280
281 if mvc_find is True and dl_find is False: 264 if mvc_find is True and dl_find is False:
282 vino = dl_vinos[0] if len(dl_vinos) > 0 else '' 265 vino = dl_vinos[-1] if len(dl_vinos) > 0 else ''
283 order_usedcar_info[consts.PCUSD_MVC[0][0]] = vino 266 order_usedcar_info[consts.PCUSD_MVC[0][0]] = '{0}-{1} {2} {3}-{4}'.format(
267 consts.PREFIX_MVC, consts.RESULT_Y, consts.SPLIT, consts.PREFIX_DL, vino)
284 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N 268 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N
285 elif mvc_find is False and dl_find is True: 269 elif mvc_find is False and dl_find is True:
286 vino = mvc_vinos[0] if len(mvc_vinos) > 0 else '' 270 vino = mvc_vinos[-1] if len(mvc_vinos) > 0 else ''
287 order_usedcar_info[consts.PCUSD_MVC[0][0]] = vino 271 order_usedcar_info[consts.PCUSD_MVC[0][0]] = '{0}-{1} {2} {3}-{4}'.format(
272 consts.PREFIX_MVC, vino, consts.SPLIT, consts.PREFIX_DL, consts.RESULT_Y)
288 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N 273 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N
289 elif mvc_find is False and dl_find is False: 274 elif mvc_find is False and dl_find is False:
290 vino_list = [] 275 if len(mvc_vinos) == 0 and len(dl_vinos) == 0:
291 if len(mvc_vinos) > 0: 276 order_usedcar_info[consts.PCUSD_MVC[0][0]] = None
292 vino_list.append(mvc_vinos[0]) 277 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_NA
293 if len(dl_vinos) > 0: 278 else:
294 vino_list.append(dl_vinos[0]) 279 mvc_vino = mvc_vinos[-1] if len(mvc_vinos) > 0 else ''
295 vino = '、'.join(vino_list) 280 dl_vino = dl_vinos[-1] if len(dl_vinos) > 0 else ''
281 vino = '{0}-{1} {2} {3}-{4}'.format(
282 consts.PREFIX_MVC, mvc_vino, consts.SPLIT, consts.PREFIX_DL, dl_vino)
296 order_usedcar_info[consts.PCUSD_MVC[0][0]] = vino 283 order_usedcar_info[consts.PCUSD_MVC[0][0]] = vino
284 order_usedcar_info[consts.PCUSD_MVC[0][4]] = consts.RESULT_N
297 285
298 comparison_res['OCR_Input']['usedCarInfo'] = order_usedcar_info 286 comparison_res['OCR_Input']['usedCarInfo'] = order_usedcar_info
299 287
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!