From b23f8cd1438c2b3c6f7e334502de619ffbb7fdc7 Mon Sep 17 00:00:00 2001
From: linzhijie <19970921lzj>
Date: 星期三, 24 三月 2021 19:24:01 +0800
Subject: [PATCH] 报告邮件标题跟随语言变换

---
 src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java |  207 ++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 138 insertions(+), 69 deletions(-)

diff --git a/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java b/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java
index 68f7f6b..5f5f453 100644
--- a/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java
+++ b/src/main/java/com/ots/project/exam/restcontroller/ExamPaperAnswerController.java
@@ -1,4 +1,6 @@
 package com.ots.project.exam.restcontroller;
+
+
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ots.common.enums.LangTypeEnum;
@@ -26,16 +28,20 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
 import javax.validation.Valid;
 import java.util.*;
 import java.util.stream.Collectors;
+
 import static com.ots.common.enums.ReportTypeEnum.Brief;
 import static com.ots.common.enums.SenderCode.noSend;
 import static com.ots.common.enums.SenderCode.send;
+
 @RestController("StudentExamPaperAnswerController")
 @RequestMapping(value = "/api/exam/exampaper/answer")
 @AllArgsConstructor
 public class ExamPaperAnswerController extends BaseApiController {
+
     @Autowired
     private ExamPaperAnswerService examPaperAnswerService;
     @Autowired
@@ -51,41 +57,53 @@
     @Autowired
     private TExamPaperServiceImpl examPaperService;
     private static final Logger logger = LoggerFactory.getLogger(Threads.class);
-    
+
+    // 绛旈鎻愪氦
     @RequestMapping(value = "/answerSubmit/{tokenId}", method = RequestMethod.POST)
     public RestResponse answerSubmit(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId) {
         logger.info("tokenId:" + tokenId);
         logger.info("itemOrder:" + examPaperSubmitVM.getItemOrder());
+
         try {
-            
+            // 1銆佹煡璇㈠嚭鐢ㄦ埛鐨勪俊鎭�
             ExamUser user = new ExamUser();
-            
+            // testId绛�
             RelatedParty relatedParty = memberService.queryProdidByToken(tokenId);
-            
-            
-            
+            //鍏ヤ汉鍙e鐨勯敭鍊�
+            // Map<String, String> examInfoMap = getDemographicReport(tokenId, user);
+            // dataReportList 瀵瑰簲鍩虹鏁版嵁瀵煎嚭content閭d釜瀛楁
             List<DataReport> dataReportList = getDemographicDataReport(examPaperSubmitVM, tokenId, user);
-            
+
+            // 3銆佹妸question鍙栧嚭鏉�
             Map<Long, QuestionObject> questionObjectMap = getLongQuestionObjectMap(examPaperSubmitVM);
-            
-            
+
+            // 4銆佹祴璇曞寘鍚嶇О銆佷骇鍝佸悕绉般�佹祴璇曞紑濮嬫椂闂淬�佹祴璇曞畬鎴愭椂闂寸殑
+            // setReportInfo(examPaperSubmitVM, relatedParty, examInfoMap);
             setReportInfo(examPaperSubmitVM, relatedParty, dataReportList);
+
             examPaperSubmitVM.setInterfaceContentList(new ArrayList<>());
             TExamReport tExamReportQuery = new TExamReport();
             tExamReportQuery.setTokenId(tokenId);
             setExamPaperSubTERList(examPaperSubmitVM, tExamReportQuery);
-            
-            
-            
-            
-            
+
+            // 5銆佷繚瀛樿皟鐢ㄦ嘲鍥藉洟闃熺殑鏁版嵁锛岀涓�娈电粨鏉熻皟鐢ㄦ嘲鍥藉洟闃�
+            // setRemoteCallReport(examPaperSubmitVM, tokenId, relatedParty, dataReportList);
+
+            //6銆佸舰鎴愰鐩�佸洖绛旈�夐」,闇�瑕佹潈闄愮瓑绛�
+            // setQuestionAndAnswer(examPaperSubmitVM, tokenId, relatedParty, dataReportList, questionObjectMap);
+
+            // 7銆佷笂涓�娆¢�変粈涔�
             Map<String, String> lastContentMap = getLastChioce(examPaperSubmitVM);
-            
+
+            // 8銆佽繖娆¢�変粈涔�
             Map<String, String> choiceMap = getThisChioce(examPaperSubmitVM);
-            
+
+            // 9銆佽缃姤琛ㄧ殑鍐呭
             setQuestionReport(examPaperSubmitVM);
-            
+
+            // 10銆侀鐩叆搴�
             ExamPaperAnswerInfo examPaperAnswerInfo = answerSubmitResult(examPaperSubmitVM, tokenId, relatedParty, user, dataReportList, lastContentMap, choiceMap);
+
             return RestResponse.ok(examPaperAnswerInfo.getSubmitReport());
         } catch (Exception e) {
             logger.error("{}", e.getMessage(), e);
@@ -98,21 +116,25 @@
             throw e;
         }
     }
+
     private void setExamPaperSubTERList(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, TExamReport tExamReportQuery) {
         List<TExamReport> tExamReportList = examReportService.selectTExamReportList(tExamReportQuery);
         if (ExamUtil.isListEmpty(tExamReportList)) {
             tExamReportList = new ArrayList<>();
         }
+
         examPaperSubmitVM.setTExamReportList(tExamReportList);
     }
+
     private void setRemoteCallReport(ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId, RelatedParty relatedParty, List<DataReport> dataReportList) {
         List<InterfaceContent> interfaceContentList = examPaperSubmitVM.getInterfaceContentList();
         if (!StringUtils.equals(examPaperSubmitVM.getIsCallTain(), "callTain")) {
-            
+            // 瑕佸彇鍘熸潵鐨勬暟鎹�
             setInterfaceContent(examPaperSubmitVM, interfaceContentList);
             return;
         }
-        
+
+        // 妯℃嫙璋冪敤
         Map<String, String> thaiCalculationMap = new HashMap<>();
         MAQReport maqReport = new MAQReport();
         maqReport.setQuestionnaireTaker(relatedParty.getMemberName());
@@ -129,6 +151,7 @@
         thaiCalculationMap.put("P_Creat02", "80");
         ReportResultData resultData = maqReport.getTemplateParameters(thaiCalculationMap, Brief, LangTypeEnum.English);
         Map<String, String> thaiDataMap = resultData.getTextMap();
+
         InterfaceContent interfaceContent = new InterfaceContent();
         interfaceContent.setPartOrder(examPaperSubmitVM.getPartOrder());
         interfaceContent.setDataReportList(new ArrayList<>());
@@ -136,10 +159,13 @@
         thaiDataMap.forEach((key, value) -> {
             iterFDataReportList.add(new DataReport(key, value, UserTypeEnum.SYS_USER.getUserType(), examPaperSubmitVM.getLangType()));
         });
-        
+
+        // 鎶婃棫鐨剅eport琛ㄦ暟鎹嬁鍑烘潵
         setInterfaceContent(examPaperSubmitVM, interfaceContentList);
+
         interfaceContentList.add(interfaceContent);
     }
+
     private void setInterfaceContent(ExamPaperSubmitVM examPaperSubmitVM, List<InterfaceContent> interfaceContentList) {
         if (ExamUtil.isListNotEmpty(examPaperSubmitVM.getTExamReportList())) {
             List<InterfaceContent> interfaceContentOldList = null;
@@ -150,7 +176,8 @@
             }
         }
     }
-    
+
+    // 娴嬭瘯鍖呭悕绉般�佷骇鍝佸悕绉般�佹祴璇曞紑濮嬫椂闂淬�佹祴璇曞畬鎴愭椂闂寸殑
     private void setReportInfo(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, RelatedParty relatedParty, List<DataReport> dataReportList) {
         dataReportList.add(new DataReport("Test Package", relatedParty.getTestName(), "", examPaperSubmitVM.getLangType()));
         dataReportList.add(new DataReport("Test", relatedParty.getProdName(), "", examPaperSubmitVM.getLangType()));
@@ -160,7 +187,8 @@
         dataReportList.add(new DataReport("Begin Time", beginTime, "", examPaperSubmitVM.getLangType()));
         dataReportList.add(new DataReport("End Time", endTime, "", examPaperSubmitVM.getLangType()));
     }
-    
+
+    // 杩欐閫変粈涔�
     private Map<String, String> getThisChioce(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
         Map<String, String> choiceMap = new LinkedHashMap<String, String>();
         examPaperSubmitVM.getAnswerItems().stream().forEach(it -> {
@@ -168,7 +196,8 @@
         });
         return choiceMap;
     }
-    
+
+    // 涓婁竴娆¢�変粈涔�
     private Map<String, String> getLastChioce(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
         Map<String, String> lastContentMap = new LinkedHashMap<String, String>();
         examPaperSubmitVM.getAnswerItems().stream().forEach(it -> {
@@ -176,34 +205,40 @@
         });
         return lastContentMap;
     }
-    
+
+    // 4銆佸舰鎴愰鐩�佸洖绛旈�夐」
     private void setQuestionAndAnswer(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, String tokenId, RelatedParty relatedParty, List<DataReport> dataReportList, Map<Long, QuestionObject> questionObjectMap) {
+
         List<QuestionAnswer> questionAnswers = examPaperSubmitVM.getAnswerItems().stream().map(item -> {
-            
+
+            //棰樺共锛屽洖绛旈」
             QuestionAnswer questionAnswer = new QuestionAnswer();
             QuestionObject questionObject = questionObjectMap.get(item.getQuestionId().longValue());
+
             try {
-                
+                //1.鍙栭骞�
                 questionAnswer.setQuestionItem(item.getItemOrder() + "." + ExamUtil.html2Text(questionObject.getTitleContent()));
-                
+                //2銆佸彇鍥炵瓟鐨勯�夐」
                 questionObject.getQuestionItemObjects().stream().forEach(q -> {
                     if (item.getContent().equals(q.getPrefix())) {
                         questionAnswer.setAnswerItem(q.getContent());
                     }
                 });
-                
+                // 3銆侀鐩案涔呯紪鍙�
                 questionAnswer.setPermanentId(item.getQuestionReport().getPermanentId());
-                
+
+                // 4銆佹湰棰樼洰鍦ㄩ偅涓�娈�
                 questionAnswer.setPartOrder(item.getQuestionReport().getPartOrder());
             } catch (Exception e) {
             }
             return questionAnswer;
         }).collect(Collectors.toList());
+
         for (int i = 0; i < questionAnswers.size(); i++) {
             if (StringUtils.isEmpty(questionAnswers.get(i).getAnswerItem())) {
                 break;
             }
-            
+            // 鎻掑叆娉板浗鍥㈤槦杩涙潵鐨勬暟鎹紝閫犳暟鎹紝濡傛灉璺冲埌浜嗕笅涓�娈碉紝閭e氨鎻掑叆娉板浗鍥㈤槦鐨勬暟鎹�
             if (i == 0 || questionAnswers.get(i - 1).getPartOrder() != questionAnswers.get(i).getPartOrder()) {
                 if (ExamUtil.isListNotEmpty(examPaperSubmitVM.getInterfaceContentList())) {
                     InterfaceContent interfaceContent = examPaperSubmitVM.getInterfaceContentList().get(0);
@@ -213,26 +248,28 @@
             dataReportList.add(new DataReport(questionAnswers.get(i).getPermanentId(), questionAnswers.get(i).getAnswerItem(), UserTypeEnum.SYS_USER.getUserType(), examPaperSubmitVM.getLangType()));
         }
     }
-    
+
+    // 鎶妐uestion鍙栧嚭鏉�
     private Map<Long, QuestionObject> getLongQuestionObjectMap(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
         List<Long> questionIdList = examPaperSubmitVM.getAnswerItems().stream().map(i -> {
             return i.getQuestionId().longValue();
         }).collect(Collectors.toList());
-        
+        //鎶妐uesitonId鍙栧嚭鏉�
         List<TQuestion> tQuestionList = questionService.selectTQuestionByIds(questionIdList);
-        
+        //棰樼洰id锛屾妸棰樺共锛岄�夐」涔嬬被鐨勫唴瀹瑰彇鍑烘潵
         Map<Long, QuestionObject> questionObjectMap = new HashMap<Long, QuestionObject>();
         tQuestionList.stream().forEach(it -> {
             questionObjectMap.put(it.getId(), JSONObject.parseObject(it.getContent(), QuestionObject.class));
         });
         return questionObjectMap;
     }
-    
+
+    //鍏ヤ汉鍙e鐨勯敭鍊�
     private Map<String, String> getDemographicReport(@PathVariable String tokenId, ExamUser user) {
         Map<String, String> examInfoMap = new LinkedHashMap<String, String>();
         try {
             List<EntDemographyInfo> entDemographyInfoList = memberService.queryDemographyParamInfo(tokenId);
-            
+            //2銆佽幏鍙栫敤鎴风殑鍊�
             EntDemographyInfo entDemographyInfo = entDemographyInfoList.get(0);
             user.setId(entDemographyInfo.getMemberId().intValue());
             entDemographyInfoList.stream().forEach(item -> examInfoMap.put(item.getParamName(), item.getParamValue()));
@@ -242,12 +279,13 @@
         }
         return examInfoMap;
     }
-    
+
+    //鍏ヤ汉鍙e鐨勯敭鍊�
     private List<DataReport> getDemographicDataReport(ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId, ExamUser user) {
         List<DataReport> dataReportList = new ArrayList<>();
         try {
             List<EntDemographyInfo> entDemographyInfoList = memberService.queryDemographyParamInfo(tokenId);
-            
+            //2銆佽幏鍙栫敤鎴风殑鍊�
             EntDemographyInfo entDemographyInfo = entDemographyInfoList.get(0);
             user.setId(entDemographyInfo.getMemberId().intValue());
             entDemographyInfoList.stream().forEach(item -> {
@@ -259,10 +297,11 @@
         }
         return dataReportList;
     }
+
     private void setQuestionReport(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
         List<ExamPaperTitleItemVM> titleItems = examPaperSubmitVM.getTitleItems();
         List<ExamPaperSubmitItemVM> anserItems = examPaperSubmitVM.getAnswerItems();
-        
+        // 浜烘牸娴嬭瘯棰橈紝鍙湁涓�娈电殑
         if (Objects.isNull(titleItems)) {
             if (Objects.isNull(anserItems)) {
                 return;
@@ -272,22 +311,23 @@
                 questionReport.setId(questionReport.getQuestionOrder() + 1);
                 questionReport.setTimeSpent(ExamUtil.timeSpent(DateTimeUtil.parseToOften(questionReport.getStartTime()), DateTimeUtil.parseToOften(questionReport.getEndTime())));
             }
-            
+            // else 宸ヤ綔闂嵎娴嬭瘯棰�
         } else {
             for (ExamPaperTitleItemVM examPaperTitleItemVM : titleItems) {
-                
+                // 璁板綍JAQ灏忛
                 QuestionReport questionReport = examPaperTitleItemVM.getQuestionReport();
                 questionReport.setId(questionReport.getQuestionOrder() + 1);
                 questionReport.setTimeSpent(ExamUtil.timeSpent(DateTimeUtil.parseToOften(questionReport.getStartTime()), DateTimeUtil.parseToOften(questionReport.getEndTime())));
             }
         }
     }
+
     private ExamPaperAnswerInfo answerSubmitResult(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId, RelatedParty relatedParty, ExamUser user, List<DataReport> dataReportList, Map<String, String> lastContentMap, Map<String, String> choiceMap) {
         TExamReport tExamReport = new TExamReport();
         TExamReport tExamReportQuery = new TExamReport();
         tExamReport.setContent(JSON.toJSON(dataReportList).toString());
         tExamReport.setProductId(examPaperSubmitVM.getId().longValue());
-        tExamReport.setQuestionReport(getQuestionReportsJson(examPaperSubmitVM));
+        tExamReport.setQuestionReport(getQuestionReportsJson(examPaperSubmitVM));// 鎶ュ憡瀛楁
         ExamPaperAnswerInfo examPaperAnswerInfo = examPaperAnswerService.calculateExamPaperAnswer(examPaperSubmitVM, user);
         TExamPaper examPaper = examPaperAnswerInfo.getExamPaper();
         tExamReport.setProductName(examPaper.getName());
@@ -297,99 +337,125 @@
         tExamReport.setChoice(JSON.toJSON(choiceMap).toString());
         tExamReport.setDoTime(examPaperSubmitVM.getDoTime());
         tExamReport.setLangType(examPaperSubmitVM.getLangType());
-        
+        // 鏄惁鑷姩鍙戦�佺姸鎬佹姤鍛�
         setAutoSendReportStatus(relatedParty, tExamReport);
         BeanUtils.copyBeanProp(tExamReportQuery, tExamReport);
+
         tExamReportQuery.setProductId(null);
         tExamReportQuery.setProductName(null);
         List<TExamReport> tExamReportList = examPaperSubmitVM.getTExamReportList();
-        
-        
+        // ExamPaperAnswer examPaperAnswer = examPaperAnswerInfo.getExamPaperAnswer();
+        // questionCount 鍋氶鏁扮洰
         tExamReport.setQuestionCount(0);
-        
+        //member_id
         tExamReport.setMemberId(relatedParty.getMemberId().intValue());
-        
+        // user_id
         tExamReport.setUserId(relatedParty.getUser_id());
-        
+        // parent_id
         tExamReport.setParentId(relatedParty.getUser_parent_id());
-        
+        // test_id
         tExamReport.setTestId(relatedParty.getTestId());
-        
+        // finish
         tExamReport.setFinish(examPaperSubmitVM.getFinish());
+        //鏇存柊鐢ㄦ埛绛旈鐘舵��
         setVerifyStatus(examPaperSubmitVM, tExamReport);
-        
+
+        // questionTemplateId
         tExamReport.setQuestionTemplateId(relatedParty.getQuestionTemplateId());
-        
+
+        // 闅忔満棰樼洰缂栧彿
         tExamReport.setQuestionOrder(JSON.toJSONString(examPaperSubmitVM.getQuestionOrder()));
-        
+
+        // 闅忔満鐨勯�夐」缂栧彿
         tExamReport.setOptionOrder(JSON.toJSONString(examPaperSubmitVM.getOptionOrder()));
-        
+
+        // 璁剧疆鎴愬憳鍚嶇О
         tExamReport.setMemberName(relatedParty.getMemberName());
-        
+
+        // 妯$増鍚嶇О
         tExamReport.setReportTemplateId(relatedParty.getReportTemplateId());
-        
-        
+
+        // tExamReport
+
+        // 鐢ㄦ埛绛旈鐨勬椂闂�
         setRemainPartTime(examPaperSubmitVM, tExamReport, tExamReportList);
-        
+
+        // 鏇存柊鎶ュ憡
         updateTExamReport(examPaperSubmitVM, tokenId, relatedParty, tExamReport, tExamReportList);
-        
+
+        // 璋冪敤娉板浗鍥㈤槦
         callThaiInteface(examPaperSubmitVM, tokenId, tExamReport, examPaperAnswerInfo);
         return examPaperAnswerInfo;
     }
+
     private void updateTExamReport(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId, RelatedParty relatedParty, TExamReport tExamReport, List<TExamReport> tExamReportList) {
-        
+        // 寮�濮嬫椂闂存病鏈夋洿鏂板氨鏇存柊涓�涓�
         if (Objects.isNull(relatedParty.getStartTime())) {
             entTestMemberService.updateTestMemberStatus(TestMemberStatusEnum.answering, memberService.queryProdidByToken(tokenId).getMemberId());
         }
+
         if (tExamReportList.size() > 0) {
-            
+            // 鏇存柊鏈鐨勭瓟棰樻椂闂达紝鍏堟妸鍘熸潵鐨勬璇诲嚭鏉�
             examReportService.updateTExamReportByTokenId(tExamReport);
         } else {
             examReportService.insertTExamReport(tExamReport);
         }
-        
+
+        //鏇存柊娴嬭瘯鍖呯殑鐘舵��
         if (!Objects.isNull(examPaperSubmitVM.getFinish())) {
-            
+
+            // 鏍¢獙姣忎竴棰樻槸鍚﹂兘绛斾簡锛屾病鏈夋剰涔夛紝鍥犱负鏈夌殑浜轰細鎻愪氦绌虹殑绛旈璁板綍涓婃潵
             checkCaqQuestionItem(tExamReport);
-            
+
+            // MAQ 鏈夌瓟瀹屼笉鏀圭姸鎬佺殑鎯呭喌
             TestMemberStatusEnum testMemberStatusEnum = TestMemberStatusEnum.codeOf(examPaperSubmitVM.getFinish().toString());
             if (Objects.equals(Integer.parseInt(TestMemberStatusEnum.completed.getCode()), tExamReport.getVerifyStatus())) {
                 testMemberStatusEnum = TestMemberStatusEnum.completed;
             }
+
             entTestMemberService.updateTestMemberStatus(testMemberStatusEnum, tExamReport.getMemberId());
         }
     }
+
     private void checkCaqQuestionItem(TExamReport tExamReport) {
         if (!Objects.equals(tExamReport.getQuestionTemplateId(), "job")) {
             return;
         }
+
         List<QuestionReport> questionReportList = JsonUtil.parseArray(tExamReport.getQuestionReport(), QuestionReport.class);
         for (QuestionReport questionReport : questionReportList) {
-
+//            questionReport = null; // 娴嬭瘯鐢�
             List<QuestionEditRequestVM> questionItems = questionReport.getQuestionItems();
         }
+
     }
+
     private void setVerifyStatus(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, TExamReport tExamReport) {
         if (Objects.equals(examPaperSubmitVM.getFinish(), 6)) {
             tExamReport.setVerifyStatus(Integer.parseInt(TestMemberStatusEnum.timeOut.getCode()));
         } else {
-            
+            // 鏇存柊鐢ㄦ埛鐨勭瓟棰樼姸鎬�
             tExamReport.setVerifyStatus(examPaperSubmitVM.getVerifyStatus());
         }
     }
+
     private void setRemainPartTime(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM, TExamReport tExamReport, List<TExamReport> tExamReportList) {
         if (Objects.isNull(examPaperSubmitVM.getRemainTime())) {
             return;
         }
+
         Map<Integer, Integer> remainPartTimeMap = null;
+
         if (tExamReportList.size() > 0) {
             remainPartTimeMap = JsonUtil.parseObject(tExamReportList.get(0).getRemainPartTime(), HashMap.class);
         } else {
             remainPartTimeMap = new HashMap<>();
         }
+
         remainPartTimeMap.put(examPaperSubmitVM.getPartOrder(), examPaperSubmitVM.getRemainTime());
         tExamReport.setRemainPartTime(JsonUtil.toJSONString(remainPartTimeMap));
     }
+
     private void callThaiInteface(ExamPaperSubmitVM examPaperSubmitVM, @PathVariable String tokenId, TExamReport tExamReport, ExamPaperAnswerInfo examPaperAnswerInfo) {
         if (Objects.equals(examPaperSubmitVM.getIsCallTain(), "CallThai")) {
             SignalObject signalObject = examPaperService.callTaiData(tokenId, tExamReport.getLangType(), examPaperSubmitVM);
@@ -397,9 +463,10 @@
             submitReport.setSignalObject(signalObject);
         }
     }
-    
+
+    // 鑷姩鍙戦�佺姸鎬佹姤鍛婇渶瑕佸鐞嗙殑鍐呭
     private void setAutoSendReportStatus(RelatedParty relatedParty, TExamReport tExamReport) {
-        
+        // 0锛氬緟鍙戦�侊紱1锛氬凡鍙戦�侊紱2锛氫笉鍙戦��
         if (relatedParty.isAutoSendReport()) {
             tExamReport.setSendHrStatus(send.getCode());
             tExamReport.setSendTesterStatus(send.getCode());
@@ -409,7 +476,8 @@
             tExamReport.setSendTesterStatus(noSend.getCode());
         }
     }
-    
+
+    // 鑾峰緱QuestionReport鍒楄〃鐨凧son瀛楃涓插叆t_exam_roport琛�
     private String getQuestionReportsJson(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
         List<ExamPaperTitleItemVM> titleItems = examPaperSubmitVM.getTitleItems();
         List<ExamPaperSubmitItemVM> answerItems = examPaperSubmitVM.getAnswerItems();
@@ -428,7 +496,8 @@
         }
         return JsonUtil.toJsonStr(questionReportList);
     }
-    
+
+    // 鐐瑰嚮寮�濮嬬瓟棰樼殑鏃跺�欙紝鏀规垚绛旈涓紝浠呮墽琛屼竴娆�
     @RequestMapping(value = "/updateTestMemberStatus/{tokenId}", method = RequestMethod.POST)
     public RestResponse updateTestMemberStatus(@PathVariable String tokenId) {
         entTestMemberService.updateTestMemberStatus(TestMemberStatusEnum.answering, memberService.queryProdidByToken(tokenId).getMemberId());

--
Gitblit v1.9.1