1、巡检记录

2、水电双计灌溉记录和刷卡记录
3、水电双计充值记录和卡信息
This commit is contained in:
wuyw
2024-08-12 08:30:02 +08:00
parent d1c9afecd8
commit 7d08d3ca47
47 changed files with 4999 additions and 1 deletions

View File

@@ -0,0 +1,101 @@
<?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.fastbee.xunjian.mapper.XjInspectionNoteMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionNote" id="XjInspectionNoteResult">
<result property="id" column="id"/>
<result property="title" column="title"/>
<result property="content" column="content"/>
<result property="projectId" column="project_id"/>
<result property="engineeringObjectType" column="engineering_object_type"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
</resultMap>
<sql id="selectXjInspectionNoteVo">
select *
from xj_inspection_note
</sql>
<select id="selectXjInspectionNoteList" parameterType="com.fastbee.xunjian.domain.XjInspectionNote"
resultMap="XjInspectionNoteResult">
<include refid="selectXjInspectionNoteVo"/>
<where>
<if test="title != null and title != ''">and title = #{title}</if>
<if test="content != null and content != ''">and content = #{content}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="engineeringObjectType != null and engineeringObjectType != ''">and engineering_object_type =
#{engineeringObjectType}
</if>
<if test="params != null and params.ids!= null and params.ids!= ''">
AND id in
<foreach item="id" collection="params.ids.split(',')" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionNoteById" parameterType="Long" resultMap="XjInspectionNoteResult">
<include refid="selectXjInspectionNoteVo"/>
where id = #{id}
</select>
<insert id="insertXjInspectionNote" parameterType="com.fastbee.xunjian.domain.XjInspectionNote"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_note
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="projectId != null">project_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="engineeringObjectType != null">engineering_object_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="projectId != null">#{projectId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="engineeringObjectType != null">#{engineeringObjectType},</if>
</trim>
</insert>
<update id="updateXjInspectionNote" parameterType="com.fastbee.xunjian.domain.XjInspectionNote">
update xj_inspection_note
<trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="engineeringObjectType != null">engineering_object_type = #{engineeringObjectType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionNoteById" parameterType="Long">
delete
from xj_inspection_note
where id = #{id}
</delete>
<delete id="deleteXjInspectionNoteByIds" parameterType="String">
delete from xj_inspection_note where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,162 @@
<?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.fastbee.xunjian.mapper.XjInspectionRecordsMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionRecords" id="XjInspectionRecordsResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="inspectionTaskId" column="inspection_task_id" />
<result property="inspectionPlanId" column="inspection_plan_id" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="inspectionPersonnelId" column="inspection_personnel_id" />
<result property="inspectionRouteId" column="inspection_route_id" />
<result property="recordStatus" column="record_status" />
<result property="abnormalStatus" column="abnormal_status"/>
<result property="latAndLong" column="lat_and_long"/>
<result property="picture" column="picture"/>
<result property="remarks" column="remarks"/>
<result property="quyuma" column="quyuma"/>
<result property="projectId" column="project_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="groupId" column="group_id"/>
</resultMap>
<sql id="selectXjInspectionRecordsVo">
select *
from xj_inspection_records
</sql>
<select id="selectXjInspectionRecordsList"
parameterType="com.fastbee.xunjian.domain.XjInspectionRecords"
resultMap="XjInspectionRecordsResult">
<include refid="selectXjInspectionRecordsVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="inspectionTaskId != null ">and inspection_task_id = #{inspectionTaskId}</if>
<if test="inspectionPlanId != null ">and inspection_plan_id = #{inspectionPlanId}</if>
<if test="startTime != null ">and start_time = #{startTime}</if>
<if test="endTime != null ">and end_time = #{endTime}</if>
<if test="inspectionPersonnelId != null ">and inspection_personnel_id = #{inspectionPersonnelId}</if>
<if test="inspectionRouteId != null ">and inspection_route_id = #{inspectionRouteId}</if>
<if test="recordStatus != null and recordStatus != ''">and record_status = #{recordStatus}</if>
<if test="abnormalStatus != null and abnormalStatus != ''">and abnormal_status = #{abnormalStatus}</if>
<if test="latAndLong != null and latAndLong != ''">and lat_and_long = #{latAndLong}</if>
<if test="picture != null and picture != ''">and picture = #{picture}</if>
<if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
<if test="quyuma != null and quyuma != ''">and quyuma = #{quyuma}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="groupId != null ">and group_id = #{groupId}</if>
<if test="params != null and params.tasksIds != null and params.tasksIds.size>0">
and inspection_task_id in
<foreach collection="params.tasksIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(end_time ,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(end_time ,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionRecordsById" parameterType="Long" resultMap="XjInspectionRecordsResult">
<include refid="selectXjInspectionRecordsVo"/>
where id = #{id}
</select>
<insert id="insertXjInspectionRecords" parameterType="com.fastbee.xunjian.domain.XjInspectionRecords"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="inspectionTaskId != null">inspection_task_id,</if>
<if test="inspectionPlanId != null">inspection_plan_id,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="inspectionPersonnelId != null">inspection_personnel_id,</if>
<if test="inspectionRouteId != null">inspection_route_id,</if>
<if test="recordStatus != null">record_status,</if>
<if test="abnormalStatus != null">abnormal_status,</if>
<if test="latAndLong != null">lat_and_long,</if>
<if test="picture != null">picture,</if>
<if test="remarks != null">remarks,</if>
<if test="quyuma != null">quyuma,</if>
<if test="projectId != null">project_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="groupId != null">group_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="inspectionTaskId != null">#{inspectionTaskId},</if>
<if test="inspectionPlanId != null">#{inspectionPlanId},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="inspectionPersonnelId != null">#{inspectionPersonnelId},</if>
<if test="inspectionRouteId != null">#{inspectionRouteId},</if>
<if test="recordStatus != null">#{recordStatus},</if>
<if test="abnormalStatus != null">#{abnormalStatus},</if>
<if test="latAndLong != null">#{latAndLong},</if>
<if test="picture != null">#{picture},</if>
<if test="remarks != null">#{remarks},</if>
<if test="quyuma != null">#{quyuma},</if>
<if test="projectId != null">#{projectId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="groupId != null">#{groupId},</if>
</trim>
</insert>
<update id="updateXjInspectionRecords" parameterType="com.fastbee.xunjian.domain.XjInspectionRecords">
update xj_inspection_records
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="inspectionTaskId != null">inspection_task_id = #{inspectionTaskId},</if>
<if test="inspectionPlanId != null">inspection_plan_id = #{inspectionPlanId},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="inspectionPersonnelId != null">inspection_personnel_id = #{inspectionPersonnelId},</if>
<if test="inspectionRouteId != null">inspection_route_id = #{inspectionRouteId},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
<if test="abnormalStatus != null">abnormal_status = #{abnormalStatus},</if>
<if test="latAndLong != null">lat_and_long = #{latAndLong},</if>
<if test="picture != null">picture = #{picture},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="quyuma != null">quyuma = #{quyuma},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="groupId != null">group_id = #{groupId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionRecordsById" parameterType="Long">
delete from xj_inspection_records where id = #{id}
</delete>
<delete id="deleteXjInspectionRecordsByIds" parameterType="String">
delete from xj_inspection_records where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,154 @@
<?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.fastbee.xunjian.mapper.XjInspectionRoutesMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionRoutes" id="XjInspectionRoutesResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="dotLineType" column="dot_line_type"/>
<result property="engineeringObjectType" column="engineering_object_type"/>
<result property="engineeringObjectId" column="engineering_object_id"/>
<result property="projectId" column="project_id"/>
<result property="latAndLong" column="lat_and_long"/>
<result property="position" column="position"/>
<result property="range" column="range"/>
<result property="rangeArea" column="range_area"/>
<result property="qrCodeId" column="qr_code_id"/>
<result property="inspectionNoteIds" column="inspection_note_ids"/>
<result property="quyuma" column="quyuma"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="qrCodeSn" column="qr_code_sn"/>
</resultMap>
<sql id="selectXjInspectionRoutesVo">
select *
from xj_inspection_routes
</sql>
<select id="selectXjInspectionRoutesList"
parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes"
resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="dotLineType != null and dotLineType != ''">and dot_line_type = #{dotLineType}</if>
<if test="engineeringObjectType != null and engineeringObjectType != ''">and engineering_object_type =
#{engineeringObjectType}
</if>
<if test="engineeringObjectId != null ">and engineering_object_id = #{engineeringObjectId}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="latAndLong != null and latAndLong != ''">and lat_and_long = #{latAndLong}</if>
<if test="position != null and position != ''">and position = #{position}</if>
<if test="range != null and range != ''">and range = #{range}</if>
<if test="rangeArea != null and rangeArea != ''">and range_area = #{rangeArea}</if>
<if test="qrCodeId != null ">and qr_code_id = #{qrCodeId}</if>
<if test="quyuma != null and quyuma != ''">and quyuma = #{quyuma}</if>
<if test="qrCodeSn != null and qrCodeSn != ''">and qr_code_sn = #{qrCodeSn}</if>
<if test="params != null and params.ids!= null and params.ids!= ''">
AND id in
<foreach item="id" collection="params.ids.split(',')" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionRoutesById" parameterType="Long" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
where id = #{id}
</select>
<select id="selectXjInspectionRoutesByName"
resultType="string" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
where name = #{name} limit 1
</select>
<select id="selectXjInspectionRoutesByQrSn"
parameterType="string" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
WHERE kqc.code_sn = #{qrSn} limit 1
</select>
<insert id="insertXjInspectionRoutes" parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_routes
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="qrCodeSn != null">qr_code_sn,</if>
<if test="dotLineType != null">dot_line_type,</if>
<if test="engineeringObjectType != null">engineering_object_type,</if>
<if test="engineeringObjectId != null">engineering_object_id,</if>
<if test="projectId != null">project_id,</if>
<if test="latAndLong != null">lat_and_long,</if>
<if test="position != null">position,</if>
<if test="range != null">`range`,</if>
<if test="rangeArea != null">range_area,</if>
<if test="qrCodeId != null">qr_code_id,</if>
<if test="quyuma != null">quyuma,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="inspectionNoteIds != null">inspection_note_ids,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="qrCodeSn != null">#{qrCodeSn},</if>
<if test="dotLineType != null">#{dotLineType},</if>
<if test="engineeringObjectType != null">#{engineeringObjectType},</if>
<if test="engineeringObjectId != null">#{engineeringObjectId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="latAndLong != null">#{latAndLong},</if>
<if test="position != null">#{position},</if>
<if test="range != null">#{range},</if>
<if test="rangeArea != null">#{rangeArea},</if>
<if test="qrCodeId != null">#{qrCodeId},</if>
<if test="quyuma != null">#{quyuma},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="inspectionNoteIds != null">#{inspectionNoteIds},</if>
</trim>
</insert>
<update id="updateXjInspectionRoutes" parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes">
update xj_inspection_routes
<trim prefix="SET" suffixOverrides=",">
<if test="inspectionNoteIds != null">inspection_note_ids = #{inspectionNoteIds},</if>
<if test="name != null">name = #{name},</if>
<if test="dotLineType != null">dot_line_type = #{dotLineType},</if>
<if test="engineeringObjectType != null">engineering_object_type = #{engineeringObjectType},</if>
<if test="engineeringObjectId != null">engineering_object_id = #{engineeringObjectId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="latAndLong != null">lat_and_long = #{latAndLong},</if>
<if test="position != null">position = #{position},</if>
<if test="range != null">`range` = #{range},</if>
<if test="rangeArea != null">range_area = #{rangeArea},</if>
<if test="qrCodeId != null">qr_code_id = #{qrCodeId},</if>
<if test="quyuma != null">quyuma = #{quyuma},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="qrCodeSn != null">qr_code_sn = #{qrCodeSn},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionRoutesById" parameterType="Long">
delete
from xj_inspection_routes
where id = #{id}
</delete>
<delete id="deleteXjInspectionRoutesByIds" parameterType="String">
delete from xj_inspection_routes where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>