审核逻辑修改前项目保存

This commit is contained in:
2025-07-10 08:40:36 +08:00
parent f3752c7cbc
commit fb5c21dbfe
70 changed files with 3710 additions and 974 deletions

View File

@@ -1,38 +1,57 @@
<?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.zg.project.information.mapper.DeviceInfoMapper">
<resultMap type="DeviceInfo" id="DeviceInfoResult">
<result property="deviceId" column="device_id" />
<result property="ipAddress" column="ip_address" />
<result property="port" column="port" />
<result property="warehouseId" column="warehouse_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDelete" column="is_delete" />
<result property="deviceId" column="device_id" />
<result property="ipAddress" column="ip_address" />
<result property="port" column="port" />
<result property="warehouseId" column="warehouse_id" />
<result property="sceneId" column="scene_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="sceneName" column="scene_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectDeviceInfoVo">
select device_id, ip_address, port, warehouse_id, create_by, create_time, update_by, update_time, is_delete from device_info
SELECT
d.device_id,
d.ip_address,
d.port,
d.warehouse_id,
d.scene_id,
w.warehouse_name AS warehouse_name,
s.scene_name AS scene_name,
d.create_by,
d.create_time,
d.update_by,
d.update_time,
d.is_delete
FROM device_info d
LEFT JOIN warehouse_info w ON d.warehouse_id = w.warehouse_code
LEFT JOIN scene_mapping s ON d.scene_id = s.scene_code
</sql>
<select id="selectDeviceInfoList" parameterType="DeviceInfo" resultMap="DeviceInfoResult">
<include refid="selectDeviceInfoVo"/>
<where>
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
<if test="port != null "> and port = #{port}</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
<where>
<if test="ipAddress != null and ipAddress != ''"> and d.ip_address = #{ipAddress}</if>
<if test="port != null "> and d.port = #{port}</if>
<if test="warehouseId != null "> and d.warehouse_id = #{warehouseId}</if>
<if test="sceneId != null "> and d.scene_id = #{sceneId}</if>
<if test="isDelete != null and isDelete != ''"> and d.is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectDeviceInfoByDeviceId" parameterType="Long" resultMap="DeviceInfoResult">
<include refid="selectDeviceInfoVo"/>
where device_id = #{deviceId}
WHERE d.device_id = #{deviceId}
</select>
<insert id="insertDeviceInfo" parameterType="DeviceInfo">
@@ -42,23 +61,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ipAddress != null">ip_address,</if>
<if test="port != null">port,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="sceneId != null">scene_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="ipAddress != null">#{ipAddress},</if>
<if test="port != null">#{port},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="sceneId != null">#{sceneId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</trim>
</insert>
<update id="updateDeviceInfo" parameterType="DeviceInfo">
@@ -67,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
<if test="port != null">port = #{port},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="sceneId != null">scene_id = #{sceneId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
@@ -81,9 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteDeviceInfoByDeviceIds" parameterType="String">
delete from device_info where device_id in
delete from device_info where device_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,27 +1,27 @@
<?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.zg.project.information.mapper.PcdeDetailMapper">
<resultMap type="PcdeDetail" id="PcdeDetailResult">
<result property="id" column="id" />
<result property="locationCode" column="location_code" />
<result property="scene" column="scene" />
<result property="sceneName" column="scene_name" />
<result property="warehouse" column="warehouse" />
<result property="encodedId" column="encoded_id" />
<result property="tag" column="tag" />
<result property="remark" column="remark"/>
<result property="isDelete" column="is_delete" />
<result property="createdBy" column="created_by" />
<result property="createdAt" column="created_at" />
<result property="updatedBy" column="updated_by" />
<result property="updatedAt" column="updated_at" />
<result property="id" column="id"/>
<result property="pcode" column="pcode"/>
<result property="scene" column="scene"/>
<result property="sceneName" column="scene_name"/>
<result property="warehouse" column="warehouse"/>
<result property="encodedId" column="encoded_id"/>
<result property="tag" column="tag"/>
<result property="remark" column="remark"/>
<result property="isDelete" column="is_delete"/>
<result property="createdBy" column="created_by"/>
<result property="createdAt" column="created_at"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedAt" column="updated_at"/>
</resultMap>
<sql id="selectPcdeDetailVo">
select d.id, d.location_code, d.scene, m.scene_name, d.warehouse,
select d.id, d.pcode, d.scene, m.scene_name, d.warehouse,
d.encoded_id, d.tag, d.remark, d.is_delete,
d.created_by, d.created_at, d.updated_by, d.updated_at
from pcde_detail d
@@ -31,16 +31,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPcdeDetailList" parameterType="PcdeDetail" resultMap="PcdeDetailResult">
<include refid="selectPcdeDetailVo"/>
<where>
<if test="locationCode != null and locationCode != ''"> and d.location_code = #{locationCode}</if>
<if test="scene != null and scene != ''"> and d.scene = #{scene}</if>
<if test="warehouse != null and warehouse != ''"> and d.warehouse = #{warehouse}</if>
<if test="encodedId != null and encodedId != ''"> and d.encoded_id = #{encodedId}</if>
<if test="tag != null and tag != ''"> and d.tag = #{tag}</if>
<if test="isDelete != null "> and d.is_delete = #{isDelete}</if>
<if test="createdBy != null and createdBy != ''"> and d.created_by = #{createdBy}</if>
<if test="createdAt != null "> and d.created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''"> and d.updated_by = #{updatedBy}</if>
<if test="updatedAt != null "> and d.updated_at = #{updatedAt}</if>
<if test="pcode != null and pcode != ''">and d.pcode = #{pcode}</if>
<if test="scene != null and scene != ''">and d.scene = #{scene}</if>
<if test="warehouse != null and warehouse != ''">and d.warehouse = #{warehouse}</if>
<if test="encodedId != null and encodedId != ''">and d.encoded_id = #{encodedId}</if>
<if test="tag != null and tag != ''">and d.tag = #{tag}</if>
<if test="isDelete != null">and d.is_delete = #{isDelete}</if>
<if test="createdBy != null and createdBy != ''">and d.created_by = #{createdBy}</if>
<if test="createdAt != null">and d.created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''">and d.updated_by = #{updatedBy}</if>
<if test="updatedAt != null">and d.updated_at = #{updatedAt}</if>
</where>
</select>
@@ -49,18 +49,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where d.id = #{id}
</select>
<select id="selectByLocationCode" resultType="com.zg.project.information.domain.PcdeDetail"
<select id="selectByPcode" resultType="com.zg.project.information.domain.PcdeDetail"
parameterType="java.lang.String">
select id, location_code, scene, warehouse, encoded_id, tag, is_delete,
select id, pcode, scene, warehouse, encoded_id, tag, is_delete,
created_by, created_at, updated_by, updated_at, remark
from pcde_detail
where location_code = #{locationCode}
where pcode = #{pcode}
</select>
<insert id="insertPcdeDetail" parameterType="PcdeDetail" useGeneratedKeys="true" keyProperty="id">
insert into pcde_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">location_code,</if>
<if test="pcode != null and pcode != ''">pcode,</if>
<if test="scene != null and scene != ''">scene,</if>
<if test="warehouse != null and warehouse != ''">warehouse,</if>
<if test="encodedId != null">encoded_id,</if>
@@ -71,9 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null">created_at,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
<if test="pcode != null and pcode != ''">#{pcode},</if>
<if test="scene != null and scene != ''">#{scene},</if>
<if test="warehouse != null and warehouse != ''">#{warehouse},</if>
<if test="encodedId != null">#{encodedId},</if>
@@ -84,13 +84,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</trim>
</insert>
<update id="updatePcdeDetail" parameterType="PcdeDetail">
update pcde_detail
<trim prefix="SET" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
<if test="pcode != null and pcode != ''">pcode = #{pcode},</if>
<if test="scene != null and scene != ''">scene = #{scene},</if>
<if test="warehouse != null and warehouse != ''">warehouse = #{warehouse},</if>
<if test="encodedId != null">encoded_id = #{encodedId},</if>
@@ -110,9 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deletePcdeDetailByIds" parameterType="String">
delete from pcde_detail where id in
delete from pcde_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>