From a35a2ff6f29c68cc458cc53cf544b6eb9929bc33 Mon Sep 17 00:00:00 2001 From: ryoeiken <754264374@qq.com> Date: Wed, 25 Nov 2020 09:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86,=E8=B4=A2?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86-=E8=A1=A5=E8=B4=B4=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FtPatientDaoController.java | 4 + .../controller/FtSubsidyDaoController.java | 92 ++++++++++--------- .../system/fantang/domain/FtSubsidyDao.java | 55 ++++------- .../fantang/mapper/FtSubsidyDaoMapper.java | 4 +- .../fantang/service/IFtSubsidyDaoService.java | 4 +- .../service/impl/FtSubsidyDaoServiceImpl.java | 10 +- .../mapper/fantang/FtSubsidyDaoMapper.xml | 2 +- .../src/views/fantang/careStaffInfo/index.vue | 2 +- ruoyi-ui/src/views/fantang/patient/index.vue | 2 +- ruoyi-ui/src/views/fantang/subsidy/index.vue | 58 +++++------- 10 files changed, 107 insertions(+), 126 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java index ee11e2e5b..91e094fcf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java @@ -2,6 +2,7 @@ package com.ruoyi.system.fantang.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import java.util.Date; import java.util.List; import java.util.Arrays; @@ -91,6 +92,9 @@ public class FtPatientDaoController extends BaseController { @Log(title = "病人管理" , businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody FtPatientDao ftPatientDao) { + + ftPatientDao.setCreateAt(new Date()); + return toAjax(iFtPatientDaoService.save(ftPatientDao) ? 1 : 0); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtSubsidyDaoController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtSubsidyDaoController.java index a4545c0c0..1c46f4064 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtSubsidyDaoController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtSubsidyDaoController.java @@ -1,33 +1,42 @@ package com.ruoyi.system.fantang.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; + +import java.util.Date; +import java.util.List; +import java.util.Arrays; + import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ruoyi.common.utils.StringUtils; +import lombok.RequiredArgsConstructor; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.fantang.domain.FtSubsidyDao; import com.ruoyi.system.fantang.service.IFtSubsidyDaoService; -import lombok.RequiredArgsConstructor; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.Arrays; -import java.util.List; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; /** * 补贴管理Controller - * + * * @author ft - * @date 2020-11-19 + * @date 2020-11-25 */ @RequiredArgsConstructor(onConstructor_ = @Autowired) @RestController -@RequestMapping("/fantang/subsidy") +@RequestMapping("/fantang/subsidy" ) public class FtSubsidyDaoController extends BaseController { private final IFtSubsidyDaoService iFtSubsidyDaoService; @@ -37,26 +46,21 @@ public class FtSubsidyDaoController extends BaseController { */ @PreAuthorize("@ss.hasPermi('fantang:subsidy:list')") @GetMapping("/list") - public TableDataInfo list(FtSubsidyDao ftSubsidyDao) { + public TableDataInfo list(FtSubsidyDao ftSubsidyDao) + { startPage(); LambdaQueryWrapper lqw = Wrappers.lambdaQuery(ftSubsidyDao); - if (StringUtils.isNotBlank(ftSubsidyDao.getType())) { - lqw.eq(FtSubsidyDao::getType, ftSubsidyDao.getType()); + if (StringUtils.isNotBlank(ftSubsidyDao.getType())){ + lqw.eq(FtSubsidyDao::getType ,ftSubsidyDao.getType()); } - if (ftSubsidyDao.getPrice() != null) { - lqw.eq(FtSubsidyDao::getPrice, ftSubsidyDao.getPrice()); + if (ftSubsidyDao.getPrice() != null){ + lqw.eq(FtSubsidyDao::getPrice ,ftSubsidyDao.getPrice()); } - if (StringUtils.isNotBlank(ftSubsidyDao.getRange())) { - lqw.eq(FtSubsidyDao::getRange, ftSubsidyDao.getRange()); + if (ftSubsidyDao.getCreateAt() != null){ + lqw.eq(FtSubsidyDao::getCreateAt ,ftSubsidyDao.getCreateAt()); } - if (StringUtils.isNotBlank(ftSubsidyDao.getCycle())) { - lqw.eq(FtSubsidyDao::getCycle, ftSubsidyDao.getCycle()); - } - if (ftSubsidyDao.getCreateAt() != null) { - lqw.eq(FtSubsidyDao::getCreateAt, ftSubsidyDao.getCreateAt()); - } - if (StringUtils.isNotBlank(ftSubsidyDao.getCreateBy())) { - lqw.eq(FtSubsidyDao::getCreateBy, ftSubsidyDao.getCreateBy()); + if (StringUtils.isNotBlank(ftSubsidyDao.getCreateBy())){ + lqw.eq(FtSubsidyDao::getCreateBy ,ftSubsidyDao.getCreateBy()); } List list = iFtSubsidyDaoService.list(lqw); return getDataTable(list); @@ -65,40 +69,42 @@ public class FtSubsidyDaoController extends BaseController { /** * 导出补贴管理列表 */ - @PreAuthorize("@ss.hasPermi('fantang:subsidy:export')") - @Log(title = "补贴管理", businessType = BusinessType.EXPORT) - @GetMapping("/export") + @PreAuthorize("@ss.hasPermi('fantang:subsidy:export')" ) + @Log(title = "补贴管理" , businessType = BusinessType.EXPORT) + @GetMapping("/export" ) public AjaxResult export(FtSubsidyDao ftSubsidyDao) { LambdaQueryWrapper lqw = new LambdaQueryWrapper(ftSubsidyDao); List list = iFtSubsidyDaoService.list(lqw); - ExcelUtil util = new ExcelUtil(FtSubsidyDao.class); - return util.exportExcel(list, "subsidy"); + ExcelUtil util = new ExcelUtil(FtSubsidyDao. class); + return util.exportExcel(list, "subsidy" ); } /** * 获取补贴管理详细信息 */ - @PreAuthorize("@ss.hasPermi('fantang:subsidy:query')") - @GetMapping(value = "/{subsidyId}") - public AjaxResult getInfo(@PathVariable("subsidyId") Long subsidyId) { + @PreAuthorize("@ss.hasPermi('fantang:subsidy:query')" ) + @GetMapping(value = "/{subsidyId}" ) + public AjaxResult getInfo(@PathVariable("subsidyId" ) Long subsidyId) { return AjaxResult.success(iFtSubsidyDaoService.getById(subsidyId)); } /** * 新增补贴管理 */ - @PreAuthorize("@ss.hasPermi('fantang:subsidy:add')") - @Log(title = "补贴管理", businessType = BusinessType.INSERT) + @PreAuthorize("@ss.hasPermi('fantang:subsidy:add')" ) + @Log(title = "补贴管理" , businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody FtSubsidyDao ftSubsidyDao) { + + ftSubsidyDao.setCreateAt(new Date()); return toAjax(iFtSubsidyDaoService.save(ftSubsidyDao) ? 1 : 0); } /** * 修改补贴管理 */ - @PreAuthorize("@ss.hasPermi('fantang:subsidy:edit')") - @Log(title = "补贴管理", businessType = BusinessType.UPDATE) + @PreAuthorize("@ss.hasPermi('fantang:subsidy:edit')" ) + @Log(title = "补贴管理" , businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody FtSubsidyDao ftSubsidyDao) { return toAjax(iFtSubsidyDaoService.updateById(ftSubsidyDao) ? 1 : 0); @@ -107,9 +113,9 @@ public class FtSubsidyDaoController extends BaseController { /** * 删除补贴管理 */ - @PreAuthorize("@ss.hasPermi('fantang:subsidy:remove')") - @Log(title = "补贴管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{subsidyIds}") + @PreAuthorize("@ss.hasPermi('fantang:subsidy:remove')" ) + @Log(title = "补贴管理" , businessType = BusinessType.DELETE) + @DeleteMapping("/{subsidyIds}" ) public AjaxResult remove(@PathVariable Long[] subsidyIds) { return toAjax(iFtSubsidyDaoService.removeByIds(Arrays.asList(subsidyIds)) ? 1 : 0); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtSubsidyDao.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtSubsidyDao.java index 952ec281b..4387958e2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtSubsidyDao.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/domain/FtSubsidyDao.java @@ -1,24 +1,25 @@ package com.ruoyi.system.fantang.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.Accessors; - +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; import java.io.Serializable; -import java.math.BigDecimal; import java.util.Date; +import java.math.BigDecimal; +import com.ruoyi.common.core.domain.BaseEntity; /** * 补贴管理对象 ft_subsidy - * + * * @author ft - * @date 2020-11-19 + * @date 2020-11-25 */ @Data @ToString @@ -28,54 +29,36 @@ import java.util.Date; @TableName("ft_subsidy") public class FtSubsidyDao implements Serializable { - private static final long serialVersionUID = 1L; +private static final long serialVersionUID=1L; - /** - * 补贴 id - */ + /** 补贴 id */ @TableId(value = "subsidy_id") private Long subsidyId; - /** - * 补贴类型 - */ + /** 补贴类型 */ @Excel(name = "补贴类型") private String type; - /** - * 金额 - */ + /** 金额 */ @Excel(name = "金额") private BigDecimal price; - /** - * 范围 - */ - @Excel(name = "范围") - private String range; + /** 范围 */ + private String subsidyRange; - /** - * 周期 - */ - @Excel(name = "周期") + /** 周期 */ private String cycle; - /** - * 启用标志 - */ + /** 启用标志 */ private Integer flag; - /** - * 创建日期 - */ - @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd") + /** 创建日期 */ + @Excel(name = "创建日期" , width = 30, dateFormat = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createAt; - /** - * 创建人 - */ + /** 创建人 */ @Excel(name = "创建人") private String createBy; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtSubsidyDaoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtSubsidyDaoMapper.java index 8bab977a9..1deebe17f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtSubsidyDaoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtSubsidyDaoMapper.java @@ -1,13 +1,13 @@ package com.ruoyi.system.fantang.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.fantang.domain.FtSubsidyDao; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * 补贴管理Mapper接口 * * @author ft - * @date 2020-11-19 + * @date 2020-11-25 */ public interface FtSubsidyDaoMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtSubsidyDaoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtSubsidyDaoService.java index ec71ed53d..eb1142531 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtSubsidyDaoService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtSubsidyDaoService.java @@ -1,13 +1,13 @@ package com.ruoyi.system.fantang.service; -import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.system.fantang.domain.FtSubsidyDao; +import com.baomidou.mybatisplus.extension.service.IService; /** * 补贴管理Service接口 * * @author ft - * @date 2020-11-19 + * @date 2020-11-25 */ public interface IFtSubsidyDaoService extends IService { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtSubsidyDaoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtSubsidyDaoServiceImpl.java index 23ca475ec..22e89fa4b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtSubsidyDaoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtSubsidyDaoServiceImpl.java @@ -1,16 +1,16 @@ package com.ruoyi.system.fantang.service.impl; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.system.fantang.domain.FtSubsidyDao; -import com.ruoyi.system.fantang.mapper.FtSubsidyDaoMapper; -import com.ruoyi.system.fantang.service.IFtSubsidyDaoService; import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.system.fantang.mapper.FtSubsidyDaoMapper; +import com.ruoyi.system.fantang.domain.FtSubsidyDao; +import com.ruoyi.system.fantang.service.IFtSubsidyDaoService; /** * 补贴管理Service业务层处理 * * @author ft - * @date 2020-11-19 + * @date 2020-11-25 */ @Service public class FtSubsidyDaoServiceImpl extends ServiceImpl implements IFtSubsidyDaoService { diff --git a/ruoyi-system/src/main/resources/mapper/fantang/FtSubsidyDaoMapper.xml b/ruoyi-system/src/main/resources/mapper/fantang/FtSubsidyDaoMapper.xml index 3e678be41..eda643fcf 100644 --- a/ruoyi-system/src/main/resources/mapper/fantang/FtSubsidyDaoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/fantang/FtSubsidyDaoMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue b/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue index 0fb54e196..0e12fb5ce 100644 --- a/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue +++ b/ruoyi-ui/src/views/fantang/careStaffInfo/index.vue @@ -163,7 +163,7 @@ v-for="item in deptListOptions" :key="item.departName" :label="item.departName" - :value="item.departName"> + :value="item.departId"> diff --git a/ruoyi-ui/src/views/fantang/patient/index.vue b/ruoyi-ui/src/views/fantang/patient/index.vue index 8e71ff25a..4516510cd 100644 --- a/ruoyi-ui/src/views/fantang/patient/index.vue +++ b/ruoyi-ui/src/views/fantang/patient/index.vue @@ -123,7 +123,7 @@ - + - - - - - - - -