Merge branch 'feature/fsm-full' into 'feature/uat-tmp'
增加 fsm流程记录 See merge request !12
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 |
| ... | @@ -1408,9 +1409,19 @@ class SECMSView(GenericView): | ... | @@ -1408,9 +1409,19 @@ class SECMSView(GenericView): |
| 1408 | fsm_contract = cms_info.get('FSMContract', False) | 1409 | fsm_contract = cms_info.get('FSMContract', False) |
| 1409 | fsm_best_price = cms_info.get('FSMBestPrice', False) | 1410 | fsm_best_price = cms_info.get('FSMBestPrice', False) |
| 1410 | if fsm_contract: | 1411 | if fsm_contract: |
| 1412 | # 记录fsm 流程的cms 提交 | ||
| 1413 | cms_status_info = CmsStatusInfo.objects.filter(application_id=application_id).first() | ||
| 1414 | if cms_status_info: | ||
| 1415 | cms_status_info.is_fsm = 1 | ||
| 1416 | cms_status_info.save() | ||
| 1417 | else: | ||
| 1418 | cms_status_info = CmsStatusInfo() | ||
| 1419 | cms_status_info.application_id = application_id | ||
| 1420 | cms_status_info.business_type = business_type | ||
| 1421 | cms_status_info.is_fsm = 1 | ||
| 1422 | cms_status_info.save() | ||
| 1411 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), | 1423 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), |
| 1412 | queue='queue_compare') | 1424 | queue='queue_compare') |
| 1413 | |||
| 1414 | else: | 1425 | else: |
| 1415 | # 触发比对 | 1426 | # 触发比对 |
| 1416 | compare.apply_async((application_id, business_type, None, None, False, True), | 1427 | compare.apply_async((application_id, business_type, None, None, False, True), | ... | ... |
-
Please register or sign in to post a comment