Authored by zhaoyue

Fix little bug

@@ -2,5 +2,5 @@ git add --all src/* @@ -2,5 +2,5 @@ git add --all src/*
2 git add push.sh 2 git add push.sh
3 git add pom.xml 3 git add pom.xml
4 git commit -m "Fix little bug" 4 git commit -m "Fix little bug"
5 -git push origin zhaoyue-dev 5 +git push origin master
6 git status 6 git status
@@ -53,5 +53,7 @@ public interface Constants { @@ -53,5 +53,7 @@ public interface Constants {
53 public static final int STATUS_OK = 1; 53 public static final int STATUS_OK = 1;
54 public static final boolean STATUS_OK2 = true; 54 public static final boolean STATUS_OK2 = true;
55 55
  56 + public static final double SMALL_DOUBLE = 0.001;
  57 +
56 58
57 } 59 }
@@ -49,18 +49,18 @@ public class ReportController { @@ -49,18 +49,18 @@ public class ReportController {
49 @AntiXSS 49 @AntiXSS
50 @Authorization 50 @Authorization
51 @Sign 51 @Sign
52 - @RequestMapping(value="/list",method = RequestMethod.GET) 52 + @RequestMapping(value = "/list", method = RequestMethod.GET)
53 @ApiOperation(value = "体检报告列表查询接口") 53 @ApiOperation(value = "体检报告列表查询接口")
54 @ApiImplicitParams({ 54 @ApiImplicitParams({
55 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), 55 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"),
56 }) 56 })
57 public ResponseEntity<ResultModel> getReportList(HttpServletRequest request, @CurrentUser User user, 57 public ResponseEntity<ResultModel> getReportList(HttpServletRequest request, @CurrentUser User user,
58 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 58 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
59 - if(!(boolean)request.getAttribute("signAspect")) 59 + if (!(boolean) request.getAttribute("signAspect"))
60 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 60 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
61 61
62 - long member_id=user.getMemberId();  
63 - List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberIdAndStatus(member_id,1); 62 + long member_id = user.getMemberId();
  63 + List<XklAmpReportEntity> xklAmpReportEntity = xklAmpReportRespository.findByMemberIdAndStatus(member_id, 1);
64 return new ResponseEntity<>(ResultModel.ok(xklAmpReportEntity), HttpStatus.OK); 64 return new ResponseEntity<>(ResultModel.ok(xklAmpReportEntity), HttpStatus.OK);
65 } 65 }
66 66
@@ -68,69 +68,68 @@ public class ReportController { @@ -68,69 +68,68 @@ public class ReportController {
68 @AntiXSS 68 @AntiXSS
69 @Authorization 69 @Authorization
70 @Sign 70 @Sign
71 - @RequestMapping(value="/detail",method = RequestMethod.GET) 71 + @RequestMapping(value = "/detail", method = RequestMethod.GET)
72 @ApiOperation(value = "体检报告详情查询接口") 72 @ApiOperation(value = "体检报告详情查询接口")
73 @ApiImplicitParams({ 73 @ApiImplicitParams({
74 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), 74 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"),
75 }) 75 })
76 - public ResponseEntity<ResultModel> getReportDetail(HttpServletRequest request, @CurrentUser User user,@RequestParam long report_id, 76 + public ResponseEntity<ResultModel> getReportDetail(HttpServletRequest request, @CurrentUser User user, @RequestParam long report_id,
77 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 77 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
78 - if(!(boolean)request.getAttribute("signAspect")) 78 + if (!(boolean) request.getAttribute("signAspect"))
79 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 79 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
80 80
81 - XklAmpReportEntity report=xklAmpReportRespository.findOne(report_id); 81 + XklAmpReportEntity report = xklAmpReportRespository.findOne(report_id);
82 List<ReportDetailModel> reportDetailModelList = new ArrayList<>(); 82 List<ReportDetailModel> reportDetailModelList = new ArrayList<>();
83 - if(report != null ){  
84 - if(report.getScore()==0){//首次调用接口,score为0  
85 - //TODO:可以在上传时直接打分? 83 + if (report != null) {
  84 + if (report.getScore() - 0 < Constants.SMALL_DOUBLE || report.getScore() == null) {//首次调用接口,score为0
86 scoreService.getScore(report_id); 85 scoreService.getScore(report_id);
87 } 86 }
88 - List<XklAmpReportDetailEntity> reportDetailEntityList=xklAmpReportDetailRespository.findAllByReportId(report_id);  
89 - for(XklAmpReportDetailEntity detail:reportDetailEntityList){  
90 - int itemId=detail.getItemId(); 87 + List<XklAmpReportDetailEntity> reportDetailEntityList = xklAmpReportDetailRespository.findAllByReportId(report_id);
  88 + for (XklAmpReportDetailEntity detail : reportDetailEntityList) {
  89 + int itemId = detail.getItemId();
91 ReportDetailModel reportDetail = new ReportDetailModel(); 90 ReportDetailModel reportDetail = new ReportDetailModel();
92 reportDetail.setItemId(itemId); 91 reportDetail.setItemId(itemId);
93 reportDetail.setItemValue(detail.getItemValue()); 92 reportDetail.setItemValue(detail.getItemValue());
94 reportDetail.setStatus(detail.getStatus()); 93 reportDetail.setStatus(detail.getStatus());
95 94
96 - XklAmpReportMetaItemsEntity metaItems=Constants.itemMetaMap.get(itemId);  
97 - if(metaItems!=null){ 95 + XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId);
  96 + if (metaItems != null) {
98 reportDetail.setTitle(metaItems.getTitle()); 97 reportDetail.setTitle(metaItems.getTitle());
99 - if(report.getSex()==Constants.MALE){  
100 - reportDetail.setNormalRange(metaItems.getStandardLowMale()+" - "+metaItems.getStandardHighMale());  
101 - }else{  
102 - reportDetail.setNormalRange(metaItems.getStandardLowFemale()+ " - "+metaItems.getStandardHighFemale()); 98 + if (report.getSex() == Constants.MALE) {
  99 + reportDetail.setNormalRange(metaItems.getStandardLowMale() + " - " + metaItems.getStandardHighMale());
  100 + } else {
  101 + reportDetail.setNormalRange(metaItems.getStandardLowFemale() + " - " + metaItems.getStandardHighFemale());
103 } 102 }
104 reportDetail.setType(metaItems.getType()); 103 reportDetail.setType(metaItems.getType());
105 } 104 }
106 105
107 - XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id,metaItems.getType());  
108 - if(scoreEntity!=null) 106 + XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id, metaItems.getType());
  107 + if (scoreEntity != null)
109 reportDetail.setTypeHealthScore(scoreEntity.getTypeHealthScore()); 108 reportDetail.setTypeHealthScore(scoreEntity.getTypeHealthScore());
110 reportDetailModelList.add(reportDetail); 109 reportDetailModelList.add(reportDetail);
111 } 110 }
112 } 111 }
113 - ReportModel reportModel = new ReportModel(report,reportDetailModelList); 112 + ReportModel reportModel = new ReportModel(report, reportDetailModelList);
114 return new ResponseEntity<>(ResultModel.ok(reportModel), HttpStatus.OK); 113 return new ResponseEntity<>(ResultModel.ok(reportModel), HttpStatus.OK);
115 } 114 }
116 115
117 @LogAnnotation 116 @LogAnnotation
118 @AntiXSS 117 @AntiXSS
119 @Sign 118 @Sign
120 - @RequestMapping(value="/score",method = RequestMethod.GET) 119 + @RequestMapping(value = "/score", method = RequestMethod.GET)
121 @ApiOperation(value = "健康评分接口") 120 @ApiOperation(value = "健康评分接口")
122 - public ResponseEntity<ResultModel> getReportScore(HttpServletRequest request,@RequestParam long report_id, 121 + public ResponseEntity<ResultModel> getReportScore(HttpServletRequest request, @RequestParam long report_id,
123 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 122 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
124 - if(!(boolean)request.getAttribute("signAspect")) 123 + if (!(boolean) request.getAttribute("signAspect"))
125 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 124 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
126 double score = 0; 125 double score = 0;
127 - XklAmpReportEntity report=xklAmpReportRespository.findOne(report_id);  
128 - if(report != null ){  
129 - if (report.getScore() == 0 || report.getScore() == null) {//首次调用接口,score为0 126 + XklAmpReportEntity report = xklAmpReportRespository.findOne(report_id);
  127 + if (report != null) {
  128 + if (report.getScore() - 0 < Constants.SMALL_DOUBLE || report.getScore() == null) {//首次调用接口,score为0
130 //TODO:可以在上传时直接打分? 129 //TODO:可以在上传时直接打分?
131 //单独测试需要删除xkl_amp_report_health_scroe表中数据 130 //单独测试需要删除xkl_amp_report_health_scroe表中数据
132 score = scoreService.getScore(report_id); 131 score = scoreService.getScore(report_id);
133 - }else{ 132 + } else {
134 score = report.getScore(); 133 score = report.getScore();
135 } 134 }
136 } 135 }
@@ -141,33 +140,33 @@ public class ReportController { @@ -141,33 +140,33 @@ public class ReportController {
141 @AntiXSS 140 @AntiXSS
142 @Authorization 141 @Authorization
143 @Sign 142 @Sign
144 - @RequestMapping(value="/itemInfo",method = RequestMethod.GET) 143 + @RequestMapping(value = "/itemInfo", method = RequestMethod.GET)
145 @ApiOperation(value = "指标解释查询接口") 144 @ApiOperation(value = "指标解释查询接口")
146 @ApiImplicitParams({ 145 @ApiImplicitParams({
147 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), 146 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"),
148 }) 147 })
149 - public ResponseEntity<ResultModel> getReportItemInfo(HttpServletRequest request, @CurrentUser User user,@RequestParam int itemId,@RequestParam int status,@RequestParam boolean isPureHtml, 148 + public ResponseEntity<ResultModel> getReportItemInfo(HttpServletRequest request, @CurrentUser User user, @RequestParam int itemId, @RequestParam int status, @RequestParam boolean isPureHtml,
150 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 149 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
151 - if(!(boolean)request.getAttribute("signAspect")) 150 + if (!(boolean) request.getAttribute("signAspect"))
152 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 151 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
153 152
154 XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId); 153 XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId);
155 - String result="";  
156 - if(metaItems!= null){ 154 + String result = "";
  155 + if (metaItems != null) {
157 //0, normal,1, lower,2, higher 156 //0, normal,1, lower,2, higher
158 - if(status == Constants.NORMAL){ 157 + if (status == Constants.NORMAL) {
159 result = metaItems.getExplainNormal(); 158 result = metaItems.getExplainNormal();
160 - }else if(status == Constants.LOWER){ 159 + } else if (status == Constants.LOWER) {
161 result = metaItems.getExplainLow(); 160 result = metaItems.getExplainLow();
162 - }else if(status == Constants.HIGHER){ 161 + } else if (status == Constants.HIGHER) {
163 result = metaItems.getExplainHigh(); 162 result = metaItems.getExplainHigh();
164 - }else{ 163 + } else {
165 result = "没有此status相关信息"; 164 result = "没有此status相关信息";
166 } 165 }
167 - }else{ 166 + } else {
168 result = "没有此itemId相关信息"; 167 result = "没有此itemId相关信息";
169 } 168 }
170 - if(isPureHtml){ 169 + if (isPureHtml) {
171 result = HtmlTools.stripHtml(result); 170 result = HtmlTools.stripHtml(result);
172 } 171 }
173 return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK); 172 return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK);
@@ -177,30 +176,30 @@ public class ReportController { @@ -177,30 +176,30 @@ public class ReportController {
177 @AntiXSS 176 @AntiXSS
178 @Authorization 177 @Authorization
179 @Sign 178 @Sign
180 - @RequestMapping(value="/itemGraph",method = RequestMethod.GET) 179 + @RequestMapping(value = "/itemGraph", method = RequestMethod.GET)
181 @ApiOperation(value = "指标曲线查询接口") 180 @ApiOperation(value = "指标曲线查询接口")
182 @ApiImplicitParams({ 181 @ApiImplicitParams({
183 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"), 182 @ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"),
184 }) 183 })
185 - public ResponseEntity<ResultModel> getReportItemGraph(HttpServletRequest request, @CurrentUser User user,@RequestParam int itemId,@RequestParam String stime,@RequestParam String etime, 184 + public ResponseEntity<ResultModel> getReportItemGraph(HttpServletRequest request, @CurrentUser User user, @RequestParam int itemId, @RequestParam String stime, @RequestParam String etime,
186 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 185 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
187 - if(!(boolean)request.getAttribute("signAspect")) 186 + if (!(boolean) request.getAttribute("signAspect"))
188 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 187 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
189 188
190 - long member_id=user.getMemberId();  
191 - List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberIdAndStatus(member_id,1);  
192 - List<ReportItemGraphModel> reportItemGraphModelList =new ArrayList<>();  
193 -  
194 - if(xklAmpReportEntity!=null && xklAmpReportEntity.size()>0){  
195 - for(XklAmpReportEntity report:xklAmpReportEntity){  
196 - long reportTime= report.getUptime().getTime();  
197 - long stimeLong= UtilTools.getLongTime(stime);  
198 - long etimeLong= UtilTools.getLongTime(etime);  
199 - long reportId= report.getId();  
200 - if(reportTime>=stimeLong&&reportTime<=etimeLong){//在时间范围内  
201 - XklAmpReportDetailEntity reportDetail = xklAmpReportDetailRespository.findByReportIdAndItemId(reportId,itemId);  
202 - if(reportDetail!=null){  
203 - ReportItemGraphModel reportItemGraphModel= new ReportItemGraphModel(reportTime,reportDetail.getItemValue()); 189 + long member_id = user.getMemberId();
  190 + List<XklAmpReportEntity> xklAmpReportEntity = xklAmpReportRespository.findByMemberIdAndStatus(member_id, 1);
  191 + List<ReportItemGraphModel> reportItemGraphModelList = new ArrayList<>();
  192 +
  193 + if (xklAmpReportEntity != null && xklAmpReportEntity.size() > 0) {
  194 + for (XklAmpReportEntity report : xklAmpReportEntity) {
  195 + long reportTime = report.getUptime().getTime();
  196 + long stimeLong = UtilTools.getLongTime(stime);
  197 + long etimeLong = UtilTools.getLongTime(etime);
  198 + long reportId = report.getId();
  199 + if (reportTime >= stimeLong && reportTime <= etimeLong) {//在时间范围内
  200 + XklAmpReportDetailEntity reportDetail = xklAmpReportDetailRespository.findByReportIdAndItemId(reportId, itemId);
  201 + if (reportDetail != null) {
  202 + ReportItemGraphModel reportItemGraphModel = new ReportItemGraphModel(reportTime, reportDetail.getItemValue());
204 reportItemGraphModelList.add(reportItemGraphModel); 203 reportItemGraphModelList.add(reportItemGraphModel);
205 } 204 }
206 } 205 }
@@ -213,18 +212,18 @@ public class ReportController { @@ -213,18 +212,18 @@ public class ReportController {
213 @AntiXSS 212 @AntiXSS
214 @Authorization 213 @Authorization
215 @Sign 214 @Sign
216 - @RequestMapping(value="/compare",method = RequestMethod.POST) 215 + @RequestMapping(value = "/compare", method = RequestMethod.POST)
217 @ApiOperation(value = "微信端体检报告分年龄比较接口") 216 @ApiOperation(value = "微信端体检报告分年龄比较接口")
218 - public ResponseEntity<ResultModel> openIdCompare(HttpServletRequest request, @CurrentUser User user,@RequestParam Long report_id, 217 + public ResponseEntity<ResultModel> openIdCompare(HttpServletRequest request, @CurrentUser User user, @RequestParam Long report_id,
219 @RequestParam String sign, @RequestParam long t, @RequestParam int type) { 218 @RequestParam String sign, @RequestParam long t, @RequestParam int type) {
220 - if(!(boolean)request.getAttribute("signAspect")) 219 + if (!(boolean) request.getAttribute("signAspect"))
221 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK); 220 return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
222 List<CompareModel> result = new ArrayList<>(); 221 List<CompareModel> result = new ArrayList<>();
223 222
224 - XklAmpReportEntity report=xklAmpReportRespository.findOne(report_id); 223 + XklAmpReportEntity report = xklAmpReportRespository.findOne(report_id);
225 double score = 0; 224 double score = 0;
226 - if(report != null ) {  
227 - if (report.getScore() == 0) {//首次调用接口,score为0 225 + if (report != null) {
  226 + if (report.getScore() - 0 < Constants.SMALL_DOUBLE || report.getScore() == null) {//首次调用接口,score为0
228 score = scoreService.getScore(report_id); 227 score = scoreService.getScore(report_id);
229 } else { 228 } else {
230 score = report.getScore(); 229 score = report.getScore();
@@ -235,14 +234,14 @@ public class ReportController { @@ -235,14 +234,14 @@ public class ReportController {
235 //List<XklAmpReportHealthScoreEntity> scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id); 234 //List<XklAmpReportHealthScoreEntity> scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id);
236 int typeId = entry.getKey(); 235 int typeId = entry.getKey();
237 XklAmpReportCategoryEntity value = entry.getValue(); 236 XklAmpReportCategoryEntity value = entry.getValue();
238 - String key = ageId +"-"+ typeId; 237 + String key = ageId + "-" + typeId;
239 double aveScore = Constants.aveScoreMap.get(key); 238 double aveScore = Constants.aveScoreMap.get(key);
240 double typeScore = 0; 239 double typeScore = 0;
241 XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id, typeId); 240 XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id, typeId);
242 if (scoreEntity != null) { 241 if (scoreEntity != null) {
243 typeScore = scoreEntity.getTypeHealthScore(); 242 typeScore = scoreEntity.getTypeHealthScore();
244 - }else{  
245 - if(typeId==1){//第一项为测试项目 243 + } else {
  244 + if (typeId == 1) {//第一项为测试项目
246 typeScore = score; 245 typeScore = score;
247 } 246 }
248 } 247 }
@@ -120,7 +120,7 @@ public class XklAmpReportEntity { @@ -120,7 +120,7 @@ public class XklAmpReportEntity {
120 Timestamp uptime, String account_str, Byte sex, Byte age, 120 Timestamp uptime, String account_str, Byte sex, Byte age,
121 int weight, int pulse, int breath_rate, Double atmos_pressure, 121 int weight, int pulse, int breath_rate, Double atmos_pressure,
122 Double LCA, Double RCA, Double LAC, Double RAC, Double ABD, Double temp_sum, 122 Double LCA, Double RCA, Double LAC, Double RAC, Double ABD, Double temp_sum,
123 - int stable, String md5, String machine_num, String conclusion) { 123 + int stable, String md5, String machine_num, String conclusion, String t0, String t1, String t2, String t3, String t4) {
124 this.name = name; 124 this.name = name;
125 this.title = title; 125 this.title = title;
126 this.checkTime = check_time; 126 this.checkTime = check_time;
@@ -143,6 +143,11 @@ public class XklAmpReportEntity { @@ -143,6 +143,11 @@ public class XklAmpReportEntity {
143 this.machineNum = machine_num; 143 this.machineNum = machine_num;
144 this.conclusion = conclusion; 144 this.conclusion = conclusion;
145 this.status = 1; //默认为有效。 145 this.status = 1; //默认为有效。
  146 + this.t0 = t0;
  147 + this.t1 = t1;
  148 + this.t2 = t2;
  149 + this.t3 = t3;
  150 + this.t4 = t4;
146 } 151 }
147 152
148 public void setId(long id) { 153 public void setId(long id) {
@@ -38,6 +38,9 @@ public class ReportService implements IReportService { @@ -38,6 +38,9 @@ public class ReportService implements IReportService {
38 @Autowired 38 @Autowired
39 private UserRepository userRepository; 39 private UserRepository userRepository;
40 40
  41 + @Autowired
  42 + private IScoreService scoreService;
  43 +
41 // 存储报告相关md5,防止重复上传已存在报告,防止重复上传错误报告。 44 // 存储报告相关md5,防止重复上传已存在报告,防止重复上传错误报告。
42 private RedisTemplate<String, String> redis; 45 private RedisTemplate<String, String> redis;
43 46
@@ -157,7 +160,7 @@ public class ReportService implements IReportService { @@ -157,7 +160,7 @@ public class ReportService implements IReportService {
157 sex = rpJson.getInteger("sex").intValue(); 160 sex = rpJson.getInteger("sex").intValue();
158 ampReport.setReport(rpJson.getString("name"), 161 ampReport.setReport(rpJson.getString("name"),
159 rpJson.getString("title"),/// "AMP快速无创身心健康评估报告", 162 rpJson.getString("title"),/// "AMP快速无创身心健康评估报告",
160 - Timestamp.valueOf(rpJson.getString("report_date")), 163 + new Timestamp(rpJson.getLong("report_date")),
161 new Timestamp(System.currentTimeMillis()), 164 new Timestamp(System.currentTimeMillis()),
162 rpJson.getString("account"),/// 165 rpJson.getString("account"),///
163 rpJson.getInteger("sex").byteValue(),/// 166 rpJson.getInteger("sex").byteValue(),///
@@ -173,7 +176,14 @@ public class ReportService implements IReportService { @@ -173,7 +176,14 @@ public class ReportService implements IReportService {
173 rpJson.getDouble("ABD").doubleValue(), 176 rpJson.getDouble("ABD").doubleValue(),
174 rpJson.getDouble("total").doubleValue(), 177 rpJson.getDouble("total").doubleValue(),
175 rpJson.getInteger("stable").intValue(), 178 rpJson.getInteger("stable").intValue(),
176 - md5, rpJson.getString("machine_num"), rpJson.getString("basic_result")); 179 + md5, rpJson.getString("machine_num"),
  180 + rpJson.getString("basic_result"),
  181 + rpJson.getString("T0"),
  182 + rpJson.getString("T1"),
  183 + rpJson.getString("T2"),
  184 + rpJson.getString("T3"),
  185 + rpJson.getString("T4")
  186 + );
177 /* 187 /*
178 * 3. 获取detail信息,id,float类型 188 * 3. 获取detail信息,id,float类型
179 */ 189 */
@@ -222,6 +232,7 @@ public class ReportService implements IReportService { @@ -222,6 +232,7 @@ public class ReportService implements IReportService {
222 } 232 }
223 reportDetailRepository.save(report.getRpDetailList()); 233 reportDetailRepository.save(report.getRpDetailList());
224 reportResultRepository.save(report.getBasicResList()); 234 reportResultRepository.save(report.getBasicResList());
  235 + scoreService.getScore(ampReport.getId());
225 return ampReport.getId(); 236 return ampReport.getId();
226 } 237 }
227 238