buildQueryWrapper修改

This commit is contained in:
Wang.Huan
2025-03-21 14:13:42 +08:00
parent 9401267fb9
commit c81a92e81d
3 changed files with 9 additions and 3 deletions

View File

@@ -108,7 +108,7 @@
</if>
<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE cast(#{deptId} as
varchar) = any(string_to_array(ancestors,,)) ))
varchar) = any(string_to_array(ancestors,',')) ))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}

View File

@@ -6,6 +6,8 @@ package com.openhis.web.inventorymanage.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 入库单据分页查询条件
*
@@ -24,4 +26,9 @@ public class InventorySearchParam {
/** 经手人 */
private Long practitionerId;
/**
* 单据时间
*/
private Date occurrenceTime;
}

View File

@@ -50,8 +50,7 @@ public class HisQueryUtils {
for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
String paramName = entry.getKey();
// 检查参数名是否以 "STime" 或 "ETime" 结尾
if (paramName.endsWith(CommonConstants.Common.S_TIME)
|| paramName.endsWith(CommonConstants.Common.E_TIME)) {
if (paramName.endsWith(CommonConstants.Common.S_TIME)) {
// 提取字段名(去掉 "STime" 或 "ETime" 后缀)
String fieldName = paramName.substring(0, paramName.length() - 5);
// 驼峰转下划线