更新
This commit is contained in:
@@ -34,7 +34,7 @@ public class FireFacility extends BaseEntity
|
||||
|
||||
|
||||
/** 设施ID,自增主键 */
|
||||
@Excel(name = "设施ID,自增主键")
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 位置ID(字符串描述,如"A101") */
|
||||
|
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.fire.mapper.FireFacilityMapper">
|
||||
|
||||
|
||||
<resultMap type="FireFacility" id="FireFacilityResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="locationId" column="location_id" />
|
||||
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectFireFacilityList" parameterType="FireFacility" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="locationId != null and locationId != ''"> and location_id like concat('%', #{locationId}, '%')</if>
|
||||
<if test="facilityName != null and facilityName != ''"> and facility_name like concat('%', #{facilityName}, '%')</if>
|
||||
<if test="facilityType != null and facilityType != ''"> and facility_type = #{facilityType}</if>
|
||||
@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectFireFacilityById" parameterType="Long" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
where id = #{id}
|
||||
@@ -97,9 +97,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFireFacilityByIds" parameterType="String">
|
||||
delete from fire_facilities where id in
|
||||
delete from fire_facilities where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 根据位置ID和设施名称查询 -->
|
||||
<select id="selectByLocationAndName" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
where location_id = #{locationId} and facility_name = #{facilityName}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- * 查询根据id查询设施列表-->
|
||||
|
||||
<select id="getDetails" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
<where>id = #{id} </where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,88 @@
|
||||
<?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.ruoyi.fire.mapper.FireFacilityRepairMapper">
|
||||
|
||||
<resultMap type="FireFacilityRepair" id="FireFacilityRepairResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="facilityId" column="facility_id" />
|
||||
<result property="repairDate" column="repair_date" />
|
||||
<result property="repairContent" column="repair_content" />
|
||||
<result property="repairResult" column="repair_result" />
|
||||
<result property="replacePerson" column="replace_person" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="nextCheckDate" column="next_check_date" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFireFacilityRepairVo">
|
||||
select id, facility_id, repair_date, repair_content, repair_result, replace_person, remark, next_check_date, create_time from fire_facility_repair
|
||||
</sql>
|
||||
|
||||
<select id="selectFireFacilityRepairList" parameterType="FireFacilityRepair" resultMap="FireFacilityRepairResult">
|
||||
<include refid="selectFireFacilityRepairVo"/>
|
||||
<where>
|
||||
<if test="facilityId != null "> and facility_id = #{facilityId}</if>
|
||||
<if test="params.beginRepairDate != null and params.beginRepairDate != '' and params.endRepairDate != null and params.endRepairDate != ''"> and repair_date between #{params.beginRepairDate} and #{params.endRepairDate}</if>
|
||||
<if test="repairResult != null "> and repair_result = #{repairResult}</if>
|
||||
<if test="replacePerson != null and replacePerson != ''"> and replace_person = #{replacePerson}</if>
|
||||
<if test="params.beginNextCheckDate != null and params.beginNextCheckDate != '' and params.endNextCheckDate != null and params.endNextCheckDate != ''"> and next_check_date between #{params.beginNextCheckDate} and #{params.endNextCheckDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectFireFacilityRepairById" parameterType="Long" resultMap="FireFacilityRepairResult">
|
||||
<include refid="selectFireFacilityRepairVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertFireFacilityRepair" parameterType="FireFacilityRepair" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into fire_facility_repair
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="facilityId != null">facility_id,</if>
|
||||
<if test="repairDate != null">repair_date,</if>
|
||||
<if test="repairContent != null and repairContent != ''">repair_content,</if>
|
||||
<if test="repairResult != null">repair_result,</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">replace_person,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="nextCheckDate != null">next_check_date,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="facilityId != null">#{facilityId},</if>
|
||||
<if test="repairDate != null">#{repairDate},</if>
|
||||
<if test="repairContent != null and repairContent != ''">#{repairContent},</if>
|
||||
<if test="repairResult != null">#{repairResult},</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">#{replacePerson},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="nextCheckDate != null">#{nextCheckDate},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateFireFacilityRepair" parameterType="FireFacilityRepair">
|
||||
update fire_facility_repair
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="facilityId != null">facility_id = #{facilityId},</if>
|
||||
<if test="repairDate != null">repair_date = #{repairDate},</if>
|
||||
<if test="repairContent != null and repairContent != ''">repair_content = #{repairContent},</if>
|
||||
<if test="repairResult != null">repair_result = #{repairResult},</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">replace_person = #{replacePerson},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="nextCheckDate != null">next_check_date = #{nextCheckDate},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFireFacilityRepairById" parameterType="Long">
|
||||
delete from fire_facility_repair where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFireFacilityRepairByIds" parameterType="String">
|
||||
delete from fire_facility_repair where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,83 @@
|
||||
<?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.ruoyi.fire.mapper.FireFacilityReplacementMapper">
|
||||
|
||||
<resultMap type="FireFacilityReplacement" id="FireFacilityReplacementResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="oldFacilityId" column="old_facility_id" />
|
||||
<result property="newFacilityId" column="new_facility_id" />
|
||||
<result property="replaceDate" column="replace_date" />
|
||||
<result property="replaceReason" column="replace_reason" />
|
||||
<result property="replacePerson" column="replace_person" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFireFacilityReplacementVo">
|
||||
select id, old_facility_id, new_facility_id, replace_date, replace_reason, replace_person, remark, create_time from fire_facility_replacement
|
||||
</sql>
|
||||
|
||||
<select id="selectFireFacilityReplacementList" parameterType="FireFacilityReplacement" resultMap="FireFacilityReplacementResult">
|
||||
<include refid="selectFireFacilityReplacementVo"/>
|
||||
<where>
|
||||
<if test="oldFacilityId != null "> and old_facility_id = #{oldFacilityId}</if>
|
||||
<if test="newFacilityId != null "> and new_facility_id = #{newFacilityId}</if>
|
||||
<if test="params.beginReplaceDate != null and params.beginReplaceDate != '' and params.endReplaceDate != null and params.endReplaceDate != ''"> and replace_date between #{params.beginReplaceDate} and #{params.endReplaceDate}</if>
|
||||
<if test="replacePerson != null and replacePerson != ''"> and replace_person = #{replacePerson}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectFireFacilityReplacementById" parameterType="Long" resultMap="FireFacilityReplacementResult">
|
||||
<include refid="selectFireFacilityReplacementVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertFireFacilityReplacement" parameterType="FireFacilityReplacement" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into fire_facility_replacement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="oldFacilityId != null">old_facility_id,</if>
|
||||
<if test="newFacilityId != null">new_facility_id,</if>
|
||||
<if test="replaceDate != null">replace_date,</if>
|
||||
<if test="replaceReason != null and replaceReason != ''">replace_reason,</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">replace_person,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="oldFacilityId != null">#{oldFacilityId},</if>
|
||||
<if test="newFacilityId != null">#{newFacilityId},</if>
|
||||
<if test="replaceDate != null">#{replaceDate},</if>
|
||||
<if test="replaceReason != null and replaceReason != ''">#{replaceReason},</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">#{replacePerson},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateFireFacilityReplacement" parameterType="FireFacilityReplacement">
|
||||
update fire_facility_replacement
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="oldFacilityId != null">old_facility_id = #{oldFacilityId},</if>
|
||||
<if test="newFacilityId != null">new_facility_id = #{newFacilityId},</if>
|
||||
<if test="replaceDate != null">replace_date = #{replaceDate},</if>
|
||||
<if test="replaceReason != null and replaceReason != ''">replace_reason = #{replaceReason},</if>
|
||||
<if test="replacePerson != null and replacePerson != ''">replace_person = #{replacePerson},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFireFacilityReplacementById" parameterType="Long">
|
||||
delete from fire_facility_replacement where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFireFacilityReplacementByIds" parameterType="String">
|
||||
delete from fire_facility_replacement where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,39 @@
|
||||
<?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.ruoyi.fire.mapper.FireFacilityReportMapper">
|
||||
|
||||
<select id="selectFireFacilityReportList" resultType="com.ruoyi.fire.domain.FireFacilityReport">
|
||||
SELECT
|
||||
id,
|
||||
location_id AS locationId,
|
||||
facility_name AS facilityName,
|
||||
facility_type AS facilityType,
|
||||
model_number AS modelNumber,
|
||||
quantity,
|
||||
entry_date AS entryDate,
|
||||
production_date AS productionDate,
|
||||
expiry_date AS expiryDate,
|
||||
status,
|
||||
remark,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime
|
||||
FROM fire_facilities
|
||||
<where>
|
||||
<!-- 支持设施类型为null(不筛选) -->
|
||||
<if test="facilityType != null and facilityType != ''">
|
||||
AND facility_type = #{facilityType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="batchUpdateStatus">
|
||||
UPDATE fire_facilities
|
||||
SET status = #{newStatus},
|
||||
update_time = NOW()
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,10 @@
|
||||
com\ruoyi\fire\controller\FireFacilityController.class
|
||||
com\ruoyi\fire\mapper\FireFacilityMapper.class
|
||||
com\ruoyi\fire\domain\FireFacility.class
|
||||
com\ruoyi\fire\service\impl\FireFacilityRepairServiceImpl.class
|
||||
com\ruoyi\fire\service\IFireFacilityRepairService.class
|
||||
com\ruoyi\fire\service\impl\FireFacilityServiceImpl.class
|
||||
com\ruoyi\fire\domain\FireFacilityRepair.class
|
||||
com\ruoyi\fire\service\IFireFacilityService.class
|
||||
com\ruoyi\fire\controller\FireFacilityRepairController.class
|
||||
com\ruoyi\fire\mapper\FireFacilityRepairMapper.class
|
@@ -0,0 +1,10 @@
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\controller\FireFacilityController.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\mapper\FireFacilityRepairMapper.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\mapper\FireFacilityMapper.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\controller\FireFacilityRepairController.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\service\IFireFacilityService.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\service\IFireFacilityRepairService.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\service\impl\FireFacilityRepairServiceImpl.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\service\impl\FireFacilityServiceImpl.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\domain\FireFacility.java
|
||||
C:\DataFromJunhua\DevTools\DevCode\pasx\pasda\pasd_sys\pasd-fire\src\main\java\com\ruoyi\fire\domain\FireFacilityRepair.java
|
Reference in New Issue
Block a user