261 lines
8.2 KiB
XML
261 lines
8.2 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.hx.slj.modules.assessment.dao.ExecuteBasicDao">
|
||
|
|
<sql id="basicColumns">
|
||
|
|
a.id,
|
||
|
|
a.standard_plan_id AS standardPlanId,
|
||
|
|
a.sys_office_id AS sysOfficeId,
|
||
|
|
a.old_person AS oldPerson,
|
||
|
|
a.signing_old_person AS signingOldPerson,
|
||
|
|
a.signing_poor_person AS signingPoorPerson,
|
||
|
|
a.birth_control_family AS birthControlFamily,
|
||
|
|
a.area_person_count AS areaPersonCount,
|
||
|
|
a.live_births AS liveBirths,
|
||
|
|
a.area_time_live_births AS areaTimeLiveBirths,
|
||
|
|
a.children_visit_count AS childrenVisitCount,
|
||
|
|
a.vaccination_certificate_child_sum AS vaccinationCertificateChildSum,
|
||
|
|
a.area_age65_person AS areaAge65Person,
|
||
|
|
a.year_hypertension_sum AS yearHypertensionSum,
|
||
|
|
a.year_area_diabetes_count AS yearAreaDiabetesCount,
|
||
|
|
a.year_area_psychosis_sum AS yearAreaPsychosisSum,
|
||
|
|
a.year_area_newborn AS yearAreaNewborn,
|
||
|
|
a.area_woman_count AS areaWomanCount,
|
||
|
|
a.area_coronary_disease_count AS areaCoronaryDiseaseCount,
|
||
|
|
a.area_cerebral_apoplexy_count AS areaCerebralApoplexyCount,
|
||
|
|
a.area_disabled_count AS areaDisabledCount,
|
||
|
|
a.health_file_number AS healthFileNumber,
|
||
|
|
a.file_review_upgrade_number AS fileReviewUpgradeNumber,
|
||
|
|
a.area_vaccination_count AS areaVaccinationCount,
|
||
|
|
a.number_measles_vaccinations_jurisdiction AS numberMeaslesVaccinationsJurisdiction,
|
||
|
|
a.area_more_visit_newborns AS areaMoreVisitNewborns,
|
||
|
|
a.area_year_chlidren_interviewed AS areaYearChlidrenInterviewed,
|
||
|
|
a.area_year_pregnancy13th_first_prenatal AS areaYearPregnancy13thFirstPrenatal,
|
||
|
|
a.area_year_visits_within28days AS areaYearVisitsWithin28days,
|
||
|
|
a.area_year_old_health_management AS areaYearOldHealthManagement,
|
||
|
|
a.area_year_hypertensive_managed_jurisdiction AS areaYearHypertensiveManagedJurisdiction,
|
||
|
|
a.area_year_specification_hypertensive_managed AS areaYearSpecificationHypertensiveManaged,
|
||
|
|
a.highbloodpressure_dietary_intake AS highbloodpressureDietaryIntake,
|
||
|
|
a.high_risk_hypertension AS highRiskHypertension,
|
||
|
|
a.salt_reduction_guides AS saltReductionGuides,
|
||
|
|
a.low_salt_guidance_households AS lowsaltGuidanceHouseholds,
|
||
|
|
a.households_salt_control_tools AS householdsSaltControlTools,
|
||
|
|
a.area_year_diabetes_management AS areaYearDiabetesManagement,
|
||
|
|
a.area_year_specification_diabetes_managed AS areaYearSpecificationDiabetesManaged,
|
||
|
|
a.area_registration_psychosis AS areaRegistrationPsychosis,
|
||
|
|
a.psychosis_national_system AS psychosisNationalSystem,
|
||
|
|
a.medicine_health_management_child AS medicineHealthManagementChild,
|
||
|
|
a.status AS status,
|
||
|
|
a.create_by AS "createBy.id",
|
||
|
|
a.create_date,
|
||
|
|
a.update_by AS "updateBy.id",
|
||
|
|
a.update_date,
|
||
|
|
a.del_flag
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="get" resultType="com.hx.slj.modules.assessment.entity.ExecuteBasic">
|
||
|
|
SELECT
|
||
|
|
<include refid="basicColumns"/>
|
||
|
|
FROM execute_basics a
|
||
|
|
WHERE a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getByPlanIDAndOfficeID" resultType="string">
|
||
|
|
SELECT
|
||
|
|
${columnsSele}
|
||
|
|
FROM execute_basics a
|
||
|
|
WHERE 1 = 1
|
||
|
|
<if test="standardPlanId != null and standardPlanId!='' ">
|
||
|
|
AND a.standard_plan_id = #{standardPlanId}
|
||
|
|
</if>
|
||
|
|
<if test="sysOfficeId != null and sysOfficeId !='' ">
|
||
|
|
AND a.sys_office_id = #{sysOfficeId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="findList" resultType="com.hx.slj.modules.assessment.entity.ExecuteBasic">
|
||
|
|
SELECT
|
||
|
|
<include refid="basicColumns"/>
|
||
|
|
FROM execute_basics a
|
||
|
|
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
|
||
|
|
<if test="standardPlanId != null and standardPlanId!='' ">
|
||
|
|
AND a.standard_plan_id = #{standardPlanId}
|
||
|
|
</if>
|
||
|
|
<if test="sysOfficeId != null and sysOfficeId !='' ">
|
||
|
|
AND a.sys_office_id = #{sysOfficeId}
|
||
|
|
</if>
|
||
|
|
<choose>
|
||
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||
|
|
ORDER BY ${page.orderBy}
|
||
|
|
</when>
|
||
|
|
<otherwise>
|
||
|
|
ORDER BY a.update_date
|
||
|
|
</otherwise>
|
||
|
|
</choose>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insert">
|
||
|
|
INSERT INTO execute_basics(
|
||
|
|
id,
|
||
|
|
standard_plan_id,
|
||
|
|
sys_office_id,
|
||
|
|
old_person,
|
||
|
|
signing_old_person,
|
||
|
|
signing_poor_person,
|
||
|
|
birth_control_family,
|
||
|
|
status,
|
||
|
|
create_by,
|
||
|
|
create_date,
|
||
|
|
update_by,
|
||
|
|
update_date,
|
||
|
|
del_flag
|
||
|
|
) VALUES (
|
||
|
|
#{id},
|
||
|
|
#{standardPlanId},
|
||
|
|
#{sysOfficeId},
|
||
|
|
#{oldPerson},
|
||
|
|
#{signingOldPerson},
|
||
|
|
#{signingPoorPerson},
|
||
|
|
#{birthControlFamily},
|
||
|
|
#{status},
|
||
|
|
#{createBy.id},
|
||
|
|
#{createDate},
|
||
|
|
#{updateBy.id},
|
||
|
|
#{updateDate},
|
||
|
|
#{delFlag}
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
||
|
|
INSERT INTO execute_basics(
|
||
|
|
id,
|
||
|
|
standard_plan_id,
|
||
|
|
sys_office_id,
|
||
|
|
old_person,
|
||
|
|
signing_old_person,
|
||
|
|
signing_poor_person,
|
||
|
|
birth_control_family,
|
||
|
|
area_person_count,
|
||
|
|
live_births,
|
||
|
|
area_time_live_births,
|
||
|
|
children_visit_count,
|
||
|
|
vaccination_certificate_child_sum,
|
||
|
|
area_age65_person,
|
||
|
|
year_hypertension_sum,
|
||
|
|
year_area_diabetes_count,
|
||
|
|
year_area_psychosis_sum,
|
||
|
|
year_area_newborn,
|
||
|
|
area_woman_count,
|
||
|
|
area_coronary_disease_count,
|
||
|
|
area_cerebral_apoplexy_count,
|
||
|
|
area_disabled_count,
|
||
|
|
health_file_number,
|
||
|
|
file_review_upgrade_number,
|
||
|
|
area_vaccination_count,
|
||
|
|
number_measles_vaccinations_jurisdiction,
|
||
|
|
area_more_visit_newborns,
|
||
|
|
area_year_chlidren_interviewed,
|
||
|
|
area_year_pregnancy13th_first_prenatal,
|
||
|
|
area_year_visits_within28days,
|
||
|
|
area_year_old_health_management,
|
||
|
|
area_year_hypertensive_managed_jurisdiction,
|
||
|
|
area_year_specification_hypertensive_managed,
|
||
|
|
highbloodpressure_dietary_intake,
|
||
|
|
high_risk_hypertension,
|
||
|
|
salt_reduction_guides,
|
||
|
|
low_salt_guidance_households,
|
||
|
|
households_salt_control_tools,
|
||
|
|
area_year_diabetes_management,
|
||
|
|
area_year_specification_diabetes_managed,
|
||
|
|
area_registration_psychosis,
|
||
|
|
psychosis_national_system,
|
||
|
|
medicine_health_management_child,
|
||
|
|
status,
|
||
|
|
create_by,
|
||
|
|
create_date,
|
||
|
|
update_by,
|
||
|
|
update_date,
|
||
|
|
del_flag
|
||
|
|
)VALUES
|
||
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
||
|
|
(
|
||
|
|
#{item.id},
|
||
|
|
#{item.standardPlanId},
|
||
|
|
#{item.sysOfficeId},
|
||
|
|
#{item.oldPerson},
|
||
|
|
#{item.signingOldPerson},
|
||
|
|
#{item.signingPoorPerson},
|
||
|
|
#{item.birthControlFamily},
|
||
|
|
#{item.areaPersonCount},
|
||
|
|
#{item.liveBirths},
|
||
|
|
#{item.areaTimeLiveBirths},
|
||
|
|
#{item.childrenVisitCount},
|
||
|
|
#{item.vaccinationCertificateChildSum},
|
||
|
|
#{item.areaAge65Person},
|
||
|
|
#{item.yearHypertensionSum},
|
||
|
|
#{item.yearAreaDiabetesCount},
|
||
|
|
#{item.yearAreaPsychosisSum},
|
||
|
|
#{item.yearAreaNewborn},
|
||
|
|
#{item.areaWomanCount},
|
||
|
|
#{item.areaCoronaryDiseaseCount},
|
||
|
|
#{item.areaCerebralApoplexyCount},
|
||
|
|
#{item.areaDisabledCount},
|
||
|
|
#{item.healthFileNumber},
|
||
|
|
#{item.fileReviewUpgradeNumber},
|
||
|
|
#{item.areaVaccinationCount},
|
||
|
|
#{item.numberMeaslesVaccinationsJurisdiction},
|
||
|
|
#{item.areaMoreVisitNewborns},
|
||
|
|
#{item.areaYearChlidrenInterviewed},
|
||
|
|
#{item.areaYearPregnancy13thFirstPrenatal},
|
||
|
|
#{item.areaYearVisitsWithin28days},
|
||
|
|
#{item.areaYearOldHealthManagement},
|
||
|
|
#{item.areaYearHypertensiveManagedJurisdiction},
|
||
|
|
#{item.areaYearSpecificationHypertensiveManaged},
|
||
|
|
#{item.highbloodpressureDietaryIntake},
|
||
|
|
#{item.highRiskHypertension},
|
||
|
|
#{item.saltReductionGuides},
|
||
|
|
#{item.lowsaltGuidanceHouseholds},
|
||
|
|
#{item.householdsSaltControlTools},
|
||
|
|
#{item.areaYearDiabetesManagement},
|
||
|
|
#{item.areaYearSpecificationDiabetesManaged},
|
||
|
|
#{item.areaRegistrationPsychosis},
|
||
|
|
#{item.psychosisNationalSystem},
|
||
|
|
#{item.medicineHealthManagementChild},
|
||
|
|
#{item.status},
|
||
|
|
#{item.createBy.id},
|
||
|
|
#{item.createDate},
|
||
|
|
#{item.updateBy.id},
|
||
|
|
#{item.updateDate},
|
||
|
|
#{item.delFlag}
|
||
|
|
)
|
||
|
|
</foreach>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="update">
|
||
|
|
UPDATE execute_basics SET
|
||
|
|
standard_plan_id = #{standardPlanId},
|
||
|
|
sys_office_id = #{sysOfficeId},
|
||
|
|
var_name_ch = #{varNameCh},
|
||
|
|
var_value = #{varValue},
|
||
|
|
old_person = #{oldPerson},
|
||
|
|
signing_old_person = #{signingOldPerson},
|
||
|
|
signing_poor_person = #{signingPoorPerson},
|
||
|
|
birth_control_family = #{birthControlFamily},
|
||
|
|
status = #{status},
|
||
|
|
update_by = #{updateBy.id},
|
||
|
|
update_date = #{updateDate},
|
||
|
|
del_flag = #{delFlag}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="delete">
|
||
|
|
DELETE FROM khtx_var WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
||
|
|
DELETE FROM execute_basics WHERE id IN (
|
||
|
|
<foreach collection="list" item="item" separator=",">
|
||
|
|
#{item.id}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</delete>
|
||
|
|
</mapper>
|