diff --git a/ruoyi-ui/src/api/benyi/contactpeople.js b/ruoyi-ui/src/api/benyi/contactpeople.js new file mode 100644 index 000000000..dcc7cf1e2 --- /dev/null +++ b/ruoyi-ui/src/api/benyi/contactpeople.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询幼儿紧急情况联系人列表 +export function listContactpeople(query) { + return request({ + url: '/benyi/contactpeople/list', + method: 'get', + params: query + }) +} + +// 查询幼儿紧急情况联系人详细 +export function getContactpeople(id) { + return request({ + url: '/benyi/contactpeople/' + id, + method: 'get' + }) +} + +// 新增幼儿紧急情况联系人 +export function addContactpeople(data) { + return request({ + url: '/benyi/contactpeople', + method: 'post', + data: data + }) +} + +// 修改幼儿紧急情况联系人 +export function updateContactpeople(data) { + return request({ + url: '/benyi/contactpeople', + method: 'put', + data: data + }) +} + +// 删除幼儿紧急情况联系人 +export function delContactpeople(id) { + return request({ + url: '/benyi/contactpeople/' + id, + method: 'delete' + }) +} + +// 导出幼儿紧急情况联系人 +export function exportContactpeople(query) { + return request({ + url: '/benyi/contactpeople/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/contactpeople/index.vue b/ruoyi-ui/src/views/benyi/contactpeople/index.vue new file mode 100644 index 000000000..5a52ab87a --- /dev/null +++ b/ruoyi-ui/src/views/benyi/contactpeople/index.vue @@ -0,0 +1,353 @@ + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/files/index.vue b/ruoyi-ui/src/views/benyi/files/index.vue index 1d8557c9d..40a5ae898 100644 --- a/ruoyi-ui/src/views/benyi/files/index.vue +++ b/ruoyi-ui/src/views/benyi/files/index.vue @@ -204,7 +204,7 @@ export default { }, methods: { handleAvatarSuccess(res, file) { - console.log(res); + //console.log(res); if (res.code == "200") { this.form.fileurl = res.fileName; this.form.filetype = res.fileName.split(".")[1]; @@ -213,13 +213,13 @@ export default { } }, handleRemove(file, fileList) { - console.log(file, fileList); + //console.log(file, fileList); if (file.response.code == "200") { this.form.fileurl = ""; } }, handlePreview(file) { - console.log(file); + //console.log(file); }, handleExceed(files, fileList) { this.$message.warning( diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java new file mode 100644 index 000000000..b40a4fbaa --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java @@ -0,0 +1,97 @@ +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.ByChildContactpeople; +import com.ruoyi.project.benyi.service.IByChildContactpeopleService; +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-13 + */ +@RestController +@RequestMapping("/benyi/contactpeople") +public class ByChildContactpeopleController extends BaseController { + @Autowired + private IByChildContactpeopleService byChildContactpeopleService; + + /** + * 查询幼儿紧急情况联系人列表 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:list')") + @GetMapping("/list") + public TableDataInfo list(ByChildContactpeople byChildContactpeople) { + startPage(); + List list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople); + return getDataTable(list); + } + + /** + * 导出幼儿紧急情况联系人列表 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:export')") + @Log(title = "幼儿紧急情况联系人", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(ByChildContactpeople byChildContactpeople) { + List list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeople); + ExcelUtil util = new ExcelUtil(ByChildContactpeople.class); + return util.exportExcel(list, "contactpeople"); + } + + /** + * 获取幼儿紧急情况联系人详细信息 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(byChildContactpeopleService.selectByChildContactpeopleById(id)); + } + + /** + * 新增幼儿紧急情况联系人 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:add')") + @Log(title = "幼儿紧急情况联系人", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ByChildContactpeople byChildContactpeople) { + return toAjax(byChildContactpeopleService.insertByChildContactpeople(byChildContactpeople)); + } + + /** + * 修改幼儿紧急情况联系人 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:edit')") + @Log(title = "幼儿紧急情况联系人", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ByChildContactpeople byChildContactpeople) { + return toAjax(byChildContactpeopleService.updateByChildContactpeople(byChildContactpeople)); + } + + /** + * 删除幼儿紧急情况联系人 + */ + @PreAuthorize("@ss.hasPermi('benyi:contactpeople:remove')") + @Log(title = "幼儿紧急情况联系人", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(byChildContactpeopleService.deleteByChildContactpeopleByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java new file mode 100644 index 000000000..df9fe532b --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChildContactpeople.java @@ -0,0 +1,292 @@ +package com.ruoyi.project.benyi.domain; + +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_contactpeople + * + * @author tsbz + * @date 2020-08-13 + */ +public class ByChildContactpeople extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 编号 + */ + private Long id; + + /** + * 幼儿id + */ + @Excel(name = "幼儿id") + private Long childid; + + /** + * 父亲姓名 + */ + @Excel(name = "父亲姓名") + private String fathername; + + /** + * 父亲联系电话 + */ + @Excel(name = "父亲联系电话") + private String fphone; + + /** + * 父亲办公电话 + */ + @Excel(name = "父亲办公电话") + private String foffphone; + + /** + * 母亲姓名 + */ + @Excel(name = "母亲姓名") + private String mothername; + + /** + * 母亲联系电话 + */ + @Excel(name = "母亲联系电话") + private String mphone; + + /** + * 母亲办公电话 + */ + @Excel(name = "母亲办公电话") + private String moffphone; + + /** + * 其他紧急联系姓名 + */ + @Excel(name = "其他紧急联系姓名") + private String grandfathername; + + /** + * 与幼儿关系 + */ + @Excel(name = "与幼儿关系") + private String gfgx; + + /** + * 联系电话 + */ + @Excel(name = "联系电话") + private String gfphone; + + /** + * 办公电话 + */ + @Excel(name = "办公电话") + private String gfoffphone; + + /** + * 住址 + */ + @Excel(name = "住址") + private String gfaddress; + + /** + * 其他联系人姓名2 + */ + @Excel(name = "其他联系人姓名2") + private String grandmothername; + + /** + * 与幼儿关系2 + */ + @Excel(name = "与幼儿关系2") + private String gmgx; + + /** + * 联系电话2 + */ + @Excel(name = "联系电话2") + private String gmphone; + + /** + * 住址2 + */ + @Excel(name = "住址2") + private String gmaddress; + + /** + * 办公电话2 + */ + @Excel(name = "办公电话2") + private String gmoffphone; + + 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 setFathername(String fathername) { + this.fathername = fathername; + } + + public String getFathername() { + return fathername; + } + + public void setFphone(String fphone) { + this.fphone = fphone; + } + + public String getFphone() { + return fphone; + } + + public void setFoffphone(String foffphone) { + this.foffphone = foffphone; + } + + public String getFoffphone() { + return foffphone; + } + + public void setMothername(String mothername) { + this.mothername = mothername; + } + + public String getMothername() { + return mothername; + } + + public void setMphone(String mphone) { + this.mphone = mphone; + } + + public String getMphone() { + return mphone; + } + + public void setMoffphone(String moffphone) { + this.moffphone = moffphone; + } + + public String getMoffphone() { + return moffphone; + } + + public void setGrandfathername(String grandfathername) { + this.grandfathername = grandfathername; + } + + public String getGrandfathername() { + return grandfathername; + } + + public void setGfgx(String gfgx) { + this.gfgx = gfgx; + } + + public String getGfgx() { + return gfgx; + } + + public void setGfphone(String gfphone) { + this.gfphone = gfphone; + } + + public String getGfphone() { + return gfphone; + } + + public void setGfoffphone(String gfoffphone) { + this.gfoffphone = gfoffphone; + } + + public String getGfoffphone() { + return gfoffphone; + } + + public void setGfaddress(String gfaddress) { + this.gfaddress = gfaddress; + } + + public String getGfaddress() { + return gfaddress; + } + + public void setGrandmothername(String grandmothername) { + this.grandmothername = grandmothername; + } + + public String getGrandmothername() { + return grandmothername; + } + + public void setGmgx(String gmgx) { + this.gmgx = gmgx; + } + + public String getGmgx() { + return gmgx; + } + + public void setGmphone(String gmphone) { + this.gmphone = gmphone; + } + + public String getGmphone() { + return gmphone; + } + + public void setGmaddress(String gmaddress) { + this.gmaddress = gmaddress; + } + + public String getGmaddress() { + return gmaddress; + } + + public void setGmoffphone(String gmoffphone) { + this.gmoffphone = gmoffphone; + } + + public String getGmoffphone() { + return gmoffphone; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("childid", getChildid()) + .append("fathername", getFathername()) + .append("fphone", getFphone()) + .append("foffphone", getFoffphone()) + .append("mothername", getMothername()) + .append("mphone", getMphone()) + .append("moffphone", getMoffphone()) + .append("grandfathername", getGrandfathername()) + .append("gfgx", getGfgx()) + .append("gfphone", getGfphone()) + .append("gfoffphone", getGfoffphone()) + .append("gfaddress", getGfaddress()) + .append("grandmothername", getGrandmothername()) + .append("gmgx", getGmgx()) + .append("gmphone", getGmphone()) + .append("gmaddress", getGmaddress()) + .append("gmoffphone", getGmoffphone()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildContactpeopleMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildContactpeopleMapper.java new file mode 100644 index 000000000..cd748b05f --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByChildContactpeopleMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.mapper; + +import java.util.List; + +import com.ruoyi.project.benyi.domain.ByChildContactpeople; + +/** + * 幼儿紧急情况联系人Mapper接口 + * + * @author tsbz + * @date 2020-08-13 + */ +public interface ByChildContactpeopleMapper { + /** + * 查询幼儿紧急情况联系人 + * + * @param id 幼儿紧急情况联系人ID + * @return 幼儿紧急情况联系人 + */ + public ByChildContactpeople selectByChildContactpeopleById(Long id); + + /** + * 查询幼儿紧急情况联系人列表 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 幼儿紧急情况联系人集合 + */ + public List selectByChildContactpeopleList(ByChildContactpeople byChildContactpeople); + + /** + * 新增幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + public int insertByChildContactpeople(ByChildContactpeople byChildContactpeople); + + /** + * 修改幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + public int updateByChildContactpeople(ByChildContactpeople byChildContactpeople); + + /** + * 删除幼儿紧急情况联系人 + * + * @param id 幼儿紧急情况联系人ID + * @return 结果 + */ + public int deleteByChildContactpeopleById(Long id); + + /** + * 批量删除幼儿紧急情况联系人 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteByChildContactpeopleByIds(Long[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildContactpeopleService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildContactpeopleService.java new file mode 100644 index 000000000..17e13de13 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByChildContactpeopleService.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.service; + +import java.util.List; + +import com.ruoyi.project.benyi.domain.ByChildContactpeople; + +/** + * 幼儿紧急情况联系人Service接口 + * + * @author tsbz + * @date 2020-08-13 + */ +public interface IByChildContactpeopleService { + /** + * 查询幼儿紧急情况联系人 + * + * @param id 幼儿紧急情况联系人ID + * @return 幼儿紧急情况联系人 + */ + public ByChildContactpeople selectByChildContactpeopleById(Long id); + + /** + * 查询幼儿紧急情况联系人列表 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 幼儿紧急情况联系人集合 + */ + public List selectByChildContactpeopleList(ByChildContactpeople byChildContactpeople); + + /** + * 新增幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + public int insertByChildContactpeople(ByChildContactpeople byChildContactpeople); + + /** + * 修改幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + public int updateByChildContactpeople(ByChildContactpeople byChildContactpeople); + + /** + * 批量删除幼儿紧急情况联系人 + * + * @param ids 需要删除的幼儿紧急情况联系人ID + * @return 结果 + */ + public int deleteByChildContactpeopleByIds(Long[] ids); + + /** + * 删除幼儿紧急情况联系人信息 + * + * @param id 幼儿紧急情况联系人ID + * @return 结果 + */ + public int deleteByChildContactpeopleById(Long id); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildContactpeopleServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildContactpeopleServiceImpl.java new file mode 100644 index 000000000..36509ea59 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByChildContactpeopleServiceImpl.java @@ -0,0 +1,89 @@ +package com.ruoyi.project.benyi.service.impl; + +import java.util.List; + +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.project.benyi.mapper.ByChildContactpeopleMapper; +import com.ruoyi.project.benyi.domain.ByChildContactpeople; +import com.ruoyi.project.benyi.service.IByChildContactpeopleService; + +/** + * 幼儿紧急情况联系人Service业务层处理 + * + * @author tsbz + * @date 2020-08-13 + */ +@Service +public class ByChildContactpeopleServiceImpl implements IByChildContactpeopleService { + @Autowired + private ByChildContactpeopleMapper byChildContactpeopleMapper; + + /** + * 查询幼儿紧急情况联系人 + * + * @param id 幼儿紧急情况联系人ID + * @return 幼儿紧急情况联系人 + */ + @Override + public ByChildContactpeople selectByChildContactpeopleById(Long id) { + return byChildContactpeopleMapper.selectByChildContactpeopleById(id); + } + + /** + * 查询幼儿紧急情况联系人列表 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 幼儿紧急情况联系人 + */ + @Override + public List selectByChildContactpeopleList(ByChildContactpeople byChildContactpeople) { + return byChildContactpeopleMapper.selectByChildContactpeopleList(byChildContactpeople); + } + + /** + * 新增幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + @Override + public int insertByChildContactpeople(ByChildContactpeople byChildContactpeople) { + byChildContactpeople.setCreateTime(DateUtils.getNowDate()); + return byChildContactpeopleMapper.insertByChildContactpeople(byChildContactpeople); + } + + /** + * 修改幼儿紧急情况联系人 + * + * @param byChildContactpeople 幼儿紧急情况联系人 + * @return 结果 + */ + @Override + public int updateByChildContactpeople(ByChildContactpeople byChildContactpeople) { + return byChildContactpeopleMapper.updateByChildContactpeople(byChildContactpeople); + } + + /** + * 批量删除幼儿紧急情况联系人 + * + * @param ids 需要删除的幼儿紧急情况联系人ID + * @return 结果 + */ + @Override + public int deleteByChildContactpeopleByIds(Long[] ids) { + return byChildContactpeopleMapper.deleteByChildContactpeopleByIds(ids); + } + + /** + * 删除幼儿紧急情况联系人信息 + * + * @param id 幼儿紧急情况联系人ID + * @return 结果 + */ + @Override + public int deleteByChildContactpeopleById(Long id) { + return byChildContactpeopleMapper.deleteByChildContactpeopleById(id); + } +} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml new file mode 100644 index 000000000..e311d116b --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildContactpeopleMapper.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, childid, fathername, fphone, foffphone, mothername, mphone, moffphone, grandfathername, gfgx, gfphone, gfoffphone, gfaddress, grandmothername, gmgx, gmphone, gmaddress, gmoffphone, create_time from by_child_contactpeople + + + + + + + + insert into by_child_contactpeople + + id, + childid, + fathername, + fphone, + foffphone, + mothername, + mphone, + moffphone, + grandfathername, + gfgx, + gfphone, + gfoffphone, + gfaddress, + grandmothername, + gmgx, + gmphone, + gmaddress, + gmoffphone, + create_time, + + + #{id}, + #{childid}, + #{fathername}, + #{fphone}, + #{foffphone}, + #{mothername}, + #{mphone}, + #{moffphone}, + #{grandfathername}, + #{gfgx}, + #{gfphone}, + #{gfoffphone}, + #{gfaddress}, + #{grandmothername}, + #{gmgx}, + #{gmphone}, + #{gmaddress}, + #{gmoffphone}, + #{createTime}, + + + + + update by_child_contactpeople + + childid = #{childid}, + fathername = #{fathername}, + fphone = #{fphone}, + foffphone = #{foffphone}, + mothername = #{mothername}, + mphone = #{mphone}, + moffphone = #{moffphone}, + grandfathername = #{grandfathername}, + gfgx = #{gfgx}, + gfphone = #{gfphone}, + gfoffphone = #{gfoffphone}, + gfaddress = #{gfaddress}, + grandmothername = #{grandmothername}, + gmgx = #{gmgx}, + gmphone = #{gmphone}, + gmaddress = #{gmaddress}, + gmoffphone = #{gmoffphone}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from by_child_contactpeople where id = #{id} + + + + delete from by_child_contactpeople where id in + + #{id} + + + + \ No newline at end of file