Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

pt
zhizhi wu 4 years ago
parent
commit
04d5a2dd47
  1. 6
      wisdomcar/src/main/java/com/ccsens/wisdomcar/api/OtherRecordsController.java
  2. 2
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/OtherRecordsDto.java
  3. 2
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/OtherRecordsVo.java
  4. 2
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/IOtherRecordsService.java
  5. 6
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/OtherRecordsService.java

6
wisdomcar/src/main/java/com/ccsens/wisdomcar/api/OtherRecordsController.java

@ -42,10 +42,10 @@ public class OtherRecordsController {
@ApiOperation(value = "查询上传图片和记录", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<OtherRecordsVo.Query>> query(@ApiParam @Validated @RequestBody QueryDto<OtherRecordsDto.Query> params){
@RequestMapping(value = "/queryList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<OtherRecordsVo.TypeAndComment>> queryList(@ApiParam @Validated @RequestBody QueryDto<OtherRecordsDto.QueryId> params){
log.info("查询上传图片和记录:{}", params);
List<OtherRecordsVo.Query> list = iOtherRecordsService.query(params.getParam());
List<OtherRecordsVo.TypeAndComment> list = iOtherRecordsService.queryList(params.getParam());
log.info("查询上传图片和记录成功");
return JsonResponse.newInstance().ok(list);
}

2
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/OtherRecordsDto.java

@ -26,7 +26,7 @@ public class OtherRecordsDto {
}
@Data
@ApiModel("查询上传图片和记录")
public static class Query {
public static class QueryId {
@ApiModelProperty("分解任务id")
private Long id;
}

2
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/OtherRecordsVo.java

@ -17,7 +17,7 @@ public class OtherRecordsVo {
@Data
@ApiModel("查询上传图片和记录")
public static class Query {
public static class TypeAndComment {
@ApiModelProperty("类型(0-图片,1-文本)")
private byte type;
@ApiModelProperty("内容")

2
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/IOtherRecordsService.java

@ -20,5 +20,5 @@ public interface IOtherRecordsService {
* @param
* @throws
*/
List<OtherRecordsVo.Query> query(OtherRecordsDto.Query param);
List<OtherRecordsVo.TypeAndComment> queryList(OtherRecordsDto.QueryId param);
}

6
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/OtherRecordsService.java

@ -88,15 +88,15 @@ public class OtherRecordsService implements IOtherRecordsService {
}
@Override
public List<OtherRecordsVo.Query> query(OtherRecordsDto.Query param) {
List<OtherRecordsVo.Query> patientInformationRecordList = new ArrayList<>();
public List<OtherRecordsVo.TypeAndComment> queryList(OtherRecordsDto.QueryId param) {
List<OtherRecordsVo.TypeAndComment> patientInformationRecordList = new ArrayList<>();
//通过任务id 找到创建的最新的
//拿到患者平车id
PatientInformationRecordExample patientInformationRecordExample = new PatientInformationRecordExample();
patientInformationRecordExample.createCriteria().andTaskSubIdEqualTo(param.getId());
List<PatientInformationRecord> patientInformationRecords = patientInformationRecordMapper.selectByExample(patientInformationRecordExample);
for (PatientInformationRecord patientInformationRecord : patientInformationRecords) {
OtherRecordsVo.Query query = new OtherRecordsVo.Query();
OtherRecordsVo.TypeAndComment query = new OtherRecordsVo.TypeAndComment();
query.setComment(patientInformationRecord.getContent());
query.setType(patientInformationRecord.getInformationType());
patientInformationRecordList.add(query);

Loading…
Cancel
Save