Commit 6ecba2ac authored by tangwei's avatar tangwei

修改数据库

parent 4d507b0d
......@@ -362,7 +362,7 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
FROM
cb_data_dictionary
WHERE
CODE = b.gender
CODE = b.gendercode
AND type = 'XB'
) AS gender,
(
......@@ -371,7 +371,7 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
FROM
cb_data_dictionary
WHERE
CODE = b.safetyTraining
CODE = b.safetyTrainingcode
AND type = 'AQPX'
) AS safetyTraining,
(
......@@ -380,7 +380,7 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
FROM
cb_data_dictionary
WHERE
CODE = b.peopleType
CODE = b.peopleTypecode
AND type = 'DWRYLX'
) AS peopleType,
fc.emergency_contact,
......@@ -394,7 +394,7 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
FROM
cb_data_dictionary
WHERE
CODE = b.certificatesTypeCode
CODE = b.certificatesTypeCodecode
AND type = 'RYZJLX'
) AS certificatesTypeCode,
(
......@@ -403,7 +403,7 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
FROM
cb_data_dictionary
WHERE
CODE = b.stateCode
CODE = b.stateCodecode
AND type = 'RYZT'
) AS stateCode,
fp.employee_hierarchy,
......@@ -416,15 +416,15 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
instance_id,
max(case field_code when 'auditCycle' then field_value_label end) auditCycle,
max(case field_code when 'certificatesNumber' then field_value end) certificatesNumber,
max(case field_code when 'certificatesTypeCode' then field_value end) certificatesTypeCode,
max(case field_code when 'certificatesTypeCode' then field_value end) certificatesTypeCodecode,
max(case field_code when 'certificateType' then field_value_label end) certificateType,
max(case field_code when 'fireManagementPostCode' then field_value_label end) fireManagementPostCode,
max(case field_code when 'gender' then field_value end) gender,
max(case field_code when 'gender' then field_value end) gendercode,
max(case field_code when 'internalPositionCode' then field_value_label end) internalPositionCode,
max(case field_code when 'personNumber' then field_value end) personNumber,
max(case field_code when 'positionType' then field_value_label end) positionType,
max(case field_code when 'safetyTraining' then field_value end) safetyTraining,
max(case field_code when 'stateCode' then field_value end) stateCode,
max(case field_code when 'safetyTraining' then field_value end) safetyTrainingcode,
max(case field_code when 'stateCode' then field_value end) stateCodecode,
max(case field_code when 'telephone' then field_value end) telephone,
max(case field_code when 'peopleType' then field_value end) peopleType,
max(case field_code when 'nation' then field_value end) nation,
......@@ -433,11 +433,11 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
max(case field_code when 'nativePlace' then field_value end) nativePlace,
max(case field_code when 'nativePlaceVal' then field_value end) nativePlaceVal,
max(case field_code when 'politicalOutlook' then field_value end) politicalOutlook,
max(case field_code when 'residenceDetails' then field_value end) residenceDetails,
max(case field_code when 'residenceDetailsCode' then field_value_label end) residenceDetails,
max(case field_code when 'residenceDetailVal' then field_value end) residenceDetailVal,
max(case field_code when 'holdingTime' then field_value end) holdingTime,
max(case field_code when 'peopleType' then field_value_label end) peopleType,
max(case field_code when 'peopleType' then field_value_label end) peopleTypecode,
max(case field_code when 'nativePlace' then field_value_label end) nativePlace,
max(case field_code when 'airportAccommodation' then field_value end) airportAccommodation
......
......@@ -631,7 +631,7 @@ GROUP BY
FROM
cb_data_dictionary
WHERE
CODE = b.gender
CODE = b.gendercode
AND type = 'XB'
) AS gender,
(
......@@ -640,7 +640,7 @@ GROUP BY
FROM
cb_data_dictionary
WHERE
CODE = b.safetyTraining
CODE = b.safetyTrainingcode
AND type = 'AQPX'
) AS safetyTraining,
(
......@@ -649,7 +649,7 @@ GROUP BY
FROM
cb_data_dictionary
WHERE
CODE = b.peopleType
CODE = b.peopleTypecode
AND type = 'DWRYLX'
) AS peopleType,
(
......@@ -658,7 +658,7 @@ GROUP BY
FROM
cb_data_dictionary
WHERE
CODE = b.certificatesTypeCode
CODE = b.certificatesTypeCodecode
AND type = 'RYZJLX'
) AS certificatesTypeCode,
(
......@@ -667,10 +667,10 @@ GROUP BY
FROM
cb_data_dictionary
WHERE
CODE = b.stateCode
CODE = b.stateCodecode
AND type = 'RYZT'
) AS stateCode,
fc.emergency_contact,
fc.emergency_contact ,
fc.emergency_contact_phone,
fp.employee_hierarchy employeeHierarchy,
cast(b.birthdayTime as datetime) as birthdayTime,
......@@ -682,15 +682,15 @@ GROUP BY
instance_id,
max(case field_code when 'auditCycle' then field_value_label end) auditCycle,
max(case field_code when 'certificatesNumber' then field_value end) certificatesNumber,
max(case field_code when 'certificatesTypeCode' then field_value end) certificatesTypeCode,
max(case field_code when 'certificatesTypeCode' then field_value end) certificatesTypeCodecode,
max(case field_code when 'certificateType' then field_value_label end) certificateType,
max(case field_code when 'fireManagementPostCode' then field_value_label end) fireManagementPostCode,
max(case field_code when 'gender' then field_value end) gender,
max(case field_code when 'gender' then field_value end) gendercode,
max(case field_code when 'internalPositionCode' then field_value_label end) internalPositionCode,
max(case field_code when 'personNumber' then field_value end) personNumber,
max(case field_code when 'positionType' then field_value_label end) positionType,
max(case field_code when 'safetyTraining' then field_value end) safetyTraining,
max(case field_code when 'stateCode' then field_value end) stateCode,
max(case field_code when 'safetyTraining' then field_value end) safetyTrainingcode,
max(case field_code when 'stateCode' then field_value end) stateCodecode,
max(case field_code when 'telephone' then field_value end) telephone,
max(case field_code when 'nation' then field_value end) nation,
max(case field_code when 'birthdayTime' then field_value end) birthdayTime,
......@@ -701,8 +701,8 @@ GROUP BY
max(case field_code when 'residenceDetailsCode' then field_value_label end) residenceDetails,
max(case field_code when 'residenceDetailVal' then field_value end) residenceDetailVal,
max(case field_code when 'holdingTime' then field_value end) holdingTime,
max(case field_code when 'peopleType' then field_value_label end) peopleType,
max(case field_code when 'holdingTime' then field_value end) holdingTime,
max(case field_code when 'peopleType' then field_value end) peopleTypecode,
max(case field_code when 'airportAccommodation' then field_value end) airportAccommodation
FROM cb_dynamic_form_instance GROUP BY instance_id) b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment