Browse Source

动作分析2.3.1

sd
zhizhi wu 4 years ago
parent
commit
3c66a93d97
  1. 2
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  2. 4
      ht/src/main/resources/application.yml
  3. 36
      question/src/main/java/com/ccsens/question/service/PatientReportService.java

2
ht/src/main/java/com/ccsens/ht/service/QuestionService.java

@ -717,7 +717,7 @@ public class QuestionService implements IQuestionService {
}
lineParameter.setSpeed(speed);
// 落笔总时间
paintTime += Long.parseLong(e[e.length - 1]) - Long.parseLong(a[a.length - 1]);
paintTime += Long.parseLong(e[e.length - 1]) - Long.parseLong(s[s.length - 1]);
//和上一笔的间隔 & 思考总时长
if(Long.parseLong(e[e.length - 1]) == 0){
lineParameter.setIntervalDuration(htPatientCanvas.getBeginTime() - htPatientCanvas.getOpenCanvasTime());

4
ht/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: prod
include: common, util-prod
active: test
include: common, util-test

36
question/src/main/java/com/ccsens/question/service/PatientReportService.java

@ -69,33 +69,33 @@ public class PatientReportService implements IPatientReportService {
public JsonResponse<PatientReportVo.Generate> generatePatientReport(PatientReportDto.Generate generate, Long userId) {
log.info("生成报告单请求参数:userId:{}, patientReport:{}", userId, generate);
//查询医生信息
HtDoctorExample doctorExample = new HtDoctorExample();
doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT);
List<HtDoctor> doctors = htDoctorDao.selectByExample(doctorExample);
if (CollectionUtils.isEmpty(doctors)) {
log.info("根据userId未找到审核通过的医生信息:{}", userId);
return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR);
}
//查询病人信息
HtPatient htPatient = htPatientMapper.selectByPrimaryKey(generate.getPatientId());
if (htPatient == null) {
log.info("根据patientId未找到病友信息:{}", generate.getPatientId());
return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR);
}
// HtDoctorExample doctorExample = new HtDoctorExample();
// doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT);
// List<HtDoctor> doctors = htDoctorDao.selectByExample(doctorExample);
// if (CollectionUtils.isEmpty(doctors)) {
// log.info("根据userId未找到审核通过的医生信息:{}", userId);
// return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR);
// }
// //查询病人信息
// HtPatient htPatient = htPatientMapper.selectByPrimaryKey(generate.getPatientId());
// if (htPatient == null) {
// log.info("根据patientId未找到病友信息:{}", generate.getPatientId());
// return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR);
// }
HtPatientReport htPatientReport = new HtPatientReport();
htPatientReport.setId(snowflake.nextId());
htPatientReport.setDoctorId(doctors.get(0).getId());
// htPatientReport.setDoctorId(doctors.get(0).getId());
htPatientReport.setPatientId(generate.getPatientId());
htPatientReport.setPatientIdcard(htPatient.getIdcard());
htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard()));
// htPatientReport.setPatientIdcard(htPatient.getIdcard());
// htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard()));
htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE);
htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today());
htPatientReport.setReportTime(System.currentTimeMillis());
// 查询医院信息
String hospital = htPositionDao.queryHospital(doctors.get(0).getPositionId());
htPatientReport.setHospital(hospital);
// String hospital = htPositionDao.queryHospital(doctors.get(0).getPositionId());
// htPatientReport.setHospital(hospital);
htPatientReportDao.insertSelective(htPatientReport);
log.info("生成病友报告单:{}", generate);
PatientReportVo.Generate generateVo = new PatientReportVo.Generate();

Loading…
Cancel
Save