Browse Source

fix:[资源库管理][选择器]

master
HanLong 3 hours ago
parent
commit
81ed060dd7
14 changed files with 107 additions and 15 deletions
  1. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Bacteria.java
  2. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Cell.java
  3. +10
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/sj/SjListDto.java
  4. +9
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java
  5. +10
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyCellSearchForm.java
  6. +1
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/BacteriaMapper.java
  7. +1
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/CellMapper.java
  8. +12
    -5
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java
  9. +11
    -5
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java
  10. +6
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java
  11. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/SjPdf.java
  12. +11
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml
  13. +11
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/CellMapper.xml
  14. +2
    -2
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Bacteria.java View File

@ -48,6 +48,17 @@ public class Bacteria extends MpBaseEntity
@TableField(exist = false)
private String studyName;
@TableField(exist = false)
private String studySn;
public String getStudySn() {
return studySn;
}
public void setStudySn(String studySn) {
this.studySn = studySn;
}
public String getStudyName() {
return studyName;
}

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Cell.java View File

@ -48,6 +48,17 @@ public class Cell extends MpBaseEntity
@TableField(exist = false)
private String studyName;
@TableField(exist = false)
private String studySn;
public String getStudySn() {
return studySn;
}
public void setStudySn(String studySn) {
this.studySn = studySn;
}
public String getStudyName() {
return studyName;
}

+ 10
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/sj/SjListDto.java View File

@ -14,12 +14,22 @@ public class SjListDto extends Sj {
/** 所属试验名称 */
private String studyName;
private String studySn;
/** 所属表单名称 */
private String formName;
/** 表单所属人 */
private String formUserName;
public String getStudySn() {
return studySn;
}
public void setStudySn(String studySn) {
this.studySn = studySn;
}
public String getDeptName() {
return deptName;
}

+ 9
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/sj/SjSearchListForm.java View File

@ -35,11 +35,20 @@ public class SjSearchListForm {
/** 试验名称 */
private String studyName;
private String studySn;
/** 所属部门名称 */
private String deptName;
private Integer archive;
public String getStudySn() {
return studySn;
}
public void setStudySn(String studySn) {
this.studySn = studySn;
}
public String getDeptName() {
return deptName;
}

+ 10
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyCellSearchForm.java View File

@ -18,6 +18,8 @@ public class StudyCellSearchForm {
/** 所属试验名称 */
private String studyName;
private String studySn;
/** 有效期开始日期 */
private String startDate;
@ -27,6 +29,14 @@ public class StudyCellSearchForm {
/** 试验id */
private Long studyId;
public String getStudySn() {
return studySn;
}
public void setStudySn(String studySn) {
this.studySn = studySn;
}
public String getMc() {
return mc;
}

+ 1
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/BacteriaMapper.java View File

@ -24,6 +24,7 @@ public interface BacteriaMapper extends BaseMapper
* @return
*/
List<Bacteria> queryStudyList(@Param("ew") Wrapper<Bacteria> queryWrapper);
List<Bacteria> queryList(@Param("ew") Wrapper<Bacteria> queryWrapper);
/**
* 批量修改库存

+ 1
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/CellMapper.java View File

@ -24,6 +24,7 @@ public interface CellMapper extends BaseMapper
* @return
*/
List<Cell> queryStudyList(@Param("ew") Wrapper<Cell> queryWrapper);
List<Cell> queryList(@Param("ew") Wrapper<Cell> queryWrapper);
/**
* 批量修改库存

+ 12
- 5
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java View File

@ -58,10 +58,7 @@ public class BacteriaServiceImpl extends ServiceImpl i
public List<Bacteria> queryStudyList(StudyCellSearchForm form) {
QueryWrapper<Bacteria> queryWrapper = Wrappers.query();
queryWrapper.eq("b.del_flag", 0);
if(form.getStudyId() != null) {
queryWrapper.eq("b.study_id", form.getStudyId())
.eq("sb.study_id", form.getStudyId());
}
if(StringUtils.isNotEmpty(form.getMc())) {
queryWrapper.like("b.mc", form.getMc());
}
@ -80,8 +77,18 @@ public class BacteriaServiceImpl extends ServiceImpl i
if(StringUtils.isNotEmpty(form.getStudyName())) {
queryWrapper.like("s.name", form.getStudyName());
}
if (StringUtils.isNotEmpty(form.getStudySn())) {
queryWrapper.like("s.sn", form.getStudySn());
}
queryWrapper.orderByDesc("b.bh");
return baseMapper.queryStudyList(queryWrapper);
if(form.getStudyId() != null) {
queryWrapper.eq("b.study_id", form.getStudyId())
.eq("sb.study_id", form.getStudyId());
return baseMapper.queryStudyList(queryWrapper);
} else {
return baseMapper.queryList(queryWrapper);
}
}
@Override

+ 11
- 5
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java View File

@ -58,10 +58,7 @@ public class CellServiceImpl extends ServiceImpl implements IC
public List<Cell> queryStudyList(StudyCellSearchForm form) {
QueryWrapper<Cell> queryWrapper = Wrappers.query();
queryWrapper.eq("c.del_flag", 0);
if (form.getStudyId() != null) {
queryWrapper.eq("c.study_id", form.getStudyId())
.eq("sc.study_id", form.getStudyId());
}
if (StringUtils.isNotEmpty(form.getMc())) {
queryWrapper.like("c.mc", form.getMc());
}
@ -80,8 +77,17 @@ public class CellServiceImpl extends ServiceImpl implements IC
if (StringUtils.isNotEmpty(form.getStudyName())) {
queryWrapper.like("s.name", form.getStudyName());
}
if (StringUtils.isNotEmpty(form.getStudySn())) {
queryWrapper.like("s.sn", form.getStudySn());
}
queryWrapper.orderByDesc("c.bh");
return baseMapper.queryStudyList(queryWrapper);
if (form.getStudyId() != null) {
queryWrapper.eq("c.study_id", form.getStudyId())
.eq("sc.study_id", form.getStudyId());
return baseMapper.queryStudyList(queryWrapper);
} else {
return baseMapper.queryList(queryWrapper);
}
}

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

@ -108,6 +108,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
if (StringUtils.isNotEmpty(form.getStudyName())) {
queryWrapper.like("t.name", form.getStudyName());
}
if (StringUtils.isNotEmpty(form.getStudySn())) {
queryWrapper.like("t.sn", form.getStudySn());
}
if (form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) {
queryWrapper.in("s.zjzt", ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue());
} else {
@ -132,6 +135,9 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
if (StringUtils.isNotEmpty(form.getStudyName())) {
queryWrapper.like("t.name", form.getStudyName());
}
if (StringUtils.isNotEmpty(form.getStudySn())) {
queryWrapper.like("t.sn", form.getStudySn());
}
queryWrapper.orderByDesc("s.id");
return baseMapper.queryList(queryWrapper);
}

+ 1
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/SjPdf.java View File

@ -71,7 +71,7 @@ public class SjPdf {
PdfBaseUtil.addUnderlinedTitle(document, getName("表单信息"), 10, true);
Map<String, String> formData3 = new LinkedHashMap<>();
formData3.put(getName("所属表单"), sj.getFormName());
formData3.put(getName("表单所属试验"), sj.getStudyName());
formData3.put(getName("表单所属试验"), sj.getStudySn());
formData3.put(getName("表单所属人"), sj.getFormUserName());
formData3.put(getName("表单所属部门"), sj.getDeptName());
PdfBaseUtil.addFormTableColumns(document, formData3, 2);

+ 11
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml View File

@ -10,7 +10,7 @@
</foreach>
</update>
<select id="queryStudyList" resultType="com.hxhq.business.domain.Bacteria">
SELECT distinct b.id, b.*, s.name AS studyName
SELECT b.*, s.name AS studyName, s.sn AS studySn
FROM `t_bacteria` b
LEFT JOIN `t_study_bacteria` sb ON b.id=sb.resource_id
LEFT JOIN `t_study` s ON s.id = b.study_id
@ -20,6 +20,16 @@
</where>
</if>
</select>
<select id="queryList" resultType="com.hxhq.business.domain.Bacteria">
SELECT b.*, s.name AS studyName, s.sn AS studySn
FROM `t_bacteria` b
LEFT JOIN `t_study` s ON s.id = b.study_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
<update id="updateKc">
UPDATE t_bacteria SET tj = #{kc} WHERE id = #{id}

+ 11
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/CellMapper.xml View File

@ -10,7 +10,7 @@
</foreach>
</update>
<select id="queryStudyList" resultType="com.hxhq.business.domain.Cell">
SELECT distinct c.id, c.*, s.name as studyName
SELECT c.*, s.name as studyName, s.sn AS studySn
FROM `t_cell` c
LEFT JOIN `t_study_cell` sc on c.id=sc.resource_id
LEFT JOIN `t_study` s on s.id = c.study_id
@ -20,6 +20,16 @@
</where>
</if>
</select>
<select id="queryList" resultType="com.hxhq.business.domain.Cell">
SELECT c.*, s.name as studyName, s.sn AS studySn
FROM `t_cell` c
LEFT JOIN `t_study` s on s.id = c.study_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
<update id="updateKc">
UPDATE t_cell SET tj = #{kc} WHERE id = #{id}

+ 2
- 2
hxhq-modules/hxhq-system/src/main/resources/mapper/business/SjMapper.xml View File

@ -29,7 +29,7 @@
</if>
</select>
<select id="queryList" resultType="com.hxhq.business.dto.sj.SjListDto">
SELECT s.* , t.name AS studyName, d.dept_name AS deptName
SELECT s.* , t.name AS studyName, t.sn AS studySn, d.dept_name AS deptName
FROM t_sj s
LEFT JOIN t_study t ON s.study_id = t.id
LEFT JOIN sys_dept d ON d.dept_id = s.dept_id
@ -41,7 +41,7 @@
</select>
<!-- 试剂详情 -->
<select id="queryInfo" resultType="com.hxhq.business.dto.sj.SjListDto">
SELECT sj.*, s.name AS studyName, f.bdmc AS formName, f.user_mc AS formUserName, d.dept_name AS deptName FROM t_sj sj
SELECT sj.*, s.name AS studyName, s.sn AS studySn, f.bdmc AS formName, f.user_mc AS formUserName, d.dept_name AS deptName FROM t_sj sj
LEFT JOIN t_study s ON s.id = sj.study_id
LEFT JOIN t_study_form_fill f ON f.id = sj.study_form_id
LEFT JOIN sys_dept d ON d.dept_id = sj.dept_id

Loading…
Cancel
Save