| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.modules.tms.entity.ToolLedgerDetail; |
| | | import org.jeecg.modules.tms.mapper.ToolLedgerDetailMapper; |
| | | import org.jeecg.modules.tms.service.IToolLedgerDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: tms_tool_ledger_detail |
| | |
| | | @Service |
| | | public class ToolLedgerDetailServiceImpl extends ServiceImpl<ToolLedgerDetailMapper, ToolLedgerDetail> implements IToolLedgerDetailService { |
| | | |
| | | @Override |
| | | public IPage<ToolLedgerDetail> queryPageList(Page<ToolLedgerDetail> page, Map<String, String[]> parameterMap) { |
| | | QueryWrapper<Object> queryWrapper = Wrappers.query(); |
| | | String[] toolCodes = parameterMap.get("toolCode"); |
| | | if (toolCodes != null && toolCodes.length > 0) { |
| | | queryWrapper.like("p.tool_code", toolCodes[0]); |
| | | } |
| | | String[] statuses = parameterMap.get("status"); |
| | | if (statuses != null && statuses.length > 0) { |
| | | queryWrapper.eq("t.status", statuses[0]); |
| | | } |
| | | String[] excludeIds = parameterMap.get("excludeIds"); |
| | | if (excludeIds != null && excludeIds.length > 0) { |
| | | String[] idArray = excludeIds[0].split(","); |
| | | queryWrapper.notIn("t.id", idArray); |
| | | } |
| | | return this.baseMapper.queryPageList(page, queryWrapper); |
| | | } |
| | | } |