diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceDepreciationController.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceDepreciationController.java new file mode 100644 index 00000000..61f406f7 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceDepreciationController.java @@ -0,0 +1,105 @@ +package com.hw.dms.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +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.hw.common.log.annotation.Log; +import com.hw.common.log.enums.BusinessType; +import com.hw.common.security.annotation.RequiresPermissions; +import com.hw.dms.domain.DmsBaseDeviceDepreciation; +import com.hw.dms.service.IDmsBaseDeviceDepreciationService; +import com.hw.common.core.web.controller.BaseController; +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.common.core.utils.poi.ExcelUtil; +import com.hw.common.core.web.page.TableDataInfo; + +/** + * 设备折旧信息Controller + * + * @author xins + * @date 2023-12-27 + */ +@RestController +@RequestMapping("/devicedepreciation") +public class DmsBaseDeviceDepreciationController extends BaseController +{ + @Autowired + private IDmsBaseDeviceDepreciationService dmsBaseDeviceDepreciationService; + + /** + * 查询设备折旧信息列表 + */ + @RequiresPermissions("dms:devicedepreciation:list") + @GetMapping("/list") + public TableDataInfo list(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + startPage(); + List list = dmsBaseDeviceDepreciationService.selectDmsBaseDeviceDepreciationList(dmsBaseDeviceDepreciation); + return getDataTable(list); + } + + /** + * 导出设备折旧信息列表 + */ + @RequiresPermissions("dms:devicedepreciation:export") + @Log(title = "设备折旧信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + List list = dmsBaseDeviceDepreciationService.selectDmsBaseDeviceDepreciationList(dmsBaseDeviceDepreciation); + ExcelUtil util = new ExcelUtil(DmsBaseDeviceDepreciation.class); + util.exportExcel(response, list, "设备折旧信息数据"); + } + + /** + * 获取设备折旧信息详细信息 + */ + @RequiresPermissions("dms:devicedepreciation:query") + @GetMapping(value = "/{deviceDepreciationId}") + public AjaxResult getInfo(@PathVariable("deviceDepreciationId") Long deviceDepreciationId) + { + return success(dmsBaseDeviceDepreciationService.selectDmsBaseDeviceDepreciationByDeviceDepreciationId(deviceDepreciationId)); + } + + /** + * 新增设备折旧信息 + */ + @RequiresPermissions("dms:devicedepreciation:add") + @Log(title = "设备折旧信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + return toAjax(dmsBaseDeviceDepreciationService.insertDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation)); + } + + /** + * 修改设备折旧信息 + */ + @RequiresPermissions("dms:devicedepreciation:edit") + @Log(title = "设备折旧信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + return toAjax(dmsBaseDeviceDepreciationService.updateDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation)); + } + + /** + * 删除设备折旧信息 + */ + @RequiresPermissions("dms:devicedepreciation:remove") + @Log(title = "设备折旧信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{deviceDepreciationIds}") + public AjaxResult remove(@PathVariable Long[] deviceDepreciationIds) + { + return toAjax(dmsBaseDeviceDepreciationService.deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(deviceDepreciationIds)); + } +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceTypeController.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceTypeController.java new file mode 100644 index 00000000..8ef3aa9b --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/controller/DmsBaseDeviceTypeController.java @@ -0,0 +1,103 @@ +package com.hw.dms.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +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.hw.common.log.annotation.Log; +import com.hw.common.log.enums.BusinessType; +import com.hw.common.security.annotation.RequiresPermissions; +import com.hw.dms.domain.DmsBaseDeviceType; +import com.hw.dms.service.IDmsBaseDeviceTypeService; +import com.hw.common.core.web.controller.BaseController; +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.common.core.utils.poi.ExcelUtil; + +/** + * 设备类型信息Controller + * + * @author xins + * @date 2023-12-27 + */ +@RestController +@RequestMapping("/devicetype") +public class DmsBaseDeviceTypeController extends BaseController +{ + @Autowired + private IDmsBaseDeviceTypeService dmsBaseDeviceTypeService; + + /** + * 查询设备类型信息列表 + */ + @RequiresPermissions("dms:devicetype:list") + @GetMapping("/list") + public AjaxResult list(DmsBaseDeviceType dmsBaseDeviceType) + { + List list = dmsBaseDeviceTypeService.selectDmsBaseDeviceTypeList(dmsBaseDeviceType); + return success(list); + } + + /** + * 导出设备类型信息列表 + */ + @RequiresPermissions("dms:devicetype:export") + @Log(title = "设备类型信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DmsBaseDeviceType dmsBaseDeviceType) + { + List list = dmsBaseDeviceTypeService.selectDmsBaseDeviceTypeList(dmsBaseDeviceType); + ExcelUtil util = new ExcelUtil(DmsBaseDeviceType.class); + util.exportExcel(response, list, "设备类型信息数据"); + } + + /** + * 获取设备类型信息详细信息 + */ + @RequiresPermissions("dms:devicetype:query") + @GetMapping(value = "/{deviceTypeId}") + public AjaxResult getInfo(@PathVariable("deviceTypeId") Long deviceTypeId) + { + return success(dmsBaseDeviceTypeService.selectDmsBaseDeviceTypeByDeviceTypeId(deviceTypeId)); + } + + /** + * 新增设备类型信息 + */ + @RequiresPermissions("dms:devicetype:add") + @Log(title = "设备类型信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DmsBaseDeviceType dmsBaseDeviceType) + { + return toAjax(dmsBaseDeviceTypeService.insertDmsBaseDeviceType(dmsBaseDeviceType)); + } + + /** + * 修改设备类型信息 + */ + @RequiresPermissions("dms:devicetype:edit") + @Log(title = "设备类型信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DmsBaseDeviceType dmsBaseDeviceType) + { + return toAjax(dmsBaseDeviceTypeService.updateDmsBaseDeviceType(dmsBaseDeviceType)); + } + + /** + * 删除设备类型信息 + */ + @RequiresPermissions("dms:devicetype:remove") + @Log(title = "设备类型信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{deviceTypeIds}") + public AjaxResult remove(@PathVariable Long[] deviceTypeIds) + { + return toAjax(dmsBaseDeviceTypeService.deleteDmsBaseDeviceTypeByDeviceTypeIds(deviceTypeIds)); + } +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceDepreciation.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceDepreciation.java new file mode 100644 index 00000000..c6d68f31 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceDepreciation.java @@ -0,0 +1,144 @@ +package com.hw.dms.domain; + +import java.math.BigDecimal; +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.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; + +/** + * 设备折旧信息对象 dms_base_device_depreciation + * + * @author xins + * @date 2023-12-27 + */ +public class DmsBaseDeviceDepreciation extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键标识 */ + private Long deviceDepreciationId; + + /** 设备ID,关联dms_base_device_ledger的device_id */ + @Excel(name = "设备ID,关联dms_base_device_ledger的device_id") + private Long deviceId; + + /** 维修次数 */ + @Excel(name = "维修次数") + private Long repairFrequency; + + /** 维修费用 */ + @Excel(name = "维修费用") + private BigDecimal repairCosts; + + /** 折旧费用 */ + @Excel(name = "折旧费用") + private BigDecimal depreciationCost; + + /** 投入时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "投入时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date putintoTime; + + /** 使用年限 */ + @Excel(name = "使用年限") + private BigDecimal useLife; + + /** 是否标识:1-是;2-否 */ + @Excel(name = "是否标识:1-是;2-否") + private Long isFlag; + + public void setDeviceDepreciationId(Long deviceDepreciationId) + { + this.deviceDepreciationId = deviceDepreciationId; + } + + public Long getDeviceDepreciationId() + { + return deviceDepreciationId; + } + public void setDeviceId(Long deviceId) + { + this.deviceId = deviceId; + } + + public Long getDeviceId() + { + return deviceId; + } + public void setRepairFrequency(Long repairFrequency) + { + this.repairFrequency = repairFrequency; + } + + public Long getRepairFrequency() + { + return repairFrequency; + } + public void setRepairCosts(BigDecimal repairCosts) + { + this.repairCosts = repairCosts; + } + + public BigDecimal getRepairCosts() + { + return repairCosts; + } + public void setDepreciationCost(BigDecimal depreciationCost) + { + this.depreciationCost = depreciationCost; + } + + public BigDecimal getDepreciationCost() + { + return depreciationCost; + } + public void setPutintoTime(Date putintoTime) + { + this.putintoTime = putintoTime; + } + + public Date getPutintoTime() + { + return putintoTime; + } + public void setUseLife(BigDecimal useLife) + { + this.useLife = useLife; + } + + public BigDecimal getUseLife() + { + return useLife; + } + public void setIsFlag(Long isFlag) + { + this.isFlag = isFlag; + } + + public Long getIsFlag() + { + return isFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("deviceDepreciationId", getDeviceDepreciationId()) + .append("deviceId", getDeviceId()) + .append("repairFrequency", getRepairFrequency()) + .append("repairCosts", getRepairCosts()) + .append("depreciationCost", getDepreciationCost()) + .append("putintoTime", getPutintoTime()) + .append("useLife", getUseLife()) + .append("isFlag", getIsFlag()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceType.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceType.java new file mode 100644 index 00000000..ef7fe385 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/domain/DmsBaseDeviceType.java @@ -0,0 +1,86 @@ +package com.hw.dms.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.TreeEntity; + +/** + * 设备类型信息对象 dms_base_device_type + * + * @author xins + * @date 2023-12-27 + */ +public class DmsBaseDeviceType extends TreeEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键标识 */ + private Long deviceTypeId; + + /** 类型编号 */ + @Excel(name = "类型编号") + private String typeCode; + + /** 类型名称 */ + @Excel(name = "类型名称") + private String typeName; + + /** 是否标识:1-是;2-否 */ + @Excel(name = "是否标识:1-是;2-否") + private Long isFlag; + + public void setDeviceTypeId(Long deviceTypeId) + { + this.deviceTypeId = deviceTypeId; + } + + public Long getDeviceTypeId() + { + return deviceTypeId; + } + public void setTypeCode(String typeCode) + { + this.typeCode = typeCode; + } + + public String getTypeCode() + { + return typeCode; + } + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getTypeName() + { + return typeName; + } + public void setIsFlag(Long isFlag) + { + this.isFlag = isFlag; + } + + public Long getIsFlag() + { + return isFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("deviceTypeId", getDeviceTypeId()) + .append("parentId", getParentId()) + .append("typeCode", getTypeCode()) + .append("typeName", getTypeName()) + .append("isFlag", getIsFlag()) + .append("ancestors", getAncestors()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceDepreciationMapper.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceDepreciationMapper.java new file mode 100644 index 00000000..de34ac36 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceDepreciationMapper.java @@ -0,0 +1,61 @@ +package com.hw.dms.mapper; + +import java.util.List; +import com.hw.dms.domain.DmsBaseDeviceDepreciation; + +/** + * 设备折旧信息Mapper接口 + * + * @author xins + * @date 2023-12-27 + */ +public interface DmsBaseDeviceDepreciationMapper +{ + /** + * 查询设备折旧信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 设备折旧信息 + */ + public DmsBaseDeviceDepreciation selectDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId); + + /** + * 查询设备折旧信息列表 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 设备折旧信息集合 + */ + public List selectDmsBaseDeviceDepreciationList(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 新增设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 修改设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 删除设备折旧信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 结果 + */ + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId); + + /** + * 批量删除设备折旧信息 + * + * @param deviceDepreciationIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(Long[] deviceDepreciationIds); +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceTypeMapper.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceTypeMapper.java new file mode 100644 index 00000000..b0b88e76 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/mapper/DmsBaseDeviceTypeMapper.java @@ -0,0 +1,61 @@ +package com.hw.dms.mapper; + +import java.util.List; +import com.hw.dms.domain.DmsBaseDeviceType; + +/** + * 设备类型信息Mapper接口 + * + * @author xins + * @date 2023-12-27 + */ +public interface DmsBaseDeviceTypeMapper +{ + /** + * 查询设备类型信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 设备类型信息 + */ + public DmsBaseDeviceType selectDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId); + + /** + * 查询设备类型信息列表 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 设备类型信息集合 + */ + public List selectDmsBaseDeviceTypeList(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 新增设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + public int insertDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 修改设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + public int updateDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 删除设备类型信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 结果 + */ + public int deleteDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId); + + /** + * 批量删除设备类型信息 + * + * @param deviceTypeIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDmsBaseDeviceTypeByDeviceTypeIds(Long[] deviceTypeIds); +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceDepreciationService.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceDepreciationService.java new file mode 100644 index 00000000..3f9a1407 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceDepreciationService.java @@ -0,0 +1,61 @@ +package com.hw.dms.service; + +import java.util.List; +import com.hw.dms.domain.DmsBaseDeviceDepreciation; + +/** + * 设备折旧信息Service接口 + * + * @author xins + * @date 2023-12-27 + */ +public interface IDmsBaseDeviceDepreciationService +{ + /** + * 查询设备折旧信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 设备折旧信息 + */ + public DmsBaseDeviceDepreciation selectDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId); + + /** + * 查询设备折旧信息列表 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 设备折旧信息集合 + */ + public List selectDmsBaseDeviceDepreciationList(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 新增设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 修改设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation); + + /** + * 批量删除设备折旧信息 + * + * @param deviceDepreciationIds 需要删除的设备折旧信息主键集合 + * @return 结果 + */ + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(Long[] deviceDepreciationIds); + + /** + * 删除设备折旧信息信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 结果 + */ + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId); +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceTypeService.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceTypeService.java new file mode 100644 index 00000000..58cafd18 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/IDmsBaseDeviceTypeService.java @@ -0,0 +1,61 @@ +package com.hw.dms.service; + +import java.util.List; +import com.hw.dms.domain.DmsBaseDeviceType; + +/** + * 设备类型信息Service接口 + * + * @author xins + * @date 2023-12-27 + */ +public interface IDmsBaseDeviceTypeService +{ + /** + * 查询设备类型信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 设备类型信息 + */ + public DmsBaseDeviceType selectDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId); + + /** + * 查询设备类型信息列表 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 设备类型信息集合 + */ + public List selectDmsBaseDeviceTypeList(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 新增设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + public int insertDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 修改设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + public int updateDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType); + + /** + * 批量删除设备类型信息 + * + * @param deviceTypeIds 需要删除的设备类型信息主键集合 + * @return 结果 + */ + public int deleteDmsBaseDeviceTypeByDeviceTypeIds(Long[] deviceTypeIds); + + /** + * 删除设备类型信息信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 结果 + */ + public int deleteDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId); +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceDepreciationServiceImpl.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceDepreciationServiceImpl.java new file mode 100644 index 00000000..2c71b086 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceDepreciationServiceImpl.java @@ -0,0 +1,96 @@ +package com.hw.dms.service.impl; + +import java.util.List; +import com.hw.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.hw.dms.mapper.DmsBaseDeviceDepreciationMapper; +import com.hw.dms.domain.DmsBaseDeviceDepreciation; +import com.hw.dms.service.IDmsBaseDeviceDepreciationService; + +/** + * 设备折旧信息Service业务层处理 + * + * @author xins + * @date 2023-12-27 + */ +@Service +public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepreciationService +{ + @Autowired + private DmsBaseDeviceDepreciationMapper dmsBaseDeviceDepreciationMapper; + + /** + * 查询设备折旧信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 设备折旧信息 + */ + @Override + public DmsBaseDeviceDepreciation selectDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId) + { + return dmsBaseDeviceDepreciationMapper.selectDmsBaseDeviceDepreciationByDeviceDepreciationId(deviceDepreciationId); + } + + /** + * 查询设备折旧信息列表 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 设备折旧信息 + */ + @Override + public List selectDmsBaseDeviceDepreciationList(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + return dmsBaseDeviceDepreciationMapper.selectDmsBaseDeviceDepreciationList(dmsBaseDeviceDepreciation); + } + + /** + * 新增设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + @Override + public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + dmsBaseDeviceDepreciation.setCreateTime(DateUtils.getNowDate()); + return dmsBaseDeviceDepreciationMapper.insertDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation); + } + + /** + * 修改设备折旧信息 + * + * @param dmsBaseDeviceDepreciation 设备折旧信息 + * @return 结果 + */ + @Override + public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation) + { + dmsBaseDeviceDepreciation.setUpdateTime(DateUtils.getNowDate()); + return dmsBaseDeviceDepreciationMapper.updateDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation); + } + + /** + * 批量删除设备折旧信息 + * + * @param deviceDepreciationIds 需要删除的设备折旧信息主键 + * @return 结果 + */ + @Override + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(Long[] deviceDepreciationIds) + { + return dmsBaseDeviceDepreciationMapper.deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(deviceDepreciationIds); + } + + /** + * 删除设备折旧信息信息 + * + * @param deviceDepreciationId 设备折旧信息主键 + * @return 结果 + */ + @Override + public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId) + { + return dmsBaseDeviceDepreciationMapper.deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(deviceDepreciationId); + } +} diff --git a/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceTypeServiceImpl.java b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceTypeServiceImpl.java new file mode 100644 index 00000000..c72c2a89 --- /dev/null +++ b/hw-modules/hw-dms/src/main/java/com/hw/dms/service/impl/DmsBaseDeviceTypeServiceImpl.java @@ -0,0 +1,96 @@ +package com.hw.dms.service.impl; + +import java.util.List; +import com.hw.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.hw.dms.mapper.DmsBaseDeviceTypeMapper; +import com.hw.dms.domain.DmsBaseDeviceType; +import com.hw.dms.service.IDmsBaseDeviceTypeService; + +/** + * 设备类型信息Service业务层处理 + * + * @author xins + * @date 2023-12-27 + */ +@Service +public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService +{ + @Autowired + private DmsBaseDeviceTypeMapper dmsBaseDeviceTypeMapper; + + /** + * 查询设备类型信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 设备类型信息 + */ + @Override + public DmsBaseDeviceType selectDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId) + { + return dmsBaseDeviceTypeMapper.selectDmsBaseDeviceTypeByDeviceTypeId(deviceTypeId); + } + + /** + * 查询设备类型信息列表 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 设备类型信息 + */ + @Override + public List selectDmsBaseDeviceTypeList(DmsBaseDeviceType dmsBaseDeviceType) + { + return dmsBaseDeviceTypeMapper.selectDmsBaseDeviceTypeList(dmsBaseDeviceType); + } + + /** + * 新增设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + @Override + public int insertDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType) + { + dmsBaseDeviceType.setCreateTime(DateUtils.getNowDate()); + return dmsBaseDeviceTypeMapper.insertDmsBaseDeviceType(dmsBaseDeviceType); + } + + /** + * 修改设备类型信息 + * + * @param dmsBaseDeviceType 设备类型信息 + * @return 结果 + */ + @Override + public int updateDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType) + { + dmsBaseDeviceType.setUpdateTime(DateUtils.getNowDate()); + return dmsBaseDeviceTypeMapper.updateDmsBaseDeviceType(dmsBaseDeviceType); + } + + /** + * 批量删除设备类型信息 + * + * @param deviceTypeIds 需要删除的设备类型信息主键 + * @return 结果 + */ + @Override + public int deleteDmsBaseDeviceTypeByDeviceTypeIds(Long[] deviceTypeIds) + { + return dmsBaseDeviceTypeMapper.deleteDmsBaseDeviceTypeByDeviceTypeIds(deviceTypeIds); + } + + /** + * 删除设备类型信息信息 + * + * @param deviceTypeId 设备类型信息主键 + * @return 结果 + */ + @Override + public int deleteDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId) + { + return dmsBaseDeviceTypeMapper.deleteDmsBaseDeviceTypeByDeviceTypeId(deviceTypeId); + } +} diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceDepreciationMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceDepreciationMapper.xml new file mode 100644 index 00000000..18f998e2 --- /dev/null +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceDepreciationMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + select device_depreciation_id, device_id, repair_frequency, repair_costs, depreciation_cost, putinto_time, use_life, is_flag, remark, create_by, create_time, update_by, update_time from dms_base_device_depreciation + + + + + + + + insert into dms_base_device_depreciation + + device_id, + repair_frequency, + repair_costs, + depreciation_cost, + putinto_time, + use_life, + is_flag, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{deviceId}, + #{repairFrequency}, + #{repairCosts}, + #{depreciationCost}, + #{putintoTime}, + #{useLife}, + #{isFlag}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update dms_base_device_depreciation + + device_id = #{deviceId}, + repair_frequency = #{repairFrequency}, + repair_costs = #{repairCosts}, + depreciation_cost = #{depreciationCost}, + putinto_time = #{putintoTime}, + use_life = #{useLife}, + is_flag = #{isFlag}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where device_depreciation_id = #{deviceDepreciationId} + + + + delete from dms_base_device_depreciation where device_depreciation_id = #{deviceDepreciationId} + + + + delete from dms_base_device_depreciation where device_depreciation_id in + + #{deviceDepreciationId} + + + \ No newline at end of file diff --git a/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceTypeMapper.xml b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceTypeMapper.xml new file mode 100644 index 00000000..b2e7c005 --- /dev/null +++ b/hw-modules/hw-dms/src/main/resources/mapper/dms/DmsBaseDeviceTypeMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + select device_type_id, parent_id, type_code, type_name, is_flag, ancestors, remark, create_by, create_time, update_by, update_time from dms_base_device_type + + + + + + + + insert into dms_base_device_type + + parent_id, + type_code, + type_name, + is_flag, + ancestors, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{parentId}, + #{typeCode}, + #{typeName}, + #{isFlag}, + #{ancestors}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update dms_base_device_type + + parent_id = #{parentId}, + type_code = #{typeCode}, + type_name = #{typeName}, + is_flag = #{isFlag}, + ancestors = #{ancestors}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where device_type_id = #{deviceTypeId} + + + + delete from dms_base_device_type where device_type_id = #{deviceTypeId} + + + + delete from dms_base_device_type where device_type_id in + + #{deviceTypeId} + + + \ No newline at end of file diff --git a/hw-ui/src/api/dms/devicedepreciation.js b/hw-ui/src/api/dms/devicedepreciation.js new file mode 100644 index 00000000..e913e730 --- /dev/null +++ b/hw-ui/src/api/dms/devicedepreciation.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询设备折旧信息列表 +export function listDevicedepreciation(query) { + return request({ + url: '/dms/devicedepreciation/list', + method: 'get', + params: query + }) +} + +// 查询设备折旧信息详细 +export function getDevicedepreciation(deviceDepreciationId) { + return request({ + url: '/dms/devicedepreciation/' + deviceDepreciationId, + method: 'get' + }) +} + +// 新增设备折旧信息 +export function addDevicedepreciation(data) { + return request({ + url: '/dms/devicedepreciation', + method: 'post', + data: data + }) +} + +// 修改设备折旧信息 +export function updateDevicedepreciation(data) { + return request({ + url: '/dms/devicedepreciation', + method: 'put', + data: data + }) +} + +// 删除设备折旧信息 +export function delDevicedepreciation(deviceDepreciationId) { + return request({ + url: '/dms/devicedepreciation/' + deviceDepreciationId, + method: 'delete' + }) +} diff --git a/hw-ui/src/api/dms/devicetype.js b/hw-ui/src/api/dms/devicetype.js new file mode 100644 index 00000000..2dcb624c --- /dev/null +++ b/hw-ui/src/api/dms/devicetype.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询设备类型信息列表 +export function listDevicetype(query) { + return request({ + url: '/dms/devicetype/list', + method: 'get', + params: query + }) +} + +// 查询设备类型信息详细 +export function getDevicetype(deviceTypeId) { + return request({ + url: '/dms/devicetype/' + deviceTypeId, + method: 'get' + }) +} + +// 新增设备类型信息 +export function addDevicetype(data) { + return request({ + url: '/dms/devicetype', + method: 'post', + data: data + }) +} + +// 修改设备类型信息 +export function updateDevicetype(data) { + return request({ + url: '/dms/devicetype', + method: 'put', + data: data + }) +} + +// 删除设备类型信息 +export function delDevicetype(deviceTypeId) { + return request({ + url: '/dms/devicetype/' + deviceTypeId, + method: 'delete' + }) +} diff --git a/hw-ui/src/views/dms/base/devicetype/index.vue b/hw-ui/src/views/dms/base/devicetype/index.vue new file mode 100644 index 00000000..a3c85eb7 --- /dev/null +++ b/hw-ui/src/views/dms/base/devicetype/index.vue @@ -0,0 +1,320 @@ + + + diff --git a/hw-ui/src/views/dms/operate/devicedepreciation/index.vue b/hw-ui/src/views/dms/operate/devicedepreciation/index.vue new file mode 100644 index 00000000..068d9d14 --- /dev/null +++ b/hw-ui/src/views/dms/operate/devicedepreciation/index.vue @@ -0,0 +1,353 @@ + + +