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