From 1f5b385ce89c528b8e4f3385dc27a3ae8cb09f24 Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期日, 19 五月 2024 15:55:58 +0800 Subject: [PATCH] 修改bug --- zhang-content/src/main/java/com/ruoyi/service/impl/ZYearInfoServiceImpl.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZYearInfoServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZYearInfoServiceImpl.java index e924156..de7ee56 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZYearInfoServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZYearInfoServiceImpl.java @@ -10,6 +10,7 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.domain.ZProperty; import com.ruoyi.domain.ZYearInfo; import com.ruoyi.domain.ZYearInfo; import com.ruoyi.mapper.ZYearInfoMapper; @@ -17,8 +18,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -38,6 +41,9 @@ @Autowired ZYearInfoServiceImpl zYearInfoService; + @Resource + ZYearInfoMapper zYearInfoMapper; + private LambdaQueryWrapper<ZYearInfo> uniqueCondition(ZYearInfo zYearInfo) { LambdaQueryWrapper<ZYearInfo> lqw = new LambdaQueryWrapper<>(); lqw.eq(StringUtils.isNotEmpty(zYearInfo.getType()), ZYearInfo::getType, zYearInfo.getType()) @@ -56,6 +62,8 @@ .like(StringUtils.isNotEmpty(zYearInfo.getType()), ZYearInfo::getType, zYearInfo.getType()) .like(StringUtils.isNotEmpty(zYearInfo.getHospital()), ZYearInfo::getHospital, zYearInfo.getHospital()) .like(StringUtils.isNotEmpty(zYearInfo.getTitle()), ZYearInfo::getTitle, zYearInfo.getTitle()) + .like(StringUtils.isNotEmpty(zYearInfo.getNotice()),ZYearInfo::getNotice,zYearInfo.getNotice()) + .like(StringUtils.isNotEmpty(zYearInfo.getRemark()),ZYearInfo::getRemark,zYearInfo.getRemark()) .between(zYearInfo.getHappenStartTime() != null && zYearInfo.getHappenEndTime() != null, ZYearInfo::getCheckTime, zYearInfo.getHappenStartTime(), zYearInfo.getHappenEndTime()) .orderByDesc(ZYearInfo::getCreateTime); return lqw; @@ -113,6 +121,21 @@ } @Override + public AjaxResult listType() { + List<String> result = zYearInfoMapper.listType(); + return AjaxResult.success(result); + } + + @Override + public List<ZYearInfo> selectByCondition() { + SysUser user = SecurityUtils.getLoginUser().getUser(); + Long userId = user.getUserId(); + ZYearInfo zYearInfo = new ZYearInfo(); + LambdaQueryWrapper<ZYearInfo> lqw = buildCondition(zYearInfo, userId); + return list(lqw); + } + + @Override @Transactional public AjaxResult importExcel(MultipartFile file) { -- Gitblit v1.9.1