主程序
This commit is contained in:
parent
f4e3e41a15
commit
3db8de6f42
@ -171,8 +171,7 @@ public class LisWorkController extends BaseController {
|
|||||||
}
|
}
|
||||||
@ApiOperation("项目与通道号对照")
|
@ApiOperation("项目与通道号对照")
|
||||||
@GetMapping("/setiteminter")
|
@GetMapping("/setiteminter")
|
||||||
public Result setiteminter(Date jyrq, String yq,String ybh,String xmdh,String tdh) {
|
public Result setiteminter(Date jyrq, String yq,String ybh,String xmdh,String xmdh0) {
|
||||||
// return lisWorkService.setiteminter(jyrq,yq,ybh);
|
return lisWorkService.setiteminter(jyrq,yq,ybh,xmdh,xmdh0);
|
||||||
return new Result("0","成功");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,17 +9,13 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface LisWorkMapper {
|
public interface LisWorkMapper {
|
||||||
List<Map<String,Object>> getInstrdList(String userId);
|
|
||||||
List<Map<String,Object>> getGroupInstrdList(@Param("userId") String userId, @Param("lisgroup") String lisgroup);
|
|
||||||
List<ComOpt> getInstrdConfig(String yq);
|
|
||||||
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(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh")String ybh);
|
|
||||||
List<LabPat> getLabPatList(LabPat labPat);
|
List<LabPat> getLabPatList(LabPat labPat);
|
||||||
List<LabResult> getLabResult(LabResult labResult);
|
|
||||||
List<LabPatInfo> getLabPatInfo(LabPatInfo labPatInfo);
|
|
||||||
List<LabResultMed> getLabResultMedInfo(LabResultMed labResultMed);
|
List<LabResultMed> getLabResultMedInfo(LabResultMed labResultMed);
|
||||||
SysUser getSysUser(String userName);
|
SysUser getSysUser(String userName);
|
||||||
LabPatBk getLabPatBk(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
LabPatBk getLabPatBk(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
||||||
List<LabResultBk> getLabResultBk(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
List<LabResultBk> getLabResultBk(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh);
|
||||||
|
List<Map<String,Object>> getnoitemresult(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh")String ybh);
|
||||||
|
List<XmInter> getXmInter(XmInter xmInter);
|
||||||
|
int inserXmInter(XmInter xmInter);
|
||||||
|
int updateXmInter(XmInter xmInter);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,4 +30,5 @@ public interface LisWorkService {
|
|||||||
Result clearnotcomplete(Date jyrq, String yq,String ybh);
|
Result clearnotcomplete(Date jyrq, String yq,String ybh);
|
||||||
Result viewbackup(Date jyrq, String yq,String ybh);
|
Result viewbackup(Date jyrq, String yq,String ybh);
|
||||||
Result getnoitemresult(Date jyrq, String yq,String ybh);
|
Result getnoitemresult(Date jyrq, String yq,String ybh);
|
||||||
|
Result setiteminter(Date jyrq, String yq,String ybh,String xmdh,String xmdh0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -527,17 +527,13 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getLabPat(Date jyrq, String yq, String ybh) {
|
public Result getLabPat(Date jyrq, String yq, String ybh) {
|
||||||
List<LabPat> labPat = lisWorkMapper.getLabPat(jyrq, yq, ybh);
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
return new Result("0", "获取该样本数据成功!", labPat);
|
return new Result("0", "获取该样本数据成功!", labPat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result sampleMedInfo(Date jyrq, String yq, String ybh) {
|
public Result sampleMedInfo(Date jyrq, String yq, String ybh) {
|
||||||
LabResult labResult = new LabResult();
|
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||||
labResult.setJyrq(jyrq);
|
|
||||||
labResult.setYq(yq);
|
|
||||||
labResult.setYbh(ybh);
|
|
||||||
List<LabResult> labResultList = lisWorkMapper.getLabResult(labResult);
|
|
||||||
LabResultMed labResultMed = new LabResultMed();
|
LabResultMed labResultMed = new LabResultMed();
|
||||||
labResultMed.setJyrq(jyrq);
|
labResultMed.setJyrq(jyrq);
|
||||||
labResultMed.setYq(yq);
|
labResultMed.setYq(yq);
|
||||||
@ -600,7 +596,7 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
labPat.setJyrq(jyrq);
|
labPat.setJyrq(jyrq);
|
||||||
labPat.setYq(yq);
|
labPat.setYq(yq);
|
||||||
labPat.setJgbz("0");
|
labPat.setJgbz("0");
|
||||||
List<LabPat> labPatlist=commonUtil.getLabPatList(labPat);
|
List<LabPat> labPatlist=lisWorkMapper.getLabPatList(labPat);
|
||||||
List<LabPat> labPatlist0=labPatlist.stream().filter(st->!"".equals(st.getSqh())||st.getSqh()!=null).collect(Collectors.toList());
|
List<LabPat> labPatlist0=labPatlist.stream().filter(st->!"".equals(st.getSqh())||st.getSqh()!=null).collect(Collectors.toList());
|
||||||
return new Result("0", "成功!",labPatlist0);
|
return new Result("0", "成功!",labPatlist0);
|
||||||
}
|
}
|
||||||
@ -630,6 +626,24 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Result getnoitemresult(Date jyrq, String yq,String ybh){
|
public Result getnoitemresult(Date jyrq, String yq,String ybh){
|
||||||
|
return new Result("0", "成功!",lisWorkMapper.getnoitemresult(jyrq, yq, ybh));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Result setiteminter(Date jyrq, String yq,String ybh,String xmdh,String xmdh0){
|
||||||
|
XmInter xmInter=new XmInter();
|
||||||
|
xmInter.setYq(yq);
|
||||||
|
xmInter.setTdh(xmdh);
|
||||||
|
List<XmInter> xmInterlist =lisWorkMapper.getXmInter(xmInter);
|
||||||
|
xmInter.setXmdh(xmdh0);
|
||||||
|
XmInfo xmInfo=commonUtil.getXmInfo(yq,xmdh0);
|
||||||
|
if(xmInfo!=null){
|
||||||
|
xmInter.setXmid(xmInfo.getId());
|
||||||
|
}
|
||||||
|
if(xmInterlist.isEmpty()){
|
||||||
|
lisWorkMapper.inserXmInter(xmInter);
|
||||||
|
}else{
|
||||||
|
lisWorkMapper.updateXmInter(xmInter);
|
||||||
|
}
|
||||||
return new Result("0", "成功!");
|
return new Result("0", "成功!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,51 +31,10 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectLabPatVo">
|
<sql id="selectLabPatVo">
|
||||||
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg 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
|
||||||
</sql>
|
</sql>
|
||||||
<select id="getInstrdList" parameterType="string" resultType="map">
|
|
||||||
SELECT com_usrpower.yhdh,com_usrpower.yq ,com_usrpower.xtdh ,com_usrpower.yhqx , lab_instr.yqmc ,lab_instr.instrid
|
|
||||||
FROM com_usrpower , lab_instr WHERE ( com_usrpower.yq = lab_instr.yq ) and ( ( com_usrpower.yhdh = #{userId} ) and ( com_usrpower.xtdh = 'LIS' ) )
|
|
||||||
and lab_instr.useflag = '0'
|
|
||||||
</select>
|
|
||||||
<select id="getGroupInstrdList" parameterType="string" resultType="map">
|
|
||||||
SELECT com_usrpower.yhdh,com_usrpower.yq ,com_usrpower.xtdh ,com_usrpower.yhqx , lab_instr.yqmc ,lab_instr.instrid
|
|
||||||
FROM com_usrpower , lab_instr WHERE ( com_usrpower.yq = lab_instr.yq ) and ( ( com_usrpower.yhdh = #{userId} ) and ( com_usrpower.xtdh = 'LIS' ) )
|
|
||||||
and lab_instr.lisgroup = #{lisgroup} and lab_instr.useflag = '0'
|
|
||||||
</select>
|
|
||||||
<select id="getInstrdConfig" resultType="com.czlis.common.core.domain.entity.lis.ComOpt">
|
|
||||||
select * from com_opt where yq = #{yq}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getLabResult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
|
||||||
select * from lab_Result where jyrq = #{jyrq} and yq = #{yq}
|
|
||||||
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
|
||||||
<if test="xmdh != null and xmdh !=''">and xmdh = #{xmdh}</if>
|
|
||||||
</select>
|
|
||||||
<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>
|
|
||||||
</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>
|
|
||||||
</select>
|
|
||||||
<select id="getLabPat" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
|
||||||
select * from lab_pat
|
|
||||||
<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>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
<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
|
<include refid="selectLabPatVo"></include>
|
||||||
<where>
|
<where>
|
||||||
<if test="jyrq != null and jyrq != ''">
|
<if test="jyrq != null and jyrq != ''">
|
||||||
and jyrq = #{jyrq}
|
and jyrq = #{jyrq}
|
||||||
@ -103,11 +62,6 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getLabPatInfo" resultType="com.czlis.common.core.domain.entity.lis.LabPatInfo">
|
|
||||||
select * from lab_patinfo where jyrq = #{jyrq} and yq = #{yq}
|
|
||||||
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<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 * from lab_resultmed where jyrq = #{jyrq} and yq = #{yq}
|
select * from lab_resultmed where jyrq = #{jyrq} and yq = #{yq}
|
||||||
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
||||||
@ -128,8 +82,41 @@
|
|||||||
select * from lab_result_bk
|
select * from lab_result_bk
|
||||||
where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||||
</select>
|
</select>
|
||||||
<select id="getnoitemresult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
<select id="getnoitemresult" resultType="map">
|
||||||
SELECT yq,xmdh,csjg FROM lab_result WHERE jyrq = #{jyrq} AND yq = #{yq} AND ybh =#{ybh}
|
SELECT xmdh,csjg FROM lab_result WHERE jyrq = #{jyrq} AND yq = #{yq} AND ybh =#{ybh}
|
||||||
AND upper(xmdh) not in (select tdh from xm_inter where yq = #{yq} )
|
AND upper(xmdh) not in (select tdh from xm_inter where yq = #{yq} )
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getXmInter" resultType="com.czlis.common.core.domain.entity.lis.XmInter">
|
||||||
|
select * from xm_inter
|
||||||
|
<where>
|
||||||
|
<if test="yq != null and yq != ''">
|
||||||
|
and yq = #{yq}
|
||||||
|
</if>
|
||||||
|
<if test="tdh != null and tdh != ''">
|
||||||
|
and tdh = #{tdh}
|
||||||
|
</if>
|
||||||
|
<if test="xmdh != null and xmdh != ''">
|
||||||
|
and xmdh = #{xmdh}
|
||||||
|
</if>
|
||||||
|
<if test="xmid != null ">
|
||||||
|
and xmid = #{xmid}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<insert id="inserXmInter" parameterType="com.czlis.common.core.domain.entity.lis.XmInter">
|
||||||
|
insert into xm_inter (yq, tdh, xmdh, xmid)
|
||||||
|
values (#{yq}, #{tdh}, #{xmdh},#{xmid})
|
||||||
|
</insert>
|
||||||
|
<update id="updateXmInter" parameterType="com.czlis.common.core.domain.entity.lis.XmInter">
|
||||||
|
update xm_inter
|
||||||
|
<set>
|
||||||
|
<if test="xmdh != null and xmdh != ''">
|
||||||
|
xmdh = #{xmdh},
|
||||||
|
</if>
|
||||||
|
<if test="xmid != null ">
|
||||||
|
xmid = #{xmid},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where yq=#{yq} and tdh=#{tdh}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user