liusheng
2025-11-07 c27e4ce95a0489907ba3848851f14ac7cca1caca
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatBabyGrowthController.java
@@ -1,9 +1,16 @@
package com.ruoyi.web.controller.smartor;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -32,8 +39,7 @@
@Api("婴儿成长记录")
@RestController
@RequestMapping("/smartor/growth")
public class PatBabyGrowthController extends BaseController
{
public class PatBabyGrowthController extends BaseController {
    @Autowired
    private IPatBabyGrowthService patBabyGrowthService;
@@ -43,8 +49,7 @@
    @ApiOperation("查询【请填写功能名称】列表")
    //@PreAuthorize("@ss.hasPermi('smartor:growth:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody PatBabyGrowth patBabyGrowth)
    {
    public TableDataInfo list(@RequestBody PatBabyGrowth patBabyGrowth) {
        startPage();
        List<PatBabyGrowth> list = patBabyGrowthService.selectPatBabyGrowthList(patBabyGrowth);
        return getDataTable(list);
@@ -52,13 +57,12 @@
    /**
     * 查询【请填写功能名称】列表
     * 查询婴儿成长记录史
     */
    @ApiOperation("查询【请填写功能名称】列表")
    @ApiOperation("查询婴儿成长记录史")
    //@PreAuthorize("@ss.hasPermi('smartor:growth:list')")
    @PostMapping("/dateLine")
    public TableDataInfo dateLine(@RequestBody PatBabyGrowth patBabyGrowth)
    {
    public TableDataInfo dateLine(@RequestBody PatBabyGrowth patBabyGrowth) {
        List<PatBabyGrowth> list = patBabyGrowthService.selectPatBabyGrowthList(patBabyGrowth);
        return getDataTable(list);
    }
@@ -70,8 +74,7 @@
    //@PreAuthorize("@ss.hasPermi('smartor:growth:export')")
    @Log(title = "【导出】", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, PatBabyGrowth patBabyGrowth)
    {
    public void export(HttpServletResponse response, PatBabyGrowth patBabyGrowth) {
        List<PatBabyGrowth> list = patBabyGrowthService.selectPatBabyGrowthList(patBabyGrowth);
        ExcelUtil<PatBabyGrowth> util = new ExcelUtil<PatBabyGrowth>(PatBabyGrowth.class);
        util.exportExcel(response, list, "婴儿成长记录数据");
@@ -83,8 +86,7 @@
    @ApiOperation("获取婴儿成长记录详细信息")
    //@PreAuthorize("@ss.hasPermi('smartor:growth:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(patBabyGrowthService.selectPatBabyGrowthById(id));
    }
@@ -95,8 +97,10 @@
    //@PreAuthorize("@ss.hasPermi('smartor:growth:add')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatBabyGrowth patBabyGrowth)
    {
    public AjaxResult add(@RequestBody PatBabyGrowth patBabyGrowth) {
        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
        patBabyGrowth.setDoctor(sysUser.getNickName());
        patBabyGrowth.setDoctorCode(sysUser.getUserName());
        return toAjax(patBabyGrowthService.insertPatBabyGrowth(patBabyGrowth));
    }
@@ -107,8 +111,9 @@
    //@PreAuthorize("@ss.hasPermi('smartor:growth:edit')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody PatBabyGrowth patBabyGrowth)
    {
    public AjaxResult edit(@RequestBody PatBabyGrowth patBabyGrowth) {
        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
        patBabyGrowth.setUpdateBy(sysUser.getNickName());
        return toAjax(patBabyGrowthService.updatePatBabyGrowth(patBabyGrowth));
    }
@@ -118,9 +123,8 @@
    @ApiOperation("删除婴儿成长记录")
    //@PreAuthorize("@ss.hasPermi('smartor:growth:remove')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
   @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(patBabyGrowthService.deletePatBabyGrowthByIds(ids));
    @GetMapping("/remove/{id}")
    public AjaxResult remove(@PathVariable("id") Long id) {
        return toAjax(patBabyGrowthService.deletePatBabyGrowthById(id));
    }
}