a.id AS "id", a.dog_id AS "dogId", a.dog_owner_code AS "dogOwnerCode", a.dog_owner_name AS "dogOwnerName", a.payment_member_code AS "paymentMemberCode", a.identify_type AS "identifyType", a.identify_site AS "identifySite", a.identify_date AS "identifyDate", a.main_show_id AS "mainShowId", a.main_show_info AS "mainShowInfo", a.show_appraisal_code AS "showAppraisalCode", a.show_appraisal_order_running_number AS "showAppraisalOrderRunningNumber", a.identifier AS "identifier", a.dog_breed AS "dogBreed", a.dog_name AS "dogName", a.dog_gender AS "dogGender", a.dog_fur_color AS "dogFurColor", a.birthday AS "birthday", a.operator AS "operator", a.price AS "price", a.dog_chip AS "dogChip", a.dog_dna_image AS "dogDnaImage", a.dna_print_flag AS "dnaPrintFlag", a.pedigree_certified AS "pedigreeCertified", a.hospital_id AS "hospitalId", a.identify_code AS "identifyCode", a.review_state AS "reviewState", a.review_time AS "reviewTime", a.review_remarks AS "reviewRemarks", a.running_number AS "runningNumber", a.payment_state AS "paymentState", a.payment_time AS "paymentTime", a.process_time AS "processTime", a.process_state AS "processState", a.send_date AS "sendDate", a.sticker_flag AS "stickerFlag", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", a.remarks AS "remarks", a.del_flag AS "delFlag", a.chongai_certificate_code AS "chongaiCertificateCode", a.chip_inject AS "chipInject", b.breed_cn_name AS "breedCnName", c.dog_color_mark_cn AS "dogColorMarkCn", b.breed_en_name AS "breedEnName", e.print_state AS "printState", e.dog_owner AS "dog.dogOwner", e.member_code AS "dog.memberCode", e.name_en AS "dog.nameEn", e.identification_flag AS "dog.identificationFlag", a.video_appraisal_id AS "videoAppraisalId", a.dog_nose AS "dogNose" LEFT JOIN dog_type b ON a.dog_breed = b.dog_breed_code LEFT JOIN dog_color_mark c ON a.dog_fur_color = c.dog_color_mark_code LEFT JOIN sys_member d ON a.payment_member_code = d.member_code LEFT OUTER JOIN dog e ON a.dog_id = e.id a.del_flag = #{DEL_FLAG_NORMAL} AND a.id in (${id}) AND (a.dog_owner_name LIKE concat('%',#{dogOwnerName},'%') OR a.dog_owner_code = #{dogOwnerName}) AND a.dog_name LIKE concat(#{dogName},'%') AND a.dog_breed ${sqlMap.dogBreedMap} AND a.identify_type = #{identifyType} AND a.show_appraisal_code = #{showAppraisalCode} AND a.dog_chip = #{dogChip} AND a.identify_site = #{identifySite} AND a.pedigree_certified LIKE concat('%',#{pedigreeCertified},'%') AND a.review_state = #{reviewState} AND a.payment_state = #{paymentState} AND a.process_state = #{processState} AND date_format(a.create_date, '%Y-%m-%d') = ]]> date_format(#{beginCreateDate}, '%Y-%m-%d') AND date_format(a.create_date, '%Y-%m-%d') date_format(#{endCreateDate}, '%Y-%m-%d') AND a.running_number = #{runningNumber} AND a.payment_member_code = #{paymentMemberCode} AND a.chongai_certificate_code = #{chongaiCertificateCode} AND a.chip_inject = #{chipInject} AND a.dog_id = #{dogId} INSERT INTO dog_appraisal( id, dog_id, dog_owner_code, dog_owner_name, payment_member_code, identify_type, identify_site, identify_date, identifier, main_show_id, main_show_info, show_appraisal_code, dog_breed, dog_name, dog_gender, dog_fur_color, birthday, operator, price, dog_chip, dog_dna_image, pedigree_certified, hospital_id, identify_code, review_state, review_time, review_remarks, running_number, payment_state, payment_time, process_time, process_state, create_by, create_date, update_by, update_date, remarks, del_flag, chip_inject ,chongai_certificate_code ,sticker_flag ,video_appraisal_id ,dog_nose ) VALUES ( #{id}, #{dogId}, #{dogOwnerCode}, #{dogOwnerName}, #{paymentMemberCode}, #{identifyType}, #{identifySite}, #{identifyDate}, #{identifier}, #{mainShowId}, #{mainShowInfo}, #{showAppraisalCode}, #{dogBreed}, #{dogName}, #{dogGender}, #{dogFurColor}, #{birthday}, #{operator}, #{price}, #{dogChip}, #{dogDnaImage}, #{pedigreeCertified}, #{hospitalId}, #{identifyCode}, #{reviewState}, #{reviewTime}, #{reviewRemarks}, #{runningNumber}, #{paymentState}, #{paymentTime}, #{processTime}, #{processState}, #{createBy.id}, #{createDate}, #{updateBy.id}, #{updateDate}, #{remarks}, #{delFlag}, #{chipInject} ,#{chongaiCertificateCode} ,#{stickerFlag} ,#{videoAppraisalId} ,#{dogNose} ) UPDATE dog_appraisal SET dog_id = #{dogId}, identify_site = #{identifySite}, identify_date =#{identifyDate}, identifier = #{identifier}, show_appraisal_order_running_number = #{showAppraisalOrderRunningNumber}, dog_breed = #{dogBreed}, dog_name = #{dogName}, dog_gender = #{dogGender}, dog_fur_color = #{dogFurColor}, birthday = #{birthday}, operator = #{operator}, dog_chip = #{dogChip}, dog_dna_image = #{dogDnaImage}, dna_print_flag = #{dnaPrintFlag}, pedigree_certified = #{pedigreeCertified}, hospital_id = #{hospitalId}, identify_code = #{identifyCode}, review_state = #{reviewState}, review_time = #{reviewTime}, review_remarks = #{reviewRemarks}, running_number = #{runningNumber}, payment_state = #{paymentState}, payment_time = #{paymentTime}, process_time = #{processTime}, process_state = #{processState}, send_date = #{sendDate}, update_by = #{updateBy.id}, update_date = #{updateDate}, remarks = #{remarks}, chip_inject = #{chipInject}, video_appraisal_id = #{videoAppraisalId}, dog_nose =#{dogNose} WHERE id = #{id} UPDATE dog_appraisal SET remarks = concat(IFNULL(remarks,''),#{remarks}), del_flag = #{DEL_FLAG_DELETE} WHERE id = #{id} AND (a.dog_owner_name LIKE concat('%',#{dogOwnerName},'%') OR a.payment_member_code = #{dogOwnerName}) AND a.dog_name LIKE concat(#{dogName},'%') AND a.dog_breed = #{dogBreed} AND a.main_show_info LIKE concat('%',#{mainShowInfo},'%') a.del_flag = '0' AND a.identify_type = '0' AND a.main_show_id != '' AND a.payment_state = '2' a.dog_owner_name AS "dogOwnerName", a.dog_owner_code AS "dogOwnerCode", m.mobile AS "memberMobile", CONCAT(IFNULL(m.province,''),IFNULL(m.city,''),IFNULL(m.street,''),IFNULL(m.address,'')) AS "memberAddress", t.breed_cn_name AS "breedCnName", a.dog_breed AS "dogBreed", a.dog_name AS "dogName", a.dog_gender AS "dogGender", a.birthday AS "birthday", CONCAT(c.dog_color_mark_code,c.dog_color_mark_cn) AS "dogColorMarkCn", a.main_show_id AS "mainShowId", a.show_appraisal_code AS "showAppraisalCode" update dog_appraisal set review_state ='4' , review_remarks=#{vo.reviewRemarks}, update_date=#{vo.updateDate}, update_by=#{vo.updateBy.id}, video_appraisal_id='' where id in #{item} update dog_appraisal set video_appraisal_id = "" where id = #{id}