SELECT spcd.id, spcd.project_id, sp.projectName, spcd.dept_id, sd.dept_name, spcd.check_type, sdd.dict_label AS check_type_name, spcd.material_name, spcd.use_position, spcd.sample_num, spcd.qualified_flag, spcd.represen_num, spcd.sample_user, spcd.sample_user_name, spcd.witness_user, spcd.witness_user_name, spcd.laboratory_name, spcd.check_time, spcd.check_state, spcd.detection_result, spcd.detection_file, spcd.create_by, spcd.create_time, spcd.is_del, spcd.update_by, spcd.update_time, spcd.remark, spcd.approve_status, u1.nick_name create_by_name ,u2.nick_name update_by_name,spcd.attachment,spcd.trust_deed,spcd.specimen_photo FROM sur_project_check_detection spcd LEFT JOIN sur_project sp ON spcd.project_id = sp.id LEFT JOIN sys_dept sd ON sd.dept_id = spcd.dept_id LEFT JOIN sys_dict_data sdd ON sdd.dict_type = 'check_detection_check_type' AND sdd.dict_value = spcd.check_type LEFT JOIN sys_user u1 ON spcd.create_by=u1.phonenumber LEFT JOIN sys_user u2 ON spcd.update_by=u2.phonenumber insert into sur_project_check_detection project_id, dept_id, check_type, material_name, use_position, sample_num, qualified_flag, represen_num, sample_user, sample_user_name, witness_user, witness_user_name, laboratory_name, check_time, check_state, detection_result, detection_file, is_del, create_by, create_time, update_by, update_time, remark, approve_status, attachment, trust_deed, specimen_photo, #{projectId}, #{deptId}, #{checkType}, #{materialName}, #{usePosition}, #{sampleNum}, #{qualifiedFlag}, #{represenNum}, #{sampleUser}, #{sampleUserName}, #{witnessUser}, #{witnessUserName}, #{laboratoryName}, #{checkTime}, #{checkState}, #{detectionResult}, #{detectionFile}, #{isDel}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{approveStatus}, #{attachment}, #{trustDeed}, #{specimenPhoto}, update sur_project_check_detection project_id = #{projectId}, dept_id = #{deptId}, check_type = #{checkType}, material_name = #{materialName}, use_position = #{usePosition}, sample_num = #{sampleNum}, qualified_flag = #{qualifiedFlag}, represen_num = #{represenNum}, sample_user = #{sampleUser}, sample_user_name = #{sampleUserName}, witness_user = #{witnessUser}, witness_user_name = #{witnessUserName}, laboratory_name = #{laboratoryName}, check_time = #{checkTime}, check_state = #{checkState}, detection_result = #{detectionResult}, detection_file = #{detectionFile}, is_del = #{isDel}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, approve_status = #{approveStatus}, attachment = #{attachment}, trust_deed = #{trustDeed}, specimen_photo = #{specimenPhoto}, where id = #{id} delete from sur_project_check_detection where id = #{id} delete from sur_project_check_detection where id in #{id}