巡检点名称模糊查询

This commit is contained in:
guo 2023-08-18 13:41:48 +08:00
parent 59fbf776cd
commit 72264b5104
6 changed files with 14 additions and 4 deletions

View File

@ -514,13 +514,13 @@ public class RedisRepository {
/**
* 存在则获取不存在则查询后获取
* 存在则获取不存在则查询后获取默认4小时过期时间
*
* @param key the key
* @return 需要的对象
*/
public <Y> Y getOrSet(String key, Supplier<Y> supplier) {
return getOrSet(key, supplier, 12 * 60 * 60L);
return getOrSet(key, supplier, 4 * 60 * 60L);
}
/**

View File

@ -17,7 +17,7 @@ public class BaseRequest extends PageQO {
and cpi.update_date >= #{dto.queryStartTime}
</if>
<if test="dto.queryEndTime != null">
and cpi.update_date <![CDATA[<=]]> concat(#{dto.queryEndTime},' 23:59:59')
and cpi.update_date <![CDATA[<=]]> concat(date_format(#{dto.queryEndTime},'%Y-%m-%d'),' 23:59:59')
</if>
*/
@ApiModelProperty(value = "查询开始时间格式2023-05-22")

View File

@ -99,5 +99,8 @@ public class Company implements Serializable {
@ApiModelProperty(value = "登录密码")
@TableField(exist = false)
private java.lang.String showPassword;
@ApiModelProperty(value = "人员姓名")
@TableField(exist = false)
private java.lang.String realName;
}

View File

@ -578,6 +578,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
su.setUserTel(company.getCompanyTel());
su.setSn(uuid);
su.setAccountType(2);
su.setRealName(company.getRealName());
systemUserMapper.insert(su);
}
@ -603,6 +604,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
su.setPassword(passwordEncoder.encode(company.getShowPassword()));
su.setShowPassword(company.getShowPassword());
su.setUserTel(company.getCompanyTel());
su.setRealName(company.getRealName());
systemUserMapper.update(su, new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getSn, company.getFullSn()).eq(SystemUser::getAccountType, 2));
}

View File

@ -25,4 +25,6 @@ public class CheckingPointInfoPageDto {
private Date queryEndTime;
@ApiModelProperty("巡检点状态 1正常 2异常 需要默认选择正常")
private Integer status;
@ApiModelProperty("巡检点名称")
private String checkingPointName;
}

View File

@ -26,7 +26,10 @@
and cpi.update_date >= #{dto.queryStartTime}
</if>
<if test="dto.queryEndTime != null">
and cpi.update_date <![CDATA[<=]]> concat(#{dto.queryEndTime},' 23:59:59')
and cpi.update_date <![CDATA[<=]]> concat(date_format(#{dto.queryEndTime},'%Y-%m-%d'),' 23:59:59')
</if>
<if test="dto.checkingPointName != null and dto.checkingPointName != ''">
and cp.checking_point_name like concat('%',#{dto.checkingPointName},'%')
</if>
group by cpi.id
order by cpi.create_date desc