fix(workorder): 修复工单和巡检任务查询的类型匹配问题
- 将工单类型查询从精确匹配改为模糊匹配
- 将巡检任务类型查询从精确匹配改为模糊匹配
- 修复地区编码提取逻辑中的多余零填充问题
| | |
| | | and pt.patrol_task_name like concat('%',#{param2.patrolTaskName},'%') |
| | | </if> |
| | | <if test="param2.patrolTaskType != null and param2.patrolTaskType != ''"> |
| | | and pt.patrol_task_type::VARCHAR = #{param2.patrolTaskType}::VARCHAR |
| | | and pt.patrol_task_type like concat('%',#{param2.patrolTaskType},'%') |
| | | </if> |
| | | <if test="param2.taskStatus != null and param2.taskStatus != ''"> |
| | | /* 报错信息中出现了这个参数,务必加强转 */ |
| | |
| | | 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 |
| | | and wo.work_order_type like concat('%',#{param2.workOrderType},'%') |
| | | </if> |
| | | <if test="param2.createUser != null "> |
| | | /* 修改点2:过滤条件也进行类型对齐 */ |
| | |
| | | try { |
| | | // 提取省、市、区三级编码 |
| | | String provinceCode = cleanCode.substring(0, 2) + "00"; // 省级编码(如:3600) |
| | | String cityCode = cleanCode.substring(0, 4) + "0"; // 市级编码(如:3608) |
| | | String cityCode = cleanCode.substring(0, 4); // 市级编码(如:3608) |
| | | String districtCode = cleanCode; // 区级编码(如:360802) |
| | | |
| | | return provinceCode + "," + cityCode + "," + districtCode; |