diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java index 8e02071..8e38f48 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java @@ -1,5 +1,8 @@ package com.hxhq.business.dto.study; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; + /** * @author tanfei */ @@ -37,7 +40,8 @@ public class StudyFormFillResource { /** * 类型:1:试剂;3:给药制剂;5:麻精药;7:供试品(产生的为null) */ - private Integer type; + @JsonSetter(nulls = Nulls.SKIP) + private Integer type=null; /** * 失效日期 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java index 044a7a8..9eb5062 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java @@ -1332,9 +1332,11 @@ public class GyzjServiceImpl extends ServiceImpl implements IG LinkedList tzList = new LinkedList<>(); if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) { List studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class); - List bhList = studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || p.getType().equals(StudyFormFillResourceTypeEnum.gyzj.getValue())).map(StudyFormFillResource::getBh).collect(Collectors.toList()); + String ss="1"; + List tmp= studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) ||(p.getType()!=null&&StudyFormFillResourceTypeEnum.gyzj.getValue()==p.getType())).collect(Collectors.toList()); // 根据编号获取需要处置的列表 - if (bhList.size() > 0) { + if (tmp.size() > 0) { + List bhList= tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.in(Gyzj::getBh, bhList); gyzjList = this.list(queryWrapper); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java index 83ffe61..2509671 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java @@ -1236,9 +1236,10 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS LinkedList tzList = new LinkedList<>(); if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) { List studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class); - List bhList = studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || p.getType().equals(StudyFormFillResourceTypeEnum.mjy.getValue())).map(StudyFormFillResource::getBh).collect(Collectors.toList()); + List tmp= studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || (p.getType()!=null&&StudyFormFillResourceTypeEnum.mjy.getValue()==p.getType())).collect(Collectors.toList()); // 根据编号获取需要处置的列表 - if (bhList.size() > 0) { + if (tmp.size() > 0) { + List bhList =tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.in(Mjy::getBh, bhList); mjyList = this.list(queryWrapper); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java index 30fcb8f..6b9f1d6 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java @@ -653,9 +653,10 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi LinkedList tzList = new LinkedList<>(); if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) { List studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class); - List bhList = studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || p.getType().equals(StudyFormFillResourceTypeEnum.sj.getValue())).map(StudyFormFillResource::getBh).collect(Collectors.toList()); + List tmp= studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || (p.getType()!=null&&StudyFormFillResourceTypeEnum.sj.getValue()==p.getType())).collect(Collectors.toList()); // 根据编号获取需要处置的列表 - if (bhList.size() > 0) { + if (tmp.size() > 0) { + List bhList = tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.in(Sj::getBh, bhList); sjList = this.list(queryWrapper);