微生物模块
This commit is contained in:
parent
be51471516
commit
943fa0bc4e
@ -80,4 +80,5 @@ public class LabPat extends BaseEntity {
|
|||||||
private Date faultdt;
|
private Date faultdt;
|
||||||
private String sn_tss;
|
private String sn_tss;
|
||||||
private String sn_result;
|
private String sn_result;
|
||||||
|
private String cp_pyzq;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,9 +11,6 @@ public interface LabPatMapper {
|
|||||||
List<LabPat> getLabPatListBySqh(String sqh);
|
List<LabPat> getLabPatListBySqh(String sqh);
|
||||||
LabPat getLabPatOne(@Param("jyrq") Date jyrq, @Param("yq")String yq,@Param("ybh") String ybh);
|
LabPat getLabPatOne(@Param("jyrq") Date jyrq, @Param("yq")String yq,@Param("ybh") String ybh);
|
||||||
void insertLabPat(LabPat labPat);
|
void insertLabPat(LabPat labPat);
|
||||||
List<LabPat> getSampleList(@Param("jyrq") Date jyrq, @Param("yq") String yq);
|
|
||||||
List<LabPat> getSampleListday(@Param("yq") String yq,@Param("days")Long days);
|
|
||||||
List<LabPat> getLabPat(LabPat labPat);
|
|
||||||
String getLabPatJgbz(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
String getLabPatJgbz(@Param("jyrq")Date jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||||
int delLabPat(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh);
|
int delLabPat(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh);
|
||||||
int updateLabPat(LabPat labPat);
|
int updateLabPat(LabPat labPat);
|
||||||
|
|||||||
@ -100,15 +100,6 @@ public class CommonUtil {
|
|||||||
return labPatMapper.getLabPatListBySqh(sqh);
|
return labPatMapper.getLabPatListBySqh(sqh);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LabPat> getLabPatList(LabPat labPat) {
|
|
||||||
return labPatMapper.getLabPat(labPat);
|
|
||||||
}
|
|
||||||
public List<LabPat> getsamplelist(Date jyrq, String yq){
|
|
||||||
return labPatMapper.getSampleList(jyrq,yq);
|
|
||||||
}
|
|
||||||
public List<LabPat> getSampleListday(String yq, Long days){
|
|
||||||
return labPatMapper.getSampleListday(yq,days);
|
|
||||||
}
|
|
||||||
public LabPatfee getLabPatfee(Date jyrq, String yq, String ybh) {
|
public LabPatfee getLabPatfee(Date jyrq, String yq, String ybh) {
|
||||||
return labPatfeeMapper.getLabPatfee(jyrq,yq,ybh);
|
return labPatfeeMapper.getLabPatfee(jyrq,yq,ybh);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,25 +9,7 @@
|
|||||||
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
select * from lab_pat where sqh = #{sqh}
|
select * from lab_pat where sqh = #{sqh}
|
||||||
</select>
|
</select>
|
||||||
<sql id="selectLabPatVo">
|
|
||||||
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf from lab_pat
|
|
||||||
</sql>
|
|
||||||
<select id="getSampleList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
|
||||||
<include refid="selectLabPatVo"></include>
|
|
||||||
<where>
|
|
||||||
<if test="yq != null and yq !=''">and yq = #{yq}</if>
|
|
||||||
<if test="jyrq != null">and jyrq = #{jyrq}</if>
|
|
||||||
</where>
|
|
||||||
order by yq,jyrq,right(space(20) + ybh,20)
|
|
||||||
</select>
|
|
||||||
<select id="getSampleListday" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
|
||||||
<include refid="selectLabPatVo"></include>
|
|
||||||
<where>
|
|
||||||
<if test="days != null and days != 0">and jyrq >=CONVERT(varchar(10),getdate() - ${days},120)</if>
|
|
||||||
<if test="yq != null and yq !=''">and yq = #{yq}</if>
|
|
||||||
</where>
|
|
||||||
order by yq,jyrq,right(space(20) + ybh,20)
|
|
||||||
</select>
|
|
||||||
<select id="getCountByKey" resultType="int">
|
<select id="getCountByKey" resultType="int">
|
||||||
select count(1) from lab_pat where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
|
select count(1) from lab_pat where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
package com.czlis.liswork.mapper;
|
package com.czlis.liswork.mapper;
|
||||||
|
|
||||||
import com.czlis.common.core.domain.entity.lis.BactMediumgroupdet;
|
import com.czlis.common.core.domain.entity.lis.*;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabGermsheetNew;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabResultMed;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.XmMedDetail;
|
|
||||||
import com.czlis.liswork.pojo.DTO.MediumDTO;
|
import com.czlis.liswork.pojo.DTO.MediumDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
public interface LisWorkGermMapper {
|
public interface LisWorkGermMapper {
|
||||||
|
List<LabPat> getSampleListday(@Param("yq") String yq, @Param("days")Integer days);
|
||||||
|
List<LabPat> getSampleListWSW(@Param("jyrq") Date jyrq, @Param("yq") String yq);
|
||||||
List<LabResultMed> getLabResultMedInfo(LabResultMed labResultMed);
|
List<LabResultMed> getLabResultMedInfo(LabResultMed labResultMed);
|
||||||
List<MediumDTO> getmedium(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
List<MediumDTO> getmedium(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
||||||
String getmediumno(@Param("sqh") String sqh,@Param("yblx") String yblx);
|
String getmediumno(@Param("sqh") String sqh,@Param("yblx") String yblx);
|
||||||
@ -19,4 +18,5 @@ public interface LisWorkGermMapper {
|
|||||||
List<XmMedDetail> getXmMedDetailNew(@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("ywdh") String ywdh);
|
List<XmMedDetail> getXmMedDetailNew(@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("ywdh") String ywdh);
|
||||||
List<XmMedDetail> getXmMedDetail(@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("ywdh") String ywdh);
|
List<XmMedDetail> getXmMedDetail(@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("ywdh") String ywdh);
|
||||||
String getXmMedDetailBZ(@Param("yq") String yq,@Param("xmdh") String xmdh);
|
String getXmMedDetailBZ(@Param("yq") String yq,@Param("xmdh") String xmdh);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,4 +17,6 @@ public interface LisWorkMapper {
|
|||||||
List<XmInter> getXmInter(XmInter xmInter);
|
List<XmInter> getXmInter(XmInter xmInter);
|
||||||
int inserXmInter(XmInter xmInter);
|
int inserXmInter(XmInter xmInter);
|
||||||
int updateXmInter(XmInter xmInter);
|
int updateXmInter(XmInter xmInter);
|
||||||
|
List<LabPat> getSampleList(@Param("jyrq") Date jyrq, @Param("yq") String yq);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
package com.czlis.liswork.service;
|
|
||||||
|
|
||||||
import com.czlis.common.core.domain.Result;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabPat;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface LabPatService {
|
|
||||||
List<LabPat> getLabPatList(LabPat labPat);
|
|
||||||
List<LabPat> getSampleList(Date jyrq, String yq, Long days);
|
|
||||||
Result getLabPat(Date jyrq, String yq,String ybh);
|
|
||||||
Result insertLabPat(LabPat labPat);
|
|
||||||
Result delLabPat(LabPat labPat);
|
|
||||||
Result updateLabPat(LabPat labPat);
|
|
||||||
//根据主键判断是否存在数据
|
|
||||||
int getCountById(Date jyrq, String yq,String ybh) ;
|
|
||||||
//根据编号查sqh
|
|
||||||
String getSqhById(Date jyrq,String yq,String ybh);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.czlis.liswork.service;
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.LabPat;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabResult;
|
import com.czlis.common.core.domain.entity.lis.LabResult;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabResultMed;
|
import com.czlis.common.core.domain.entity.lis.LabResultMed;
|
||||||
|
|
||||||
@ -17,4 +18,6 @@ public interface LisWorkGermService {
|
|||||||
Result savemedresultall(List<LabResultMed> labResultmedlist);
|
Result savemedresultall(List<LabResultMed> labResultmedlist);
|
||||||
Result deletemedresult(LabResultMed labResultmed);
|
Result deletemedresult(LabResultMed labResultmed);
|
||||||
Result sampleMedInfo(Date jyrq, String yq, String ybh);
|
Result sampleMedInfo(Date jyrq, String yq, String ybh);
|
||||||
|
List<LabPat> getSampleList(Date jyrq, String yq, Integer days);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,77 +0,0 @@
|
|||||||
package com.czlis.liswork.service.impl;
|
|
||||||
|
|
||||||
import com.czlis.common.core.domain.Result;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabPat;
|
|
||||||
import com.czlis.liswork.service.LabPatService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import com.czlis.interfaceCommon.mapper.LabPatMapper;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class LabPatServiceImpl implements LabPatService {
|
|
||||||
@Autowired
|
|
||||||
private LabPatMapper labPatMapper;
|
|
||||||
@Override
|
|
||||||
public List<LabPat> getLabPatList(LabPat labPat) {
|
|
||||||
return labPatMapper.getLabPat(labPat);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public List<LabPat> getSampleList(Date jyrq, String yq, Long days) {
|
|
||||||
if(days>1) {
|
|
||||||
return labPatMapper.getSampleListday(yq, days);
|
|
||||||
}else {
|
|
||||||
return labPatMapper.getSampleList(jyrq, yq);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public Result getLabPat(Date jyrq, String yq,String ybh) {
|
|
||||||
LabPat labPatlist=labPatMapper.getLabPatOne(jyrq,yq,ybh);
|
|
||||||
return new Result("0", "获取该样本数据成功!",labPatlist);
|
|
||||||
}
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
|
||||||
public Result insertLabPat(LabPat labPat) {
|
|
||||||
int row = labPatMapper.updateLabPat(labPat);
|
|
||||||
if (row > 0)
|
|
||||||
return new Result("0", "修改成功!");
|
|
||||||
else
|
|
||||||
return new Result("-1", "修改失败!");
|
|
||||||
}
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
|
||||||
public Result delLabPat(LabPat labPat){
|
|
||||||
int row = labPatMapper.updateLabPat(labPat);
|
|
||||||
if (row > 0)
|
|
||||||
return new Result("0", "修改成功!");
|
|
||||||
else
|
|
||||||
return new Result("-1", "修改失败!");
|
|
||||||
}
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
|
||||||
public Result updateLabPat(LabPat labPat){
|
|
||||||
int row = labPatMapper.updateLabPat(labPat);
|
|
||||||
if (row > 0)
|
|
||||||
return new Result("0", "修改成功!");
|
|
||||||
else
|
|
||||||
return new Result("-1", "修改失败!");
|
|
||||||
}
|
|
||||||
//根据主键判断是否存在数据
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
|
||||||
public int getCountById(Date jyrq, String yq,String ybh) {
|
|
||||||
return labPatMapper.getCountByKey(jyrq,yq,ybh);
|
|
||||||
}
|
|
||||||
//根据编号查sqh
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
@Override
|
|
||||||
public String getSqhById(Date jyrq,String yq,String ybh){
|
|
||||||
return labPatMapper.getSqhByKey(jyrq,yq,ybh);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -9,6 +9,7 @@ import com.czlis.interfaceCommon.mapper.LabResultMedMapper;
|
|||||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||||
import com.czlis.interfaceCommon.utils.LisUtil;
|
import com.czlis.interfaceCommon.utils.LisUtil;
|
||||||
import com.czlis.liswork.mapper.LisWorkGermMapper;
|
import com.czlis.liswork.mapper.LisWorkGermMapper;
|
||||||
|
import com.czlis.liswork.mapper.LisWorkMapper;
|
||||||
import com.czlis.liswork.mapper.xtwh.XmMedgroupMapper;
|
import com.czlis.liswork.mapper.xtwh.XmMedgroupMapper;
|
||||||
import com.czlis.liswork.pojo.DTO.MediumDTO;
|
import com.czlis.liswork.pojo.DTO.MediumDTO;
|
||||||
import com.czlis.liswork.pojo.HistoryResult;
|
import com.czlis.liswork.pojo.HistoryResult;
|
||||||
@ -74,7 +75,15 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
|
|||||||
map.put("yq2",yq2);
|
map.put("yq2",yq2);
|
||||||
return new Result("0","成功",map);
|
return new Result("0","成功",map);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<LabPat> getSampleList(Date jyrq, String yq, Integer days) {
|
||||||
|
if(days==-1) return lisWorkGermMapper.getSampleListday(yq, 0);
|
||||||
|
if (days > 1) {
|
||||||
|
return lisWorkGermMapper.getSampleListday(yq, days);//new Result("0", "获取样本数据成功!", labPatListday);
|
||||||
|
} else {
|
||||||
|
return lisWorkGermMapper.getSampleListWSW(jyrq, yq);//new Result("0", "获取样本数据成功!", labPatListday);
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取培养基记录
|
* 获取培养基记录
|
||||||
* @param jyrq
|
* @param jyrq
|
||||||
|
|||||||
@ -461,11 +461,7 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LabPat> getSampleList(Date jyrq, String yq, Long days) {
|
public List<LabPat> getSampleList(Date jyrq, String yq, Long days) {
|
||||||
if (days > 1) {
|
return lisWorkMapper.getSampleList(jyrq, yq);//new Result("0", "获取样本数据成功!", labPatListday);
|
||||||
return commonUtil.getSampleListday(yq, days);//new Result("0", "获取样本数据成功!", labPatListday);
|
|
||||||
} else {
|
|
||||||
return commonUtil.getsamplelist(jyrq, yq);//new Result("0", "获取样本数据成功!", labPatListday);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -2,6 +2,10 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.czlis.liswork.mapper.LisWorkGermMapper">
|
<mapper namespace="com.czlis.liswork.mapper.LisWorkGermMapper">
|
||||||
|
<sql id="selectLabPatVoWSW">
|
||||||
|
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf,CONVERT(varchar(10), DATEDIFF(day, CONVERT(varchar(10),sqsj,110), CONVERT(varchar(10),isnull(dysj,getdate()),110)))+'天' as cp_pyzq from lab_pat
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
|
<select id="getLabResultMedInfo" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
|
||||||
select a.*,
|
select a.*,
|
||||||
case
|
case
|
||||||
@ -18,7 +22,22 @@
|
|||||||
<if test="xh != null">and xh = #{xh}</if>
|
<if test="xh != null">and xh = #{xh}</if>
|
||||||
<if test="ywdh != null and ywdh != ''">and ywdh = #{ywdh}</if>
|
<if test="ywdh != null and ywdh != ''">and ywdh = #{ywdh}</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getSampleListWSW" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
|
<include refid="selectLabPatVoWSW"></include>
|
||||||
|
<where>
|
||||||
|
<if test="yq != null and yq !=''">and yq = #{yq}</if>
|
||||||
|
<if test="jyrq != null">and jyrq = #{jyrq}</if>
|
||||||
|
</where>
|
||||||
|
order by yq,jyrq DESC,right(space(20) + ybh,20) DESC
|
||||||
|
</select>
|
||||||
|
<select id="getSampleListday" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
|
<include refid="selectLabPatVoWSW"></include>
|
||||||
|
<where>
|
||||||
|
<if test="days != null and days != 0">and jyrq >=CONVERT(varchar(10),getdate() - ${days},120)</if>
|
||||||
|
<if test="yq != null and yq !=''">and yq = #{yq}</if>
|
||||||
|
</where>
|
||||||
|
order by yq,jyrq DESC,right(space(20) + ybh,20) DESC
|
||||||
|
</select>
|
||||||
<select id="getmedium" resultType="com.czlis.liswork.pojo.DTO.MediumDTO">
|
<select id="getmedium" resultType="com.czlis.liswork.pojo.DTO.MediumDTO">
|
||||||
SELECT lab_germsheet_new.jyrq,
|
SELECT lab_germsheet_new.jyrq,
|
||||||
lab_germsheet_new.yq,
|
lab_germsheet_new.yq,
|
||||||
|
|||||||
@ -29,6 +29,18 @@
|
|||||||
<result property="snid" column="snid" />
|
<result property="snid" column="snid" />
|
||||||
<result property="signCert" column="signCert" />
|
<result property="signCert" column="signCert" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<sql id="selectLabPatVoCG">
|
||||||
|
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf from lab_pat
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getSampleList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
|
<include refid="selectLabPatVoCG"></include>
|
||||||
|
<where>
|
||||||
|
<if test="yq != null and yq !=''">and yq = #{yq}</if>
|
||||||
|
<if test="jyrq != null">and jyrq = #{jyrq}</if>
|
||||||
|
</where>
|
||||||
|
order by yq,jyrq,right(space(20) + ybh,20)
|
||||||
|
</select>
|
||||||
|
|
||||||
<sql id="selectLabPatVo">
|
<sql id="selectLabPatVo">
|
||||||
select instrid,jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf from lab_pat
|
select instrid,jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg,alarmflag,finish,fslx,autojgbz,lstd,shcs,yblx,sqh,yhdh,ch,zjf from lab_pat
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user