Fancy
2024-10-18 3f4c3b0257ae514e2f07f554c33eb95b1ce01b05
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
126
127
128
129
<?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.dy.pmsGlobal.daoPr.PrScheduleRelMapper">
  <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    <!--@Table pr_schedule_rel-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="schedule_id" jdbcType="BIGINT" property="scheduleId" />
    <result column="plan_id" jdbcType="BIGINT" property="planId" />
    <result column="node_id" jdbcType="BIGINT" property="nodeId" />
    <result column="station_id" jdbcType="BIGINT" property="stationId" />
    <result column="work_details" jdbcType="VARCHAR" property="workDetails" />
    <association property="nodeName" column="node_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.selectNameByNodeId" fetchType="eager"/>
    <association property="planName" column="plan_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.selectNameByPlanId" fetchType="eager"/>
    <association property="stationName" column="station_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPlt.PltStationMapper.selectNameByStationId" fetchType="eager"/>
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, schedule_id, plan_id, node_id, station_id, work_details
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from pr_schedule_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from pr_schedule_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    insert into pr_schedule_rel (id, schedule_id, plan_id, 
      node_id, station_id, work_details
      )
    values (#{id,jdbcType=BIGINT}, #{scheduleId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT}, 
      #{nodeId,jdbcType=BIGINT}, #{stationId,jdbcType=BIGINT}, #{workDetails,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    insert into pr_schedule_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="scheduleId!= null and scheduleId !=''">
        schedule_id,
      </if>
      <if test="planId != null">
        plan_id,
      </if>
      <if test="nodeId!= null">
        node_id,
      </if>
      <if test="stationId != null">
        station_id,
      </if>
      <if test="workDetails!= null and workDetails !=''">
        work_details,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="scheduleId!= null and scheduleId !=''">
        #{scheduleId,jdbcType=BIGINT},
      </if>
      <if test="planId != null">
        #{planId,jdbcType=BIGINT},
      </if>
      <if test="nodeId!= null">
        #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="stationId != null">
        #{stationId,jdbcType=BIGINT},
      </if>
      <if test="workDetails!= null and workDetails !=''">
        #{workDetails,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    update pr_schedule_rel
    <set>
      <if test="scheduleId!= null and scheduleId !=''">
        schedule_id = #{scheduleId,jdbcType=BIGINT},
      </if>
      <if test="planId != null">
        plan_id = #{planId,jdbcType=BIGINT},
      </if>
      <if test="nodeId!= null">
        node_id = #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="stationId != null">
        station_id = #{stationId,jdbcType=BIGINT},
      </if>
      <if test="workDetails!= null and workDetails !=''">
        work_details = #{workDetails,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    update pr_schedule_rel
    set schedule_id = #{scheduleId,jdbcType=BIGINT},
      plan_id = #{planId,jdbcType=BIGINT},
      node_id = #{nodeId,jdbcType=BIGINT},
      station_id = #{stationId,jdbcType=BIGINT},
      work_details = #{workDetails,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
 
  <delete id="deleteByScheduleId">
    delete  from pr_schedule_rel where schedule_id=#{scheduleId}
  </delete>
 
  <select id="selectByScheduleId" resultMap="BaseResultMap">
    select * from pr_schedule_rel where schedule_id=#{scheduleId}
  </select>
</mapper>