| | |
| | | <result property="assistants" column="assistants" jdbcType="VARCHAR"/> |
| | | <association property="userName" column="user_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager" /> |
| | | <association property="stationName" column="station_id" javaType="java.lang.Long" |
| | | <!-- <association property="stationName" column="station_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoPlt.PltStationMapper.selectNameByStationId" fetchType="eager" /> |
| | | <association property="planName" column="plan_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.selectNameByPlanId" fetchType="eager"/> |
| | | <association property="processName" column="process_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectProcessNameById" fetchType="eager"/> |
| | | <association property="nodeName" column="node_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.selectNameByNodeId" fetchType="eager"/>--> |
| | | |
| | | <association property="lineName" column="line_id" javaType="java.lang.Long" |
| | | select="com.dy.pmsGlobal.daoPlt.PltProductionLineMapper.selectNameByLineId" fetchType="eager" /> |
| | | <collection property="assistantsList" ofType="com.dy.pmsGlobal.pojoBa.BaUser" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectByAssistants" fetchType="eager" column="assistants" /> |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectByAssistants" fetchType="eager" |
| | | column="assistants"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SelectResultMap" type="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast"> |
| | |
| | | <result property="nodeName" column="node_name" jdbcType="VARCHAR"/> |
| | | <result property="lineName" column="line_name" jdbcType="VARCHAR"/> |
| | | <collection property="assistantsList" ofType="com.dy.pmsGlobal.pojoBa.BaUser" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectByAssistants" fetchType="eager" column="assistants" /> |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectByAssistants" fetchType="eager" |
| | | column="assistants"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,user_id,line_id, |
| | | id |
| | | ,user_id,line_id, |
| | | station_id,plan_id,process_id, |
| | | node_id,node_type,dt,status, |
| | | start_time,end_time,assistants |
| | | </sql> |
| | | <sql id="part_Column_List"> |
| | | ${alias}.id, |
| | | ${alias}.user_id, |
| | | ${alias}.line_id, |
| | | ${alias}.station_id, |
| | | ${alias}.plan_id, |
| | | ${alias}.process_id, |
| | | ${alias}.node_id, |
| | | ${alias}.node_type, |
| | | ${alias}.dt, |
| | | ${alias}.status, |
| | | ${alias}.start_time, |
| | | ${alias}.end_time, |
| | | ${alias}.assistants |
| | | ${alias} |
| | | . |
| | | id |
| | | , |
| | | ${alias} |
| | | . |
| | | user_id, |
| | | ${alias} |
| | | . |
| | | line_id, |
| | | ${alias} |
| | | . |
| | | station_id, |
| | | ${alias} |
| | | . |
| | | plan_id, |
| | | ${alias} |
| | | . |
| | | process_id, |
| | | ${alias} |
| | | . |
| | | node_id, |
| | | ${alias} |
| | | . |
| | | node_type, |
| | | ${alias} |
| | | . |
| | | dt, |
| | | ${alias} |
| | | . |
| | | status, |
| | | ${alias} |
| | | . |
| | | start_time, |
| | | ${alias} |
| | | . |
| | | end_time, |
| | | ${alias} |
| | | . |
| | | assistants |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | |
| | | select |
| | | <include refid="part_Column_List" > |
| | | <property name="alias" value="l"/> |
| | | </include>, |
| | | </include> |
| | | , |
| | | u.name as user_name, |
| | | s.name as station_name, |
| | | p.name as plan_name, |
| | |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_assembly_work_last |
| | | delete |
| | | from sta_assembly_work_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast" useGeneratedKeys="true"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast" |
| | | useGeneratedKeys="true"> |
| | | insert into sta_assembly_work_last |
| | | ( id,user_id,line_id |
| | | ,station_id,plan_id,process_id |
| | | ,node_id,node_type,dt,status |
| | | ,start_time,end_time,assistants |
| | | ) |
| | | , start_time, end_time, assistants) |
| | | values (#{id,jdbcType=BIGINT},#{userId,jdbcType=BIGINT},#{lineId,jdbcType=BIGINT} |
| | | ,#{stationId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{processId,jdbcType=BIGINT} |
| | | ,#{nodeId,jdbcType=BIGINT},#{nodeType,jdbcType=TINYINT},#{dt,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT} |
| | | ,#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{assistants,jdbcType=VARCHAR} |
| | | ) |
| | | , #{nodeId,jdbcType=BIGINT}, #{nodeType,jdbcType=TINYINT}, #{dt,jdbcType=TIMESTAMP} |
| | | , #{status,jdbcType=TINYINT} |
| | | , #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{assistants,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast" useGeneratedKeys="true"> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" |
| | | parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast" useGeneratedKeys="true"> |
| | | insert into sta_assembly_work_last |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast"> |
| | | update sta_assembly_work_last |
| | | set |
| | | user_id = #{userId,jdbcType=BIGINT}, |
| | | set user_id = #{userId,jdbcType=BIGINT}, |
| | | line_id = #{lineId,jdbcType=BIGINT}, |
| | | station_id = #{stationId,jdbcType=BIGINT}, |
| | | plan_id = #{planId,jdbcType=BIGINT}, |