|
|
|
@ -2,8 +2,8 @@ package com.foreverwin.mesnac.meapi.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.dto.OperationDto;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.NcGroupMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.NcGroup;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.Operation;
|
|
|
|
@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -51,13 +52,21 @@ public class NcGroupServiceImpl extends ServiceImpl<NcGroupMapper, NcGroup> impl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IPage selectPageByOperation(Page<NcGroup> frontPage, String globalQuery, String operation) {
|
|
|
|
|
public List<NcGroup> selectPageByOperation(OperationDto dto) {
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
if (StringUtils.isBlank(operation)) {
|
|
|
|
|
if (StringUtils.isBlank(dto.getOperation())) {
|
|
|
|
|
throw new BaseException("工序不能为空");
|
|
|
|
|
}
|
|
|
|
|
String operationBO = new OperationBOHandle(site, operation, "#").getValue();
|
|
|
|
|
return ncGroupMapper.selectPageByOperation(frontPage, site, operationBO, globalQuery);
|
|
|
|
|
String operationBO = new OperationBOHandle(site, dto.getOperation(), "#").getValue();
|
|
|
|
|
String ncGroup="";
|
|
|
|
|
if (dto.getType().equals("Z")){
|
|
|
|
|
ncGroup="QC_";
|
|
|
|
|
}else if (dto.getType().equals("S")){
|
|
|
|
|
ncGroup="E_";
|
|
|
|
|
}else {
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
|
return ncGroupMapper.selectPageByOperation(site, operationBO,ncGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|