|
|
|
@ -10,6 +10,7 @@
|
|
|
|
|
<result property="teamName" column="team_name"/>
|
|
|
|
|
<result property="teamHead" column="team_head"/>
|
|
|
|
|
<result property="stationCode" column="station_code"/>
|
|
|
|
|
<result property="stationName" column="station_name"/>
|
|
|
|
|
<result property="classes" column="classes"/>
|
|
|
|
|
<result property="startTime" column="start_time"/>
|
|
|
|
|
<result property="endTime" column="end_time"/>
|
|
|
|
@ -20,46 +21,51 @@
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="machineCode" column="machine_code"/>
|
|
|
|
|
<result property="machineName" column="machine_name"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseTeamMembersVo">
|
|
|
|
|
select obj_id,
|
|
|
|
|
team_code,
|
|
|
|
|
team_name,
|
|
|
|
|
team_head,
|
|
|
|
|
station_code,
|
|
|
|
|
classes,
|
|
|
|
|
start_time,
|
|
|
|
|
end_time,
|
|
|
|
|
dine_time,
|
|
|
|
|
is_flag,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time,
|
|
|
|
|
machine_code
|
|
|
|
|
from base_team_members
|
|
|
|
|
select btm.obj_id,
|
|
|
|
|
btm.team_code,
|
|
|
|
|
btm.team_name,
|
|
|
|
|
btm.team_head,
|
|
|
|
|
btm.station_code,
|
|
|
|
|
bpl.product_line_name station_name,
|
|
|
|
|
btm.classes,
|
|
|
|
|
btm.start_time,
|
|
|
|
|
btm.end_time,
|
|
|
|
|
btm.dine_time,
|
|
|
|
|
btm.is_flag,
|
|
|
|
|
btm.create_by,
|
|
|
|
|
btm.create_time,
|
|
|
|
|
btm.update_by,
|
|
|
|
|
btm.update_time,
|
|
|
|
|
btm.machine_code,
|
|
|
|
|
bdl.device_name machine_name
|
|
|
|
|
from base_team_members btm
|
|
|
|
|
left join base_product_line bpl on bpl.product_line_code = btm.station_code
|
|
|
|
|
left join base_device_ledger bdl on bdl.device_code = btm.machine_code
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult">
|
|
|
|
|
<include refid="selectBaseTeamMembersVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
|
|
|
|
|
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if>
|
|
|
|
|
<if test="teamHead != null and teamHead != ''">and team_head = #{teamHead}</if>
|
|
|
|
|
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
|
|
|
|
|
<if test="classes != null and classes != ''">and classes = #{classes}</if>
|
|
|
|
|
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if>
|
|
|
|
|
<if test="endTime != null and endTime != ''">and end_time = #{endTime}</if>
|
|
|
|
|
<if test="dineTime != null and dineTime != ''">and dine_time = #{dineTime}</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="machineCode != null and machineCode != ''">and machine_code = #{machineCode}</if>
|
|
|
|
|
<if test="teamCode != null and teamCode != ''">and btm.team_code = #{teamCode}</if>
|
|
|
|
|
<if test="teamName != null and teamName != ''">and btm.team_name like concat('%', #{teamName}, '%')</if>
|
|
|
|
|
<if test="teamHead != null and teamHead != ''">and btm.team_head = #{teamHead}</if>
|
|
|
|
|
<if test="stationCode != null and stationCode != ''">and btm.station_code = #{stationCode}</if>
|
|
|
|
|
<if test="classes != null and classes != ''">and btm.classes = #{classes}</if>
|
|
|
|
|
<if test="startTime != null and startTime != ''">and btm.start_time = #{startTime}</if>
|
|
|
|
|
<if test="endTime != null and endTime != ''">and btm.end_time = #{endTime}</if>
|
|
|
|
|
<if test="dineTime != null and dineTime != ''">and btm.dine_time = #{dineTime}</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">and btm.is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="machineCode != null and machineCode != ''">and btm.machine_code = #{machineCode}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult">
|
|
|
|
|
<include refid="selectBaseTeamMembersVo"/>
|
|
|
|
|
where obj_id = #{objId}
|
|
|
|
|
where btm.obj_id = #{objId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers" useGeneratedKeys="true" keyProperty="objId">
|
|
|
|
|