| | |
| | | <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"/> |
| | |
| | | <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, |
| | |
| | | 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:过滤条件也进行类型对齐 */ |