xiangpei
2024-08-23 b26636a777324c0c8620108ff72700246c7ec358
ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -14,6 +14,7 @@
        <result column="yw_condition" property="ywCondition"/>
        <result column="yw_check_result" property="ywCheckResult"/>
        <result column="overtime" property="overtime"/>
        <result column="deduct" property="deduct"/>
    </resultMap>
    <select id="page" resultType="com.ycl.platform.domain.vo.WorkOrderVO">
@@ -47,7 +48,9 @@
            wo.*,
            u.unit_name,
            p.yw_person_name,
            yp.point_tag,
            yp.province_tag,
            yp.important_tag,
            yp.important_command_image_tag,
            odr.create_time as distributeTime,
            su.nick_name as realName
        FROM
@@ -72,7 +75,9 @@
        SELECT
             wo.id,
             wod.create_time,
             yp.point_tag
             yp.province_tag,
             yp.important_tag,
             yp.important_command_image_tag
        FROM
             t_work_order wo
                INNER JOIN t_yw_point yp ON yp.serial_number = wo.serial_number AND yp.deleted = 0
@@ -162,9 +167,19 @@
        LEFT JOIN t_work_order w ON w.serial_number = p.serial_number AND w.deleted = 0
        WHERE d.del_flag = 0 AND d.area IS NOT NULL
        <if test="dataScope == 1"> AND p.province_tag = 'province' </if>
        <if test="deptId != null"> AND p.dept_id = #{deptId} </if>
        <!-- <if test="deptId != null"> AND p.dept_id = #{deptId} </if> -->
        GROUP BY d.area, d.dept_id
        ORDER BY d.dept_id
    </select>
    <select id="hasErrorWorkOrderList" resultType="com.ycl.platform.domain.vo.DeviceInfoVO">
        SELECT
               wo.id as workOrderId,
               di.device_id,
               di.channel_id
        FROM
             t_work_order wo
                 INNER JOIN t_device_info di ON wo.serial_number = di.device_id
    </select>
</mapper>