|
|
|
@ -42,6 +42,7 @@
|
|
|
|
|
FROM sys_user su
|
|
|
|
|
LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id and sd.del_flag = '0'
|
|
|
|
|
WHERE su.del_flag = '0'
|
|
|
|
|
<if test="userCode != null and userCode != ''">and su.user_name like concat('%', #{userCode}, '%')</if>
|
|
|
|
|
<if test="userName != null and userName != ''">and su.nick_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
<if test="deptId != null">and sd.dept_id = #{deptId}</if>
|
|
|
|
|
<if test="phonenumber != null and phonenumber != ''">and su.phonenumber like concat('%', #{phonenumber}, '%')</if>
|
|
|
|
@ -57,6 +58,7 @@
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
-->
|
|
|
|
|
</select>
|
|
|
|
@ -69,7 +71,7 @@
|
|
|
|
|
phonenumber,
|
|
|
|
|
create_time
|
|
|
|
|
FROM sys_user
|
|
|
|
|
WHERE user_name = #{userCode}
|
|
|
|
|
WHERE del_flag = '0' and user_name = #{userCode}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcUserMaterialById" parameterType="String" resultMap="QcUserMaterialResult">
|
|
|
|
@ -102,8 +104,8 @@
|
|
|
|
|
select distinct um.material_code materialCode,
|
|
|
|
|
concat(bp.equipment_name,'(',bp.equipment_code,')') label
|
|
|
|
|
from qc_user_material um
|
|
|
|
|
left join base_equipment bp on um.material_code = bp.equipment_code
|
|
|
|
|
where bp.equipment_type_code = 'equ_type_bzx' and um.user_code in
|
|
|
|
|
left join base_equipment bp on um.material_code = bp.equipment_code and bp.del_flag = '0'
|
|
|
|
|
where um.del_flag = '0' and bp.equipment_type_code = 'equ_type_bzx' and um.user_code in
|
|
|
|
|
<foreach collection="userCodes" item="userCode" open="(" close=")" separator=",">
|
|
|
|
|
#{userCode}
|
|
|
|
|
</foreach>
|
|
|
|
@ -114,7 +116,7 @@
|
|
|
|
|
<select id="getSelectedUsers" resultMap="QcUserMaterialResult">
|
|
|
|
|
select qum.user_code, qum.user_name
|
|
|
|
|
from qc_user_material qum
|
|
|
|
|
where qum.material_code = #{materialCode}
|
|
|
|
|
where qum.del_flag = '0' and qum.material_code = #{materialCode}
|
|
|
|
|
</select>
|
|
|
|
|
<insert id="insertQcUserMaterial" parameterType="QcUserMaterial">
|
|
|
|
|
insert into qc_user_material
|
|
|
|
@ -176,11 +178,11 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteQcUserMaterialByUserCode" parameterType="String">
|
|
|
|
|
delete from qc_user_material where user_code = #{userCode}
|
|
|
|
|
update qc_user_material set del_flag = '1' where user_code = #{userCode}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteQcUserMaterialByUserCodes" parameterType="String">
|
|
|
|
|
delete from qc_user_material where user_code in
|
|
|
|
|
update qc_user_material set del_flag = '1' where user_code in
|
|
|
|
|
<foreach item="userCode" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{userCode}
|
|
|
|
|
</foreach>
|
|
|
|
|