fix merge
Showing
3 changed files
with
12 additions
and
1 deletions
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| ... | @@ -16,6 +16,7 @@ class Comparison: | ... | @@ -16,6 +16,7 @@ class Comparison: |
| 16 | self.CSIBM = 'CSIBM' | 16 | self.CSIBM = 'CSIBM' |
| 17 | self.CSSME = 'CSSME' | 17 | self.CSSME = 'CSSME' |
| 18 | self.CSOTH = 'CSOTH' | 18 | self.CSOTH = 'CSOTH' |
| 19 | self.SPLIT_STR = '_' | ||
| 19 | 20 | ||
| 20 | self.TYPE_MAPPING = ( | 21 | self.TYPE_MAPPING = ( |
| 21 | (r'个体工商户', self.CSIBM), | 22 | (r'个体工商户', self.CSIBM), |
| ... | @@ -109,6 +110,16 @@ class Comparison: | ... | @@ -109,6 +110,16 @@ class Comparison: |
| 109 | ocr_output = None | 110 | ocr_output = None |
| 110 | return self.build_res(input_str == ocr_str), ocr_output | 111 | return self.build_res(input_str == ocr_str), ocr_output |
| 111 | 112 | ||
| 113 | def mvi_special(self, amount_lower_str, amount_upper_str, bhsj_str, zzsse_str): | ||
| 114 | # 不含税价, 增值税税额 | ||
| 115 | try: | ||
| 116 | if float(amount_lower_str) != rmb_handler.to_rmb_lower(amount_upper_str): | ||
| 117 | return self.RESULT_N | ||
| 118 | except Exception: | ||
| 119 | return self.RESULT_N | ||
| 120 | else: | ||
| 121 | return self.SPLIT_STR.join([bhsj_str, zzsse_str, self.RESULT_Y]) | ||
| 122 | |||
| 112 | def rmb_compare(self, input_str, ocr_str, idx, **kwargs): | 123 | def rmb_compare(self, input_str, ocr_str, idx, **kwargs): |
| 113 | if not isinstance(ocr_str, str) or not isinstance(input_str, str): | 124 | if not isinstance(ocr_str, str) or not isinstance(input_str, str): |
| 114 | return self.RESULT_NA, None | 125 | return self.RESULT_NA, None |
| ... | @@ -198,7 +209,7 @@ class Comparison: | ... | @@ -198,7 +209,7 @@ class Comparison: |
| 198 | ) | 209 | ) |
| 199 | dti = DatetimeIndex(dt_array, tz=None, name=None) | 210 | dti = DatetimeIndex(dt_array, tz=None, name=None) |
| 200 | ts = dti[0] | 211 | ts = dti[0] |
| 201 | if isinstance(ts, NaTType) or ts.date() < datetime.today().date(): | 212 | if isinstance(ts, NaTType) or ts.date() < (datetime.today() + relativedelta(days=8)).date(): |
| 202 | return False | 213 | return False |
| 203 | else: | 214 | else: |
| 204 | return True | 215 | return True | ... | ... |
-
Please register or sign in to post a comment