Browse Source

fix:[填报表单]优化

master
15881625488@163.com 2 months ago
parent
commit
03fa11ee41
4 changed files with 15 additions and 7 deletions
  1. +5
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java
  2. +4
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java
  3. +3
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
  4. +3
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java

+ 5
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java View File

@ -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;
/**
* 失效日期

+ 4
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java View File

@ -1332,9 +1332,11 @@ public class GyzjServiceImpl extends ServiceImpl implements IG
LinkedList<GyzjTz> tzList = new LinkedList<>();
if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) {
List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class);
List<String> 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<StudyFormFillResource> 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<String> bhList= tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList());
LambdaQueryWrapper<Gyzj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Gyzj::getBh, bhList);
gyzjList = this.list(queryWrapper);

+ 3
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java View File

@ -1236,9 +1236,10 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
LinkedList<MjyTz> tzList = new LinkedList<>();
if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) {
List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class);
List<String> bhList = studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || p.getType().equals(StudyFormFillResourceTypeEnum.mjy.getValue())).map(StudyFormFillResource::getBh).collect(Collectors.toList());
List<StudyFormFillResource> 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<String> bhList =tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList());
LambdaQueryWrapper<Mjy> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Mjy::getBh, bhList);
mjyList = this.list(queryWrapper);

+ 3
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java View File

@ -653,9 +653,10 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
LinkedList<SjTz> tzList = new LinkedList<>();
if (StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) {
List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class);
List<String> bhList = studyFormFillResourceList.stream().filter(p -> (p.getType() == null && mark) || p.getType().equals(StudyFormFillResourceTypeEnum.sj.getValue())).map(StudyFormFillResource::getBh).collect(Collectors.toList());
List<StudyFormFillResource> 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<String> bhList = tmp.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList());
LambdaQueryWrapper<Sj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Sj::getBh, bhList);
sjList = this.list(queryWrapper);

Loading…
Cancel
Save