From f26131172d91045a502cb5f42c9da4dac6ffaf65 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期五, 21 六月 2024 16:26:01 +0800 Subject: [PATCH] check user and station --- pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml index c307fd9..03bcba8 100644 --- a/pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml +++ b/pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml @@ -17,6 +17,10 @@ <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/> <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" + select="com.dy.pmsGlobal.daoPlt.PltStationMapper.selectNameByStationId" fetchType="eager" /> </resultMap> <sql id="Base_Column_List"> @@ -33,6 +37,69 @@ where id = #{id,jdbcType=BIGINT} </select> + <select id="selectByUserAndStation" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List" /> + from plt_station where status ==1 + <trim prefix="and" suffixOverrides="and"> + <if test="id != null and id !=''"> + id = #{id,jdbcType=BIGINT} and + </if> + <if test="code != null and code !=''"> + code = #{code,jdbcType=VARCHAR} and + </if> + <if test="name != null and name !=''"> + name like concat('%', #{name}, '%') and + </if> + <if test="disabled != null and disabled !=''"> + disabled = #{disabled,jdbcType=TINYINT} and + </if> + <if test="lineId != null and lineId !=''"> + line_id = #{lineId,jdbcType=BIGINT} and + </if> + </trim> + order by id desc + </select> + + <select id="selectList" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List" /> + from sta_assembly_work_last + <where> + <if test="userId != null and userId !=''"> + and user_id = #{userId,jdbcType=BIGINT} + </if> + <if test="lineId != null and lineId !=''"> + and line_id = #{lineId,jdbcType=BIGINT} + </if> + <if test="stationId != null and stationId !=''"> + and station_id = #{stationId,jdbcType=BIGINT} + </if> + <if test="planId != null and planId !=''"> + and plan_id = #{planId,jdbcType=BIGINT} + </if> + <if test="processId != null and processId !=''"> + and process_id = #{processId,jdbcType=BIGINT} + </if> + <if test="nodeId != null and nodeId !=''"> + and node_id = #{nodeId,jdbcType=BIGINT} + </if> + <if test="status != null and status !=''"> + and status = #{status,jdbcType=TINYINT} + </if> + <if test="startTime != null and startTime !=''"> + and start_time = #{startTime,jdbcType=TIMESTAMP}, + </if> + <if test="endTime != null and userId !=''"> + and end_time = #{endTime,jdbcType=TIMESTAMP}, + </if> + <if test="assistants != null and assistants !=''"> + and assistants = #{assistants,jdbcType=VARCHAR} + </if> + </where> + order by id desc + </select> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from sta_assembly_work_last where id = #{id,jdbcType=BIGINT} -- Gitblit v1.8.0