| | |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> |
| | | <result property="planName" column="plan_name" jdbcType="VARCHAR"/> |
| | | <result property="stationName" column="station_name" jdbcType="VARCHAR"/> |
| | | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> |
| | | <association property="assistantNames" jdbcType="VARCHAR" column="assistants" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNamesByAssistants" fetchType="eager" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | |
| | | out_time,updated_by,memo |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_device_production_log |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | | sta_device_last t |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_device_production_log |