Merge remote-tracking branch 'lis8.0/master'

This commit is contained in:
jiangs 2025-10-31 18:06:49 +08:00
commit e82c31b33e
5 changed files with 99 additions and 27 deletions

View File

@ -1,16 +1,14 @@
package com.czlis.interfaceCommon.mapper; package com.czlis.interfaceCommon.mapper;
import com.czlis.common.core.domain.entity.lis.LabResultMed; import com.czlis.common.core.domain.entity.lis.LabResultMed;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List; import java.util.List;
public interface LabResultMedMapper { public interface LabResultMedMapper {
List<LabResultMed> getLabResultMed(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh, @Param("xmdh")String xmdh); List<LabResultMed> getLabResultMed(LabResultMed labResultMed);
int getLabResultMedCount(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh); int getLabResultMedCount(LabResultMed labResultMed);
int delLabResultMed(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh,@Param("xmdh")String xmdh); int delLabResultMed(LabResultMed labResultMed);
int delLabResultMedAll(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
int insertLabResultMed(LabResultMed labResultMed); int insertLabResultMed(LabResultMed labResultMed);
int insertLabResultMedAll(List<LabResultMed> labResultMedList); int insertLabResultMedAll(List<LabResultMed> labResultMedList);
int updateLabResultMed(LabResultMed labResultMed);
} }

View File

@ -328,19 +328,30 @@ public class CommonUtil {
public LabPatlog getLabPatlog(Date jyrq, String yq, String ybh,Date xgrq) { public LabPatlog getLabPatlog(Date jyrq, String yq, String ybh,Date xgrq) {
return labPatlogMapper.getLabPatlog(jyrq, yq, ybh,xgrq); return labPatlogMapper.getLabPatlog(jyrq, yq, ybh,xgrq);
} }
public int getLabResultMedCount(Date jyrq, String yq, String ybh) { public int getLabResultMedCount(LabResultMed labResultMed) {
return labResultMedMapper.getLabResultMedCount(jyrq, yq, ybh); return labResultMedMapper.getLabResultMedCount(labResultMed);
} }
public List<LabResultMed> getLabResultMed(Date jyrq, String yq, String ybh,String xmdh){ public int getLabResultMedCountAll(Date jyrq, String yq, String ybh) {
return labResultMedMapper.getLabResultMed(jyrq, yq, ybh,xmdh); LabResultMed labResultMed=new LabResultMed();
labResultMed.setJyrq(jyrq);
labResultMed.setYq(yq);
labResultMed.setYbh(ybh);
return labResultMedMapper.getLabResultMedCount(labResultMed);
}
public List<LabResultMed> getLabResultMed(LabResultMed labResultMed){
return labResultMedMapper.getLabResultMed(labResultMed);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void delLabResultMed(Date jyrq, String yq, String ybh,String xmdh) { public void delLabResultMed(LabResultMed labResultMed) {
labResultMedMapper.delLabResultMed(jyrq, yq, ybh,xmdh); labResultMedMapper.delLabResultMed( labResultMed);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void delLabResultMedAll(Date jyrq, String yq, String ybh) { public void delLabResultMedAll(Date jyrq, String yq, String ybh) {
labResultMedMapper.delLabResultMedAll(jyrq, yq, ybh); LabResultMed labResultMed=new LabResultMed();
labResultMed.setJyrq(jyrq);
labResultMed.setYq(yq);
labResultMed.setYbh(ybh);
labResultMedMapper.delLabResultMed( labResultMed);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertLabResultMed(LabResultMed labResultMed){ public int insertLabResultMed(LabResultMed labResultMed){
@ -350,6 +361,10 @@ public class CommonUtil {
public int insertLabResultMedAll(List<LabResultMed> labResultMedList){ public int insertLabResultMedAll(List<LabResultMed> labResultMedList){
return labResultMedMapper.insertLabResultMedAll(labResultMedList); return labResultMedMapper.insertLabResultMedAll(labResultMedList);
} }
@Transactional(rollbackFor = Exception.class)
public int updateLabResultMed(LabResultMed labResultMed){
return labResultMedMapper.updateLabResultMed(labResultMed);
}
//封箱 //封箱
public List<LabReqpack> getLabReqpack(String packno){ public List<LabReqpack> getLabReqpack(String packno){
return labReqpackMapper.getLabReqpack(packno); return labReqpackMapper.getLabReqpack(packno);

View File

@ -194,7 +194,7 @@ public class ReportUtil {
//判断细菌仪使用的报告单模板 //判断细菌仪使用的报告单模板
String yqdl = commonUtil.getYqdl(yq); String yqdl = commonUtil.getYqdl(yq);
if ("细菌仪".equals(yqdl)) { if ("细菌仪".equals(yqdl)) {
int ym = commonUtil.getLabResultMedCount(jyrq, yq, ybh); int ym = commonUtil.getLabResultMedCountAll(jyrq, yq, ybh);
if (ym > 1) { if (ym > 1) {
if ("2".equals(NOBOTH)) { if ("2".equals(NOBOTH)) {
return "A4"; return "A4";

View File

@ -18,8 +18,12 @@
<if test="xmdh != null and xmdh != ''"> <if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh} and xmdh = #{xmdh}
</if> </if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where> </where>
</select> </select>
<select id="getLabResultMedCount" resultType="int"> <select id="getLabResultMedCount" resultType="int">
select count(1) select count(1)
from lab_resultmed from lab_resultmed
@ -33,20 +37,33 @@
<if test="ybh != null and ybh != ''"> <if test="ybh != null and ybh != ''">
and ybh = #{ybh} and ybh = #{ybh}
</if> </if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where> </where>
</select> </select>
<delete id="delLabResultMed" > <delete id="delLabResultMed" >
delete from lab_resultmed delete from lab_resultmed
where jyrq = #{jyrq} <where>
and yq = #{yq} <if test="jyrq != null ">
and ybh = #{ybh} and jyrq = #{jyrq}
and xmdh = #{xmdh} </if>
</delete> <if test="yq != null and yq != ''">
<delete id="delLabResultMedAll" > and yq = #{yq}
delete from lab_resultmed </if>
where jyrq = #{jyrq} <if test="ybh != null and ybh != ''">
and yq = #{yq} and ybh = #{ybh}
and ybh = #{ybh} </if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where>
</delete> </delete>
<insert id="insertLabResultMed" parameterType="com.czlis.common.core.domain.entity.lis.LabResultMed"> <insert id="insertLabResultMed" parameterType="com.czlis.common.core.domain.entity.lis.LabResultMed">
insert into lab_resultmed (jyrq, yq, ybh, insert into lab_resultmed (jyrq, yq, ybh,
@ -69,6 +86,27 @@
</foreach> </foreach>
) AS temp ) AS temp
</insert> </insert>
<update id="updateLabResultMed" parameterType="com.czlis.common.core.domain.entity.lis.LabResultMed">
update lab_resultmed
set xh=#{xh},ywdh=#{ywdh}, mic=#{mic},rad=#{rad}, csjg=#{csjg},
jgbz=#{jgbz},bz=#{bz},txtresult=#{txtresult}
<where>
<if test="jyrq != null ">
and jyrq = #{jyrq}
</if>
<if test="yq != null and yq != ''">
and yq = #{yq}
</if>
<if test="ybh != null and ybh != ''">
and ybh = #{ybh}
</if>
<if test="xmdh != null and xmdh != ''">
and xmdh = #{xmdh}
</if>
<if test="ywdh != null and ywdh != ''">
and ywdh = #{ywdh}
</if>
</where>
</update>
</mapper> </mapper>

View File

@ -156,7 +156,22 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
} }
@Override @Override
public Result savemedresult(LabResultMed labResultmed) { public Result savemedresult(LabResultMed labResultmed) {
commonUtil.insertLabResultMed(labResultmed); Date jyrq=labResultmed.getJyrq();
if(jyrq==null)return new Result("-1","检验日期不允许为空");
String yq=labResultmed.getYq();
if(yq==null||"".equals(yq))return new Result("-1","仪器不允许为空");
String ybh=labResultmed.getYbh();
if(ybh==null||"".equals(ybh))return new Result("-1","样本号不允许为空");
String xmdh=labResultmed.getXmdh();
if(xmdh==null||"".equals(xmdh))return new Result("-1","细菌代码不允许为空");
String ywdh=labResultmed.getYwdh();
if(ywdh==null||"".equals(ywdh))return new Result("-1","药物代码不允许为空");
int sl=commonUtil.getLabResultMedCount(labResultmed);
if(sl==0) {
commonUtil.insertLabResultMed(labResultmed);
}else{
commonUtil.updateLabResultMed(labResultmed);
}
return new Result("0","成功"); return new Result("0","成功");
} }
@Override @Override
@ -167,10 +182,16 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
@Override @Override
public Result deletemedresult(LabResultMed labResultmed) { public Result deletemedresult(LabResultMed labResultmed) {
Date jyrq=labResultmed.getJyrq(); Date jyrq=labResultmed.getJyrq();
if(jyrq==null)return new Result("-1","检验日期不允许为空");
String yq=labResultmed.getYq(); String yq=labResultmed.getYq();
if(yq==null||"".equals(yq))return new Result("-1","仪器不允许为空");
String ybh=labResultmed.getYbh(); String ybh=labResultmed.getYbh();
if(ybh==null||"".equals(ybh))return new Result("-1","样本号不允许为空");
String xmdh=labResultmed.getXmdh(); String xmdh=labResultmed.getXmdh();
commonUtil.delLabResultMed(jyrq,yq,ybh,xmdh); if(xmdh==null||"".equals(xmdh))return new Result("-1","细菌代码不允许为空");
String ywdh=labResultmed.getYwdh();
if(ywdh==null||"".equals(ywdh))return new Result("-1","药物代码不允许为空");
commonUtil.delLabResultMed(labResultmed);
return new Result("0","成功"); return new Result("0","成功");
} }
} }