a.id AS "id",
a.dog_id AS "dogId",
a.breed_deadline AS "breedDeadline",
a.breed_grade AS "breedGrade",
a.shoulder AS "shoulder",
a.body_length AS "bodyLength",
a.chest_depth AS "chestDepth",
a.weight AS "weight",
a.testicles AS "testicles",
a.appraises AS "appraises",
a.dog_fur_color AS "dogFurColor",
a.disposition AS "disposition",
a.attention AS "attention",
a.nerve_situation AS "nerveSituation",
a.natural_degree AS "naturalDegree",
a.instinct_confidence_suffer AS "instinctConfidenceSuffer",
a.sex_typical AS "sexTypical",
a.physique AS "physique",
a.expressive AS "expressive",
a.trunk AS "trunk",
a.bones AS "bones",
a.muscles AS "muscles",
a.forelimbs AS "forelimbs",
a.hindlimbs AS "hindlimbs",
a.back AS "back",
a.elbow_joint AS "elbowJoint",
a.strength_of_pasterns AS "strengthOfPasterns",
a.front AS "front",
a.croup AS "croup",
a.strength_of_hocks AS "strengthOfHocks",
a.gait AS "gait",
a.steps_forward AS "stepsForward",
a.steps_backward AS "stepsBackward",
a.nails AS "nails",
a.feet AS "feet",
a.head AS "head",
a.colour_of_teeth AS "colourOfTeeth",
a.upper_jaw AS "upperJaw",
a.underjaw AS "underjaw",
a.teeth AS "teeth",
a.faults_of_teeth AS "faultsOfTeeth",
a.other_strengths_wcaknesses AS "otherStrengthsWcaknesses",
a.suggestions_on_breeding AS "suggestionsOnBreeding",
a.breed_identify_time AS "breedIdentifyTime",
a.breed_identify_location AS "breedIdentifyLocation",
a.breed_certified_code AS "breedCertifiedCode",
a.breed_identify_referee AS "breedIdentifyReferee",
a.kin_breed AS "kinBreed",
a.breed_results AS "breedResults",
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.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.print_state AS "printState"
left join dog b on a.dog_id = b.id left join dog_type c on b.dog_breed = c.dog_breed_code
a.del_flag = #{DEL_FLAG_NORMAL}
AND (a.breed_certified_code = #{breedCertifiedCode} or b.pedigree_certified_code like concat('%',#{breedCertifiedCode},'%'))
AND (b.dog_owner = #{dog.dogOwner} or b.member_code like concat('%',#{dog.dogOwner},'%'))
AND date_format(a.create_date, '%Y-%m-%d') = ]]> date_format(#{createDate}, '%Y-%m-%d')
AND date_format(a.create_date, '%Y-%m-%d') date_format(#{endDate}, '%Y-%m-%d')
AND a.review_state = #{reviewState}
AND a.payment_state = #{paymentState}
AND a.process_state = #{processState}
AND b.dog_breed ${sqlMap.dogBreedMap}
AND a.running_number = #{runningNumber}
INSERT INTO dog_breed_certified(
id,
dog_id,
breed_deadline,
breed_grade,
shoulder,
body_length,
chest_depth,
weight,
testicles,
appraises,
dog_fur_color,
disposition,
attention,
nerve_situation,
natural_degree,
instinct_confidence_suffer,
sex_typical,
physique,
expressive,
trunk,
bones,
muscles,
forelimbs,
hindlimbs,
back,
elbow_joint,
strength_of_pasterns,
front,
croup,
strength_of_hocks,
gait,
steps_forward,
steps_backward,
nails,
feet,
head,
colour_of_teeth,
upper_jaw,
underjaw,
teeth,
faults_of_teeth,
other_strengths_wcaknesses,
suggestions_on_breeding,
breed_identify_time,
breed_identify_location,
breed_certified_code,
breed_identify_referee,
kin_breed,
breed_results,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag,
review_state,
review_time,
review_remarks,
running_number,
payment_state,
payment_time,
process_time,
process_state
) VALUES (
#{id},
#{dogId},
#{breedDeadline},
#{breedGrade},
#{shoulder},
#{bodyLength},
#{chestDepth},
#{weight},
#{testicles},
#{appraises},
#{dogFurColor},
#{disposition},
#{attention},
#{nerveSituation},
#{naturalDegree},
#{instinctConfidenceSuffer},
#{sexTypical},
#{physique},
#{expressive},
#{trunk},
#{bones},
#{muscles},
#{forelimbs},
#{hindlimbs},
#{back},
#{elbowJoint},
#{strengthOfPasterns},
#{front},
#{croup},
#{strengthOfHocks},
#{gait},
#{stepsForward},
#{stepsBackward},
#{nails},
#{feet},
#{head},
#{colourOfTeeth},
#{upperJaw},
#{underjaw},
#{teeth},
#{faultsOfTeeth},
#{otherStrengthsWcaknesses},
#{suggestionsOnBreeding},
#{breedIdentifyTime},
#{breedIdentifyLocation},
#{breedCertifiedCode},
#{breedIdentifyReferee},
#{kinBreed},
#{breedResults},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag},
#{reviewState},
#{reviewTime},
#{reviewRemarks},
#{runningNumber},
#{paymentState},
#{paymentTime},
#{processTime},
#{processState}
)
UPDATE dog_breed_certified SET
dog_id = #{dogId},
breed_deadline = #{breedDeadline},
breed_grade = #{breedGrade},
shoulder = #{shoulder},
body_length = #{bodyLength},
chest_depth = #{chestDepth},
weight = #{weight},
testicles = #{testicles},
appraises = #{appraises},
dog_fur_color = #{dogFurColor},
disposition = #{disposition},
attention = #{attention},
nerve_situation = #{nerveSituation},
natural_degree = #{naturalDegree},
instinct_confidence_suffer = #{instinctConfidenceSuffer},
sex_typical = #{sexTypical},
physique = #{physique},
expressive = #{expressive},
trunk = #{trunk},
bones = #{bones},
muscles = #{muscles},
forelimbs = #{forelimbs},
hindlimbs = #{hindlimbs},
back = #{back},
elbow_joint = #{elbowJoint},
strength_of_pasterns = #{strengthOfPasterns},
front = #{front},
croup = #{croup},
strength_of_hocks = #{strengthOfHocks},
gait = #{gait},
steps_forward = #{stepsForward},
steps_backward = #{stepsBackward},
nails = #{nails},
feet = #{feet},
head = #{head},
colour_of_teeth = #{colourOfTeeth},
upper_jaw = #{upperJaw},
underjaw = #{underjaw},
teeth = #{teeth},
faults_of_teeth = #{faultsOfTeeth},
other_strengths_wcaknesses = #{otherStrengthsWcaknesses},
suggestions_on_breeding = #{suggestionsOnBreeding},
breed_identify_time = #{breedIdentifyTime},
breed_identify_location = #{breedIdentifyLocation},
breed_certified_code = #{breedCertifiedCode},
breed_identify_referee = #{breedIdentifyReferee},
kin_breed = #{kinBreed},
breed_results = #{breedResults},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks},
review_state = #{reviewState},
review_time = #{reviewTime},
review_remarks = #{reviewRemarks},
running_number = #{runningNumber},
payment_state = #{paymentState},
payment_time = #{paymentTime},
process_time = #{processTime},
process_state = #{processState}
WHERE id = #{id}
UPDATE dog_breed_certified SET
remarks = concat(IFNULL(remarks,''),#{remarks}),
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
UPDATE dog_breed_certified SET
breed_grade = #{breedGrade},
shoulder = #{shoulder},
body_length = #{bodyLength},
chest_depth = #{chestDepth},
weight = #{weight},
testicles = #{testicles},
appraises = #{appraises},
dog_fur_color = #{dogFurColor},
disposition = #{disposition},
attention = #{attention},
nerve_situation = #{nerveSituation},
natural_degree = #{naturalDegree},
instinct_confidence_suffer = #{instinctConfidenceSuffer},
sex_typical = #{sexTypical},
physique = #{physique},
expressive = #{expressive},
trunk = #{trunk},
bones = #{bones},
muscles = #{muscles},
forelimbs = #{forelimbs},
hindlimbs = #{hindlimbs},
back = #{back},
elbow_joint = #{elbowJoint},
strength_of_pasterns = #{strengthOfPasterns},
front = #{front},
croup = #{croup},
strength_of_hocks = #{strengthOfHocks},
gait = #{gait},
steps_forward = #{stepsForward},
steps_backward = #{stepsBackward},
nails = #{nails},
feet = #{feet},
head = #{head},
colour_of_teeth = #{colourOfTeeth},
upper_jaw = #{upperJaw},
underjaw = #{underjaw},
teeth = #{teeth},
faults_of_teeth = #{faultsOfTeeth},
other_strengths_wcaknesses = #{otherStrengthsWcaknesses},
suggestions_on_breeding = #{suggestionsOnBreeding},
breed_identify_time = #{breedIdentifyTime},
breed_identify_location = #{breedIdentifyLocation},
breed_certified_code = #{breedCertifiedCode},
breed_identify_referee = #{breedIdentifyReferee},
kin_breed = #{kinBreed},
breed_results = #{breedResults},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks}
WHERE id = #{id}
update dog_breed_certified set
breed_certified_code = #{breedCertifiedCode},
process_time = #{processTime},
process_state = #{processState},
print_state = #{printState},
update_by = #{updateBy.id},
update_date = #{updateDate}
WHERE id = #{id}
UPDATE dog_breed_certified SET
print_state = #{printState}
WHERE id = #{id}
UPDATE dog_breed_certified SET
print_state = #{printState},
print_time = #{printTime}
WHERE id = #{id}
UPDATE dog_breed_certified SET review_state = #{reviewState},
review_remarks = #{reviewRemarks},
review_time = #{reviewTime}
where id = #{id}