diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysDrawingController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysDrawingController.java deleted file mode 100644 index 116652bf..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysDrawingController.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.config.RuoYiConfig; -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.file.FileUploadUtils; -import com.ruoyi.common.utils.file.FileUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysDrawing; -import com.ruoyi.system.service.ISysDrawingService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 图纸资料Controller - * - * @author ruoyi - * @date 2022-10-26 - */ -@Controller -@RequestMapping("/system/drawing") -public class SysDrawingController extends BaseController -{ - private String prefix = "system/drawing"; - - @Autowired - private ISysDrawingService sysDrawingService; - - @RequiresPermissions("system:drawing:view") - @GetMapping() - public String drawing() - { - return prefix + "/drawing"; - } - - /** - * 查询图纸资料列表 - */ - @RequiresPermissions("system:drawing:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(SysDrawing sysDrawing) - { - startPage(); - List list = sysDrawingService.selectSysDrawingList(sysDrawing); - return getDataTable(list); - } - - /** - * 导出图纸资料列表 - */ - @RequiresPermissions("system:drawing:export") - @Log(title = "图纸资料", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(SysDrawing sysDrawing) - { - List list = sysDrawingService.selectSysDrawingList(sysDrawing); - ExcelUtil util = new ExcelUtil(SysDrawing.class); - return util.exportExcel(list, "图纸资料数据"); - } - - /** - * 新增图纸资料 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } - - /** - * 新增保存图纸资料 - */ - @RequiresPermissions("system:drawing:add") - @Log(title = "图纸资料", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(SysDrawing sysDrawing) - { - return toAjax(sysDrawingService.insertSysDrawing(sysDrawing)); - } - - /** - * 修改图纸资料 - */ - @GetMapping("/edit/{drawingId}") - public String edit(@PathVariable("drawingId") Long drawingId, ModelMap mmap) - { - SysDrawing sysDrawing = sysDrawingService.selectSysDrawingById(drawingId); - mmap.put("sysDrawing", sysDrawing); - return prefix + "/edit"; - } - - /** - * 修改保存图纸资料 - */ - @RequiresPermissions("system:drawing:edit") - @Log(title = "图纸资料", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(SysDrawing sysDrawing) - { - return toAjax(sysDrawingService.updateSysDrawing(sysDrawing)); - } - - /** - * 删除图纸资料 - */ - @RequiresPermissions("system:drawing:remove") - @Log(title = "图纸资料", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(sysDrawingService.deleteSysDrawingByIds(ids)); - } - - @PostMapping("/upload") - @ResponseBody - public AjaxResult uploadFile(MultipartFile file) throws Exception - { - try - { - // 上传文件路径 - String filePath = RuoYiConfig.getUploadPath(); - String modalName = prefix.substring(prefix.lastIndexOf("/")+1); - String filePathNow = filePath + "/" + modalName; - // 上传并返回新文件名称 - String fileName = FileUploadUtils.upload(filePathNow, file); - String url = filePathNow + fileName; - AjaxResult ajax = AjaxResult.success(); - ajax.put("fileName", fileName); - ajax.put("url", url); - return ajax; - } - catch (Exception e) - { - return AjaxResult.error(e.getMessage()); - } - } - - - @RequestMapping ("/downloadFile") - public void downloadFile(String filepath, HttpServletResponse response, - HttpServletRequest request) throws Exception - { - String fileNameNow = filepath.substring(filepath.lastIndexOf("/")+1); - - try - { -// System.out.println(fileName); - String filePath = filepath; - - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); - FileUtils.setAttachmentResponseHeader(response, fileNameNow); - FileUtils.writeBytes(filePath, response.getOutputStream()); - - } - catch (Exception e) - { - System.out.println("fail"); - } - } - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysDrawing.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysDrawing.java deleted file mode 100644 index 556cfe0c..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysDrawing.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.ruoyi.system.domain; - -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; - -/** - * 图纸资料对象 sys_drawing - * - * @author ruoyi - * @date 2022-10-26 - */ -public class SysDrawing extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 图纸id */ - private Long drawingId; - - /** 图纸编码 */ - @Excel(name = "图纸编码") - private String drawingCode; - - /** 图纸类别 */ - @Excel(name = "图纸类别") - private String drawingMaterialCategory; - - /** 备注 */ - @Excel(name = "备注") - private String drawingRemarks; - - /** 图纸上传 */ - @Excel(name = "图纸上传") - private String drawingUpload; - - /** 上传人 */ - @Excel(name = "图纸上传") - private String uploadPerson; - - /** 录入时间 */ - @Excel(name = "录入时间") - private String firstAddTime; - - /** 修改时间 */ - @Excel(name = "修改时间") - private String updateInfoTime; - - public void setDrawingId(Long drawingId) - { - this.drawingId = drawingId; - } - - public Long getDrawingId() - { - return drawingId; - } - public void setDrawingCode(String drawingCode) - { - this.drawingCode = drawingCode; - } - - public String getDrawingCode() - { - return drawingCode; - } - public void setDrawingMaterialCategory(String drawingMaterialCategory) - { - this.drawingMaterialCategory = drawingMaterialCategory; - } - - public String getDrawingMaterialCategory() - { - return drawingMaterialCategory; - } - public void setDrawingRemarks(String drawingRemarks) - { - this.drawingRemarks = drawingRemarks; - } - - public String getDrawingRemarks() - { - return drawingRemarks; - } - public void setDrawingUpload(String drawingUpload) - { - this.drawingUpload = drawingUpload; - } - - public String getDrawingUpload() - { - return drawingUpload; - } - - public String getUploadPerson() { - return uploadPerson; - } - - public void setUploadPerson(String uploadPerson) { - this.uploadPerson = uploadPerson; - } - - public String getFirstAddTime() { - return firstAddTime; - } - - public void setFirstAddTime(String firstAddTime) { - this.firstAddTime = firstAddTime; - } - - public String getUpdateInfoTime() { - return updateInfoTime; - } - - public void setUpdateInfoTime(String updateInfoTime) { - this.updateInfoTime = updateInfoTime; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("drawingId", getDrawingId()) - .append("drawingCode", getDrawingCode()) - .append("drawingMaterialCategory", getDrawingMaterialCategory()) - .append("drawingRemarks", getDrawingRemarks()) - .append("drawingUpload", getDrawingUpload()) - .append("uploadPerson", getUploadPerson()) - .append("firstAddTime", getFirstAddTime()) - .append("updateInfoTime", getUpdateInfoTime()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDrawingMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDrawingMapper.java deleted file mode 100644 index d8080902..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDrawingMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.SysDrawing; - -/** - * 图纸资料Mapper接口 - * - * @author ruoyi - * @date 2022-10-26 - */ -public interface SysDrawingMapper -{ - /** - * 查询图纸资料 - * - * @param drawingId 图纸资料ID - * @return 图纸资料 - */ - public SysDrawing selectSysDrawingById(Long drawingId); - - /** - * 查询图纸资料列表 - * - * @param sysDrawing 图纸资料 - * @return 图纸资料集合 - */ - public List selectSysDrawingList(SysDrawing sysDrawing); - - /** - * 新增图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - public int insertSysDrawing(SysDrawing sysDrawing); - - /** - * 修改图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - public int updateSysDrawing(SysDrawing sysDrawing); - - /** - * 删除图纸资料 - * - * @param drawingId 图纸资料ID - * @return 结果 - */ - public int deleteSysDrawingById(Long drawingId); - - /** - * 批量删除图纸资料 - * - * @param drawingIds 需要删除的数据ID - * @return 结果 - */ - public int deleteSysDrawingByIds(String[] drawingIds); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDrawingService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDrawingService.java deleted file mode 100644 index 8f56a2e1..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDrawingService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.SysDrawing; - -/** - * 图纸资料Service接口 - * - * @author ruoyi - * @date 2022-10-26 - */ -public interface ISysDrawingService -{ - /** - * 查询图纸资料 - * - * @param drawingId 图纸资料ID - * @return 图纸资料 - */ - public SysDrawing selectSysDrawingById(Long drawingId); - - /** - * 查询图纸资料列表 - * - * @param sysDrawing 图纸资料 - * @return 图纸资料集合 - */ - public List selectSysDrawingList(SysDrawing sysDrawing); - - /** - * 新增图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - public int insertSysDrawing(SysDrawing sysDrawing); - - /** - * 修改图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - public int updateSysDrawing(SysDrawing sysDrawing); - - /** - * 批量删除图纸资料 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteSysDrawingByIds(String ids); - - /** - * 删除图纸资料信息 - * - * @param drawingId 图纸资料ID - * @return 结果 - */ - public int deleteSysDrawingById(Long drawingId); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDrawingServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDrawingServiceImpl.java deleted file mode 100644 index 38fa6753..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDrawingServiceImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.system.domain.SysDrawing; -import com.ruoyi.system.mapper.SysDrawingMapper; -import com.ruoyi.system.service.ISysDrawingService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 图纸资料Service业务层处理 - * - * @author ruoyi - * @date 2022-10-26 - */ -@Service -public class SysDrawingServiceImpl implements ISysDrawingService -{ - @Autowired - private SysDrawingMapper sysDrawingMapper; - - /** - * 查询图纸资料 - * - * @param drawingId 图纸资料ID - * @return 图纸资料 - */ - @Override - public SysDrawing selectSysDrawingById(Long drawingId) - { - return sysDrawingMapper.selectSysDrawingById(drawingId); - } - - /** - * 查询图纸资料列表 - * - * @param sysDrawing 图纸资料 - * @return 图纸资料 - */ - @Override - public List selectSysDrawingList(SysDrawing sysDrawing) - { - return sysDrawingMapper.selectSysDrawingList(sysDrawing); - } - - /** - * 新增图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - @Override - public int insertSysDrawing(SysDrawing sysDrawing) - { - return sysDrawingMapper.insertSysDrawing(sysDrawing); - } - - /** - * 修改图纸资料 - * - * @param sysDrawing 图纸资料 - * @return 结果 - */ - @Override - public int updateSysDrawing(SysDrawing sysDrawing) - { - return sysDrawingMapper.updateSysDrawing(sysDrawing); - } - - /** - * 删除图纸资料对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteSysDrawingByIds(String ids) - { - return sysDrawingMapper.deleteSysDrawingByIds(Convert.toStrArray(ids)); - } - - /** - * 删除图纸资料信息 - * - * @param drawingId 图纸资料ID - * @return 结果 - */ - @Override - public int deleteSysDrawingById(Long drawingId) - { - return sysDrawingMapper.deleteSysDrawingById(drawingId); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysDrawingMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysDrawingMapper.xml deleted file mode 100644 index 566dccc8..00000000 --- a/ruoyi-admin/src/main/resources/mapper/system/SysDrawingMapper.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - select drawing_id, drawing_code, drawing_material_category, drawing_remarks, drawing_upload, upload_person, first_add_time, update_info_time from sys_drawing - - - - - - - - insert into sys_drawing - - drawing_code, - drawing_material_category, - drawing_remarks, - drawing_upload, - upload_person, - first_add_time, - - - #{drawingCode}, - #{drawingMaterialCategory}, - #{drawingRemarks}, - #{drawingUpload}, - #{uploadPerson}, - now(), - - - - - update sys_drawing - - drawing_code = #{drawingCode}, - drawing_material_category = #{drawingMaterialCategory}, - drawing_remarks = #{drawingRemarks}, - drawing_upload = #{drawingUpload}, - upload_person = #{uploadPerson}, - update_info_time = CONCAT_WS(',',NOW(),update_info_time), - - where drawing_id = #{drawingId} - - - - delete from sys_drawing where drawing_id = #{drawingId} - - - - delete from sys_drawing where drawing_id in - - #{drawingId} - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/drawing/add.html b/ruoyi-admin/src/main/resources/templates/system/drawing/add.html deleted file mode 100644 index 402c1c0d..00000000 --- a/ruoyi-admin/src/main/resources/templates/system/drawing/add.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/drawing/drawing.html b/ruoyi-admin/src/main/resources/templates/system/drawing/drawing.html deleted file mode 100644 index deb12cb7..00000000 --- a/ruoyi-admin/src/main/resources/templates/system/drawing/drawing.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - -
-
-
-
-
- -
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/drawing/edit.html b/ruoyi-admin/src/main/resources/templates/system/drawing/edit.html deleted file mode 100644 index afd14f00..00000000 --- a/ruoyi-admin/src/main/resources/templates/system/drawing/edit.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
- -
-
-
-
-
- - - - - \ No newline at end of file