From 096296cd7485c5583c8194d88cca700e3c4d84a0 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 01 十二月 2025 16:50:42 +0800
Subject: [PATCH] 调整基础配置信息查询方式,取消jpa
---
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java | 46 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
index cc37c83..9f157ce 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -1,8 +1,10 @@
package com.fzzy.igds.service;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.NoticeDto;
import com.fzzy.igds.data.NoticeParam;
+import com.fzzy.igds.mapper.InoutNoticeInMapper;
import com.fzzy.igds.mapper.InoutNoticeMapper;
import com.fzzy.igds.repository.InoutNoticeInRepository;
import com.fzzy.igds.repository.InoutNoticeOutRepository;
@@ -12,14 +14,17 @@
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
-import org.springframework.data.domain.Page;
+
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
+import java.util.Map;
/**
* @Description 鍑哄叆搴撻�氱煡鍗晄ervice灞傦紝鍖呭惈鍏ュ簱閫氱煡鍗曞拰鍑哄簱閫氱煡鍗�
@@ -37,15 +42,27 @@
@Resource
private InoutNoticeMapper noticeMapper;
- /**
+ @Resource
+ private InoutNoticeInMapper noticeInMapper;
+
+
+/* *//**
* JPA鍒嗛〉鏌ヨ鏁版嵁
*
- * @param specification
- * @param pageable
- * @return
- */
+ *//*
public Page<InoutNoticeIn> queryAllNoticeIn(Specification<InoutNoticeIn> specification, Pageable pageable) {
return noticeInRepository.findAll(specification, pageable);
+ }*/
+
+ public void pageQueryIn(Page<InoutNoticeIn> page, NoticeParam param) {
+ QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>();
+
+ if(null == param) param = new NoticeParam();
+ param.setCompanyId(ContextUtil.getCompanyId());
+
+ queryWrapper.eq("company_id", param.getCompanyId());
+
+ noticeInMapper.selectPage(page, queryWrapper);
}
/**
@@ -77,15 +94,20 @@
* @return
*/
public String saveOrUpdateIn(InoutNoticeIn data) {
- if (Constant.YN_Y.equals(data.getTag())) {
+ if (null == data.getUpdateBy()) {
+ data.setUpdateBy(ContextUtil.getLoginUserName());
+ data.setUpdateTime(new Date());
data.setCreateBy(ContextUtil.getLoginUserName());
data.setCreateTime(new Date());
data.setAuditStatus(Constant.COMPLETE_STATUS_NONE);
data.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
+ noticeInRepository.save(data);
+ } else {
+ data.setUpdateBy(ContextUtil.getLoginUserName());
+ data.setUpdateTime(new Date());
+ noticeInRepository.save(data);
}
- data.setUpdateBy(ContextUtil.getLoginUserName());
- data.setUpdateTime(new Date());
- noticeInRepository.save(data);
+
return null;
}
@@ -108,7 +130,8 @@
* @return
*/
public Page<InoutNoticeOut> queryAllNoticeOut(Specification<InoutNoticeOut> specification, Pageable pageable) {
- return noticeOutRepository.findAll(specification, pageable);
+ //return noticeOutRepository.findAll(specification, pageable);
+ return null;
}
/**
@@ -285,4 +308,5 @@
return null;
}
+
}
--
Gitblit v1.9.3