<?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.zy.acs.manager.manager.mapper.AgvDetailMapper">
|
|
<!-- 关联查询sql -->
|
<sql id="selectSql">
|
SELECT a.*
|
FROM man_agv_detail a
|
<where>
|
AND a.deleted = 0
|
<if test="param.id != null">
|
AND a.id = #{param.id}
|
</if>
|
<if test="param.agvId != null">
|
AND a.agv_id = #{param.agvId}
|
</if>
|
<if test="param.status != null">
|
AND a.status = #{param.status}
|
</if>
|
<if test="param.keywords != null">
|
AND (
|
a.memo LIKE CONCAT('%', #{param.keywords}, '%')
|
OR a.memo LIKE CONCAT('%', #{param.keywords}, '%')
|
)
|
</if>
|
</where>
|
</sql>
|
|
<select id="selectMajorByAgvId" resultType="com.zy.acs.manager.manager.entity.AgvDetail">
|
SELECT id, agv_id, pos, code, last_code, agv_angle, vol, backpack, status, deleted
|
FROM man_agv_detail
|
WHERE agv_id = #{agvId}
|
LIMIT 1
|
</select>
|
|
<update id="updatePosCode">
|
update man_agv_detail
|
set code = #{codeId},
|
last_code = null,
|
pos = 1
|
where 1=1
|
and id = #{id}
|
</update>
|
|
<update id="updateUnPosCode">
|
update man_agv_detail
|
set last_code = #{lastCode},
|
code = null,
|
pos = 0
|
where 1=1
|
and id = #{id}
|
</update>
|
|
<update id="updatePosCodeByAgvId">
|
update man_agv_detail
|
set code = #{codeId},
|
pos = 1
|
where 1=1
|
and agv_id = #{agvId}
|
</update>
|
|
<update id="updateAngleByAgvId">
|
update man_agv_detail
|
set agv_angle = #{angle}
|
where 1=1
|
and agv_id = #{agvId}
|
</update>
|
|
</mapper>
|