linzhijie
2021-03-26 af8d29a4affd04da30eba76b5a6ef96ece6264e1
更正代码
2个文件已修改
51 ■■■■ 已修改文件
.idea/workspace.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/workspace.xml
@@ -20,16 +20,7 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="cd72c5cc-17e9-4269-9d87-e1dc29ad79ec" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/jar/tai-ots-framework.jar" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/src/main/resources/application-online.yml" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/src/main/resources/application-prod.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/java/com/ots/OtsApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ots/OtsApplication.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/resources/application-sand.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-sand.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/resources/logback.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/logback.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/src/main/resources/mailConfig.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mailConfig.properties" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -181,6 +172,11 @@
            </State>
          </value>
        </entry>
        <entry key="2">
          <value>
            <State />
          </value>
        </entry>
      </map>
    </option>
    <option name="OPEN_GENERIC_TABS">
@@ -288,14 +284,14 @@
      <screen x="0" y="0" width="1920" height="1040" />
    </state>
    <state width="968" height="528" key="XDebugger.FullValuePopup/0.0.1920.1040@0.0.1920.1040" timestamp="1615866063087" />
    <state x="754" y="432" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1615427969273">
    <state x="754" y="432" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1616725792611">
      <screen x="0" y="0" width="1920" height="1040" />
    </state>
    <state x="754" y="432" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1040@0.0.1920.1040" timestamp="1615427969273" />
    <state x="1083" y="283" width="603" height="748" key="find.popup" timestamp="1615866113491">
    <state x="754" y="432" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1040@0.0.1920.1040" timestamp="1616725792611" />
    <state x="1083" y="283" width="603" height="748" key="find.popup" timestamp="1616725783782">
      <screen x="0" y="0" width="1920" height="1040" />
    </state>
    <state x="1083" y="283" width="603" height="748" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1615866113491" />
    <state x="1083" y="283" width="603" height="748" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1616725783782" />
    <state x="761" y="426" key="git4idea.remote.GitConfigureRemotesDialog" timestamp="1615460537318">
      <screen x="0" y="0" width="1920" height="1040" />
    </state>
src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java
@@ -512,33 +512,8 @@
    // 点击开始答题的时候,改成答题中,仅执行一次
    @RequestMapping(value = "/updateTestMemberStatus/{tokenId}", method = RequestMethod.POST)
    public RestResponse updateTestMemberStatus(@PathVariable String tokenId) {
        RelatedParty rp = memberService.queryProdidByToken(tokenId);
        EntTestPackage etp = entTestPackageService.selectEntTestPackageById(rp.getTestId());
        TExamPaper tp = iTExamPaperService.selectTExamPaperById(etp.getProdId());
        TTextContent tc = textContentService.selectTTextContentById(tp.getFrameTextContentId());
        List<ExamPaperTitleItem> examPaperTitleItemList = JsonUtil.parseArray(tc.getContent(), ExamPaperTitleItem.class);
        List<QuestionPart> parts = examPaperTitleItemList.get(0).getParts();
        QuestionPart questionPart = parts.get(0);
        List<SignalObject> signals = questionPart.getSignals();
        //晚点再写随机
        SignalObject signalObject = signals.get(0);
        String langType = entDemographyInfoService.getlangType(rp.getMemberId());
        signalObject.setSignalDescription(ExamUtil.getLangString(langType, signalObject.getSignalDescription()));
        TExamReport tExamReportResult = new TExamReport();
        tExamReportResult.setMemberId(rp.getMemberId().intValue());
        String name = examReportService.getDemographicName(tExamReportResult);
        signalObject.setSignalDescription(signalObject.getSignalDescription().replaceAll("%%fullName%%", StringUtils.isNotEmpty(name) ? name : tExamReportResult.getMemberName()));
        signalObject.setCode("success");
        signalObject.setMessage("");
        //更新
        entTestMemberService.updateTestMemberStatus(TestMemberStatusEnum.answering, rp.getMemberId());
        SubmitReport submitReport = new SubmitReport();
        submitReport.setSignalObject(signalObject);
        return RestResponse.ok(submitReport);
        entTestMemberService.updateTestMemberStatus(TestMemberStatusEnum.answering, memberService.queryProdidByToken(tokenId).getMemberId());
        return RestResponse.ok();
    }
}