13693261870
2025-07-02 6708810c4de34dfb9513061432d656f91d56ee3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?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.buss.mapper.DmWarshipMapper">
    
    <resultMap type="DmWarship" id="DmWarshipResult">
        <id property="shipNo"    column="SHIP_NO"    />
        <result property="shipType"    column="SHIP_TYPE"    />
        <result property="TONNAGE"    column="TONNAGE"    />
        <result property="DRAFT"    column="DRAFT"    />
        <result property="LEADER"    column="LEADER"    />
        <result property="STAFF"    column="STAFF"    />
        <result property="grpName"    column="GRP_NAME"    />
        <result property="LEVEL"    column="LEVEL"    />
        <result property="LAT"    column="LAT"    />
        <result property="LON"    column="LON"    />
        <result property="delFlag"    column="DEL_FLAG"    />
        <result property="createBy"    column="CREATE_BY"    />
        <result property="createTime"    column="CREATE_TIME"    />
        <result property="updateBy"    column="UPDATE_BY"    />
        <result property="updateTime"    column="UPDATE_TIME"    />
    </resultMap>
 
    <sql id="selectDmWarshipVo">
        select SHIP_NO, SHIP_TYPE, TONNAGE, DRAFT, LEADER, STAFF, GRP_NAME, LEVEL, LAT, LON, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME from dm_warship
    </sql>
 
    <select id="selectDmWarshipList" parameterType="DmWarship" resultMap="DmWarshipResult">
        <include refid="selectDmWarshipVo"/>
        <where>  
            <if test="shipNo != null  and shipNo != ''"> and SHIP_NO = #{shipNo}</if>
            <if test="shipType != null  and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
            <if test="TONNAGE != null "> and TONNAGE = #{TONNAGE}</if>
            <if test="DRAFT != null "> and DRAFT = #{DRAFT}</if>
            <if test="LEADER != null  and LEADER != ''"> and LEADER = #{LEADER}</if>
            <if test="STAFF != null "> and STAFF = #{STAFF}</if>
            <if test="grpName != null  and grpName != ''"> and GRP_NAME like concat('%', #{grpName}, '%')</if>
            <if test="LEVEL != null "> and LEVEL = #{LEVEL}</if>
            <if test="LAT != null "> and LAT = #{LAT}</if>
            <if test="LON != null "> and LON = #{LON}</if>
            <if test="delFlag != null  and delFlag != ''"> and DEL_FLAG = #{delFlag}</if>
            <if test="createBy != null  and createBy != ''"> and CREATE_BY = #{createBy}</if>
            <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
            <if test="updateBy != null  and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
            <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
        </where>
    </select>
    
    <select id="selectDmWarshipByShipNo" parameterType="String" resultMap="DmWarshipResult">
        <include refid="selectDmWarshipVo"/>
        where SHIP_NO = #{shipNo}
    </select>
 
    <insert id="insertDmWarship" parameterType="DmWarship">
        insert into dm_warship
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="shipNo != null and shipNo != ''">SHIP_NO,</if>
            <if test="shipType != null">SHIP_TYPE,</if>
            <if test="TONNAGE != null">TONNAGE,</if>
            <if test="DRAFT != null">DRAFT,</if>
            <if test="LEADER != null">LEADER,</if>
            <if test="STAFF != null">STAFF,</if>
            <if test="grpName != null">GRP_NAME,</if>
            <if test="LEVEL != null">LEVEL,</if>
            <if test="LAT != null">LAT,</if>
            <if test="LON != null">LON,</if>
            <if test="delFlag != null">DEL_FLAG,</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>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="shipNo != null and shipNo != ''">#{shipNo},</if>
            <if test="shipType != null">#{shipType},</if>
            <if test="TONNAGE != null">#{TONNAGE},</if>
            <if test="DRAFT != null">#{DRAFT},</if>
            <if test="LEADER != null">#{LEADER},</if>
            <if test="STAFF != null">#{STAFF},</if>
            <if test="grpName != null">#{grpName},</if>
            <if test="LEVEL != null">#{LEVEL},</if>
            <if test="LAT != null">#{LAT},</if>
            <if test="LON != null">#{LON},</if>
            <if test="delFlag != null">#{delFlag},</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>
         </trim>
    </insert>
 
    <update id="updateDmWarship" parameterType="DmWarship">
        update dm_warship
        <trim prefix="SET" suffixOverrides=",">
            <if test="shipType != null">SHIP_TYPE = #{shipType},</if>
            <if test="TONNAGE != null">TONNAGE = #{TONNAGE},</if>
            <if test="DRAFT != null">DRAFT = #{DRAFT},</if>
            <if test="LEADER != null">LEADER = #{LEADER},</if>
            <if test="STAFF != null">STAFF = #{STAFF},</if>
            <if test="grpName != null">GRP_NAME = #{grpName},</if>
            <if test="LEVEL != null">LEVEL = #{LEVEL},</if>
            <if test="LAT != null">LAT = #{LAT},</if>
            <if test="LON != null">LON = #{LON},</if>
            <if test="delFlag != null">DEL_FLAG = #{delFlag},</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>
            <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
        </trim>
        where SHIP_NO = #{shipNo}
    </update>
 
    <delete id="deleteDmWarshipByShipNo" parameterType="String">
        delete from dm_warship where SHIP_NO = #{shipNo}
    </delete>
 
    <delete id="deleteDmWarshipByShipNos" parameterType="String">
        delete from dm_warship where SHIP_NO in 
        <foreach item="shipNo" collection="array" open="(" separator="," close=")">
            #{shipNo}
        </foreach>
    </delete>
 
</mapper>