change - 集中器新增修改管理能源类型

master
yinq 1 month ago
parent a1694891fc
commit 99ee4bb432

@ -16,7 +16,7 @@ public class RuoYiApplication {
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println(
"(♥◠‿◠)ノ゙ 能源管理系统启动成功 ლ(´ڡ`ლ)゙ \n"
"(♥◠‿◠)ノ゙ 传感器平台启动成功 ლ(´ڡ`ლ)゙ \n"
+ "$$$$$$\\ $$\\ $$\\ $$$$$$\\ $$$$$$\\ $$$$$$$$\\ $$$$$$\\ $$$$$$\\ \n"
+ "$$ __$$\\ $$ | $$ |$$ __$$\\ $$ __$$\\ $$ _____|$$ __$$\\ $$ __$$\\ \n"
+ "$$ / \\__|$$ | $$ |$$ / \\__|$$ / \\__|$$ | $$ / \\__|$$ / \\__| \n"

@ -49,11 +49,11 @@ public class T_CollectDeviceInfoController extends BaseController
@RequiresPermissions("system:CollectDeviceInfo:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(T_CollectDeviceInfoDTO t_CollectDeviceInfo)
public TableDataInfo list(T_CollectDeviceInfo t_CollectDeviceInfo)
{
startPage();
//List<T_CollectDeviceInfo> list = t_CollectDeviceInfoService.selectT_CollectDeviceInfoList(t_CollectDeviceInfo);
List<T_CollectDeviceInfoDTO> list = t_CollectDeviceInfoService.selectT_CollectDeviceInfoDTOList(t_CollectDeviceInfo);
List<T_CollectDeviceInfo> list = t_CollectDeviceInfoService.selectT_CollectDeviceInfoList(t_CollectDeviceInfo);
// List<T_CollectDeviceInfoDTO> list = t_CollectDeviceInfoService.selectT_CollectDeviceInfoDTOList(t_CollectDeviceInfo);
return getDataTable(list);
}

@ -16,9 +16,9 @@
</li>
<li>
<label style="width: auto">能源类型:</label>
<select name="energyTypeId" th:with="type=${@energyTypeService.getEnergyType()}">
<select name="energyTypeId" th:with="type=${@dict.getType('energy_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.energyName}" th:value="${dict.energyTypeId}"></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
@ -54,6 +54,7 @@
var editFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:remove')}]];
var prefix = ctx + "system/CollectDeviceInfo";
var energyTypeData = [[${@dict.getType('energy_type')}]];
$(function() {
var options = {
@ -97,7 +98,10 @@
},
{
field: 'energyTypeId',
title: '能源类型'
title: '能源类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(energyTypeData, value);
}
},
{
field: 'ip',

@ -49,9 +49,8 @@
<div class="form-group">
<label class="col-sm-3 control-label">能源类型:</label>
<div class="col-sm-8">
<select name="energyTypeId" class="form-control m-b" th:with="type=${@energyTypeService.getEnergyType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.energyName}" th:value="${dict.energyTypeId}"></option>
<select name="energyTypeId" class="form-control m-b" th:with="type=${@dict.getType('energy_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>

@ -50,9 +50,8 @@
<div class="form-group">
<label class="col-sm-3 control-label">能源类型:</label>
<div class="col-sm-8">
<select name="energyTypeId" class="form-control m-b" th:with="type=${@energyTypeService.getEnergyType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.energyName}" th:value="${dict.energyTypeId}" th:field="*{energyTypeId}"></option>
<select name="energyTypeId" class="form-control m-b" th:with="type=${@dict.getType('energy_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{energyTypeId}"></option>
</select>
</div>
</div>

@ -287,6 +287,7 @@ public class ShiroConfig
// 不需要拦截的访问
filterChainDefinitionMap.put("/login", "anon,captchaValidate");
filterChainDefinitionMap.put("/appLogin", "anon,captchaValidate");
filterChainDefinitionMap.put("/miniProgramApi/**", "anon,captchaValidate");
//MES接口
filterChainDefinitionMap.put("/test/testapi/**/**", "anon,captchaValidate");
// 注册相关

@ -1,64 +1,81 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.T_CollectDeviceInfoMapper">
<resultMap type="T_CollectDeviceInfo" id="T_CollectDeviceInfoResult">
<result property="objid" column="objid" />
<result property="collectDeviceId" column="collectDeviceId" />
<result property="manufacturer" column="manufacturer" />
<result property="model" column="model" />
<result property="factoryNumber" column="factoryNumber" />
<result property="produceDate" column="produceDate" />
<result property="settingAddress" column="settingAddress" />
<result property="energyTypeId" column="energyTypeId" />
<result property="ip" column="ip" />
<result property="objid" column="objid"/>
<result property="collectDeviceId" column="collectDeviceId"/>
<result property="manufacturer" column="manufacturer"/>
<result property="model" column="model"/>
<result property="factoryNumber" column="factoryNumber"/>
<result property="produceDate" column="produceDate"/>
<result property="settingAddress" column="settingAddress"/>
<result property="energyTypeId" column="energyTypeId"/>
<result property="ip" column="ip"/>
</resultMap>
<resultMap type="T_CollectDeviceInfoDTO" id="T_CollectDeviceInfoDTOResult">
<result property="objid" column="objid" />
<result property="collectDeviceId" column="collectDeviceId" />
<result property="manufacturer" column="manufacturer" />
<result property="model" column="model" />
<result property="factoryNumber" column="factoryNumber" />
<result property="produceDate" column="produceDate" />
<result property="settingAddress" column="settingAddress" />
<result property="energyTypeId" column="energyTypeId" />
<result property="ip" column="ip" />
<result property="objid" column="objid"/>
<result property="collectDeviceId" column="collectDeviceId"/>
<result property="manufacturer" column="manufacturer"/>
<result property="model" column="model"/>
<result property="factoryNumber" column="factoryNumber"/>
<result property="produceDate" column="produceDate"/>
<result property="settingAddress" column="settingAddress"/>
<result property="energyTypeId" column="energyTypeId"/>
<result property="ip" column="ip"/>
</resultMap>
<sql id="selectT_CollectDeviceInfoVo">
select objid, collectDeviceId, manufacturer, model, factoryNumber, produceDate, settingAddress, energyTypeId, ip from T_CollectDeviceInfo
select objid,
collectDeviceId,
manufacturer,
model,
factoryNumber,
produceDate,
settingAddress,
energyTypeId,
ip
from T_CollectDeviceInfo
</sql>
<sql id="selectT_CollectDeviceInfoDTOVo">
select t1.objid as objid, t1.collectDeviceId as collectDeviceId,t1.manufacturer as manufacturer,t1.model as model,
t1.factoryNumber as factoryNumber,t1.produceDate as produceDate,t1.settingAddress as settingAddress,
t2.energyName as energyTypeId, t1.ip as ip
select t1.objid as objid,
t1.collectDeviceId as collectDeviceId,
t1.manufacturer as manufacturer,
t1.model as model,
t1.factoryNumber as factoryNumber,
t1.produceDate as produceDate,
t1.settingAddress as settingAddress,
t2.energyName as energyTypeId,
t1.ip as ip
from T_CollectDeviceInfo t1
left join T_EnergyType t2 on t1.energyTypeId = t2.energyTypeId
</sql>
<select id="selectT_CollectDeviceInfoList" parameterType="T_CollectDeviceInfo" resultMap="T_CollectDeviceInfoResult">
<select id="selectT_CollectDeviceInfoList" parameterType="T_CollectDeviceInfo"
resultMap="T_CollectDeviceInfoResult">
<include refid="selectT_CollectDeviceInfoVo"/>
<where>
<if test="collectDeviceId != null and collectDeviceId != ''"> and collectDeviceId = #{collectDeviceId}</if>
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="factoryNumber != null and factoryNumber != ''"> and factoryNumber = #{factoryNumber}</if>
<if test="produceDate != null "> and produceDate = #{produceDate}</if>
<if test="settingAddress != null and settingAddress != ''"> and settingAddress = #{settingAddress}</if>
<if test="energyTypeId != null "> and energyTypeId = #{energyTypeId}</if>
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
<if test="collectDeviceId != null and collectDeviceId != ''">and collectDeviceId = #{collectDeviceId}</if>
<if test="manufacturer != null and manufacturer != ''">and manufacturer = #{manufacturer}</if>
<if test="model != null and model != ''">and model = #{model}</if>
<if test="factoryNumber != null and factoryNumber != ''">and factoryNumber = #{factoryNumber}</if>
<if test="produceDate != null ">and produceDate = #{produceDate}</if>
<if test="settingAddress != null and settingAddress != ''">and settingAddress = #{settingAddress}</if>
<if test="energyTypeId != null ">and energyTypeId = #{energyTypeId}</if>
<if test="ip != null and ip != ''">and ip = #{ip}</if>
</where>
</select>
<select id="selectT_CollectDeviceInfoDTOList" parameterType="T_CollectDeviceInfoDTO" resultMap="T_CollectDeviceInfoDTOResult">
<select id="selectT_CollectDeviceInfoDTOList" parameterType="T_CollectDeviceInfoDTO"
resultMap="T_CollectDeviceInfoDTOResult">
<include refid="selectT_CollectDeviceInfoDTOVo"/>
<where>
<if test="settingAddress != null and settingAddress != ''"> and t1.settingAddress = #{settingAddress}</if>
<if test="energyTypeId != '' "> and t2.energyTypeId = #{energyTypeId}</if>
<if test="settingAddress != null and settingAddress != ''">and t1.settingAddress = #{settingAddress}</if>
<if test="energyTypeId != '' ">and t2.energyTypeId = #{energyTypeId}</if>
</where>
</select>
@ -109,7 +126,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteT_CollectDeviceInfoById" parameterType="Long">
delete from T_CollectDeviceInfo where objid = #{objid}
delete
from T_CollectDeviceInfo
where objid = #{objid}
</delete>
<delete id="deleteT_CollectDeviceInfoByIds" parameterType="String">

Loading…
Cancel
Save