whywhyo
2023-05-13 78694f580367d8825025a0d32beccbd9662764b7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java
@@ -9,6 +9,7 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfDoctor;
import com.ruoyi.domain.excel.ZfCollectionExcelBean;
import com.ruoyi.service.ZfDoctorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +18,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
@@ -42,6 +44,16 @@
        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
        return zfDoctorService.selectDoctorList(zfDoctor, pageNum, pageSize);
    }
    /**
     * 获取导入模板
     */
    @GetMapping("/model")
    public void getExportModel(HttpServletResponse response){
        List<ZfDoctor> list = Collections.singletonList(new ZfDoctor());
        ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class);
        util.exportExcel(response,list,"小医生记录数据");
    }
@@ -94,7 +106,7 @@
    @PostMapping
    public AjaxResult add(@RequestBody ZfDoctor zfDoctor)
    {
        return toAjax(zfDoctorService.save(zfDoctor));
        return zfDoctorService.mySave(zfDoctor);
    }
    /**