吉安感知网项目-后端
linwei
2026-06-23 ebeb43ea497fafc448c827d1de6796bcaa4e0b52
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdWorkOrderMapper.xml
@@ -7,7 +7,7 @@
        <result column="id" property="id"/>
        <result column="work_order_name" property="workOrderName"/>
        <result column="work_order_code" property="workOrderCode"/>
        <result column="work_order_type" property="workOrderType"/>
        <result column="work_order_type" property="workOrderType" typeHandler="org.sxkj.common.handler.GenericListTypeHandler"/>
        <result column="device_load_demand" property="deviceLoadDemand"/>
        <result column="recommend_device_ids" property="recommendDeviceIds"/>
        <result column="work_order_status" property="workOrderStatus"/>
@@ -26,7 +26,7 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="getWorkOrderDetail" resultType="org.sxkj.gd.workorder.entity.GdWorkOrderEntity">
    <select id="getWorkOrderDetail" resultMap="gdWorkOrderResultMap">
        select id,
               work_order_name,
               work_order_code,
@@ -115,7 +115,13 @@
                and wo.work_order_name like concat('%',#{param2.workOrderName},'%')
            </if>
            <if test="param2.workOrderType != null and param2.workOrderType != ''">
                and wo.work_order_type::VARCHAR = #{param2.workOrderType}::VARCHAR
                /* 将逗号分隔的字符串转换为带引号的格式,如 "road,road1" 转为 "\"road\",\"road1\"" */
                and wo.work_order_type like concat('%',
                (
                select string_agg(concat('"', trim(arr_val), '"'), ',')
                from unnest(string_to_array(#{param2.workOrderType}, ',')) as arr_val
                ),
                '%')
            </if>
            <if test="param2.createUser != null ">
                /* 修改点2:过滤条件也进行类型对齐 */