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

master
yinq 3 weeks ago
parent a1694891fc
commit 99ee4bb432

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

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

@ -16,9 +16,9 @@
</li> </li>
<li> <li>
<label style="width: auto">能源类型:</label> <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 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> </select>
</li> </li>
<li> <li>
@ -54,6 +54,7 @@
var editFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:edit')}]]; var editFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:CollectDeviceInfo:remove')}]];
var prefix = ctx + "system/CollectDeviceInfo"; var prefix = ctx + "system/CollectDeviceInfo";
var energyTypeData = [[${@dict.getType('energy_type')}]];
$(function() { $(function() {
var options = { var options = {
@ -97,7 +98,10 @@
}, },
{ {
field: 'energyTypeId', field: 'energyTypeId',
title: '能源类型' title: '能源类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(energyTypeData, value);
}
}, },
{ {
field: 'ip', field: 'ip',

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

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

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

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

Loading…
Cancel
Save