change - add传感器阵列

master
yinq 2 years ago
parent b2087ae22c
commit 859af92917

@ -0,0 +1,118 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TArraytemperaturedata;
import com.ruoyi.system.service.ITArraytemperaturedataService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author wenjy
* @date 2024-04-24
*/
@Controller
@RequestMapping("/system/ArrayTemperatureData")
public class TArraytemperaturedataController extends BaseController {
private String prefix = "system/ArrayTemperatureData";
@Autowired
private ITArraytemperaturedataService tArraytemperaturedataService;
@RequiresPermissions("system:ArrayTemperatureData:view")
@GetMapping()
public String ArrayTemperatureData() {
return prefix + "/ArrayTemperatureData";
}
/**
*
*/
@RequiresPermissions("system:ArrayTemperatureData:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TArraytemperaturedata tArraytemperaturedata) {
startPage();
List<TArraytemperaturedata> list = tArraytemperaturedataService.selectTArraytemperaturedataList(tArraytemperaturedata);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:ArrayTemperatureData:export")
@Log(title = "温度传感器阵列报", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TArraytemperaturedata tArraytemperaturedata) {
List<TArraytemperaturedata> list = tArraytemperaturedataService.selectTArraytemperaturedataList(tArraytemperaturedata);
ExcelUtil<TArraytemperaturedata> util = new ExcelUtil<TArraytemperaturedata>(TArraytemperaturedata.class);
return util.exportExcel(list, "ArrayTemperatureData");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:ArrayTemperatureData:add")
@Log(title = "温度传感器阵列报", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TArraytemperaturedata tArraytemperaturedata) {
return toAjax(tArraytemperaturedataService.insertTArraytemperaturedata(tArraytemperaturedata));
}
/**
*
*/
@GetMapping("/edit/{objId}")
public String edit(@PathVariable("objId") Long objId, ModelMap mmap) {
TArraytemperaturedata tArraytemperaturedata = tArraytemperaturedataService.selectTArraytemperaturedataById(objId);
mmap.put("tArraytemperaturedata", tArraytemperaturedata);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:ArrayTemperatureData:edit")
@Log(title = "温度传感器阵列报", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TArraytemperaturedata tArraytemperaturedata) {
return toAjax(tArraytemperaturedataService.updateTArraytemperaturedata(tArraytemperaturedata));
}
/**
*
*/
@RequiresPermissions("system:ArrayTemperatureData:remove")
@Log(title = "温度传感器阵列报", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(tArraytemperaturedataService.deleteTArraytemperaturedataByIds(ids));
}
}

@ -7,13 +7,13 @@ spring:
# 主库数据源
master:
# 海威环境
# url: jdbc:sqlserver://175.27.215.92:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa
# password: Hawei@123
# 新疆库尔勒测温环境
url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
url: jdbc:sqlserver://175.27.215.92:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
username: sa
password: haiwei@2024
password: Hawei@123
# 新疆库尔勒测温环境
# url: jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=hw_iot_ems
# username: sa
# password: haiwei@2024
# 从库数据源
slave:
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TArraytemperaturedata;
/**
* Mapper
*
* @author wenjy
* @date 2024-04-24
*/
public interface TArraytemperaturedataMapper
{
/**
*
*
* @param objId ID
* @return
*/
public TArraytemperaturedata selectTArraytemperaturedataById(Long objId);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public List<TArraytemperaturedata> selectTArraytemperaturedataList(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public int insertTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public int updateTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param objId ID
* @return
*/
public int deleteTArraytemperaturedataById(Long objId);
/**
*
*
* @param objIds ID
* @return
*/
public int deleteTArraytemperaturedataByIds(String[] objIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TArraytemperaturedata;
/**
* Service
*
* @author wenjy
* @date 2024-04-24
*/
public interface ITArraytemperaturedataService {
/**
*
*
* @param objId ID
* @return
*/
public TArraytemperaturedata selectTArraytemperaturedataById(Long objId);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public List<TArraytemperaturedata> selectTArraytemperaturedataList(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public int insertTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param tArraytemperaturedata
* @return
*/
public int updateTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata);
/**
*
*
* @param ids ID
* @return
*/
public int deleteTArraytemperaturedataByIds(String ids);
/**
*
*
* @param objId ID
* @return
*/
public int deleteTArraytemperaturedataById(Long objId);
}

@ -0,0 +1,94 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TArraytemperaturedataMapper;
import com.ruoyi.system.domain.TArraytemperaturedata;
import com.ruoyi.system.service.ITArraytemperaturedataService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author wenjy
* @date 2024-04-24
*/
@Service
public class TArraytemperaturedataServiceImpl implements ITArraytemperaturedataService
{
@Autowired
private TArraytemperaturedataMapper tArraytemperaturedataMapper;
/**
*
*
* @param objId ID
* @return
*/
@Override
public TArraytemperaturedata selectTArraytemperaturedataById(Long objId)
{
return tArraytemperaturedataMapper.selectTArraytemperaturedataById(objId);
}
/**
*
*
* @param tArraytemperaturedata
* @return
*/
@Override
public List<TArraytemperaturedata> selectTArraytemperaturedataList(TArraytemperaturedata tArraytemperaturedata)
{
return tArraytemperaturedataMapper.selectTArraytemperaturedataList(tArraytemperaturedata);
}
/**
*
*
* @param tArraytemperaturedata
* @return
*/
@Override
public int insertTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata)
{
return tArraytemperaturedataMapper.insertTArraytemperaturedata(tArraytemperaturedata);
}
/**
*
*
* @param tArraytemperaturedata
* @return
*/
@Override
public int updateTArraytemperaturedata(TArraytemperaturedata tArraytemperaturedata)
{
return tArraytemperaturedataMapper.updateTArraytemperaturedata(tArraytemperaturedata);
}
/**
*
*
* @param ids ID
* @return
*/
@Override
public int deleteTArraytemperaturedataByIds(String ids)
{
return tArraytemperaturedataMapper.deleteTArraytemperaturedataByIds(Convert.toStrArray(ids));
}
/**
*
*
* @param objId ID
* @return
*/
@Override
public int deleteTArraytemperaturedataById(Long objId)
{
return tArraytemperaturedataMapper.deleteTArraytemperaturedataById(objId);
}
}
Loading…
Cancel
Save