浏览代码

入参修改

chengyao 4 年之前
父节点
当前提交
dcededb186

+ 4 - 2
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -582,11 +582,13 @@ public class ConsoleFacade {
     /**
      * 病案指标数据保存
      *
-     * @param filterVO
+     * @param IndexTimeVO
      * @return 2170
      */
     @Transactional
-    public Boolean saveMedicaIndicator(FilterVO filterVO){
+    public Boolean saveMedicaIndicator(IndexTimeVO IndexTimeVO){
+        FilterVO filterVO = new FilterVO();
+        BeanUtils.copyProperties(IndexTimeVO,filterVO);
         List<String> timeList = filterFacade.getTimeList(filterVO);
         QueryWrapper<MedIndexResult> qw = new QueryWrapper<>();
         qw.eq("hospital_id",filterVO.getHospitalId());

+ 29 - 0
src/main/java/com/diagbot/vo/IndexTimeVO.java

@@ -0,0 +1,29 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/15 16:04
+ */
+@Getter
+@Setter
+public class IndexTimeVO {
+
+    /**
+     * 起始时间
+     */
+    @NotBlank(message = "请输入起始时间")
+    private String startDate;
+    /**
+     * 结束时间
+     */
+    @NotBlank(message = "请输入结束时间")
+    private String endDate;
+
+}

+ 2 - 2
src/main/java/com/diagbot/web/ConsoleController.java

@@ -187,8 +187,8 @@ public class ConsoleController {
                     "endDate: 结束时间-样例[2021-01-01]请严格按照日历时间传参!!!<br>")
     @PostMapping("/saveMedicaIndicator")
     @SysLogger("saveMedicaIndicator")
-    public RespDTO<Boolean> saveMedicaIndicator(@RequestBody @Valid FilterVO filterVO) {
-        Boolean flag = consoleFacade.saveMedicaIndicator(filterVO);
+    public RespDTO<Boolean> saveMedicaIndicator(@RequestBody @Valid IndexTimeVO indexTimeVO) {
+        Boolean flag = consoleFacade.saveMedicaIndicator(indexTimeVO);
         return RespDTO.onSuc(flag);
     }