diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java new file mode 100644 index 00000000..6e63923f --- /dev/null +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java @@ -0,0 +1,85 @@ +package com.god.web.controller.maintenance; + +import com.god.common.annotation.Log; +import com.god.common.core.controller.BaseController; +import com.god.common.core.domain.AjaxResult; +import com.god.common.core.page.TableDataInfo; +import com.god.common.enums.BusinessType; +import com.god.common.utils.poi.ExcelUtil; +import com.god.maintenance.domain.MaintainUpkeepInfo; +import com.god.maintenance.service.IMaintainUpkeepInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 维修保养记录Controller + * + * @author god + * @date 2023-12-04 + */ +@RestController +@RequestMapping("/maintenance/maintainUpkeepInfo") +public class MaintainUpkeepInfoController extends BaseController { + @Autowired + private IMaintainUpkeepInfoService maintainUpkeepInfoService; + + /** + * 查询维修保养记录列表 + */ + @GetMapping("/list") + public TableDataInfo list(MaintainUpkeepInfo maintainUpkeepInfo) { + startPage(); + List list = maintainUpkeepInfoService.selectMaintainUpkeepInfoList(maintainUpkeepInfo); + return getDataTable(list); + } + + /** + * 导出维修保养记录列表 + */ + @Log(title = "维修保养记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MaintainUpkeepInfo maintainUpkeepInfo) { + List list = maintainUpkeepInfoService.selectMaintainUpkeepInfoList(maintainUpkeepInfo); + ExcelUtil util = new ExcelUtil(MaintainUpkeepInfo.class); + util.exportExcel(response, list, "维修保养记录数据"); + } + + /** + * 获取维修保养记录详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) { + return success(maintainUpkeepInfoService.selectMaintainUpkeepInfoById(id)); + } + + /** + * 新增维修保养记录 + */ + @Log(title = "维修保养记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MaintainUpkeepInfo maintainUpkeepInfo) { + return toAjax(maintainUpkeepInfoService.insertMaintainUpkeepInfo(maintainUpkeepInfo)); + } + + /** + * 修改维修保养记录 + */ + @Log(title = "维修保养记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MaintainUpkeepInfo maintainUpkeepInfo) { + return toAjax(maintainUpkeepInfoService.updateMaintainUpkeepInfo(maintainUpkeepInfo)); + } + + /** + * 删除维修保养记录 + */ + @Log(title = "维修保养记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) { + return toAjax(maintainUpkeepInfoService.deleteMaintainUpkeepInfoByIds(ids)); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/domain/MaintainUpkeepInfo.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/domain/MaintainUpkeepInfo.java new file mode 100644 index 00000000..b0104477 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/domain/MaintainUpkeepInfo.java @@ -0,0 +1,100 @@ +package com.god.maintenance.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.god.common.annotation.Excel; +import com.god.common.core.domain.BaseEntity; + +/** + * 维修保养记录对象 maintain_upkeep_info + * + * @author god + * @date 2023-12-04 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class MaintainUpkeepInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 设备ID + */ + @Excel(name = "设备ID") + private String facilityId; + /** + * 设备名称 + */ + @Excel(name = "设备名称") + private String facilityName; + + /** + * 设备类型 + */ + @Excel(name = "设备类型") + private String facilityType; + + /** + * 品牌 + */ + @Excel(name = "品牌") + private String facilityBrand; + + /** + * 维修保养类型1维修2保养 + */ + @Excel(name = "维修保养类型1维修2保养") + private String maintainUpkeepType; + + /** + * 区分系统端口 + */ + @Excel(name = "区分系统端口") + private String distinctionPort; + + /** + * 维保时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "维保时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date nowTime; + + /** + * 开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startTimeA; + + /** + * 结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endTimeA; + + /** + * 维保人 + */ + @Excel(name = "维保人") + private String maintenanceUser; + + /** + * 维保内容 + */ + @Excel(name = "维保内容") + private String maintenanceInfo; + + /** + * 备用字段 + */ + @Excel(name = "备用字段") + private String reserveOne; +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java new file mode 100644 index 00000000..d71eaf19 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java @@ -0,0 +1,61 @@ +package com.god.maintenance.mapper; + +import java.util.List; + +import com.god.maintenance.domain.MaintainUpkeepInfo; + +/** + * 维修保养记录Mapper接口 + * + * @author god + * @date 2023-12-04 + */ +public interface MaintainUpkeepInfoMapper { + /** + * 查询维修保养记录 + * + * @param id 维修保养记录主键 + * @return 维修保养记录 + */ + MaintainUpkeepInfo selectMaintainUpkeepInfoById(String id); + + /** + * 查询维修保养记录列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + List selectMaintainUpkeepInfoList(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 新增维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + int insertMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 修改维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + int updateMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 删除维修保养记录 + * + * @param id 维修保养记录主键 + * @return 结果 + */ + int deleteMaintainUpkeepInfoById(String id); + + /** + * 批量删除维修保养记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteMaintainUpkeepInfoByIds(String[] ids); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java new file mode 100644 index 00000000..fda4db50 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java @@ -0,0 +1,61 @@ +package com.god.maintenance.service; + +import java.util.List; + +import com.god.maintenance.domain.MaintainUpkeepInfo; + +/** + * 维修保养记录Service接口 + * + * @author god + * @date 2023-12-04 + */ +public interface IMaintainUpkeepInfoService { + /** + * 查询维修保养记录 + * + * @param id 维修保养记录主键 + * @return 维修保养记录 + */ + MaintainUpkeepInfo selectMaintainUpkeepInfoById(String id); + + /** + * 查询维修保养记录列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + List selectMaintainUpkeepInfoList(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 新增维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + int insertMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 修改维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + int updateMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 批量删除维修保养记录 + * + * @param ids 需要删除的维修保养记录主键集合 + * @return 结果 + */ + int deleteMaintainUpkeepInfoByIds(String[] ids); + + /** + * 删除维修保养记录信息 + * + * @param id 维修保养记录主键 + * @return 结果 + */ + int deleteMaintainUpkeepInfoById(String id); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java new file mode 100644 index 00000000..dd47d507 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java @@ -0,0 +1,89 @@ +package com.god.maintenance.service.impl; + +import java.util.List; + +import com.god.common.utils.uuid.IdUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.god.maintenance.mapper.MaintainUpkeepInfoMapper; +import com.god.maintenance.domain.MaintainUpkeepInfo; +import com.god.maintenance.service.IMaintainUpkeepInfoService; + +/** + * 维修保养记录Service业务层处理 + * + * @author god + * @date 2023-12-04 + */ +@Service +public class MaintainUpkeepInfoServiceImpl implements IMaintainUpkeepInfoService { + @Autowired + private MaintainUpkeepInfoMapper maintainUpkeepInfoMapper; + + /** + * 查询维修保养记录 + * + * @param id 维修保养记录主键 + * @return 维修保养记录 + */ + @Override + public MaintainUpkeepInfo selectMaintainUpkeepInfoById(String id) { + return maintainUpkeepInfoMapper.selectMaintainUpkeepInfoById(id); + } + + /** + * 查询维修保养记录列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录 + */ + @Override + public List selectMaintainUpkeepInfoList(MaintainUpkeepInfo maintainUpkeepInfo) { + return maintainUpkeepInfoMapper.selectMaintainUpkeepInfoList(maintainUpkeepInfo); + } + + /** + * 新增维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + @Override + public int insertMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo) { + maintainUpkeepInfo.setId(IdUtils.fastSimpleUUID()); + return maintainUpkeepInfoMapper.insertMaintainUpkeepInfo(maintainUpkeepInfo); + } + + /** + * 修改维修保养记录 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 结果 + */ + @Override + public int updateMaintainUpkeepInfo(MaintainUpkeepInfo maintainUpkeepInfo) { + return maintainUpkeepInfoMapper.updateMaintainUpkeepInfo(maintainUpkeepInfo); + } + + /** + * 批量删除维修保养记录 + * + * @param ids 需要删除的维修保养记录主键 + * @return 结果 + */ + @Override + public int deleteMaintainUpkeepInfoByIds(String[] ids) { + return maintainUpkeepInfoMapper.deleteMaintainUpkeepInfoByIds(ids); + } + + /** + * 删除维修保养记录信息 + * + * @param id 维修保养记录主键 + * @return 结果 + */ + @Override + public int deleteMaintainUpkeepInfoById(String id) { + return maintainUpkeepInfoMapper.deleteMaintainUpkeepInfoById(id); + } +} diff --git a/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml new file mode 100644 index 00000000..061674e4 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + select i.id, + m.device_name as facility_name, + m.device_type as facility_type, + m.device_brand as facility_brand, + i.maintain_upkeep_type, + i.distinction_port, + i.now_time, + i.maintenance_user, + i.maintenance_info, + i.remark, + i.reserve_one, + i.facility_id + from maintain_upkeep_info i + left join gcjx_device_manage m on m.id = i.facility_id + + + + + + + + insert into maintain_upkeep_info + + id, + facility_name, + facility_id, + facility_type, + facility_brand, + maintain_upkeep_type, + distinction_port, + now_time, + maintenance_user, + maintenance_info, + remark, + reserve_one, + + + #{id}, + #{facilityName}, + #{facilityId}, + #{facilityType}, + #{facilityBrand}, + #{maintainUpkeepType}, + #{distinctionPort}, + #{nowTime}, + #{maintenanceUser}, + #{maintenanceInfo}, + #{remark}, + #{reserveOne}, + + + + + update maintain_upkeep_info + + facility_name = #{facilityName}, + facility_id = #{facilityId}, + facility_type = #{facilityType}, + facility_brand = #{facilityBrand}, + maintain_upkeep_type = #{maintainUpkeepType}, + distinction_port = #{distinctionPort}, + now_time = #{nowTime}, + maintenance_user = #{maintenanceUser}, + maintenance_info = #{maintenanceInfo}, + remark = #{remark}, + reserve_one = #{reserveOne}, + + where id = #{id} + + + + delete + from maintain_upkeep_info + where id = #{id} + + + + delete from maintain_upkeep_info where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/maintenance/maintainUpkeepInfo.js b/god-ui/src/api/maintenance/maintainUpkeepInfo.js new file mode 100644 index 00000000..71e657ce --- /dev/null +++ b/god-ui/src/api/maintenance/maintainUpkeepInfo.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询维修保养记录列表 +export function listMaintainUpkeepInfo(query) { + return request({ + url: '/maintenance/maintainUpkeepInfo/list', + method: 'get', + params: query + }) +} + +// 查询维修保养记录详细 +export function getMaintainUpkeepInfo(id) { + return request({ + url: '/maintenance/maintainUpkeepInfo/' + id, + method: 'get' + }) +} + +// 新增维修保养记录 +export function addMaintainUpkeepInfo(data) { + return request({ + url: '/maintenance/maintainUpkeepInfo', + method: 'post', + data: data + }) +} + +// 修改维修保养记录 +export function updateMaintainUpkeepInfo(data) { + return request({ + url: '/maintenance/maintainUpkeepInfo', + method: 'put', + data: data + }) +} + +// 删除维修保养记录 +export function delMaintainUpkeepInfo(id) { + return request({ + url: '/maintenance/maintainUpkeepInfo/' + id, + method: 'delete' + }) +} diff --git a/god-ui/src/views/maintenance/maintainUpkeepInfo/index.vue b/god-ui/src/views/maintenance/maintainUpkeepInfo/index.vue new file mode 100644 index 00000000..a907149e --- /dev/null +++ b/god-ui/src/views/maintenance/maintainUpkeepInfo/index.vue @@ -0,0 +1,375 @@ + + + diff --git a/god-ui/src/views/maintenance/maintainUpkeepInfoA/index.vue b/god-ui/src/views/maintenance/maintainUpkeepInfoA/index.vue new file mode 100644 index 00000000..91041f80 --- /dev/null +++ b/god-ui/src/views/maintenance/maintainUpkeepInfoA/index.vue @@ -0,0 +1,375 @@ + + + diff --git a/god-ui/src/views/maintenance/maintainUpkeepInfoC/index.vue b/god-ui/src/views/maintenance/maintainUpkeepInfoC/index.vue new file mode 100644 index 00000000..2f7de058 --- /dev/null +++ b/god-ui/src/views/maintenance/maintainUpkeepInfoC/index.vue @@ -0,0 +1,386 @@ + + +