xiangpei
2024-09-03 d2a3c95c4fbb71a4b73638bc4bd968a66c96df87
工单下发分页统计bug
3个文件已修改
11 ■■■■■ 已修改文件
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
@@ -83,7 +83,7 @@
    }
    @GetMapping("/work/list")
    @ApiOperation(value = "工单列表", notes = "工单列表")
    @ApiOperation(value = "统计运维单位工单数量", notes = "统计运维单位工单数量")
    public Result workList(DistributeWorkOrderQuery query) {
        return ywUnitService.workList(query);
    }
ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -96,6 +96,9 @@
            <if test="query.unitId != null">
                AND wo.unit_id = #{query.unitId}
            </if>
            <if test="query.unitId == null">
                AND wo.unit_id is not null
            </if>
            <if test="query.status != null and query.status != ''">
                AND wo.status = #{query.status}
            </if>
ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
@@ -35,10 +35,10 @@
    <select id="workList" resultType="integer">
        SELECT
               count(*)
               count(DISTINCT wo.id)
        FROM
            t_work_order wo
            INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number AND #{query.unitId}
            INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number
            INNER JOIN t_yw_point yp ON yp.serial_number = wo.serial_number AND yp.deleted = 0
            INNER JOIN t_work_order_error_type et ON wo.work_order_no = et.work_order_no
            INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type'
@@ -46,7 +46,7 @@
                    collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach>
            </if>
        WHERE
            wo.deleted = 0
            wo.unit_id = #{query.unitId} AND wo.deleted = 0
            <if test="query.status != null and query.status != ''">
                AND wo.status = #{query.status}
            </if>