| | |
| | | package org.dromara.eims.service.impl; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.dromara.common.core.service.RepairReqService; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.SpringUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.eims.domain.EimsEqu; |
| | | import org.dromara.eims.domain.EimsFixtureBorrow; |
| | | import org.dromara.eims.domain.vo.EimsFixtureVo; |
| | | import org.dromara.eims.domain.vo.EimsInventoryDetailVo; |
| | | import org.dromara.eims.utils.DataFilterUtil; |
| | | import org.dromara.system.domain.SysDept; |
| | |
| | | */ |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class EimsRepairReqServiceImpl implements IEimsRepairReqService { |
| | | public class EimsRepairReqServiceImpl implements IEimsRepairReqService, RepairReqService { |
| | | |
| | | private final EimsRepairReqMapper baseMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | |
| | | |
| | | @Override |
| | | public TableDataInfo<EimsRepairReqVo> queryPageListCustom(EimsRepairReqBo bo, PageQuery pageQuery) { |
| | | DataFilterUtil.getInstance().filterRepairReq(bo); |
| | | //DataFilterUtil.getInstance().filterRepairReq(bo); |
| | | Page<EimsRepairReqVo> page = baseMapper.selectRepairReqList(pageQuery.build(), buildWrapper(bo)); |
| | | return TableDataInfo.build(page); |
| | | } |
| | |
| | | qw.eq(bo.getRepairDept() != null, "a.repair_dept", bo.getRepairDept()); |
| | | qw.eq(bo.getRepairUser() != null, "a.repair_user", bo.getRepairUser()); |
| | | qw.eq(StringUtils.isNotBlank(bo.getFaultType()), "a,fault_type", bo.getFaultType()); |
| | | qw.eq(params.containsKey("createBy"), "a.create_by", params.get("createBy")); |
| | | qw.in(params.containsKey("createBy"), "a.create_by", (List<Long>) params.get("createBy")); |
| | | qw.eq(params.containsKey("status"), "a.status", params.get("status")); |
| | | qw.between(params.get("beginReqTime") != null && params.get("endReqTime") != null, |
| | | "a.req_time", params.get("beginReqTime"), params.get("endReqTime")); |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String selectRepairReqCodeByIds(String reqIds) { |
| | | List<String> list = new ArrayList<>(); |
| | | for (Long id : StringUtils.splitTo(reqIds, Convert::toLong)) { |
| | | EimsRepairReqVo vo = SpringUtils.getAopProxy(this).queryById(id); |
| | | if (ObjectUtil.isNotNull(vo)) { |
| | | list.add(vo.getCode()); |
| | | } |
| | | } |
| | | return String.join(StringUtils.SEPARATOR, list); |
| | | } |
| | | |
| | | } |