select pma.id, pma.user_id, pma.project_id, pma.cfg_id, pma.in_out, pma.longitude, pma.latitude, pma.att_date, pma.att_img, pma.is_del,
pma.remark, pma.state, pma.create_by, pma.create_time, pma.update_by, pma.update_time,
dic1.dict_label as craft_type_name,dic2.dict_label as craft_post_name,pma.att_device,
psu.user_name, psu.user_phone,psu.sub_dept_name,psu.sub_dept_group_name,psu.user_post,psu.user_sex
from pro_mobile_attendance_data pma
left join pro_project_info_subdepts_users psu on pma.user_id=psu.user_id
left join sys_dict_data dic1 on psu.`craft_type`=dic1.`dict_value` and dic1.`dict_type`='pro_craft_type'
left join sys_dict_data dic2 on psu.`craft_post`=dic2.`dict_value` and dic2.`dict_type`='pro_craft_post'
insert into pro_mobile_attendance_data
user_id,
project_id,
cfg_id,
in_out,
longitude,
latitude,
att_date,
att_img,
att_device,
is_del,
remark,
state,
create_by,
create_time,
update_by,
update_time,
#{userId},
#{projectId},
#{cfgId},
#{inOut},
#{longitude},
#{latitude},
#{attDate},
#{attImg},
#{attDevice},
#{isDel},
#{remark},
#{state},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
update pro_mobile_attendance_data
user_id = #{userId},
project_id = #{projectId},
cfg_id = #{cfgId},
in_out = #{inOut},
longitude = #{longitude},
latitude = #{latitude},
att_date = #{attDate},
att_img = #{attImg},
att_device = #{attDevice},
is_del = #{isDel},
remark = #{remark},
state = #{state},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where id = #{id}
delete from pro_mobile_attendance_data where id = #{id}
delete from pro_mobile_attendance_data where id in
#{id}