Browse Source

20210202删除画图轨迹

sd
zy_Java 5 years ago
parent
commit
fc820838b9
  1. 13
      ht/src/main/java/com/ccsens/ht/api/QuestionController.java
  2. 7
      ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java
  3. 7
      ht/src/main/java/com/ccsens/ht/service/IQuestionService.java
  4. 13
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  5. 4
      ht/src/main/resources/application.yml

13
ht/src/main/java/com/ccsens/ht/api/QuestionController.java

@ -104,4 +104,17 @@ public class QuestionController {
log.info("查看用户画图信息成功");
return JsonResponse.newInstance().ok(patientCanvas);
}
@MustLogin
@DoctorAudit
@ApiOperation(value = "删除画图轨迹",notes = "zy:删除画图的轨迹,可以一次删除多条")
@ApiImplicitParams({
})
@RequestMapping(value="/delCanvas", method = RequestMethod.POST)
public JsonResponse delCanvas(@RequestBody @ApiParam @Valid QueryDto<QuestionDto.DelPatientCanvas> queryDto) throws IOException, NotSupportedFileTypeException {
log.info("删除画图轨迹");
questionService.delCanvas(queryDto.getParam(), queryDto.getUserId());
log.info("删除画图轨迹成功");
return JsonResponse.newInstance().ok();
}
}

7
ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java

@ -103,4 +103,11 @@ public class QuestionDto {
private Long questionId;
}
@Data
@ApiModel("删除画图笔画")
public static class DelPatientCanvas{
@ApiModelProperty("轨迹的id")
private List<Long> pointId;
}
}

7
ht/src/main/java/com/ccsens/ht/service/IQuestionService.java

@ -54,4 +54,11 @@ public interface IQuestionService {
* @return 返回选项
*/
List<QuestionVo.OptionJson> queryOptionJson(QuestionDto.QueryPatientCanvas param, Long userId);
/**
* 删除画图轨迹
* @param param 轨迹的id可以为多条
* @param userId userId
*/
void delCanvas(QuestionDto.DelPatientCanvas param, Long userId);
}

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

@ -783,4 +783,17 @@ public class QuestionService implements IQuestionService {
}
return BigDecimal.valueOf(l).setScale(2, RoundingMode.HALF_UP).doubleValue();
}
@Override
public void delCanvas(QuestionDto.DelPatientCanvas param, Long userId) {
if(CollectionUtil.isNotEmpty(param.getPointId())){
param.getPointId().forEach(pointId ->{
HtPatientCanvasLine patientCanvasLine = new HtPatientCanvasLine();
patientCanvasLine.setId(pointId);
patientCanvasLine.setIsDel((byte) 2);
patientCanvasLineMapper.updateByPrimaryKeySelective(patientCanvasLine);
});
}
}
}

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
Loading…
Cancel
Save