From 03fa11ee415b05976d71174fed1daea7b298dfcc Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sat, 31 Jan 2026 09:08:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A[=E5=A1=AB=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=8D=95]=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hxhq/business/dto/study/StudyFormFillResource.java | 6 +++++- .../main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java | 6 ++++-- .../main/java/com/hxhq/business/service/impl/MjyServiceImpl.java | 5 +++-- .../src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java | 5 +++-- 4 files changed, 15 insertions(+), 7 deletions(-) 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);