parent
788d0c4863
commit
75b050a100
@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-modules</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>hw-modules-dms</artifactId>
|
||||
|
||||
<description>
|
||||
hw-modules-dms设备管理模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.hw</groupId>
|
||||
<artifactId>hw-common-swagger</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -1,34 +0,0 @@
|
||||
package com.hw.dms;
|
||||
|
||||
import com.hw.common.security.annotation.EnableCustomConfig;
|
||||
import com.hw.common.security.annotation.EnableRyFeignClients;
|
||||
import com.hw.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 系统模块
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
public class HwDmsApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(HwDmsApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 设备模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
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));
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
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));
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
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);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
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);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
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);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
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);
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ _
|
||||
(_) | |
|
||||
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
|
||||
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
|
||||
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|
||||
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
@ -1,29 +0,0 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 7306
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: hw-dms
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 175.27.215.92:8848
|
||||
namespace: jyhb
|
||||
group: DEFAULT_GROUP
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 175.27.215.92:8848
|
||||
namespace: jyhb
|
||||
group: DEFAULT_GROUP
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/hw-dms" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.hw" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
@ -1,106 +0,0 @@
|
||||
<?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>
|
@ -1,96 +0,0 @@
|
||||
<?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>
|
Loading…
Reference in New Issue