|
@@ -101,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="orderType" column="orderType" />
|
|
<result property="orderType" column="orderType" />
|
|
|
<result property="repairPerson" column="repairPerson" />
|
|
<result property="repairPerson" column="repairPerson" />
|
|
|
<result property="chargePerson" column="chargePerson" />
|
|
<result property="chargePerson" column="chargePerson" />
|
|
|
|
|
+ <result property="operator" column="operator" />
|
|
|
<result property="score" column="score" />
|
|
<result property="score" column="score" />
|
|
|
<result property="xfsc" column="xfsc" />
|
|
<result property="xfsc" column="xfsc" />
|
|
|
<result property="xysc" column="xysc" />
|
|
<result property="xysc" column="xysc" />
|
|
@@ -661,6 +662,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="center != null and center == 'true'">IFNULL(o.center,'未知中心') AS center,</if>
|
|
<if test="center != null and center == 'true'">IFNULL(o.center,'未知中心') AS center,</if>
|
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
|
|
|
+ <if test="operator != null and operator == 'true'">o.operator,</if>
|
|
|
<if test="score != null and score == 1">o.score,</if>
|
|
<if test="score != null and score == 1">o.score,</if>
|
|
|
<if test="xfsc != null and xfsc == 'true'">o.xfsc,</if>
|
|
<if test="xfsc != null and xfsc == 'true'">o.xfsc,</if>
|
|
|
<if test="xysc != null and xysc == 'true'">o.xysc,</if>
|
|
<if test="xysc != null and xysc == 'true'">o.xysc,</if>
|
|
@@ -683,6 +685,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
wo.pcs_station_name AS pcs,
|
|
wo.pcs_station_name AS pcs,
|
|
|
wo.brand,
|
|
wo.brand,
|
|
|
wo.model,
|
|
wo.model,
|
|
|
|
|
+ NULL AS operator,
|
|
|
IF(wo.repair_method='2', 1, null) AS restart_flag,
|
|
IF(wo.repair_method='2', 1, null) AS restart_flag,
|
|
|
wo.mis_no AS `system`,
|
|
wo.mis_no AS `system`,
|
|
|
wo.gxt_center AS center,
|
|
wo.gxt_center AS center,
|
|
@@ -773,6 +776,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
wo.pcs_station_name AS pcs,
|
|
wo.pcs_station_name AS pcs,
|
|
|
wo.brand,
|
|
wo.brand,
|
|
|
wo.model,
|
|
wo.model,
|
|
|
|
|
+ opflow.operator_name AS operator,
|
|
|
IF(wo.repair_method='2', 1, 0) AS restart_flag,
|
|
IF(wo.repair_method='2', 1, 0) AS restart_flag,
|
|
|
NULL AS `system`,
|
|
NULL AS `system`,
|
|
|
wo.gxt_center AS center,
|
|
wo.gxt_center AS center,
|
|
@@ -796,6 +800,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN (SELECT order_id,COUNT(*) AS wop_num FROM gxt_repair_order_person GROUP BY order_id) wopp ON wopp.order_id=wo.id
|
|
LEFT JOIN (SELECT order_id,COUNT(*) AS wop_num FROM gxt_repair_order_person GROUP BY order_id) wopp ON wopp.order_id=wo.id
|
|
|
LEFT JOIN (SELECT order_id,MAX(action_time) AS finish_time FROM gxt_repair_order_flow WHERE action_type IN ('complete','auto_finalize') GROUP BY order_id) gsflow ON gsflow.order_id=wo.id
|
|
LEFT JOIN (SELECT order_id,MAX(action_time) AS finish_time FROM gxt_repair_order_flow WHERE action_type IN ('complete','auto_finalize') GROUP BY order_id) gsflow ON gsflow.order_id=wo.id
|
|
|
LEFT JOIN (SELECT order_id,MAX(action_time) AS score_time FROM gxt_repair_order_flow WHERE action_type IN ('reviewRating','finalRating') GROUP BY order_id) gfflow ON gfflow.order_id=wo.id
|
|
LEFT JOIN (SELECT order_id,MAX(action_time) AS score_time FROM gxt_repair_order_flow WHERE action_type IN ('reviewRating','finalRating') GROUP BY order_id) gfflow ON gfflow.order_id=wo.id
|
|
|
|
|
+ LEFT JOIN gxt_repair_order_flow opflow ON opflow.id=(SELECT MAX(gxt_repair_order_flow.id) FROM gxt_repair_order_flow WHERE gxt_repair_order_flow.action_type='complete' AND gxt_repair_order_flow.order_id=wo.id GROUP BY gxt_repair_order_flow.order_id) AND opflow.order_id=wo.id AND wo.repair_method='2'
|
|
|
<where>
|
|
<where>
|
|
|
<if test="startTime != null ">
|
|
<if test="startTime != null ">
|
|
|
<choose>
|
|
<choose>
|
|
@@ -857,7 +862,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND wo.work_order_status IN ('completed','archived')
|
|
AND wo.work_order_status IN ('completed','archived')
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
- AND wopp.wop_num>0 AND wo.work_order_status IS NOT NULL
|
|
|
|
|
|
|
+ AND (wopp.wop_num>0 OR wo.repair_method='2') AND wo.work_order_status IS NOT NULL
|
|
|
</where>
|
|
</where>
|
|
|
) o
|
|
) o
|
|
|
<where>
|
|
<where>
|
|
@@ -875,6 +880,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
o.work_order_project_no,
|
|
o.work_order_project_no,
|
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
|
|
|
+ <if test="operator != null and operator == 'true'">o.operator,</if>
|
|
|
<if test="brand != null and brand == 'true'">o.brand,</if>
|
|
<if test="brand != null and brand == 'true'">o.brand,</if>
|
|
|
<if test="model != null and model == 'true'">o.model,</if>
|
|
<if test="model != null and model == 'true'">o.model,</if>
|
|
|
<if test="system != null and system == 'true'">o.`system`,</if>
|
|
<if test="system != null and system == 'true'">o.`system`,</if>
|
|
@@ -892,6 +898,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="center != null and center == 'true'">o.center,</if>
|
|
<if test="center != null and center == 'true'">o.center,</if>
|
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
|
|
|
+ <if test="operator != null and operator == 'true'">o.operator,</if>
|
|
|
<if test="score != null and score == 1">o.score,</if>
|
|
<if test="score != null and score == 1">o.score,</if>
|
|
|
<if test="xfsc != null and xfsc == 'true'">o.xfsc,</if>
|
|
<if test="xfsc != null and xfsc == 'true'">o.xfsc,</if>
|
|
|
<if test="xysc != null and xysc == 'true'">o.xysc,</if>
|
|
<if test="xysc != null and xysc == 'true'">o.xysc,</if>
|
|
@@ -906,6 +913,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="pcs != null and pcs == 'true'">o.pcs,</if>
|
|
<if test="pcs != null and pcs == 'true'">o.pcs,</if>
|
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
<if test="chargePerson != null and chargePerson == 'true'">o.chargePerson,</if>
|
|
|
<if test="(workOrder != null and workOrder == true) or (repairOrder != null and repairOrder==true)">o.orderType,</if>
|
|
<if test="(workOrder != null and workOrder == true) or (repairOrder != null and repairOrder==true)">o.orderType,</if>
|
|
|
|
|
+ <if test="operator != null and operator == 'true'">o.operator,</if>
|
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
<if test="repairPerson != null and repairPerson == 'true'">o.repairPerson,</if>
|
|
|
<if test="brand != null and brand == 'true'">o.brand,</if>
|
|
<if test="brand != null and brand == 'true'">o.brand,</if>
|
|
|
<if test="model != null and model == 'true'">o.model,</if>
|
|
<if test="model != null and model == 'true'">o.model,</if>
|