diff --git a/ruoyi-ui/src/api/benyi/healthcheck.js b/ruoyi-ui/src/api/benyi/healthcheck.js new file mode 100644 index 000000000..f2d258235 --- /dev/null +++ b/ruoyi-ui/src/api/benyi/healthcheck.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询儿童常规体检记录列表 +export function listHealthcheck(query) { + return request({ + url: '/benyi/healthcheck/list', + method: 'get', + params: query + }) +} + +// 查询儿童常规体检记录详细 +export function getHealthcheck(id) { + return request({ + url: '/benyi/healthcheck/' + id, + method: 'get' + }) +} + +// 新增儿童常规体检记录 +export function addHealthcheck(data) { + return request({ + url: '/benyi/healthcheck', + method: 'post', + data: data + }) +} + +// 修改儿童常规体检记录 +export function updateHealthcheck(data) { + return request({ + url: '/benyi/healthcheck', + method: 'put', + data: data + }) +} + +// 删除儿童常规体检记录 +export function delHealthcheck(id) { + return request({ + url: '/benyi/healthcheck/' + id, + method: 'delete' + }) +} + +// 导出儿童常规体检记录 +export function exportHealthcheck(query) { + return request({ + url: '/benyi/healthcheck/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/healthcheck/index.vue b/ruoyi-ui/src/views/benyi/healthcheck/index.vue new file mode 100644 index 000000000..9a65e23ec --- /dev/null +++ b/ruoyi-ui/src/views/benyi/healthcheck/index.vue @@ -0,0 +1,520 @@ + + + \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildHealthCheckController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildHealthCheckController.java new file mode 100644 index 000000000..f4e2317ac --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildHealthCheckController.java @@ -0,0 +1,103 @@ +package com.ruoyi.project.benyi.controller; + +import java.util.List; +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.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.project.benyi.domain.ByChildHealthCheck; +import com.ruoyi.project.benyi.service.IByChildHealthCheckService; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.web.page.TableDataInfo; + +/** + * 儿童常规体检记录Controller + * + * @author tsbz + * @date 2020-08-07 + */ +@RestController +@RequestMapping("/benyi/healthcheck") +public class ByChildHealthCheckController extends BaseController +{ + @Autowired + private IByChildHealthCheckService byChildHealthCheckService; + +/** + * 查询儿童常规体检记录列表 + */ +@PreAuthorize("@ss.hasPermi('benyi:healthcheck:list')") +@GetMapping("/list") + public TableDataInfo list(ByChildHealthCheck byChildHealthCheck) + { + startPage(); + List list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck); + return getDataTable(list); + } + + /** + * 导出儿童常规体检记录列表 + */ + @PreAuthorize("@ss.hasPermi('benyi:healthcheck:export')") + @Log(title = "儿童常规体检记录", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(ByChildHealthCheck byChildHealthCheck) + { + List list = byChildHealthCheckService.selectByChildHealthCheckList(byChildHealthCheck); + ExcelUtil util = new ExcelUtil(ByChildHealthCheck.class); + return util.exportExcel(list, "healthcheck"); + } + + /** + * 获取儿童常规体检记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('benyi:healthcheck:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(byChildHealthCheckService.selectByChildHealthCheckById(id)); + } + + /** + * 新增儿童常规体检记录 + */ + @PreAuthorize("@ss.hasPermi('benyi:healthcheck:add')") + @Log(title = "儿童常规体检记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ByChildHealthCheck byChildHealthCheck) + { + return toAjax(byChildHealthCheckService.insertByChildHealthCheck(byChildHealthCheck)); + } + + /** + * 修改儿童常规体检记录 + */ + @PreAuthorize("@ss.hasPermi('benyi:healthcheck:edit')") + @Log(title = "儿童常规体检记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ByChildHealthCheck byChildHealthCheck) + { + return toAjax(byChildHealthCheckService.updateByChildHealthCheck(byChildHealthCheck)); + } + + /** + * 删除儿童常规体检记录 + */ + @PreAuthorize("@ss.hasPermi('benyi:healthcheck:remove')") + @Log(title = "儿童常规体检记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(byChildHealthCheckService.deleteByChildHealthCheckByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildHealthCheck.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildHealthCheck.java new file mode 100644 index 000000000..5e5cbe6e3 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildHealthCheck.java @@ -0,0 +1,293 @@ +package com.ruoyi.project.benyi.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; + +/** + * 儿童常规体检记录对象 by_child_health_check + * + * @author tsbz + * @date 2020-08-07 + */ +public class ByChildHealthCheck extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 体检表编号 + */ + private Long id; + + /** + * 幼儿ID + */ + @Excel(name = "幼儿ID") + private Long childId; + + /** + * 班级信息 + */ + @Excel(name = "班级信息") + private String classInfo; + + /** + * 学校名称 + */ + @Excel(name = "学校名称") + private String schoolName; + + /** + * 检查日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date checkTime; + + /** + * 保健师 + */ + @Excel(name = "保健师") + private String doctorName; + + /** + * 左眼视力 + */ + @Excel(name = "左眼视力") + private String eyesVisionLeft; + + /** + * 右眼视力 + */ + @Excel(name = "右眼视力") + private String eyesVisionRight; + + /** + * 视力评价 + */ + @Excel(name = "视力评价") + private String visionAssessment; + + /** + * 是否龋齿 + */ + @Excel(name = "是否龋齿") + private String decayedTooth; + + /** + * 体重 + */ + @Excel(name = "体重") + private Integer weight; + + /** + * 体重评价 + */ + @Excel(name = "体重评价") + private String weightAssessment; + + /** + * 身高 + */ + @Excel(name = "身高") + private Double height; + + /** + * 身高评价 + */ + @Excel(name = "身高评价") + private String heightAssessment; + + /** + * 总评价 + */ + @Excel(name = "总评价") + private String totalAssessment; + + /** + * 创建时间 + */ + @Excel(name = "创建时间") + private Date createtime; + + + /** + * 创建人 + */ + @Excel(name = "创建人") + + private ByChild byChild; + + private Long createuser; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setChildId(Long childId) { + this.childId = childId; + } + + public Long getChildId() { + return childId; + } + + public void setClassInfo(String classInfo) { + this.classInfo = classInfo; + } + + public String getClassInfo() { + return classInfo; + } + + public void setSchoolName(String schoolName) { + this.schoolName = schoolName; + } + + public String getSchoolName() { + return schoolName; + } + + public void setCheckTime(Date checkTime) { + this.checkTime = checkTime; + } + + public Date getCheckTime() { + return checkTime; + } + + public void setDoctorName(String doctorName) { + this.doctorName = doctorName; + } + + public String getDoctorName() { + return doctorName; + } + + public void setEyesVisionLeft(String eyesVisionLeft) { + this.eyesVisionLeft = eyesVisionLeft; + } + + public String getEyesVisionLeft() { + return eyesVisionLeft; + } + + public void setEyesVisionRight(String eyesVisionRight) { + this.eyesVisionRight = eyesVisionRight; + } + + public String getEyesVisionRight() { + return eyesVisionRight; + } + + public void setVisionAssessment(String visionAssessment) { + this.visionAssessment = visionAssessment; + } + + public String getVisionAssessment() { + return visionAssessment; + } + + public void setDecayedTooth(String decayedTooth) { + this.decayedTooth = decayedTooth; + } + + public String getDecayedTooth() { + return decayedTooth; + } + + public void setWeight(Integer weight) { + this.weight = weight; + } + + public Integer getWeight() { + return weight; + } + + public void setWeightAssessment(String weightAssessment) { + this.weightAssessment = weightAssessment; + } + + public String getWeightAssessment() { + return weightAssessment; + } + + public void setHeight(Double height) { + this.height = height; + } + + public Double getHeight() { + return height; + } + + public void setHeightAssessment(String heightAssessment) { + this.heightAssessment = heightAssessment; + } + + public String getHeightAssessment() { + return heightAssessment; + } + + public void setTotalAssessment(String totalAssessment) { + this.totalAssessment = totalAssessment; + } + + public String getTotalAssessment() { + return totalAssessment; + } + + public void setCreateuser(Long createuser) { + this.createuser = createuser; + } + + public Long getCreateuser() { + return createuser; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("childId", getChildId()) + .append("classInfo", getClassInfo()) + .append("schoolName", getSchoolName()) + .append("checkTime", getCheckTime()) + .append("doctorName", getDoctorName()) + .append("eyesVisionLeft", getEyesVisionLeft()) + .append("eyesVisionRight", getEyesVisionRight()) + .append("visionAssessment", getVisionAssessment()) + .append("decayedTooth", getDecayedTooth()) + .append("weight", getWeight()) + .append("weightAssessment", getWeightAssessment()) + .append("height", getHeight()) + .append("heightAssessment", getHeightAssessment()) + .append("totalAssessment", getTotalAssessment()) + .append("createtime", getCreatetime()) + .append("createuser", getCreateuser()) + .append("byChild", getByChild()) + .toString(); + } + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public ByChild getByChild() { + return byChild; + } + + public void setByChild(ByChild byChild) { + this.byChild = byChild; + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildHealthCheckMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildHealthCheckMapper.java new file mode 100644 index 000000000..c485d24d2 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildHealthCheckMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.mapper; + +import java.util.List; +import com.ruoyi.project.benyi.domain.ByChildHealthCheck; + +/** + * 儿童常规体检记录Mapper接口 + * + * @author tsbz + * @date 2020-08-07 + */ +public interface ByChildHealthCheckMapper +{ + /** + * 查询儿童常规体检记录 + * + * @param id 儿童常规体检记录ID + * @return 儿童常规体检记录 + */ + public ByChildHealthCheck selectByChildHealthCheckById(Long id); + + /** + * 查询儿童常规体检记录列表 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 儿童常规体检记录集合 + */ + public List selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck); + + /** + * 新增儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck); + + /** + * 修改儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck); + + /** + * 删除儿童常规体检记录 + * + * @param id 儿童常规体检记录ID + * @return 结果 + */ + public int deleteByChildHealthCheckById(Long id); + + /** + * 批量删除儿童常规体检记录 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteByChildHealthCheckByIds(Long[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildHealthCheckService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildHealthCheckService.java new file mode 100644 index 000000000..8d3b2adcf --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildHealthCheckService.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.service; + +import java.util.List; +import com.ruoyi.project.benyi.domain.ByChildHealthCheck; + +/** + * 儿童常规体检记录Service接口 + * + * @author tsbz + * @date 2020-08-07 + */ +public interface IByChildHealthCheckService +{ + /** + * 查询儿童常规体检记录 + * + * @param id 儿童常规体检记录ID + * @return 儿童常规体检记录 + */ + public ByChildHealthCheck selectByChildHealthCheckById(Long id); + + /** + * 查询儿童常规体检记录列表 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 儿童常规体检记录集合 + */ + public List selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck); + + /** + * 新增儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck); + + /** + * 修改儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck); + + /** + * 批量删除儿童常规体检记录 + * + * @param ids 需要删除的儿童常规体检记录ID + * @return 结果 + */ + public int deleteByChildHealthCheckByIds(Long[] ids); + + /** + * 删除儿童常规体检记录信息 + * + * @param id 儿童常规体检记录ID + * @return 结果 + */ + public int deleteByChildHealthCheckById(Long id); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildHealthCheckServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildHealthCheckServiceImpl.java new file mode 100644 index 000000000..f37c5ee39 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildHealthCheckServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.project.benyi.service.impl; + +import java.util.List; + import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.project.benyi.mapper.ByChildHealthCheckMapper; +import com.ruoyi.project.benyi.domain.ByChildHealthCheck; +import com.ruoyi.project.benyi.service.IByChildHealthCheckService; + +/** + * 儿童常规体检记录Service业务层处理 + * + * @author tsbz + * @date 2020-08-07 + */ +@Service +public class ByChildHealthCheckServiceImpl implements IByChildHealthCheckService +{ + @Autowired + private ByChildHealthCheckMapper byChildHealthCheckMapper; + + /** + * 查询儿童常规体检记录 + * + * @param id 儿童常规体检记录ID + * @return 儿童常规体检记录 + */ + @Override + public ByChildHealthCheck selectByChildHealthCheckById(Long id) + { + return byChildHealthCheckMapper.selectByChildHealthCheckById(id); + } + + /** + * 查询儿童常规体检记录列表 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 儿童常规体检记录 + */ + @Override + public List selectByChildHealthCheckList(ByChildHealthCheck byChildHealthCheck) + { + return byChildHealthCheckMapper.selectByChildHealthCheckList(byChildHealthCheck); + } + + /** + * 新增儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + @Override + public int insertByChildHealthCheck(ByChildHealthCheck byChildHealthCheck) + { + return byChildHealthCheckMapper.insertByChildHealthCheck(byChildHealthCheck); + } + + /** + * 修改儿童常规体检记录 + * + * @param byChildHealthCheck 儿童常规体检记录 + * @return 结果 + */ + @Override + public int updateByChildHealthCheck(ByChildHealthCheck byChildHealthCheck) + { + return byChildHealthCheckMapper.updateByChildHealthCheck(byChildHealthCheck); + } + + /** + * 批量删除儿童常规体检记录 + * + * @param ids 需要删除的儿童常规体检记录ID + * @return 结果 + */ + @Override + public int deleteByChildHealthCheckByIds(Long[] ids) + { + return byChildHealthCheckMapper.deleteByChildHealthCheckByIds(ids); + } + + /** + * 删除儿童常规体检记录信息 + * + * @param id 儿童常规体检记录ID + * @return 结果 + */ + @Override + public int deleteByChildHealthCheckById(Long id) + { + return byChildHealthCheckMapper.deleteByChildHealthCheckById(id); + } +} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildHealthCheckMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildHealthCheckMapper.xml new file mode 100644 index 000000000..4f98d04c2 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildHealthCheckMapper.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select h.id, h.child_id, h.class_info, h.school_name, h.check_time, h.doctor_name, h.eyes_vision_left, h.eyes_vision_right, h.vision_assessment, h.decayed_tooth, h.weight, h.weight_assessment, h.height, h.height_assessment, h.total_assessment, h.createtime, h.createuser, + c.id, c.schoolid, c.classid, c.name + from by_child_health_check h + left join by_child c on h.child_id = c.id + + + + + + + + insert into by_child_health_check + + child_id, + class_info, + school_name, + check_time, + doctor_name, + eyes_vision_left, + eyes_vision_right, + vision_assessment, + decayed_tooth, + weight, + weight_assessment, + height, + height_assessment, + total_assessment, + createtime, + createuser, + + + #{childId}, + #{classInfo}, + #{schoolName}, + #{checkTime}, + #{doctorName}, + #{eyesVisionLeft}, + #{eyesVisionRight}, + #{visionAssessment}, + #{decayedTooth}, + #{weight}, + #{weightAssessment}, + #{height}, + #{heightAssessment}, + #{totalAssessment}, + #{createtime}, + #{createuser}, + + + + + update by_child_health_check + + child_id = #{childId}, + class_info = #{classInfo}, + school_name = #{schoolName}, + check_time = #{checkTime}, + doctor_name = #{doctorName}, + eyes_vision_left = #{eyesVisionLeft}, + eyes_vision_right = #{eyesVisionRight}, + vision_assessment = #{visionAssessment}, + + decayed_tooth = #{decayedTooth}, + weight = #{weight}, + weight_assessment = #{weightAssessment}, + + height = #{height}, + height_assessment = #{heightAssessment}, + + total_assessment = #{totalAssessment}, + createtime = #{createtime}, + createuser = #{createuser}, + + where id = #{id} + + + + delete from by_child_health_check where id = #{id} + + + + delete from by_child_health_check where id in + + #{id} + + + + \ No newline at end of file