Commit 63904d74 authored by hongguangwu's avatar hongguangwu

createTimeEnd

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