parent
886e034aae
commit
7ae4eb5d16
@ -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<DmsBaseDeviceDepreciation> 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<DmsBaseDeviceDepreciation> list = dmsBaseDeviceDepreciationService.selectDmsBaseDeviceDepreciationList(dmsBaseDeviceDepreciation);
|
||||||
|
ExcelUtil<DmsBaseDeviceDepreciation> util = new ExcelUtil<DmsBaseDeviceDepreciation>(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));
|
||||||
|
}
|
||||||
|
}
|
@ -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<DmsBaseDeviceType> 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<DmsBaseDeviceType> list = dmsBaseDeviceTypeService.selectDmsBaseDeviceTypeList(dmsBaseDeviceType);
|
||||||
|
ExcelUtil<DmsBaseDeviceType> util = new ExcelUtil<DmsBaseDeviceType>(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));
|
||||||
|
}
|
||||||
|
}
|
@ -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<DmsBaseDeviceDepreciation> 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);
|
||||||
|
}
|
@ -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<DmsBaseDeviceType> 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);
|
||||||
|
}
|
@ -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<DmsBaseDeviceDepreciation> 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);
|
||||||
|
}
|
@ -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<DmsBaseDeviceType> 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);
|
||||||
|
}
|
@ -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<DmsBaseDeviceDepreciation> 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);
|
||||||
|
}
|
||||||
|
}
|
@ -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<DmsBaseDeviceType> 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hw.dms.mapper.DmsBaseDeviceDepreciationMapper">
|
||||||
|
|
||||||
|
<resultMap type="DmsBaseDeviceDepreciation" id="DmsBaseDeviceDepreciationResult">
|
||||||
|
<result property="deviceDepreciationId" column="device_depreciation_id" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="repairFrequency" column="repair_frequency" />
|
||||||
|
<result property="repairCosts" column="repair_costs" />
|
||||||
|
<result property="depreciationCost" column="depreciation_cost" />
|
||||||
|
<result property="putintoTime" column="putinto_time" />
|
||||||
|
<result property="useLife" column="use_life" />
|
||||||
|
<result property="isFlag" column="is_flag" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDmsBaseDeviceDepreciationVo">
|
||||||
|
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
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDmsBaseDeviceDepreciationList" parameterType="DmsBaseDeviceDepreciation" resultMap="DmsBaseDeviceDepreciationResult">
|
||||||
|
<include refid="selectDmsBaseDeviceDepreciationVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
|
<if test="repairFrequency != null "> and repair_frequency = #{repairFrequency}</if>
|
||||||
|
<if test="repairCosts != null "> and repair_costs = #{repairCosts}</if>
|
||||||
|
<if test="depreciationCost != null "> and depreciation_cost = #{depreciationCost}</if>
|
||||||
|
<if test="putintoTime != null "> and putinto_time = #{putintoTime}</if>
|
||||||
|
<if test="useLife != null "> and use_life = #{useLife}</if>
|
||||||
|
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDmsBaseDeviceDepreciationByDeviceDepreciationId" parameterType="Long" resultMap="DmsBaseDeviceDepreciationResult">
|
||||||
|
<include refid="selectDmsBaseDeviceDepreciationVo"/>
|
||||||
|
where device_depreciation_id = #{deviceDepreciationId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDmsBaseDeviceDepreciation" parameterType="DmsBaseDeviceDepreciation" useGeneratedKeys="true" keyProperty="deviceDepreciationId">
|
||||||
|
insert into dms_base_device_depreciation
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="repairFrequency != null">repair_frequency,</if>
|
||||||
|
<if test="repairCosts != null">repair_costs,</if>
|
||||||
|
<if test="depreciationCost != null">depreciation_cost,</if>
|
||||||
|
<if test="putintoTime != null">putinto_time,</if>
|
||||||
|
<if test="useLife != null">use_life,</if>
|
||||||
|
<if test="isFlag != null">is_flag,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="repairFrequency != null">#{repairFrequency},</if>
|
||||||
|
<if test="repairCosts != null">#{repairCosts},</if>
|
||||||
|
<if test="depreciationCost != null">#{depreciationCost},</if>
|
||||||
|
<if test="putintoTime != null">#{putintoTime},</if>
|
||||||
|
<if test="useLife != null">#{useLife},</if>
|
||||||
|
<if test="isFlag != null">#{isFlag},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDmsBaseDeviceDepreciation" parameterType="DmsBaseDeviceDepreciation">
|
||||||
|
update dms_base_device_depreciation
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="repairFrequency != null">repair_frequency = #{repairFrequency},</if>
|
||||||
|
<if test="repairCosts != null">repair_costs = #{repairCosts},</if>
|
||||||
|
<if test="depreciationCost != null">depreciation_cost = #{depreciationCost},</if>
|
||||||
|
<if test="putintoTime != null">putinto_time = #{putintoTime},</if>
|
||||||
|
<if test="useLife != null">use_life = #{useLife},</if>
|
||||||
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where device_depreciation_id = #{deviceDepreciationId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDmsBaseDeviceDepreciationByDeviceDepreciationId" parameterType="Long">
|
||||||
|
delete from dms_base_device_depreciation where device_depreciation_id = #{deviceDepreciationId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds" parameterType="String">
|
||||||
|
delete from dms_base_device_depreciation where device_depreciation_id in
|
||||||
|
<foreach item="deviceDepreciationId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{deviceDepreciationId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hw.dms.mapper.DmsBaseDeviceTypeMapper">
|
||||||
|
|
||||||
|
<resultMap type="DmsBaseDeviceType" id="DmsBaseDeviceTypeResult">
|
||||||
|
<result property="deviceTypeId" column="device_type_id" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="typeCode" column="type_code" />
|
||||||
|
<result property="typeName" column="type_name" />
|
||||||
|
<result property="isFlag" column="is_flag" />
|
||||||
|
<result property="ancestors" column="ancestors" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDmsBaseDeviceTypeVo">
|
||||||
|
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
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDmsBaseDeviceTypeList" parameterType="DmsBaseDeviceType" resultMap="DmsBaseDeviceTypeResult">
|
||||||
|
<include refid="selectDmsBaseDeviceTypeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||||
|
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
||||||
|
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
|
||||||
|
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||||
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDmsBaseDeviceTypeByDeviceTypeId" parameterType="Long" resultMap="DmsBaseDeviceTypeResult">
|
||||||
|
<include refid="selectDmsBaseDeviceTypeVo"/>
|
||||||
|
where device_type_id = #{deviceTypeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDmsBaseDeviceType" parameterType="DmsBaseDeviceType" useGeneratedKeys="true" keyProperty="deviceTypeId">
|
||||||
|
insert into dms_base_device_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">parent_id,</if>
|
||||||
|
<if test="typeCode != null and typeCode != ''">type_code,</if>
|
||||||
|
<if test="typeName != null and typeName != ''">type_name,</if>
|
||||||
|
<if test="isFlag != null">is_flag,</if>
|
||||||
|
<if test="ancestors != null">ancestors,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">#{parentId},</if>
|
||||||
|
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
|
||||||
|
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||||
|
<if test="isFlag != null">#{isFlag},</if>
|
||||||
|
<if test="ancestors != null">#{ancestors},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDmsBaseDeviceType" parameterType="DmsBaseDeviceType">
|
||||||
|
update dms_base_device_type
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||||
|
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
|
||||||
|
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
|
||||||
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||||
|
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where device_type_id = #{deviceTypeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDmsBaseDeviceTypeByDeviceTypeId" parameterType="Long">
|
||||||
|
delete from dms_base_device_type where device_type_id = #{deviceTypeId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteDmsBaseDeviceTypeByDeviceTypeIds" parameterType="String">
|
||||||
|
delete from dms_base_device_type where device_type_id in
|
||||||
|
<foreach item="deviceTypeId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{deviceTypeId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -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'
|
||||||
|
})
|
||||||
|
}
|
@ -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'
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in New Issue