From 45764b415d28f50b977c9842a4313fd2642a65b2 Mon Sep 17 00:00:00 2001 From: hansha Date: Fri, 29 Mar 2024 14:14:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9C=BA=E6=89=80=E4=B8=8E=E6=88=BF?= =?UTF-8?q?=E5=B1=8B=E5=85=B3=E8=81=94=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../szxc/controller/SzxcCsFwController.java | 104 ++++++++ .../java/com/ruoyi/szxc/domain/SzxcCsFw.java | 49 ++++ .../ruoyi/szxc/domain/SzxcPlaceManage.java | 147 +++++------ .../com/ruoyi/szxc/mapper/SzxcCsFwMapper.java | 62 +++++ .../ruoyi/szxc/service/ISzxcCsFwService.java | 62 +++++ .../service/impl/SzxcCsFwServiceImpl.java | 94 +++++++ .../resources/mapper/szxc/SzxcCsFwMapper.xml | 57 +++++ .../mapper/szxc/SzxcPlaceManageMapper.xml | 30 +-- ruoyi-ui/src/api/szxc/cs_fw.js | 44 ++++ ruoyi-ui/src/views/szxc/cs_fw/index.vue | 233 ++++++++++++++++++ 10 files changed, 775 insertions(+), 107 deletions(-) create mode 100644 ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcCsFwController.java create mode 100644 ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java create mode 100644 ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcCsFwMapper.java create mode 100644 ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcCsFwService.java create mode 100644 ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcCsFwServiceImpl.java create mode 100644 ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml create mode 100644 ruoyi-ui/src/api/szxc/cs_fw.js create mode 100644 ruoyi-ui/src/views/szxc/cs_fw/index.vue diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcCsFwController.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcCsFwController.java new file mode 100644 index 0000000..42c020f --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcCsFwController.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.SzxcCsFw; +import com.ruoyi.szxc.service.ISzxcCsFwService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 场所房屋关联Controller + * + * @author hs + * @date 2024-03-29 + */ +@RestController +@RequestMapping("/szxc/cs_fw") +public class SzxcCsFwController extends BaseController +{ + @Autowired + private ISzxcCsFwService szxcCsFwService; + + /** + * 查询场所房屋关联列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:list')") + @GetMapping("/list") + public TableDataInfo list(SzxcCsFw szxcCsFw) + { + startPage(); + List list = szxcCsFwService.selectSzxcCsFwList(szxcCsFw); + return getDataTable(list); + } + + /** + * 导出场所房屋关联列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:export')") + @Log(title = "场所房屋关联", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SzxcCsFw szxcCsFw) + { + List list = szxcCsFwService.selectSzxcCsFwList(szxcCsFw); + ExcelUtil util = new ExcelUtil(SzxcCsFw.class); + util.exportExcel(response, list, "场所房屋关联数据"); + } + + /** + * 获取场所房屋关联详细信息 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:query')") + @GetMapping(value = "/{csId}") + public AjaxResult getInfo(@PathVariable("csId") Long csId) + { + return success(szxcCsFwService.selectSzxcCsFwByCsId(csId)); + } + + /** + * 新增场所房屋关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:add')") + @Log(title = "场所房屋关联", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SzxcCsFw szxcCsFw) + { + return toAjax(szxcCsFwService.insertSzxcCsFw(szxcCsFw)); + } + + /** + * 修改场所房屋关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:edit')") + @Log(title = "场所房屋关联", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SzxcCsFw szxcCsFw) + { + return toAjax(szxcCsFwService.updateSzxcCsFw(szxcCsFw)); + } + + /** + * 删除场所房屋关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:cs_fw:remove')") + @Log(title = "场所房屋关联", businessType = BusinessType.DELETE) + @DeleteMapping("/{csIds}") + public AjaxResult remove(@PathVariable Long[] csIds) + { + return toAjax(szxcCsFwService.deleteSzxcCsFwByCsIds(csIds)); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java new file mode 100644 index 0000000..e84fab2 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java @@ -0,0 +1,49 @@ +package com.ruoyi.szxc.domain; + +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 场所房屋关联对象 szxc_cs_fw + * + * @author hs + * @date 2024-03-29 + */ +public class SzxcCsFw extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 场所id */ + private Long csId; + + /** 房屋id */ + private Long fwId; + + public void setCsId(Long csId) + { + this.csId = csId; + } + + public Long getCsId() + { + return csId; + } + public void setFwId(Long fwId) + { + this.fwId = fwId; + } + + public Long getFwId() + { + return fwId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("csId", getCsId()) + .append("fwId", getFwId()) + .toString(); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPlaceManage.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPlaceManage.java index e7decd0..28b105f 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPlaceManage.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPlaceManage.java @@ -1,17 +1,18 @@ package com.ruoyi.szxc.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.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_place_manage - * + * * @author hs - * @date 2024-03-28 + * @date 2024-03-29 */ public class SzxcPlaceManage extends BaseEntity { @@ -69,14 +70,6 @@ public class SzxcPlaceManage extends BaseEntity @Excel(name = "营业执照") private String yyzzPicture; - /** 关联房屋id */ - @Excel(name = "关联房屋id") - private Long glfwId; - - /** 关联房屋名称 */ - @Excel(name = "关联房屋名称") - private String glfwName; - /** 部门id */ @Excel(name = "部门id") private Long deptId; @@ -89,165 +82,147 @@ public class SzxcPlaceManage extends BaseEntity @Excel(name = "创建者ID") private Long userId; - public void setId(Long id) + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setCsName(String csName) + public void setCsName(String csName) { this.csName = csName; } - public String getCsName() + public String getCsName() { return csName; } - public void setHyType(String hyType) + public void setHyType(String hyType) { this.hyType = hyType; } - public String getHyType() + public String getHyType() { return hyType; } - public void setCsType(String csType) + public void setCsType(String csType) { this.csType = csType; } - public String getCsType() + public String getCsType() { return csType; } - public void setCsAddress(String csAddress) + public void setCsAddress(String csAddress) { this.csAddress = csAddress; } - public String getCsAddress() + public String getCsAddress() { return csAddress; } - public void setEmployeeNum(Long employeeNum) + public void setEmployeeNum(Long employeeNum) { this.employeeNum = employeeNum; } - public Long getEmployeeNum() + public Long getEmployeeNum() { return employeeNum; } - public void setSzyt(String szyt) + public void setSzyt(String szyt) { this.szyt = szyt; } - public String getSzyt() + public String getSzyt() { return szyt; } - public void setFwType(String fwType) + public void setFwType(String fwType) { this.fwType = fwType; } - public String getFwType() + public String getFwType() { return fwType; } - public void setFrName(String frName) + public void setFrName(String frName) { this.frName = frName; } - public String getFrName() + public String getFrName() { return frName; } - public void setClDate(Date clDate) + public void setClDate(Date clDate) { this.clDate = clDate; } - public Date getClDate() + public Date getClDate() { return clDate; } - public void setYyqx(String yyqx) + public void setYyqx(String yyqx) { this.yyqx = yyqx; } - public String getYyqx() + public String getYyqx() { return yyqx; } - public void setTyshxyCode(String tyshxyCode) + public void setTyshxyCode(String tyshxyCode) { this.tyshxyCode = tyshxyCode; } - public String getTyshxyCode() + public String getTyshxyCode() { return tyshxyCode; } - public void setYyzzPicture(String yyzzPicture) + public void setYyzzPicture(String yyzzPicture) { this.yyzzPicture = yyzzPicture; } - public String getYyzzPicture() + public String getYyzzPicture() { return yyzzPicture; } - public void setGlfwId(Long glfwId) - { - this.glfwId = glfwId; - } - - public Long getGlfwId() - { - return glfwId; - } - public void setGlfwName(String glfwName) - { - this.glfwName = glfwName; - } - - public String getGlfwName() - { - return glfwName; - } - public void setDeptId(Long deptId) + public void setDeptId(Long deptId) { this.deptId = deptId; } - public Long getDeptId() + public Long getDeptId() { return deptId; } - public void setDeptName(String deptName) + public void setDeptName(String deptName) { this.deptName = deptName; } - public String getDeptName() + public String getDeptName() { return deptName; } - public void setUserId(Long userId) + public void setUserId(Long userId) { this.userId = userId; } - public Long getUserId() + public Long getUserId() { return userId; } @@ -255,29 +230,27 @@ public class SzxcPlaceManage extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("csName", getCsName()) - .append("hyType", getHyType()) - .append("csType", getCsType()) - .append("csAddress", getCsAddress()) - .append("employeeNum", getEmployeeNum()) - .append("szyt", getSzyt()) - .append("fwType", getFwType()) - .append("frName", getFrName()) - .append("clDate", getClDate()) - .append("yyqx", getYyqx()) - .append("tyshxyCode", getTyshxyCode()) - .append("yyzzPicture", getYyzzPicture()) - .append("glfwId", getGlfwId()) - .append("glfwName", getGlfwName()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("deptId", getDeptId()) - .append("deptName", getDeptName()) - .append("userId", getUserId()) - .toString(); + .append("id", getId()) + .append("csName", getCsName()) + .append("hyType", getHyType()) + .append("csType", getCsType()) + .append("csAddress", getCsAddress()) + .append("employeeNum", getEmployeeNum()) + .append("szyt", getSzyt()) + .append("fwType", getFwType()) + .append("frName", getFrName()) + .append("clDate", getClDate()) + .append("yyqx", getYyqx()) + .append("tyshxyCode", getTyshxyCode()) + .append("yyzzPicture", getYyzzPicture()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("deptId", getDeptId()) + .append("deptName", getDeptName()) + .append("userId", getUserId()) + .toString(); } } diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcCsFwMapper.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcCsFwMapper.java new file mode 100644 index 0000000..959fd32 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcCsFwMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.mapper; + +import com.ruoyi.szxc.domain.SzxcCsFw; + +import java.util.List; + +/** + * 场所房屋关联Mapper接口 + * + * @author hs + * @date 2024-03-29 + */ +public interface SzxcCsFwMapper +{ + /** + * 查询场所房屋关联 + * + * @param csId 场所房屋关联主键 + * @return 场所房屋关联 + */ + public SzxcCsFw selectSzxcCsFwByCsId(Long csId); + + /** + * 查询场所房屋关联列表 + * + * @param szxcCsFw 场所房屋关联 + * @return 场所房屋关联集合 + */ + public List selectSzxcCsFwList(SzxcCsFw szxcCsFw); + + /** + * 新增场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + public int insertSzxcCsFw(SzxcCsFw szxcCsFw); + + /** + * 修改场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + public int updateSzxcCsFw(SzxcCsFw szxcCsFw); + + /** + * 删除场所房屋关联 + * + * @param csId 场所房屋关联主键 + * @return 结果 + */ + public int deleteSzxcCsFwByCsId(Long csId); + + /** + * 批量删除场所房屋关联 + * + * @param csIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSzxcCsFwByCsIds(Long[] csIds); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcCsFwService.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcCsFwService.java new file mode 100644 index 0000000..df5f232 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcCsFwService.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.service; + +import com.ruoyi.szxc.domain.SzxcCsFw; + +import java.util.List; + +/** + * 场所房屋关联Service接口 + * + * @author hs + * @date 2024-03-29 + */ +public interface ISzxcCsFwService +{ + /** + * 查询场所房屋关联 + * + * @param csId 场所房屋关联主键 + * @return 场所房屋关联 + */ + public SzxcCsFw selectSzxcCsFwByCsId(Long csId); + + /** + * 查询场所房屋关联列表 + * + * @param szxcCsFw 场所房屋关联 + * @return 场所房屋关联集合 + */ + public List selectSzxcCsFwList(SzxcCsFw szxcCsFw); + + /** + * 新增场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + public int insertSzxcCsFw(SzxcCsFw szxcCsFw); + + /** + * 修改场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + public int updateSzxcCsFw(SzxcCsFw szxcCsFw); + + /** + * 批量删除场所房屋关联 + * + * @param csIds 需要删除的场所房屋关联主键集合 + * @return 结果 + */ + public int deleteSzxcCsFwByCsIds(Long[] csIds); + + /** + * 删除场所房屋关联信息 + * + * @param csId 场所房屋关联主键 + * @return 结果 + */ + public int deleteSzxcCsFwByCsId(Long csId); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcCsFwServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcCsFwServiceImpl.java new file mode 100644 index 0000000..811b8d8 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcCsFwServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.szxc.service.impl; + +import com.ruoyi.szxc.domain.SzxcCsFw; +import com.ruoyi.szxc.mapper.SzxcCsFwMapper; +import com.ruoyi.szxc.service.ISzxcCsFwService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 场所房屋关联Service业务层处理 + * + * @author hs + * @date 2024-03-29 + */ +@Service +public class SzxcCsFwServiceImpl implements ISzxcCsFwService +{ + @Autowired + private SzxcCsFwMapper szxcCsFwMapper; + + /** + * 查询场所房屋关联 + * + * @param csId 场所房屋关联主键 + * @return 场所房屋关联 + */ + @Override + public SzxcCsFw selectSzxcCsFwByCsId(Long csId) + { + return szxcCsFwMapper.selectSzxcCsFwByCsId(csId); + } + + /** + * 查询场所房屋关联列表 + * + * @param szxcCsFw 场所房屋关联 + * @return 场所房屋关联 + */ + @Override + public List selectSzxcCsFwList(SzxcCsFw szxcCsFw) + { + return szxcCsFwMapper.selectSzxcCsFwList(szxcCsFw); + } + + /** + * 新增场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + @Override + public int insertSzxcCsFw(SzxcCsFw szxcCsFw) + { + return szxcCsFwMapper.insertSzxcCsFw(szxcCsFw); + } + + /** + * 修改场所房屋关联 + * + * @param szxcCsFw 场所房屋关联 + * @return 结果 + */ + @Override + public int updateSzxcCsFw(SzxcCsFw szxcCsFw) + { + return szxcCsFwMapper.updateSzxcCsFw(szxcCsFw); + } + + /** + * 批量删除场所房屋关联 + * + * @param csIds 需要删除的场所房屋关联主键 + * @return 结果 + */ + @Override + public int deleteSzxcCsFwByCsIds(Long[] csIds) + { + return szxcCsFwMapper.deleteSzxcCsFwByCsIds(csIds); + } + + /** + * 删除场所房屋关联信息 + * + * @param csId 场所房屋关联主键 + * @return 结果 + */ + @Override + public int deleteSzxcCsFwByCsId(Long csId) + { + return szxcCsFwMapper.deleteSzxcCsFwByCsId(csId); + } +} diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml new file mode 100644 index 0000000..396f5c7 --- /dev/null +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + select cs_id, fw_id from szxc_cs_fw + + + + + + + + insert into szxc_cs_fw + + cs_id, + fw_id, + + + #{csId}, + #{fwId}, + + + + + update szxc_cs_fw + + fw_id = #{fwId}, + + where cs_id = #{csId} + + + + delete from szxc_cs_fw where cs_id = #{csId} + + + + delete from szxc_cs_fw where cs_id in + + #{csId} + + + \ No newline at end of file diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPlaceManageMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPlaceManageMapper.xml index 1e90afe..73e674c 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPlaceManageMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPlaceManageMapper.xml @@ -1,9 +1,9 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -18,8 +18,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - @@ -31,12 +29,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, cs_name, hy_type, cs_type, cs_address, employee_num, szyt, fw_type, fr_name, cl_date, yyqx, tyshxy_code, yyzz_picture, glfw_id, glfw_name, remark, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_place_manage + select id, cs_name, hy_type, cs_type, cs_address, employee_num, szyt, fw_type, fr_name, cl_date, yyqx, tyshxy_code, yyzz_picture, remark, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_place_manage - + - + insert into szxc_place_manage @@ -77,8 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" yyqx, tyshxy_code, yyzz_picture, - glfw_id, - glfw_name, remark, create_by, create_time, @@ -87,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dept_id, dept_name, user_id, - + #{csName}, #{hyType}, @@ -101,8 +95,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{yyqx}, #{tyshxyCode}, #{yyzzPicture}, - #{glfwId}, - #{glfwName}, #{remark}, #{createBy}, #{createTime}, @@ -111,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deptId}, #{deptName}, #{userId}, - + @@ -129,8 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" yyqx = #{yyqx}, tyshxy_code = #{tyshxyCode}, yyzz_picture = #{yyzzPicture}, - glfw_id = #{glfwId}, - glfw_name = #{glfwName}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, @@ -148,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from szxc_place_manage where id in + delete from szxc_place_manage where id in #{id} diff --git a/ruoyi-ui/src/api/szxc/cs_fw.js b/ruoyi-ui/src/api/szxc/cs_fw.js new file mode 100644 index 0000000..e22f59b --- /dev/null +++ b/ruoyi-ui/src/api/szxc/cs_fw.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询场所房屋关联列表 +export function listCs_fw(query) { + return request({ + url: '/szxc/cs_fw/list', + method: 'get', + params: query + }) +} + +// 查询场所房屋关联详细 +export function getCs_fw(csId) { + return request({ + url: '/szxc/cs_fw/' + csId, + method: 'get' + }) +} + +// 新增场所房屋关联 +export function addCs_fw(data) { + return request({ + url: '/szxc/cs_fw', + method: 'post', + data: data + }) +} + +// 修改场所房屋关联 +export function updateCs_fw(data) { + return request({ + url: '/szxc/cs_fw', + method: 'put', + data: data + }) +} + +// 删除场所房屋关联 +export function delCs_fw(csId) { + return request({ + url: '/szxc/cs_fw/' + csId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/szxc/cs_fw/index.vue b/ruoyi-ui/src/views/szxc/cs_fw/index.vue new file mode 100644 index 0000000..ddddf60 --- /dev/null +++ b/ruoyi-ui/src/views/szxc/cs_fw/index.vue @@ -0,0 +1,233 @@ + + + From a376bb262652df24c63acd539aeaf68adefdd371 Mon Sep 17 00:00:00 2001 From: hansha Date: Fri, 29 Mar 2024 14:22:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/szxc/domain/SzxcCsFw.java | 33 ++- .../resources/mapper/szxc/SzxcCsFwMapper.xml | 25 +- ruoyi-ui/src/views/szxc/cs_fw/index.vue | 267 ++++++++++-------- 3 files changed, 181 insertions(+), 144 deletions(-) diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java index e84fab2..dcea975 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcCsFw.java @@ -1,12 +1,13 @@ package com.ruoyi.szxc.domain; -import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; /** * 场所房屋关联对象 szxc_cs_fw - * + * * @author hs * @date 2024-03-29 */ @@ -20,30 +21,44 @@ public class SzxcCsFw extends BaseEntity /** 房屋id */ private Long fwId; - public void setCsId(Long csId) + /** 房屋名称 */ + @Excel(name = "房屋名称") + private String fwName; + + public void setCsId(Long csId) { this.csId = csId; } - public Long getCsId() + public Long getCsId() { return csId; } - public void setFwId(Long fwId) + public void setFwId(Long fwId) { this.fwId = fwId; } - public Long getFwId() + public Long getFwId() { return fwId; } + public void setFwName(String fwName) + { + this.fwName = fwName; + } + + public String getFwName() + { + return fwName; + } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("csId", getCsId()) - .append("fwId", getFwId()) - .toString(); + .append("csId", getCsId()) + .append("fwId", getFwId()) + .append("fwName", getFwName()) + .toString(); } } diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml index 396f5c7..1299faf 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcCsFwMapper.xml @@ -1,45 +1,50 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + - select cs_id, fw_id from szxc_cs_fw + select cs_id, fw_id, fw_name from szxc_cs_fw - + - + insert into szxc_cs_fw cs_id, fw_id, - + fw_name, + #{csId}, #{fwId}, - + #{fwName}, + update szxc_cs_fw fw_id = #{fwId}, + fw_name = #{fwName}, where cs_id = #{csId} @@ -49,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from szxc_cs_fw where cs_id in + delete from szxc_cs_fw where cs_id in #{csId} diff --git a/ruoyi-ui/src/views/szxc/cs_fw/index.vue b/ruoyi-ui/src/views/szxc/cs_fw/index.vue index ddddf60..874a776 100644 --- a/ruoyi-ui/src/views/szxc/cs_fw/index.vue +++ b/ruoyi-ui/src/views/szxc/cs_fw/index.vue @@ -1,6 +1,14 @@