select
sc.id as id,sc.process_id as processId,sc.sign_type as signType,sc.people_id as peopleId,
su.nick_name as peopleName,sdd.dict_label as processName,sdd2.dict_label as signTypeName
from sign_config sc
left join sys_dict_data sdd on sc.process_id = sdd.dict_value and sdd.dict_type = 'countersign_process_name' and sdd.status = 0
left join sys_dict_data sdd2 on sc.sign_type = sdd2.dict_value and sdd2.dict_type = 'countersign_type_name' and sdd2.status = 0
left join sys_user su on sc.people_id = su.user_id and su.del_flag = 0
sc.del_flag = 0
and (sdd.dict_label like concat('%', #{keyWord}, '%') or sdd2.dict_label like concat('%', #{keyWord}, '%')
or su.user_name like concat('%', #{keyWord}, '%'))
select
count(id)
from sign_config sc
sc.del_flag = 0
and sc.process_id = #{processId}
and sc.sign_type = #{signType}
insert into sign_config(
process_id,
sign_type,
people_id,
del_flag
)values(
#{processId},
#{signType},
#{peopleId},
0
)
select
sc.id as id,sc.process_id as processId,sc.sign_type as signType,sc.people_id as peopleId
from sign_config sc
where sc.id = #{id} and sc.del_flag = 0
select
count(id)
from sign_config sc
sc.del_flag = 0
and sc.id != #{id}
and sc.process_id = #{processId}
and sc.sign_type = #{signType}
update sign_config
process_id = #{processId},
sign_type = #{signType},
people_id = #{peopleId}
where id = #{id} and del_flag = 0
update sign_config
set del_flag = 1
where id = #{id} and del_flag = 0