Browse Source

修改代码

pt
hyy-alt 5 years ago
parent
commit
b65e22c861
  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 = "") @ApiOperation(value = "查询上传图片和记录", notes = "")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/queryList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<OtherRecordsVo.Query>> query(@ApiParam @Validated @RequestBody QueryDto<OtherRecordsDto.Query> params){ public JsonResponse<List<OtherRecordsVo.TypeAndComment>> queryList(@ApiParam @Validated @RequestBody QueryDto<OtherRecordsDto.QueryId> params){
log.info("查询上传图片和记录:{}", params); log.info("查询上传图片和记录:{}", params);
List<OtherRecordsVo.Query> list = iOtherRecordsService.query(params.getParam()); List<OtherRecordsVo.TypeAndComment> list = iOtherRecordsService.query(params.getParam());
log.info("查询上传图片和记录成功"); log.info("查询上传图片和记录成功");
return JsonResponse.newInstance().ok(list); 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 @Data
@ApiModel("查询上传图片和记录") @ApiModel("查询上传图片和记录")
public static class Query { public static class QueryId {
@ApiModelProperty("分解任务id") @ApiModelProperty("分解任务id")
private Long id; private Long id;
} }

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

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

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

@ -20,5 +20,5 @@ public interface IOtherRecordsService {
* @param * @param
* @throws * @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 @Override
public List<OtherRecordsVo.Query> query(OtherRecordsDto.Query param) { public List<OtherRecordsVo.TypeAndComment> queryList(OtherRecordsDto.QueryId param) {
List<OtherRecordsVo.Query> patientInformationRecordList = new ArrayList<>(); List<OtherRecordsVo.TypeAndComment> patientInformationRecordList = new ArrayList<>();
//通过任务id 找到创建的最新的 //通过任务id 找到创建的最新的
//拿到患者平车id //拿到患者平车id
PatientInformationRecordExample patientInformationRecordExample = new PatientInformationRecordExample(); PatientInformationRecordExample patientInformationRecordExample = new PatientInformationRecordExample();
patientInformationRecordExample.createCriteria().andTaskSubIdEqualTo(param.getId()); patientInformationRecordExample.createCriteria().andTaskSubIdEqualTo(param.getId());
List<PatientInformationRecord> patientInformationRecords = patientInformationRecordMapper.selectByExample(patientInformationRecordExample); List<PatientInformationRecord> patientInformationRecords = patientInformationRecordMapper.selectByExample(patientInformationRecordExample);
for (PatientInformationRecord patientInformationRecord : patientInformationRecords) { for (PatientInformationRecord patientInformationRecord : patientInformationRecords) {
OtherRecordsVo.Query query = new OtherRecordsVo.Query(); OtherRecordsVo.TypeAndComment query = new OtherRecordsVo.TypeAndComment();
query.setComment(patientInformationRecord.getContent()); query.setComment(patientInformationRecord.getContent());
query.setType(patientInformationRecord.getInformationType()); query.setType(patientInformationRecord.getInformationType());
patientInformationRecordList.add(query); patientInformationRecordList.add(query);

Loading…
Cancel
Save