Commit 63904d74 authored by hongguangwu's avatar hongguangwu

createTimeEnd

parent e3b651e0
......@@ -49,10 +49,15 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
* 申请时间起
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
@Schema(description = "申请时间起")
private LocalDateTime createTimeStart;
/**
* 申请时间止
*/
@Schema(description = "申请时间止")
private LocalDateTime createTimeEnd;
/**
* @Author fxj
* 查询数据起
......
......@@ -210,15 +210,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
idList = searchVo.getIdList();
wrapper.in(TDispatchInfo::getId, idList);
}
if (Common.isNotNull(searchVo.getCreateTimeStart())) {
wrapper.ge(TDispatchInfo::getCreateTime, searchVo.getCreateTimeStart());
}
if (Common.isNotNull(searchVo.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, searchVo.getCreateTimeEnd());
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TDispatchInfoSearchVo entity) {
LambdaQueryWrapper<TDispatchInfo> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TDispatchInfo::getCreateTime, entity.getCreateTimes()[0])
.le(TDispatchInfo::getCreateTime,
entity.getCreateTimes()[1]);
if (Common.isNotNull(entity.getCreateTimeStart())) {
wrapper.ge(TDispatchInfo::getCreateTime, entity.getCreateTimeStart());
}
if (Common.isNotNull(entity.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, entity.getCreateTimeEnd());
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TDispatchInfo::getCreateName, entity.getCreateName());
......
......@@ -394,16 +394,18 @@
AND a.BELONG_UNIT_NAME = #{tDispatchInfo.belongUnitName}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND s.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
<if test="tDispatchInfo.createTimes != null and tDispatchInfo.createTimes.length>0">
AND a.UPDATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimes[0]}
AND a.UPDATE_TIME <![CDATA[ <= ]]> #{tDispatchInfo.createTimes[1]}
</if>
<if test="tDispatchInfo.createTimeStart != null and tDispatchInfo.createTimeStart.trim() != ''">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimeStart}
</if>
<if test="tDispatchInfo.createTimeEnd != null and tDispatchInfo.createTimeEnd.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tDispatchInfo.createTimeEnd}
</if>
</if>
</sql>
<!--tDispatchInfo简单分页查询-->
......
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