| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | 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,"小医生记录数据"); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfDoctor zfDoctor) |
| | | { |
| | | return toAjax(zfDoctorService.save(zfDoctor)); |
| | | return zfDoctorService.mySave(zfDoctor); |
| | | } |
| | | |
| | | /** |