diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcWishManageController.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcWishManageController.java new file mode 100644 index 0000000..4a9390b --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcWishManageController.java @@ -0,0 +1,104 @@ +package com.ruoyi.szxc.controller; + +import java.util.List; +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; +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.enums.BusinessType; +import com.ruoyi.szxc.domain.SzxcWishManage; +import com.ruoyi.szxc.service.ISzxcWishManageService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 心愿管理Controller + * + * @author hs + * @date 2024-04-03 + */ +@RestController +@RequestMapping("/szxc/wish") +public class SzxcWishManageController extends BaseController +{ + @Autowired + private ISzxcWishManageService szxcWishManageService; + + /** + * 查询心愿管理列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:list')") + @GetMapping("/list") + public TableDataInfo list(SzxcWishManage szxcWishManage) + { + startPage(); + List list = szxcWishManageService.selectSzxcWishManageList(szxcWishManage); + return getDataTable(list); + } + + /** + * 导出心愿管理列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:export')") + @Log(title = "心愿管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SzxcWishManage szxcWishManage) + { + List list = szxcWishManageService.selectSzxcWishManageList(szxcWishManage); + ExcelUtil util = new ExcelUtil(SzxcWishManage.class); + util.exportExcel(response, list, "心愿管理数据"); + } + + /** + * 获取心愿管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(szxcWishManageService.selectSzxcWishManageById(id)); + } + + /** + * 新增心愿管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:add')") + @Log(title = "心愿管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SzxcWishManage szxcWishManage) + { + return toAjax(szxcWishManageService.insertSzxcWishManage(szxcWishManage)); + } + + /** + * 修改心愿管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:edit')") + @Log(title = "心愿管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SzxcWishManage szxcWishManage) + { + return toAjax(szxcWishManageService.updateSzxcWishManage(szxcWishManage)); + } + + /** + * 删除心愿管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:wish:remove')") + @Log(title = "心愿管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(szxcWishManageService.deleteSzxcWishManageByIds(ids)); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcWishManage.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcWishManage.java new file mode 100644 index 0000000..2414d44 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcWishManage.java @@ -0,0 +1,298 @@ +package com.ruoyi.szxc.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 心愿管理对象 szxc_wish_manage + * + * @author hs + * @date 2024-04-03 + */ +public class SzxcWishManage extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 申请人 */ + @Excel(name = "申请人") + private String applyName; + + /** 申请人电话 */ + @Excel(name = "申请人电话") + private String applyPhone; + + /** 申请时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date applyDate; + + /** 心愿标题 */ + @Excel(name = "心愿标题") + private String title; + + /** 心愿类型 */ + @Excel(name = "心愿类型") + private String wishType; + + /** 心愿描述 */ + @Excel(name = "心愿描述") + private String wishDescrib; + + /** 心愿状态 */ + @Excel(name = "心愿状态") + private String wishStatus; + + /** 认领人 */ + @Excel(name = "认领人") + private String rlName; + + /** 认领人电话 */ + @Excel(name = "认领人电话") + private String rlPhone; + + /** 认领人居民id */ + @Excel(name = "认领人居民id") + private Long rlId; + + /** 审核部门 */ + @Excel(name = "审核部门") + private String auditDept; + + /** 审核部门id */ + @Excel(name = "审核部门id") + private Long auditDeptid; + + /** 审核人 */ + @Excel(name = "审核人") + private String auditName; + + /** 审核结果 */ + @Excel(name = "审核结果") + private String auditResult; + + /** 审核原因 */ + @Excel(name = "审核原因") + private String auditReason; + + /** 申请人网格 */ + @Excel(name = "申请人网格") + private String deptName; + + /** 申请人部门id */ + @Excel(name = "申请人部门id") + private Long deptId; + + /** 创建者ID */ + @Excel(name = "创建者ID") + private Long userId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setApplyName(String applyName) + { + this.applyName = applyName; + } + + public String getApplyName() + { + return applyName; + } + public void setApplyPhone(String applyPhone) + { + this.applyPhone = applyPhone; + } + + public String getApplyPhone() + { + return applyPhone; + } + public void setApplyDate(Date applyDate) + { + this.applyDate = applyDate; + } + + public Date getApplyDate() + { + return applyDate; + } + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + public void setWishType(String wishType) + { + this.wishType = wishType; + } + + public String getWishType() + { + return wishType; + } + public void setWishDescrib(String wishDescrib) + { + this.wishDescrib = wishDescrib; + } + + public String getWishDescrib() + { + return wishDescrib; + } + public void setWishStatus(String wishStatus) + { + this.wishStatus = wishStatus; + } + + public String getWishStatus() + { + return wishStatus; + } + public void setRlName(String rlName) + { + this.rlName = rlName; + } + + public String getRlName() + { + return rlName; + } + public void setRlPhone(String rlPhone) + { + this.rlPhone = rlPhone; + } + + public String getRlPhone() + { + return rlPhone; + } + public void setRlId(Long rlId) + { + this.rlId = rlId; + } + + public Long getRlId() + { + return rlId; + } + public void setAuditDept(String auditDept) + { + this.auditDept = auditDept; + } + + public String getAuditDept() + { + return auditDept; + } + public void setAuditDeptid(Long auditDeptid) + { + this.auditDeptid = auditDeptid; + } + + public Long getAuditDeptid() + { + return auditDeptid; + } + public void setAuditName(String auditName) + { + this.auditName = auditName; + } + + public String getAuditName() + { + return auditName; + } + public void setAuditResult(String auditResult) + { + this.auditResult = auditResult; + } + + public String getAuditResult() + { + return auditResult; + } + public void setAuditReason(String auditReason) + { + this.auditReason = auditReason; + } + + public String getAuditReason() + { + return auditReason; + } + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getDeptName() + { + return deptName; + } + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + public Long getDeptId() + { + return deptId; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("applyName", getApplyName()) + .append("applyPhone", getApplyPhone()) + .append("applyDate", getApplyDate()) + .append("title", getTitle()) + .append("wishType", getWishType()) + .append("wishDescrib", getWishDescrib()) + .append("wishStatus", getWishStatus()) + .append("rlName", getRlName()) + .append("rlPhone", getRlPhone()) + .append("rlId", getRlId()) + .append("auditDept", getAuditDept()) + .append("auditDeptid", getAuditDeptid()) + .append("auditName", getAuditName()) + .append("auditResult", getAuditResult()) + .append("auditReason", getAuditReason()) + .append("remark", getRemark()) + .append("deptName", getDeptName()) + .append("deptId", getDeptId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("userId", getUserId()) + .toString(); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcWishManageMapper.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcWishManageMapper.java new file mode 100644 index 0000000..2be6b13 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcWishManageMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.mapper; + +import com.ruoyi.szxc.domain.SzxcWishManage; + +import java.util.List; + +/** + * 心愿管理Mapper接口 + * + * @author hs + * @date 2024-04-03 + */ +public interface SzxcWishManageMapper +{ + /** + * 查询心愿管理 + * + * @param id 心愿管理主键 + * @return 心愿管理 + */ + public SzxcWishManage selectSzxcWishManageById(Long id); + + /** + * 查询心愿管理列表 + * + * @param szxcWishManage 心愿管理 + * @return 心愿管理集合 + */ + public List selectSzxcWishManageList(SzxcWishManage szxcWishManage); + + /** + * 新增心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + public int insertSzxcWishManage(SzxcWishManage szxcWishManage); + + /** + * 修改心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + public int updateSzxcWishManage(SzxcWishManage szxcWishManage); + + /** + * 删除心愿管理 + * + * @param id 心愿管理主键 + * @return 结果 + */ + public int deleteSzxcWishManageById(Long id); + + /** + * 批量删除心愿管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSzxcWishManageByIds(Long[] ids); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcWishManageService.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcWishManageService.java new file mode 100644 index 0000000..417b14c --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcWishManageService.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.service; + +import com.ruoyi.szxc.domain.SzxcWishManage; + +import java.util.List; + +/** + * 心愿管理Service接口 + * + * @author hs + * @date 2024-04-03 + */ +public interface ISzxcWishManageService +{ + /** + * 查询心愿管理 + * + * @param id 心愿管理主键 + * @return 心愿管理 + */ + public SzxcWishManage selectSzxcWishManageById(Long id); + + /** + * 查询心愿管理列表 + * + * @param szxcWishManage 心愿管理 + * @return 心愿管理集合 + */ + public List selectSzxcWishManageList(SzxcWishManage szxcWishManage); + + /** + * 新增心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + public int insertSzxcWishManage(SzxcWishManage szxcWishManage); + + /** + * 修改心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + public int updateSzxcWishManage(SzxcWishManage szxcWishManage); + + /** + * 批量删除心愿管理 + * + * @param ids 需要删除的心愿管理主键集合 + * @return 结果 + */ + public int deleteSzxcWishManageByIds(Long[] ids); + + /** + * 删除心愿管理信息 + * + * @param id 心愿管理主键 + * @return 结果 + */ + public int deleteSzxcWishManageById(Long id); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/ISzxcZcssService.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/ISzxcZcssService.java deleted file mode 100644 index 6ee4820..0000000 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/ISzxcZcssService.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.szxc.service.impl; - -import com.ruoyi.szxc.domain.SzxcZcss; - -import java.util.List; - -/** - * 资产设施Service接口 - * - * @author hs - * @date 2024-04-02 - */ -public interface ISzxcZcssService -{ - /** - * 查询资产设施 - * - * @param id 资产设施主键 - * @return 资产设施 - */ - public SzxcZcss selectSzxcZcssById(Long id); - - /** - * 查询资产设施列表 - * - * @param szxcZcss 资产设施 - * @return 资产设施集合 - */ - public List selectSzxcZcssList(SzxcZcss szxcZcss); - - /** - * 新增资产设施 - * - * @param szxcZcss 资产设施 - * @return 结果 - */ - public int insertSzxcZcss(SzxcZcss szxcZcss); - - /** - * 修改资产设施 - * - * @param szxcZcss 资产设施 - * @return 结果 - */ - public int updateSzxcZcss(SzxcZcss szxcZcss); - - /** - * 批量删除资产设施 - * - * @param ids 需要删除的资产设施主键集合 - * @return 结果 - */ - public int deleteSzxcZcssByIds(Long[] ids); - - /** - * 删除资产设施信息 - * - * @param id 资产设施主键 - * @return 结果 - */ - public int deleteSzxcZcssById(Long id); -} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcWishManageServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcWishManageServiceImpl.java new file mode 100644 index 0000000..26fb0ff --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcWishManageServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.szxc.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.szxc.domain.SzxcWishManage; +import com.ruoyi.szxc.mapper.SzxcWishManageMapper; +import com.ruoyi.szxc.service.ISzxcWishManageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 心愿管理Service业务层处理 + * + * @author hs + * @date 2024-04-03 + */ +@Service +public class SzxcWishManageServiceImpl implements ISzxcWishManageService +{ + @Autowired + private SzxcWishManageMapper szxcWishManageMapper; + + /** + * 查询心愿管理 + * + * @param id 心愿管理主键 + * @return 心愿管理 + */ + @Override + public SzxcWishManage selectSzxcWishManageById(Long id) + { + return szxcWishManageMapper.selectSzxcWishManageById(id); + } + + /** + * 查询心愿管理列表 + * + * @param szxcWishManage 心愿管理 + * @return 心愿管理 + */ + @Override + public List selectSzxcWishManageList(SzxcWishManage szxcWishManage) + { + return szxcWishManageMapper.selectSzxcWishManageList(szxcWishManage); + } + + /** + * 新增心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + @Override + public int insertSzxcWishManage(SzxcWishManage szxcWishManage) + { + szxcWishManage.setCreateTime(DateUtils.getNowDate()); + return szxcWishManageMapper.insertSzxcWishManage(szxcWishManage); + } + + /** + * 修改心愿管理 + * + * @param szxcWishManage 心愿管理 + * @return 结果 + */ + @Override + public int updateSzxcWishManage(SzxcWishManage szxcWishManage) + { + szxcWishManage.setUpdateTime(DateUtils.getNowDate()); + return szxcWishManageMapper.updateSzxcWishManage(szxcWishManage); + } + + /** + * 批量删除心愿管理 + * + * @param ids 需要删除的心愿管理主键 + * @return 结果 + */ + @Override + public int deleteSzxcWishManageByIds(Long[] ids) + { + return szxcWishManageMapper.deleteSzxcWishManageByIds(ids); + } + + /** + * 删除心愿管理信息 + * + * @param id 心愿管理主键 + * @return 结果 + */ + @Override + public int deleteSzxcWishManageById(Long id) + { + return szxcWishManageMapper.deleteSzxcWishManageById(id); + } +} diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcWishManageMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcWishManageMapper.xml new file mode 100644 index 0000000..d5b815b --- /dev/null +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcWishManageMapper.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, apply_name, apply_phone, apply_date, title, wish_type, wish_describ, wish_status, rl_name, rl_phone, rl_id, audit_dept, audit_deptid, audit_name, audit_result, audit_reason, remark, dept_name, dept_id, create_by, create_time, update_by, update_time, user_id from szxc_wish_manage + + + + + + + + insert into szxc_wish_manage + + apply_name, + apply_phone, + apply_date, + title, + wish_type, + wish_describ, + wish_status, + rl_name, + rl_phone, + rl_id, + audit_dept, + audit_deptid, + audit_name, + audit_result, + audit_reason, + remark, + dept_name, + dept_id, + create_by, + create_time, + update_by, + update_time, + user_id, + + + #{applyName}, + #{applyPhone}, + #{applyDate}, + #{title}, + #{wishType}, + #{wishDescrib}, + #{wishStatus}, + #{rlName}, + #{rlPhone}, + #{rlId}, + #{auditDept}, + #{auditDeptid}, + #{auditName}, + #{auditResult}, + #{auditReason}, + #{remark}, + #{deptName}, + #{deptId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{userId}, + + + + + update szxc_wish_manage + + apply_name = #{applyName}, + apply_phone = #{applyPhone}, + apply_date = #{applyDate}, + title = #{title}, + wish_type = #{wishType}, + wish_describ = #{wishDescrib}, + wish_status = #{wishStatus}, + rl_name = #{rlName}, + rl_phone = #{rlPhone}, + rl_id = #{rlId}, + audit_dept = #{auditDept}, + audit_deptid = #{auditDeptid}, + audit_name = #{auditName}, + audit_result = #{auditResult}, + audit_reason = #{auditReason}, + remark = #{remark}, + dept_name = #{deptName}, + dept_id = #{deptId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + user_id = #{userId}, + + where id = #{id} + + + + delete from szxc_wish_manage where id = #{id} + + + + delete from szxc_wish_manage where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/szxc/wish.js b/ruoyi-ui/src/api/szxc/wish.js new file mode 100644 index 0000000..5369529 --- /dev/null +++ b/ruoyi-ui/src/api/szxc/wish.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询心愿管理列表 +export function listWish(query) { + return request({ + url: '/szxc/wish/list', + method: 'get', + params: query + }) +} + +// 查询心愿管理详细 +export function getWish(id) { + return request({ + url: '/szxc/wish/' + id, + method: 'get' + }) +} + +// 新增心愿管理 +export function addWish(data) { + return request({ + url: '/szxc/wish', + method: 'post', + data: data + }) +} + +// 修改心愿管理 +export function updateWish(data) { + return request({ + url: '/szxc/wish', + method: 'put', + data: data + }) +} + +// 删除心愿管理 +export function delWish(id) { + return request({ + url: '/szxc/wish/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/szxc/wish/index.vue b/ruoyi-ui/src/views/szxc/wish/index.vue new file mode 100644 index 0000000..f96041d --- /dev/null +++ b/ruoyi-ui/src/views/szxc/wish/index.vue @@ -0,0 +1,471 @@ + + +