Commit 31454e80 authored by fangxinjiang's avatar fangxinjiang

自动化日志查询项优化-fxj

parent 93f2f6ad
......@@ -251,10 +251,23 @@ public class TSocialSoldierLogServiceImpl extends ServiceImpl<TSocialSoldierLogM
private LambdaQueryWrapper buildQueryWrapper(TSocialSoldierLogSearchVo entity) {
LambdaQueryWrapper<TSocialSoldierLog> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimeStart())) {
// 派单项筛选:社保/医保
if (Common.isNotNull(entity.getDispatchItem()) && Common.isNotNull(entity.getDispatchItem())) {
wrapper.eq(TSocialSoldierLog::getDispatchItem, entity.getDispatchItem());
}
// 社保户模糊搜索
if (Common.isNotNull(entity.getSocialHuName()) && Common.isNotNull(entity.getSocialHuName())) {
wrapper.eq(TSocialSoldierLog::getSocialHuName, entity.getSocialHuName());
}
// 结果模糊搜索
if (Common.isNotNull(entity.getRemark()) && Common.isNotNull(entity.getRemark())) {
wrapper.like(TSocialSoldierLog::getRemark, entity.getRemark());
}
// 时间区间筛选
if (Common.isNotNull(entity.getCreateTimeStart())) {
wrapper.ge(TSocialSoldierLog::getCreateTime, entity.getCreateTimeStart());
}
if (ArrayUtil.isNotEmpty(entity.getCreateTimeEnd())) {
if (Common.isNotNull(entity.getCreateTimeEnd())) {
wrapper.le(TSocialSoldierLog::getCreateTime, entity.getCreateTimeEnd());
}
if (Common.isNotNull(entity.getCreateName())) {
......
......@@ -82,7 +82,7 @@
AND a.TYPE = #{tSocialSoldierLog.type}
</if>
<if test="tSocialSoldierLog.remark != null and tSocialSoldierLog.remark.trim() != ''">
AND a.REMARK = #{tSocialSoldierLog.remark}
AND a.REMARK LIKE CONCAT('%',#{tSocialSoldierLog.remark},'%')
</if>
<if test="tSocialSoldierLog.createBy != null and tSocialSoldierLog.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialSoldierLog.createBy}
......@@ -133,7 +133,7 @@
</if>
</select>
<!--tSocialSoldierLog简单分页查询-->
<!--tSocialSoldierLog 简单分页查询-->
<select id="getMaxTimeToLog" resultType="java.time.LocalDateTime">
SELECT
max(a.CREATE_TIME)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment