diff --git a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java index 962157c1..2fd7765c 100644 --- a/ht/src/main/java/com/ccsens/ht/service/QuestionService.java +++ b/ht/src/main/java/com/ccsens/ht/service/QuestionService.java @@ -741,13 +741,25 @@ public class QuestionService implements IQuestionService { */ private QuestionVo.Parameter getParameter(HtQuestion question, HtPatientCanvas htPatientCanvas, QuestionDto.QueryPatientCanvas param) { QuestionVo.Parameter parameter = new QuestionVo.Parameter(); - //开始画图时长:打开画板到第一笔画图时长 - parameter.setStartDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime()); +// //开始画图时长:打开画板到第一笔画图时长 +// parameter.setStartDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime()); //获取轨迹信息 List canvasPoints = patientCanvasDao.getCanvasPoints(htPatientCanvas.getId()); if(CollectionUtil.isEmpty(canvasPoints)){ return parameter; } + //第一笔的开始时间 + String[] pointsStart = canvasPoints.get(0).getValue().split(";"); + if(pointsStart.length <= 0){ + return parameter; + } + String[] splitStart = pointsStart[0].split(","); + if(splitStart.length <= 0){ + return parameter; + } + long startTime = Long.parseLong(splitStart[splitStart.length - 1]); + //开始画图时长:打开画板到第一笔画图时长 + parameter.setStartDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime() + startTime); //最后一笔的结束时间 String[] pointsLast = canvasPoints.get(canvasPoints.size() - 1).getValue().split(";"); if(pointsLast.length <= 0){ @@ -761,7 +773,7 @@ public class QuestionService implements IQuestionService { //超出占比 parameter.setBeyondProportion(htPatientCanvas.getBeyondProportion()); //画图总时长 - parameter.setTotalDuration(endTime + parameter.getStartDuration()); + parameter.setTotalDuration(endTime - startTime + parameter.getStartDuration()); //总笔画数 parameter.setLineNums(canvasPoints.size()); //共几分钟 diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index f59084b0..4ecd13fd 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: test - include: common, util-test + active: dev + include: common, util-dev diff --git a/ht/src/main/resources/druid-dev.yml b/ht/src/main/resources/druid-dev.yml index 12cbfc08..b3326f7f 100644 --- a/ht/src/main/resources/druid-dev.yml +++ b/ht/src/main/resources/druid-dev.yml @@ -27,7 +27,8 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://49.233.89.188:3306/ht?useUnicode=true&characterEncoding=UTF-8 +# url: jdbc:mysql://49.233.89.188:3306/ht?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://81.70.54.64:3306/ht?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_HT \ No newline at end of file diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index eca66951..1d881c2f 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: test - include: util-test,common \ No newline at end of file + active: dev + include: util-dev,common \ No newline at end of file