参数收集、参数模板管理、上报库管理,检索编号问题处理。
This commit is contained in:
+18
-1
@@ -386,7 +386,24 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// 搜索NIO编号或认证类别编号 精确搜索
|
// 搜索NIO编号或认证类别编号 精确搜索
|
||||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
||||||
//queryWrapper.and(wrapper->wrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber()));
|
//queryWrapper.and(wrapper->wrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber()));
|
||||||
queryWrapper.and(wrapper->wrapper.like("nio_number", paramsCollectManifestVO.getAllNumber()));
|
//queryWrapper.and(wrapper->wrapper.like("nio_number", paramsCollectManifestVO.getAllNumber()));
|
||||||
|
|
||||||
|
QueryWrapper<CertCategoryParamsInfoPublishEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoPublishEO::getParamsNumber,paramsCollectManifestVO.getAllNumber());
|
||||||
|
List<CertCategoryParamsInfoPublishEO> categoryParamsList = this.certCategoryParamsInfoPublishEOService.list(categoryParamsQueryWrap);
|
||||||
|
|
||||||
|
queryWrapper.and(wrapper -> {
|
||||||
|
wrapper.eq("nio_number",paramsCollectManifestVO.getAllNumber());
|
||||||
|
if(CollectionUtils.isNotEmpty(categoryParamsList)){
|
||||||
|
List<String> nioNumberList = categoryParamsList.stream().map(CertCategoryParamsInfoPublishEO::getNioNumber)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(nioNumberList)){
|
||||||
|
wrapper.or(wrap -> {
|
||||||
|
wrap.in("nio_number",nioNumberList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||||
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
||||||
|
|||||||
+4
-1
@@ -71,7 +71,10 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="paramsReportDetailVO != null">
|
<if test="paramsReportDetailVO != null">
|
||||||
<if test="paramsReportDetailVO.allNumber !=null and paramsReportDetailVO.allNumber !=''">
|
<if test="paramsReportDetailVO.allNumber !=null and paramsReportDetailVO.allNumber !=''">
|
||||||
AND prd.nio_number LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.allNumber}),'%')
|
AND (
|
||||||
|
prd.nio_number = #{paramsReportDetailVO.allNumber}
|
||||||
|
or prd.nio_number in (select nio_number from report_cert_category_params_info rccpi where rccpi.params_number = #{paramsReportDetailVO.allNumber})
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="paramsReportDetailVO.paramsName !=null and paramsReportDetailVO.paramsName !=''">
|
<if test="paramsReportDetailVO.paramsName !=null and paramsReportDetailVO.paramsName !=''">
|
||||||
AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%')
|
AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%')
|
||||||
|
|||||||
+25
-3
@@ -10,13 +10,16 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -29,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,6 +52,9 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IParamsInfoPublishEOService paramsInfoPublishEOService;
|
private IParamsInfoPublishEOService paramsInfoPublishEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -83,9 +90,24 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
|
|
||||||
QueryWrapper<ParamsInfoEO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ParamsInfoEO> queryWrapper = new QueryWrapper<>();
|
||||||
String finalAllNumber = allNumber;
|
String finalAllNumber = allNumber;
|
||||||
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId())
|
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId());
|
||||||
.and(StringUtils.isNotEmpty(allNumber), wrapper->wrapper.eq("pi.nio_number", finalAllNumber).or().eq("ccpi.params_number", finalAllNumber))
|
if(StringUtils.isNotEmpty(allNumber)){
|
||||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
|
queryWrapper.and(wrapper->wrapper.eq("pi.nio_number", finalAllNumber));
|
||||||
|
|
||||||
|
QueryWrapper<CertCategoryParamsInfoEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoEO::getParamsNumber,finalAllNumber);
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = this.certCategoryParamsInfoEOService.list(categoryParamsQueryWrap);
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(certCategoryParamsInfoEOList)){
|
||||||
|
List<String> nioNumberList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getNioNumber).collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(nioNumberList)){
|
||||||
|
queryWrapper.or(wrap -> {
|
||||||
|
wrap.in("pi.nio_number",nioNumberList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
|
||||||
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory())
|
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory())
|
||||||
.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
|
.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
|
||||||
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
||||||
|
|||||||
-1
@@ -180,7 +180,6 @@
|
|||||||
<select id="selectpage" resultMap="ParamsInfoEOResultMap">
|
<select id="selectpage" resultMap="ParamsInfoEOResultMap">
|
||||||
select DISTINCT pi.*
|
select DISTINCT pi.*
|
||||||
from params_info pi
|
from params_info pi
|
||||||
left join cert_category_params_info ccpi on pi.nio_number = ccpi.nio_number and pi.params_template_id = ccpi.params_template_id
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user