Browse Source

Merge branch 'main' of http://git.cc-lotus.info/Information/cxyy-service into main

zs 4 months ago
parent
commit
9f16624862
1 changed files with 17 additions and 1 deletions
  1. 17 1
      src/controller/match/matchExt.controller.ts

+ 17 - 1
src/controller/match/matchExt.controller.ts

@@ -586,7 +586,23 @@ export class MatchExtController implements BaseController {
   // TODO:决赛大屏,评委打分
 
   @Post('/step8', { routerName: '决赛阶段-赛事结束' })
-  async step8(@Body() data: object) {}
+  async step8(@Body() data: object) {
+    /**
+    * 检查内容:
+    *  赛事拓展表:
+    *    ext.status = "7"
+    * 修改内容: 
+    *  赛事拓展表:
+    *    ext.status => "8" 变为 决赛阶段-赛事进行
+    *  赛事报名表:
+    *    reg.ext_status: "7" => '8'
+    */
+    const match_id = get(data, 'match_id')
+    await this.service.checkMatchExtStatus(match_id, "7")
+    await this.service.update({ match_id }, { status: '8' })
+    await this.matchRegService.update({ match_id, ext_status: '7', final_confirm: '0' }, { ext_status: '8' })
+
+  }
 
   @Get('/firstStep/:match_id', { routerName: '进入初审阶段' })
   async toFirstStep(@Param('match_id') match_id: string, @Body() data: object) {