| | |
| | | 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; |
| | |
| | | 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 出入库通知单service层,包含入库通知单和出库通知单 |
| | |
| | | @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public Page<InoutNoticeOut> queryAllNoticeOut(Specification<InoutNoticeOut> specification, Pageable pageable) { |
| | | return noticeOutRepository.findAll(specification, pageable); |
| | | //return noticeOutRepository.findAll(specification, pageable); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |