MOD:财年和非零比对逻辑
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -705,7 +705,7 @@ class Comparison: | ... | @@ -705,7 +705,7 @@ class Comparison: |
705 | this_year_str = datetime.now().strftime('%Y') | 705 | this_year_str = datetime.now().strftime('%Y') |
706 | this_year = int(this_year_str) | 706 | this_year = int(this_year_str) |
707 | last_year = this_year - 1 | 707 | last_year = this_year - 1 |
708 | if input_str != this_year and input_str != last_year: | 708 | if str(input_str) != str(this_year) and str(input_str) != str(last_year): |
709 | return self.RESULT_N | 709 | return self.RESULT_N |
710 | return self.RESULT_Y | 710 | return self.RESULT_Y |
711 | except Exception as e: | 711 | except Exception as e: |
... | @@ -714,7 +714,7 @@ class Comparison: | ... | @@ -714,7 +714,7 @@ class Comparison: |
714 | def input_list_not_zero_compare(self, input_list, ocr_list, **kwargs): | 714 | def input_list_not_zero_compare(self, input_list, ocr_list, **kwargs): |
715 | try: | 715 | try: |
716 | for item in input_list: | 716 | for item in input_list: |
717 | if item == 0: | 717 | if float(item) <= 0: |
718 | return self.RESULT_N | 718 | return self.RESULT_N |
719 | return self.RESULT_Y | 719 | return self.RESULT_Y |
720 | except Exception as e: | 720 | except Exception as e: | ... | ... |
-
Please register or sign in to post a comment