增加 fsm流程记录
Showing
2 changed files
with
25 additions
and
2 deletions
... | @@ -1075,3 +1075,15 @@ class NscInvoice(models.Model): | ... | @@ -1075,3 +1075,15 @@ class NscInvoice(models.Model): |
1075 | situ_db_label = 'hil' | 1075 | situ_db_label = 'hil' |
1076 | 1076 | ||
1077 | 1077 | ||
1078 | class CmsStatusInfo(models.Model): | ||
1079 | id = models.AutoField(primary_key=True, verbose_name="id") # 主键 | ||
1080 | application_id = models.CharField(max_length=64, verbose_name="订单id") # 索引 | ||
1081 | business_type = models.CharField(max_length=64, verbose_name="业务类型") | ||
1082 | is_fsm = models.models.SmallIntegerField(null=False, default=0, verbose_name="是否fsm流程 1:是") | ||
1083 | update_time = models.DateTimeField(verbose_name='更新时间') | ||
1084 | create_time = models.DateTimeField(verbose_name='创建时间') | ||
1085 | |||
1086 | class Meta: | ||
1087 | managed = False | ||
1088 | db_table = 'cms_status_info' | ||
1089 | situ_db_label = 'hil' | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -51,7 +51,8 @@ from .models import ( | ... | @@ -51,7 +51,8 @@ from .models import ( |
51 | HILOCRResult, | 51 | HILOCRResult, |
52 | HILSEOCRResult, | 52 | HILSEOCRResult, |
53 | AFCOCRResult, | 53 | AFCOCRResult, |
54 | AFCSEOCRResult | 54 | AFCSEOCRResult, |
55 | CmsStatusInfo | ||
55 | ) | 56 | ) |
56 | from .named_enum import ErrorType, AutoResult, WholeResult, RPAResult, SystemName, RequestTeam | 57 | from .named_enum import ErrorType, AutoResult, WholeResult, RPAResult, SystemName, RequestTeam |
57 | from .mixins import DocHandler, MPOSHandler, PreSEHandler | 58 | from .mixins import DocHandler, MPOSHandler, PreSEHandler |
... | @@ -1399,9 +1400,19 @@ class SECMSView(GenericView): | ... | @@ -1399,9 +1400,19 @@ class SECMSView(GenericView): |
1399 | fsm_contract = cms_info.get('FSMContract', False) | 1400 | fsm_contract = cms_info.get('FSMContract', False) |
1400 | fsm_best_price = cms_info.get('FSMBestPrice', False) | 1401 | fsm_best_price = cms_info.get('FSMBestPrice', False) |
1401 | if fsm_contract: | 1402 | if fsm_contract: |
1403 | # 记录fsm 流程的cms 提交 | ||
1404 | cms_status_info = CmsStatusInfo.objects.filter(application_id=application_id).first() | ||
1405 | if cms_status_info: | ||
1406 | cms_status_info.is_fsm = 1 | ||
1407 | cms_status_info.save() | ||
1408 | else: | ||
1409 | cms_status_info = CmsStatusInfo() | ||
1410 | cms_status_info.application_id = application_id | ||
1411 | cms_status_info.business_type = business_type | ||
1412 | cms_status_info.is_fsm = 1 | ||
1413 | cms_status_info.save() | ||
1402 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), | 1414 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), |
1403 | queue='queue_compare') | 1415 | queue='queue_compare') |
1404 | |||
1405 | else: | 1416 | else: |
1406 | # 触发比对 | 1417 | # 触发比对 |
1407 | compare.apply_async((application_id, business_type, None, None, False, True), | 1418 | compare.apply_async((application_id, business_type, None, None, False, True), | ... | ... |
-
Please register or sign in to post a comment