缺陷记录表增加查询条件

tags/yfai-mes-ext-v2.0
gsz 8 months ago
parent 7a847d4a53
commit b9ea5084fe

@ -70,11 +70,13 @@ public class MesPartInspectionService extends BaseMesService<MesPartInspection>
// DdlPreparedPack.getStringLikerPack(bean.getInventoryLocationCode(), "responsibleParty", packBeanLo);
List<MesOrg> orgList = mesOrgRDao.findByHqlWhere(packBeanLo);
//2.增加库区查询条件,文本框,支持模糊输入
// LOGGER.info("queryMesPartInspectionParamByPager-orgList:{}", orgList);
if(!StringUtil.isEmpty(bean.getInventoryLocationCode())){
if (!CollectionUtils.isEmpty(orgList)){
DdlPreparedPack.getInPackList(orgList.stream().map(MesOrg::getResponsibleParty).
filter(responsibleParty ->bean.getInventoryLocationCode().equals(responsibleParty)).collect(Collectors.toList()),
"responsibleParty", packBean);
String inventoryLocationCode = bean.getInventoryLocationCode();
List<String> collect = orgList.stream().filter(o->o.getInventoryLocationCode().equals(inventoryLocationCode))
.map(MesOrg::getResponsibleParty).collect(Collectors.toList());
DdlPreparedPack.getInPackList(collect,"responsibleParty", packBean);
}
}
pager = PagerHelper.getPager(pager, baseRDao.findByHqlWhereCount(packBean));
@ -94,7 +96,7 @@ public class MesPartInspectionService extends BaseMesService<MesPartInspection>
//1.页面增加库区字段(库区根据报废选择的责任人关联查询)
if (!StringUtils.isEmpty(mesPartInspection.getResponsibleParty())){
if (!CollectionUtils.isEmpty(orgList)){
List<MesOrg> collect = orgList.stream().filter(a -> bean.getResponsibleParty().equals(a.getResponsibleParty())).collect(Collectors.toList());
List<MesOrg> collect = orgList.stream().filter(a -> mesPartInspection.getResponsibleParty().equals(a.getResponsibleParty())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(collect)){
mesPartInspection.setInventoryLocationCode(collect.get(0).getInventoryLocationCode());
}

Loading…
Cancel
Save