From 5556ee022b4a49cd1b8e46690cd8fe69c48a0239 Mon Sep 17 00:00:00 2001 From: baishou_zjx <2710684311@qq.com> Date: Thu, 8 Aug 2019 18:59:53 +0800 Subject: [PATCH] 机器人接口完成80% --- springboot/morning-check/src/main/java/com/sincere/morningcheck/MorningCheckApplication.java | 21 +++++++++++++++++++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/CheckReportController.java | 22 ++++++++++++++++++++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/MorningCheckController.java | 3 ++- springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentCheckReportDao.java | 11 ++++++++++- springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentDao.java | 4 ++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ApiStudentCheckReport.java | 2 +- springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ClassExReport.java | 15 +++++++++++++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/model/Grade.java | 13 +++++++++++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/model/StudentCheckReport.java | 2 +- springboot/morning-check/src/main/java/com/sincere/morningcheck/service/StudentCheckReportService.java | 4 ++++ springboot/morning-check/src/main/java/com/sincere/morningcheck/service/impl/StudentCheckReportServiceImpl.java | 200 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- springboot/morning-check/src/main/resources/file-message.properties | 2 +- springboot/morning-check/src/main/resources/logback.xml | 2 +- springboot/morning-check/src/main/resources/mapper/StudentCheckReport.xml | 22 +++++++++++++++++++--- springboot/morning-check/src/main/resources/mapper/studentmapper.xml | 7 +++++++ springboot/src/main/java/com/sincre/springboot/controller/TuYaYunController.java | 7 +++++++ 16 files changed, 303 insertions(+), 34 deletions(-) create mode 100644 springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ClassExReport.java create mode 100644 springboot/morning-check/src/main/java/com/sincere/morningcheck/model/Grade.java diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/MorningCheckApplication.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/MorningCheckApplication.java index 299e47c..ca5b551 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/MorningCheckApplication.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/MorningCheckApplication.java @@ -4,6 +4,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration; import org.springframework.context.annotation.Bean; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.commons.CommonsMultipartResolver; @@ -30,4 +33,22 @@ public class MorningCheckApplication { resolver.setMaxUploadSize(50 * 1024 * 1024);//上传文件大小 50 10*1024*1024 return resolver; } + + @Bean + public CorsFilter corsFilter() { + final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + final CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + config.addAllowedOrigin("*"); + config.addAllowedHeader("*"); + config.addAllowedMethod("OPTIONS"); + config.addAllowedMethod("HEAD"); + config.addAllowedMethod("GET"); + config.addAllowedMethod("PUT"); + config.addAllowedMethod("POST"); + config.addAllowedMethod("DELETE"); + config.addAllowedMethod("PATCH"); + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } } diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/CheckReportController.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/CheckReportController.java index f618c0f..99170d0 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/CheckReportController.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/CheckReportController.java @@ -5,6 +5,7 @@ import com.sincere.morningcheck.model.ApiStudentCheckReport; import com.sincere.morningcheck.service.StudentCheckReportService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -30,5 +31,26 @@ public class CheckReportController { return studentCheckReportService.getCheckReport(stuUserId); } + @ApiOperation(value = "根据学校获取学生晨检报告") + @ApiImplicitParams({ + @ApiImplicitParam(name = "schoolId",value = "学校ID",required = true), + @ApiImplicitParam(name = "checkTime",value = "检查报告的时间,格式为yyyy-MM-dd",required = true) + }) + @GetMapping("getCheckReportBySchoolId") + public ServerResponse getCheckReportBySchoolId(@RequestParam Integer schoolId,@RequestParam String checkTime){ + + return studentCheckReportService.getCheckReportBySchool(schoolId,checkTime); + } + + @ApiOperation(value = "根据年级获取学生异常晨检报告的比例") + @ApiImplicitParams({ + @ApiImplicitParam(name = "schoolId",value = "学校ID",required = true), + @ApiImplicitParam(name = "gradeId",value = "年级标识",required = true) + }) + @GetMapping("getCheckExReportByGrade") + public ServerResponse getCheckExReportByGrade(@RequestParam Integer schoolId,@RequestParam Integer gradeId){ + + return studentCheckReportService.getCheckExReportByGrade(schoolId,gradeId); + } } diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/MorningCheckController.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/MorningCheckController.java index bbea1ec..824fb4d 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/MorningCheckController.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/controller/MorningCheckController.java @@ -366,7 +366,8 @@ public class MorningCheckController { studentCheckReport.setCardNo(card); studentCheckReport.setCheckResult(result); studentCheckReport.setRobotResult(robotResult); - java.sql.Date checkDate = new java.sql.Date(new Date().getTime()); + //java.sql.Date checkDate = new java.sql.Date(new Date().getTime()); + Date checkDate = new Date(); studentCheckReport.setCheckTime(checkDate); studentCheckReport.setInTime(checkDate); studentCheckReport.setTemperature(temperature); diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentCheckReportDao.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentCheckReportDao.java index aaa9ad1..1507162 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentCheckReportDao.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentCheckReportDao.java @@ -1,15 +1,24 @@ package com.sincere.morningcheck.dao; +import com.sincere.morningcheck.model.ClassExReport; import com.sincere.morningcheck.model.StudentCheckReport; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Mapper @Repository public interface StudentCheckReportDao { int insert(StudentCheckReport studentCheckReport); - StudentCheckReport getCheckReport(@Param("studentId") Integer studentId); + List getCheckReport(@Param("studentId") Integer studentId); + + int getCheckStuCountBySchoolId(@Param("schoolId")Integer schoolId,@Param("checkTime") String checkTime); + + List getCheckReportBySchoolId(@Param("schoolId")Integer schoolId,@Param("checkTime") String checkTime); + + List getCheckExReportByGrade(@Param("schoolId")Integer schoolId,@Param("gradeId") Integer gradeId); } diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentDao.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentDao.java index 472c8c7..3b1fd34 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentDao.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/dao/StudentDao.java @@ -1,6 +1,7 @@ package com.sincere.morningcheck.dao; +import com.sincere.morningcheck.model.Grade; import com.sincere.morningcheck.model.Student; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -19,6 +20,9 @@ public interface StudentDao { Student getStudentByStuUserId(@Param("sUserId") String sUserId); + int getStuCountBySchoolId(@Param("schoolId") Integer schoolId); + + List getGradeBySchoolId(@Param("schoolId") Integer schoolId); /** * 传入的参数和返回的结果都在map集合参数params中 * @param params diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ApiStudentCheckReport.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ApiStudentCheckReport.java index 7af5448..78c265e 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ApiStudentCheckReport.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ApiStudentCheckReport.java @@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.sql.Date; + /** * 接口使用类 检查报告 diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ClassExReport.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ClassExReport.java new file mode 100644 index 0000000..64754b9 --- /dev/null +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/ClassExReport.java @@ -0,0 +1,15 @@ +package com.sincere.morningcheck.model; + +import lombok.Data; + +@Data +public class ClassExReport { + + private Integer class_id; + + private String className; + + private Integer count; + + private float exRate; +} diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/Grade.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/Grade.java new file mode 100644 index 0000000..aee3e6d --- /dev/null +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/Grade.java @@ -0,0 +1,13 @@ +package com.sincere.morningcheck.model; + +import lombok.Data; + +@Data +public class Grade { + + private Integer id; + + private String grade; + + private String ShortName; +} diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/StudentCheckReport.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/StudentCheckReport.java index 171cafd..bb96a9c 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/StudentCheckReport.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/model/StudentCheckReport.java @@ -2,7 +2,7 @@ package com.sincere.morningcheck.model; import lombok.Data; -import java.sql.Date; +import java.util.Date; @Data public class StudentCheckReport { diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/StudentCheckReportService.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/StudentCheckReportService.java index 74a2841..6c79901 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/StudentCheckReportService.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/StudentCheckReportService.java @@ -10,4 +10,8 @@ public interface StudentCheckReportService { int insert(StudentCheckReport studentCheckReport); ServerResponse getCheckReport(String stuUserId); + + ServerResponse getCheckReportBySchool(Integer schoolId,String checkTime); + + ServerResponse getCheckExReportByGrade(Integer schoolId,Integer gradeId); } diff --git a/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/impl/StudentCheckReportServiceImpl.java b/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/impl/StudentCheckReportServiceImpl.java index da3a7de..60ed549 100644 --- a/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/impl/StudentCheckReportServiceImpl.java +++ b/springboot/morning-check/src/main/java/com/sincere/morningcheck/service/impl/StudentCheckReportServiceImpl.java @@ -3,15 +3,14 @@ package com.sincere.morningcheck.service.impl; import com.sincere.morningcheck.common.ServerResponse; import com.sincere.morningcheck.dao.StudentCheckReportDao; import com.sincere.morningcheck.dao.StudentDao; -import com.sincere.morningcheck.model.ApiStudentCheckReport; -import com.sincere.morningcheck.model.CheckResult; -import com.sincere.morningcheck.model.Student; -import com.sincere.morningcheck.model.StudentCheckReport; +import com.sincere.morningcheck.model.*; import com.sincere.morningcheck.service.StudentCheckReportService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; @Service public class StudentCheckReportServiceImpl implements StudentCheckReportService { @@ -30,52 +29,202 @@ public class StudentCheckReportServiceImpl implements StudentCheckReportService @Override public ServerResponse getCheckReport(String stuUserId) { - StudentCheckReport studentCheckReport; + List studentCheckReports = new ArrayList<>(); + StudentCheckReport studentCheckReport= new StudentCheckReport(); Student student = studentDao.getStudentByStuUserId(stuUserId); - studentCheckReport = studentCheckReportDao.getCheckReport(student.getStuId()); + studentCheckReports = studentCheckReportDao.getCheckReport(student.getStuId()); Boolean isMorningCheck; - if(studentCheckReport == null){ - isMorningCheck = false; + if(studentCheckReports!=null&&studentCheckReports.size()>0){ + + studentCheckReport = studentCheckReports.get(0); + isMorningCheck = true; + }else{ - isMorningCheck = true; + isMorningCheck = false; } ApiStudentCheckReport apiStudentCheckReport = getApiStudentReport(studentCheckReport,isMorningCheck); return ServerResponse.createBySuccess(apiStudentCheckReport); } + @Override + public ServerResponse getCheckReportBySchool(Integer schoolId, String checkTime) { + + Map map = new HashMap<>(); + + int studentAllCount = getStuCountBySchoolId(schoolId); + int stuCheckStuCount = studentCheckReportDao.getCheckStuCountBySchoolId(schoolId,checkTime); + map.put("studentAllCount",studentAllCount); + map.put("stuCheckStuCount",stuCheckStuCount); + + List studentCheckReports = studentCheckReportDao.getCheckReportBySchoolId(schoolId,checkTime); + + List studentExCheckReports = studentCheckReports.stream().filter(n->n.getCheckResult().contains("N")).collect(Collectors.toList()); + //检查报告总人数 + int checkAllCount = studentCheckReports.size(); + //异常人数 + long exCheckCount = studentExCheckReports.size(); + //检查报告中正常的人数 + long checkCount = checkAllCount - exCheckCount; + + map.put("checkCount",checkCount); + map.put("exCheckCount",exCheckCount); + + List grades= studentDao.getGradeBySchoolId(schoolId); + + map.put("grades",grades); + + List checkTypeList = new ArrayList<>(); + List checkTypeCount = new ArrayList<>(); +// String[] checkTypeArrays ={"handNoEx","mouthNoEx","noRedEye","noFever","noCrotchBig","noPoorSpirit","noPharyngitis","noTrauma","noCough","noNail","noToothDecay","other"}; + + List checkResults = new ArrayList<>(); + for(StudentCheckReport checkReport:studentExCheckReports){ + CheckResult checkResult = new CheckResult(); + char[] chs = checkReport.getCheckResult().toCharArray(); + checkResult = getCheckResult(chs); + checkResults.add(checkResult); + } + + long count1 = checkResults.stream().filter(n->!n.getHandNoEx()).count(); + if(count1>0){ + checkTypeList.add("handNoEx"); + checkTypeCount.add(count1); + } + long count2= checkResults.stream().filter(n->!n.getMouthNoEx()).count(); + if(count2>0){ + checkTypeList.add("mouthNoEx"); + checkTypeCount.add(count2); + } + long count3= checkResults.stream().filter(n->!n.getNoRedEye()).count(); + if(count3>0){ + checkTypeList.add("noRedEye"); + checkTypeCount.add(count3); + } + long count4= checkResults.stream().filter(n->!n.getNoFever()).count(); + if(count4>0){ + checkTypeList.add("noFever"); + checkTypeCount.add(count4); + } + + long count5= checkResults.stream().filter(n->!n.getNoCrotchBig()).count(); + if(count5>0){ + checkTypeList.add("noCrotchBig"); + checkTypeCount.add(count5); + } + + long count6= checkResults.stream().filter(n->!n.getNoPoorSpirit()).count(); + if(count6>0){ + checkTypeList.add("noPoorSpirit"); + checkTypeCount.add(count6); + } + long count7= checkResults.stream().filter(n->!n.getNoPharyngitis()).count(); + if(count7>0){ + checkTypeList.add("noPharyngitis"); + checkTypeCount.add(count7); + } + + long count8= checkResults.stream().filter(n->!n.getNoTrauma()).count(); + if(count8>0){ + checkTypeList.add("noTrauma"); + checkTypeCount.add(count8); + } + + long count9= checkResults.stream().filter(n->!n.getNoCough()).count(); + if(count9>0){ + checkTypeList.add("noCough"); + checkTypeCount.add(count9); + } + + long count10= checkResults.stream().filter(n->!n.getNoNail()).count(); + if(count10>0){ + checkTypeList.add("noNail"); + checkTypeCount.add(count10); + } + + long count11= checkResults.stream().filter(n->!n.getNoToothDecay()).count(); + if(count11>0){ + checkTypeList.add("noToothDecay"); + checkTypeCount.add(count11); + } + + long count12= checkResults.stream().filter(n->!n.getOther()).count(); + if(count12>0){ + checkTypeList.add("other"); + checkTypeCount.add(count12); + } + map.put("checkTypeList",checkTypeList); + map.put("checkTypeCount",checkTypeCount); + return ServerResponse.createBySuccess(map); + } + + @Override + public ServerResponse getCheckExReportByGrade(Integer schoolId, Integer gradeId) { + + List classExReports = studentCheckReportDao.getCheckExReportByGrade(schoolId,gradeId); + float count = 0; + for(ClassExReport classExReport : classExReports){ + count = count + classExReport.getCount(); + } + + if(count>0){ + for(ClassExReport classExReport : classExReports){ + classExReport.setExRate((classExReport.getCount()/count)*100); + } + }else { + return ServerResponse.createByErrorCodeMessage(10,"暂无数据"); + } + return ServerResponse.createBySuccess(classExReports); + } + private ApiStudentCheckReport getApiStudentReport(StudentCheckReport studentCheckReport,Boolean isMorningCheck){ ApiStudentCheckReport apiStudentCheckReport = new ApiStudentCheckReport(); if(isMorningCheck) { apiStudentCheckReport.setCardNo(studentCheckReport.getCardNo()); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); + System.out.println(studentCheckReport.getCheckTime()); apiStudentCheckReport.setCheckTime(simpleDateFormat.format(studentCheckReport.getCheckTime())); apiStudentCheckReport.setStudent_id(studentCheckReport.getStudent_id()); apiStudentCheckReport.setTemperature(studentCheckReport.getTemperature()); char[] chs = studentCheckReport.getCheckResult().toCharArray(); - CheckResult checkResult = new CheckResult(); - - //前12位 - checkResult.setHandNoEx(isJudge(Character.toString(chs[0]))); - checkResult.setMouthNoEx(isJudge(Character.toString(chs[1]))); - checkResult.setNoRedEye(isJudge(Character.toString(chs[2]))); - checkResult.setNoFever(isJudge(Character.toString(chs[3]))); - checkResult.setNoCrotchBig(isJudge(Character.toString(chs[4]))); - checkResult.setNoPoorSpirit(isJudge(Character.toString(chs[5]))); - checkResult.setNoPharyngitis(isJudge(Character.toString(chs[6]))); - checkResult.setNoTrauma(isJudge(Character.toString(chs[7]))); - checkResult.setNoCough(isJudge(Character.toString(chs[8]))); - checkResult.setNoNail(isJudge(Character.toString(chs[9]))); - checkResult.setNoToothDecay(isJudge(Character.toString(chs[10]))); - checkResult.setOther(isJudge(Character.toString(chs[11]))); + CheckResult checkResult = getCheckResult(chs); apiStudentCheckReport.setCheckResultObj(checkResult); } apiStudentCheckReport.setIsMorningCheck(isMorningCheck); return apiStudentCheckReport; } + private int getStuCountBySchoolId(Integer schoolId){ + + return studentDao.getStuCountBySchoolId(schoolId); + } + + /** + * 解析字符串 + * @param chs + * @return + */ + private CheckResult getCheckResult(char[] chs){ + CheckResult checkResult = new CheckResult(); + + //前12位 + checkResult.setHandNoEx(isJudge(Character.toString(chs[0]))); + checkResult.setMouthNoEx(isJudge(Character.toString(chs[1]))); + checkResult.setNoRedEye(isJudge(Character.toString(chs[2]))); + checkResult.setNoFever(isJudge(Character.toString(chs[3]))); + checkResult.setNoCrotchBig(isJudge(Character.toString(chs[4]))); + checkResult.setNoPoorSpirit(isJudge(Character.toString(chs[5]))); + checkResult.setNoPharyngitis(isJudge(Character.toString(chs[6]))); + checkResult.setNoTrauma(isJudge(Character.toString(chs[7]))); + checkResult.setNoCough(isJudge(Character.toString(chs[8]))); + checkResult.setNoNail(isJudge(Character.toString(chs[9]))); + checkResult.setNoToothDecay(isJudge(Character.toString(chs[10]))); + checkResult.setOther(isJudge(Character.toString(chs[11]))); + + return checkResult; + } private Boolean isJudge(String yesOrNo){ if(yesOrNo.equals("Y")){ @@ -83,4 +232,5 @@ public class StudentCheckReportServiceImpl implements StudentCheckReportService } return false; } + } diff --git a/springboot/morning-check/src/main/resources/file-message.properties b/springboot/morning-check/src/main/resources/file-message.properties index 7f7bf15..5af6b05 100644 --- a/springboot/morning-check/src/main/resources/file-message.properties +++ b/springboot/morning-check/src/main/resources/file-message.properties @@ -1,7 +1,7 @@ #ļѹС(5ѹ) message.fileSize=5242880 #ͼƬ· -message.upPath=E:/MorningRobot/UploadData/images/ +message.upPath=C:/MorningRobot/UploadData/images/ #ѹ message.scaleRatio=0.90f #ͼƬ diff --git a/springboot/morning-check/src/main/resources/logback.xml b/springboot/morning-check/src/main/resources/logback.xml index c6a748a..3b41f79 100644 --- a/springboot/morning-check/src/main/resources/logback.xml +++ b/springboot/morning-check/src/main/resources/logback.xml @@ -4,7 +4,7 @@ - + diff --git a/springboot/morning-check/src/main/resources/mapper/StudentCheckReport.xml b/springboot/morning-check/src/main/resources/mapper/StudentCheckReport.xml index e7d95de..5b8002a 100644 --- a/springboot/morning-check/src/main/resources/mapper/StudentCheckReport.xml +++ b/springboot/morning-check/src/main/resources/mapper/StudentCheckReport.xml @@ -12,8 +12,8 @@ - - + + @@ -26,7 +26,7 @@ insert xiaoan.dbo.SZ_StudentCheckReport(student_id,cardNo,checkResult,robotResult,intime,checkTime,access,temperature,handImgId,mouthImgId,eyeImgId) -values(#{student_id,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR}, #{robotResult,jdbcType=VARCHAR},#{inTime,jdbcType=DATE},#{checkTime,jdbcType=DATE},#{access,jdbcType=VARCHAR},#{temperature,jdbcType=VARCHAR},#{handImgId,jdbcType=VARCHAR},#{mouthImgId,jdbcType=VARCHAR},#{eyeImgId,jdbcType=VARCHAR}) +values(#{student_id,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR}, #{robotResult,jdbcType=VARCHAR},#{inTime,jdbcType=TIMESTAMP},#{checkTime,jdbcType=TIMESTAMP},#{access,jdbcType=VARCHAR},#{temperature,jdbcType=VARCHAR},#{handImgId,jdbcType=VARCHAR},#{mouthImgId,jdbcType=VARCHAR},#{eyeImgId,jdbcType=VARCHAR}) + + + + + \ No newline at end of file diff --git a/springboot/morning-check/src/main/resources/mapper/studentmapper.xml b/springboot/morning-check/src/main/resources/mapper/studentmapper.xml index ace07fd..9716dd2 100644 --- a/springboot/morning-check/src/main/resources/mapper/studentmapper.xml +++ b/springboot/morning-check/src/main/resources/mapper/studentmapper.xml @@ -38,6 +38,13 @@ where user_id=#{sUserId} + + +