|
|
@@ -60,7 +60,7 @@
|
|
|
SELECT
|
|
|
xt.id,
|
|
|
xm.*,
|
|
|
- t.name, t.unicode, t.number,t.id_card,t.secondary_unit,t.department,t.nature,t.situation,t.personnel_type
|
|
|
+ t.name, t.unicode, t.number,t.id_card,t.department,t.nature,t.situation,t.personnel_type
|
|
|
FROM kd_xm_technician xt
|
|
|
LEFT JOIN kd_technician t on xt.unicode = t.unicode and t.year_and_month = #{ew.yearAndMonth}
|
|
|
LEFT JOIN (
|
|
|
@@ -98,7 +98,7 @@
|
|
|
resultMap="ResultXmTechnicianSummary">
|
|
|
SELECT
|
|
|
xm.XMMC,
|
|
|
- t.unicode,t.name, t.number,t.id_card,t.secondary_unit,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type,t.year_and_month
|
|
|
+ t.unicode,t.name, t.number,t.id_card,t.department_id,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type,t.year_and_month
|
|
|
FROM kd_xm_technician m
|
|
|
LEFT JOIN kd_technician t on t.unicode = m.unicode and t.year_and_month = #{ew.yearAndMonth}
|
|
|
LEFT JOIN (
|
|
|
@@ -116,7 +116,7 @@
|
|
|
resultMap="ResultXmTechnicianSummary">
|
|
|
SELECT
|
|
|
xm.XMMC,
|
|
|
- t.unicode,t.number,t.id_card, t.name,t.secondary_unit,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type
|
|
|
+ t.unicode,t.number,t.id_card, t.name,t.department_id,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type
|
|
|
FROM kd_xm_technician m
|
|
|
LEFT JOIN kd_technician t on t.unicode = m.unicode and left(t.year_and_month,4) = #{ew.yearAndMonth}
|
|
|
LEFT JOIN (
|
|
|
@@ -134,12 +134,12 @@
|
|
|
SELECT
|
|
|
xt.unicode,
|
|
|
COUNT(DISTINCT xm_id) as proCount,
|
|
|
- t.`name`,t.number, t.id_card, t.secondary_unit, t.department, t.post, post_location, t.nature, t.situation , t.personnel_type
|
|
|
+ t.`name`,t.number, t.id_card, t.department_id,t.department, t.post, post_location, t.nature, t.situation , t.personnel_type
|
|
|
FROM kd_xm_technician xt
|
|
|
left join
|
|
|
(
|
|
|
select
|
|
|
- unicode, NAME, number, id_card, secondary_unit , department, post, post_location, nature, situation , personnel_type
|
|
|
+ unicode, NAME, number, id_card, department_id , department, post, post_location, nature, situation , personnel_type
|
|
|
from kd_technician temp
|
|
|
where temp.unicode = unicode and temp.year_and_month = ( select max(year_and_month) from kd_technician where unicode = temp.unicode and LEFT(year_and_month, 4) = #{ew.yearAndMonth} group by unicode )
|
|
|
) t on xt.unicode = t.unicode
|