Browse Source

fix:[填报表单]使用存储

master
15881625488@163.com 2 months ago
parent
commit
e686ca174e
8 changed files with 338 additions and 223 deletions
  1. +64
    -21
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillResource.java
  2. +61
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormFillResourceTypeEnum.java
  3. +2
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjJcgjServiceImpl.java
  4. +206
    -200
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java
  5. +2
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyJcgjServiceImpl.java
  6. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
  7. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java
  8. +1
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java

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

@ -4,38 +4,81 @@ package com.hxhq.business.dto.study;
* @author tanfei * @author tanfei
*/ */
public class StudyFormFillResource { public class StudyFormFillResource {
/** /**
* mc : 生理盐水
* bh : slys202601220002
* ph :
* nd : 30mg/mL
* source : 配置
* type : 1
* sxrq : 2026-01-12 16:03:27
* ndz : 30
* nddw : mg/mL
* kc : 36000
* kcdw : mL
* syl : 20
* syldw : mL
* 名称
*/ */
private String mc; private String mc;
/**
* 编号
*/
private String bh; private String bh;
/**
* 批号
*/
private String ph; private String ph;
/**
* 浓度
*/
private String nd; private String nd;
/**
* 来源
*/
private String source; private String source;
private int type;
/**
* 类型1试剂3给药制剂5麻精药7供试品产生的为null
*/
private Integer type;
/**
* 失效日期
*/
private String sxrq; private String sxrq;
private int ndz;
/**
* 浓度值
*/
private Integer ndz;
/**
* 浓度单位
*/
private String nddw; private String nddw;
/**
* 库存
*/
private String kc; private String kc;
/**
* 库存单位
*/
private String kcdw; private String kcdw;
/**
* 使用量
*/
private String syl; private String syl;
/**
* 使用量单位
*/
private String syldw; private String syldw;
/**
* 有效周期
*/
private String yxzq; private String yxzq;
/**
* 有效周期单位
*/
private String yxzqdw; private String yxzqdw;
public String getMc() { public String getMc() {
return mc; return mc;
} }
@ -76,11 +119,11 @@ public class StudyFormFillResource {
this.source = source; this.source = source;
} }
public int getType() {
public Integer getType() {
return type; return type;
} }
public void setType(int type) {
public void setType(Integer type) {
this.type = type; this.type = type;
} }
@ -92,11 +135,11 @@ public class StudyFormFillResource {
this.sxrq = sxrq; this.sxrq = sxrq;
} }
public int getNdz() {
public Integer getNdz() {
return ndz; return ndz;
} }
public void setNdz(int ndz) {
public void setNdz(Integer ndz) {
this.ndz = ndz; this.ndz = ndz;
} }

+ 61
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormFillResourceTypeEnum.java View File

@ -0,0 +1,61 @@
package com.hxhq.business.enums.study;
/**
* 类型1试剂3给药制剂5麻精药7供试品产生的为null
* @author tanfei
*/
public enum StudyFormFillResourceTypeEnum {
/**
* 试剂
*/
sj(1, "试剂"),
/**
* 给药制剂
*/
gyzj(3, "给药制剂"),
/**
* 麻精药
*/
mjy(5, "麻精药"),
/**
* 供试品
*/
gsp(7, "供试品");
private int value;
private String text;
StudyFormFillResourceTypeEnum(int value, String text) {
this.value = value;
this.text = text;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public static StudyFormFillResourceTypeEnum getEnumByValue(int type) {
for (StudyFormFillResourceTypeEnum bt : values()) {
if (bt.value == type) {
return bt;
}
}
return null;
}
}

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

@ -11,6 +11,7 @@ import com.hxhq.business.utils.lang.GyzjJcnrUtil;
import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.utils.StringUtils;
import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.api.domain.SysUser;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.GyzjJcgjMapper; import com.hxhq.business.mapper.GyzjJcgjMapper;
import com.hxhq.business.service.IGyzjJcgjService; import com.hxhq.business.service.IGyzjJcgjService;
@ -60,6 +61,7 @@ public class GyzjJcgjServiceImpl extends ServiceImpl i
* @param remark 备注 * @param remark 备注
*/ */
@Override @Override
@Async
public void saveJcgj(Long gyzjId, Integer jcgjlx, String jcmc, Integer jcmcys, Map<String, String> jcnr, SysUser qmr, String remark){ public void saveJcgj(Long gyzjId, Integer jcgjlx, String jcmc, Integer jcmcys, Map<String, String> jcnr, SysUser qmr, String remark){
GyzjJcgj gyzjJcgj = new GyzjJcgj(); GyzjJcgj gyzjJcgj = new GyzjJcgj();
gyzjJcgj.setGyzjId(gyzjId); gyzjJcgj.setGyzjId(gyzjId);

+ 206
- 200
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java
File diff suppressed because it is too large
View File


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

@ -11,6 +11,7 @@ import com.hxhq.business.utils.lang.MjyJcnrUtil;
import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.utils.StringUtils;
import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.api.domain.SysUser;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.MjyJcgjMapper; import com.hxhq.business.mapper.MjyJcgjMapper;
import com.hxhq.business.service.IMjyJcgjService; import com.hxhq.business.service.IMjyJcgjService;
@ -60,6 +61,7 @@ public class MjyJcgjServiceImpl extends ServiceImpl impl
* @param remark 备注 * @param remark 备注
*/ */
@Override @Override
@Async
public void saveJcgj(Long mjyId, Integer jcgjlx, String jcmc, Integer jcmcys, Map<String, String> jcnr, SysUser qmr, String remark){ public void saveJcgj(Long mjyId, Integer jcgjlx, String jcmc, Integer jcmcys, Map<String, String> jcnr, SysUser qmr, String remark){
MjyJcgj mjyJcgj = new MjyJcgj(); MjyJcgj mjyJcgj = new MjyJcgj();
mjyJcgj.setMjyId(mjyId); mjyJcgj.setMjyId(mjyId);

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

@ -1235,7 +1235,7 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
LinkedList<MjyTz> tzList = new LinkedList<>(); LinkedList<MjyTz> tzList = new LinkedList<>();
if(StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) { if(StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) {
List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class); List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class);
List<String> bhList = studyFormFillResourceList.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList());
List<String> bhList = studyFormFillResourceList.stream().filter(p->p.getType()==null).map(StudyFormFillResource::getBh).collect(Collectors.toList());
// 根据编号获取需要处置的列表 // 根据编号获取需要处置的列表
LambdaQueryWrapper<Mjy> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Mjy> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Mjy::getBh, bhList); queryWrapper.in(Mjy::getBh, bhList);

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

@ -653,7 +653,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
LinkedList<SjTz> tzList = new LinkedList<>(); LinkedList<SjTz> tzList = new LinkedList<>();
if(StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) { if(StringUtils.isNotEmpty(resource) && !StringUtils.equals("[]", resource)) {
List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class); List<StudyFormFillResource> studyFormFillResourceList = JSONUtil.toList(resource, StudyFormFillResource.class);
List<String> bhList = studyFormFillResourceList.stream().map(StudyFormFillResource::getBh).collect(Collectors.toList());
List<String> bhList = studyFormFillResourceList.stream().filter(p->p.getType()==null).map(StudyFormFillResource::getBh).collect(Collectors.toList());
// 根据编号获取需要处置的试剂列表 // 根据编号获取需要处置的试剂列表
LambdaQueryWrapper<Sj> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Sj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Sj::getBh, bhList); queryWrapper.in(Sj::getBh, bhList);

+ 1
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java View File

@ -447,6 +447,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
if (template.getProduct().equals(ProductEnum.Mjy.getValue())) { if (template.getProduct().equals(ProductEnum.Mjy.getValue())) {
mjyService.genResource(studyFormFill, template, remark); mjyService.genResource(studyFormFill, template, remark);
} }
//todo使用存储
} }
/** /**

Loading…
Cancel
Save