配置文件如下:
SELECT
GENERALLY_HIDDEN_ID AS generallyHiddenId,
CHECK_DATE AS checkDate,
DICT_CHECK_TYPE_ID AS dictCheckTypeId,
CHECK_DEPT_ID AS checkDeptId,
HIDDEN_DEPT_ID AS hiddenDeptId,
LAST_DEPT_ID AS lastDeptId,
GENERALLY_PROBLEMS AS generallyProblems,
RECTIFICATION_STATUS AS rectificationStatus,
REPORTED_USER_NAME AS reportedUserName,
REPORTED_USER_ID AS reportedUserId,
REPORTED_DATE AS reportedDate,
RECTIFICATION_DATE AS rectificationDate,
DICT_WARN_LEVEL_ID AS dictWarnLevelId,
CUR_WARN_LEVEL_ID AS curWarnLevelId,
HIST_WARN_LEVEL_ID AS histWarnLevelId,
REVIEW_USER_NAME AS reviewUserName,
REVIEW_DATE AS reviewDate,
THIRD_DEPT_ID AS thirdDeptId,
HAZARD_ID AS hazardId,
DICT_RECTIFICATION_TYPE_ID AS dictRectificationTypeId,
CREATE_USER_NAME AS createUserName,
DELAY_STATUS AS isDelayAudit,
DELAY_AUDIT_STATUS AS delayAuditStatus,
DELAY_AUDIT_USER_ID AS delayAuditUserId,
DELAY_CONFIM_DATE AS delayConfimDate,
RESPON_USER_ID AS responUserId,
FOUR_CONFIRM_FLAG AS fourConfirmFlag,
FOUR_CONFIRM_STATUS AS fourConfirmStatus,
DICT_HIDDEN_LEVEL_ID AS dictHiddenLevelId,
GENERALLY_ADDRESS AS generallyAddress,
DICT_SPECIALTY_TYPE_ID AS dictSpecialtyTypeId,
RECTIFICATION_MANDATE AS rectificationMandate,
RECT_USER_ID AS rectUserId,
DICT_BELONGS_PLATE_ID AS dictBelongsPlateId,
DESTROY_STATUS AS destroyStatus,
GENERALLY_HIDDEN_STATUS AS generallyHiddenStatus,
PENALTY_POINTS AS penaltyPoints
FROM AQ_GENERALLY_HIDDEN LEFT JOIN (SELECT CONFIG_ID,DICT_HIDDEN_LEVEL_ID FROM AQ_HAZARD_INFO, AQ_HAZARD_CONFIG WHERE AQ_HAZARD_INFO.HAZARD_ID = AQ_HAZARD_CONFIG.HAZARD_ID) TEMP
ON AQ_GENERALLY_HIDDEN.HAZARD_ID = TEMP.CONFIG_ID
AND SUB_DEPT_ID = #{subDeptId}
AND CHECK_DATE >= #{startDate}
AND CHECK_DATE <= #{endDate}
AND CHECK_DEPT_ID NOT IN (11111111, 11111112, 11111113, 11111114, 11111115)
AND CHECK_DEPT_ID = #{checkDeptId}
AND HIDDEN_DEPT_ID = #{hiddenDeptId}
AND DELETE_FLAG = #{deleteFlag}
AND LAST_DEPT_ID = #{deptId}
AND RECTIFICATION_STATUS = 1
AND RECTIFICATION_STATUS IN (0,1)
ORDER BY GENERALLY_HIDDEN_ID DESC
entity如下
public class AqGenerallyHidden extends BaseEntity {
private static final long serialVersionUID = -5069942087880879743L;
/**
* 一般隐患ID
*/
private Long generallyHiddenId = null;
/**
* 检查日期
*/
private String checkDate = null;
/**
* 检查类型
*/
private Long dictCheckTypeId = null;
.
.
.
Dao如下
public abstract List searchHiddenListDetailList(Map paramMap);
service如下:
public List searchHiddenListDetailList(Map paramMap) {
try {
List list = ((AqGenerallyStatisticsDao) super.getBaseDao()).searchHiddenListDetailList(paramMap);
return list;
} catch (Exception e) {
e.printStackTrace();
throw new BusinessException("[searchHiddenListDetailList]操作异常");
}
}
现在程序执行不报错。能打印sql语句。sql语句可以执行,并且能查询到数据。
但是返回的List为空。
不知道为什么,求各位指教。