模版数据,其他仪器结果数据
This commit is contained in:
parent
7eecf4d987
commit
8a838af8b6
@ -1,13 +1,27 @@
|
||||
package com.czlis.interfaceCommon.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInputmdlMapper {
|
||||
List<LabInputmdl> query(LabInputmdl labInputmdl);
|
||||
|
||||
List<LabInputmdlDetail> queryDetail(LabInputmdl labInputmdl);
|
||||
|
||||
void add(LabInputmdl labInputmdl);
|
||||
|
||||
void addDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
|
||||
void update(LabInputmdl labInputmdl);
|
||||
void updateDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
void delete(LabInputmdl labInputmdl);
|
||||
void deleteDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
|
||||
List<LabInputmdl> getLabInputmdl(String yq);
|
||||
LabInputmdl getLabInputmdlmbmc(@Param("yq") String yq,@Param("mbmc") String mbmc);
|
||||
LabInputmdl getLabInputmdlmbmc(@Param("yq") String yq, @Param("mbmc") String mbmc);
|
||||
List<LabInputmdl> getLabInputmdlzdsr(String yq);
|
||||
List<LabInputmdl> getLabInputmdlzdsrybh(@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
}
|
||||
|
||||
@ -2,6 +2,72 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.interfaceCommon.mapper.LabInputmdlMapper">
|
||||
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdl">
|
||||
select * from lab_inputmdl
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryDetail" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdlDetail">
|
||||
select * from lab_inputmdldetail
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
<if test="xh != null "> and xh = #{xh}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into lab_inputmdl(
|
||||
yq,mbmc,srbh,zdsr,qsybh,jsybh,yblx
|
||||
)values(
|
||||
#{yq},#{mbmc},#{srbh},#{zdsr},#{qsybh},#{jsybh},#{yblx}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="addDetail">
|
||||
insert into lab_inputmdldetail(
|
||||
yq,mbmc,xh,xmdh,mrz
|
||||
)values(
|
||||
#{yq},#{mbmc},#{xh},#{xmdh},#{mrz}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update lab_inputmdl
|
||||
<set>
|
||||
<if test="mbmc != null and mbmc != ''"> mbmc = #{mbmc},</if>
|
||||
<if test="srbh != null"> srbh = #{srbh},</if>
|
||||
<if test="zdsr != null and zdsr != ''"> zdsr = #{zdsr},</if>
|
||||
<if test="qsybh != null "> qsybh = #{qsybh},</if>
|
||||
<if test="jsybh != null "> jsybh = #{jsybh},</if>
|
||||
<if test="yblx != null and yblx != ''"> yblx = #{yblx},</if>
|
||||
yq = #{yq},mbmc = #{mbmc}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc}
|
||||
</update>
|
||||
|
||||
<update id="updateDetail">
|
||||
update lab_inputmdldetail
|
||||
<set>
|
||||
<if test="xmdh != null and xmdh != ''">xmdh = #{xmdh},</if>
|
||||
<if test="mrz != null and mrz != ''">mrz = #{mrz},</if>
|
||||
yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from lab_inputmdl where yq = #{yq} and mbmc = #{mbmc}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDetail">
|
||||
delete from lab_inputmdldetail where yq = #{yq} and mbmc = #{mbmc} and xh = #{xh}
|
||||
</delete>
|
||||
|
||||
<select id="getLabInputmdl" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdl">
|
||||
SELECT * FROM lab_inputmdl where yq = #{yq}
|
||||
</select>
|
||||
@ -15,6 +81,6 @@
|
||||
<select id="getLabInputmdlzdsr" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdl">
|
||||
SELECT * FROM lab_inputmdl where yq = #{yq} AND zdsr = 'Y'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
|
||||
@ -46,10 +46,11 @@ public class LisWorkPageInfoController extends BaseController {
|
||||
return lisWorkPageInfoService.getOtherinstr(jyrq,yq,ybh);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@ApiOperation("获取其他仪器结果明细")
|
||||
@GetMapping("/otherinstrdetail")
|
||||
public Result getOtherinstrDetail(String brdh,String yq,Date jyrq){
|
||||
return lisWorkPageInfoService.getOtherinstrDetail(brdh,yq,jyrq);
|
||||
public Result getOtherinstrDetail(String brdh,String yq,Date jyrq,String ybh){
|
||||
return lisWorkPageInfoService.getOtherinstrDetail(brdh,yq,jyrq,ybh);
|
||||
}
|
||||
|
||||
@ApiOperation("获取收费信息")
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
package com.czlis.liswork.mapper.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInputmdlMapper {
|
||||
List<LabInputmdl> query(LabInputmdl labInputmdl);
|
||||
|
||||
List<LabInputmdlDetail> queryDetail(LabInputmdl labInputmdl);
|
||||
|
||||
void add(LabInputmdl labInputmdl);
|
||||
|
||||
void addDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
|
||||
void update(LabInputmdl labInputmdl);
|
||||
void updateDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
void delete(LabInputmdl labInputmdl);
|
||||
void deleteDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
}
|
||||
@ -12,7 +12,7 @@ public interface LisWorkPageInfoService {
|
||||
Result getOtherinstr(Date jyrq, String yq, String ybh);
|
||||
Result getReqInfo(Date jyrq, String yq, String ybh);
|
||||
|
||||
Result getOtherinstrDetail(String brdh, String yq, Date jyrq);
|
||||
Result getOtherinstrDetail(String brdh, String yq, Date jyrq,String ybh);
|
||||
|
||||
Result getReqdetailMX(String yq, String sqxmdh);
|
||||
|
||||
|
||||
@ -78,12 +78,84 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
||||
map.clear();
|
||||
map.put("yqdl", hisResultThisList.get(0).getYqdl());
|
||||
map.put("brdh",hisResultThisList.get(0).getBrdh());
|
||||
Result historyResult = getHistoryResult(hisResultThisList, map);
|
||||
return new Result("0","获取成功!",historyResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收费信息
|
||||
* @param jyrq
|
||||
* @param yq
|
||||
* @param ybh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result getReqdetail(Date jyrq, String yq, String ybh) {
|
||||
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
if(labPatOne == null) return new Result("-1","没有查到对应的上机记录!");
|
||||
String sqh = labPatOne.getSqh();
|
||||
List<Map<String,Object>> labReqdetailList = lisWorkPageInfoMapper.getReqdetail(sqh);
|
||||
return new Result("0","获取数据成功!",labReqdetailList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getOtherinstr(Date jyrq, String yq, String ybh) {
|
||||
//String value = commonUtil.getComOptValue(yq, "COMPAREDA");
|
||||
//先固定一个30天
|
||||
String value = "30";
|
||||
DateTime dayEnd = DateUtil.offsetDay(DateUtil.date(), Integer.parseInt(value));
|
||||
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
String brdh = labPatOne.getBrdh();
|
||||
String brxm = labPatOne.getBrxm();
|
||||
List<Map<String,Object>> queryList = lisWorkPageInfoMapper.getOtherinstr(jyrq,dayEnd,brdh,brxm);
|
||||
return new Result("0","查询数据成功!",queryList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getReqInfo(Date jyrq, String yq, String ybh) {
|
||||
List<Map<String,Object>> reqInfoList = lisWorkPageInfoMapper.getReqInfo(jyrq,yq,ybh);
|
||||
return new Result("0","获取标本流转数据成功!",reqInfoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getOtherinstrDetail(String brdh, String yq, Date jyrq,String ybh) {
|
||||
//List<Map<String,Object>> otherinstrDetailList = lisWorkPageInfoMapper.getOtherinstrDetail(brdh,yq,jyrq);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("jyrq",jyrq);
|
||||
map.put("yq",yq);
|
||||
map.put("ybh",ybh);
|
||||
//本次结果
|
||||
List<HistoryResult> hisResultThisList = lisWorkPageInfoMapper.getHisResult(map);
|
||||
if(hisResultThisList.size()<=0) return new Result("-1","没有找到对应的结果信息!");
|
||||
map.clear();
|
||||
map.put("yqdl", hisResultThisList.get(0).getYqdl());
|
||||
map.put("brdh",hisResultThisList.get(0).getBrdh());
|
||||
Result historyResult = getHistoryResult(hisResultThisList, map);
|
||||
return new Result("0","获取成功!",historyResult.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请项目明细
|
||||
* @param yq
|
||||
* @param sqxmdh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result getReqdetailMX(String yq, String sqxmdh) {
|
||||
List<Map<String, Object>> bgxmList = lisWorkPageInfoMapper.getbgxm(yq, sqxmdh);
|
||||
return new Result("0","获取数据成功!",bgxmList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getInputmdl(String yq) {
|
||||
List<LabInputmdl> labInputmdlList = lisWorkPageInfoMapper.getInputmdl(yq);
|
||||
return new Result("0","获取数据成功!",labInputmdlList);
|
||||
}
|
||||
|
||||
|
||||
public Result getHistoryResult(List<HistoryResult> hisResultThisList,Map<String,Object> map){
|
||||
List<HistoryResult> hisResultList = lisWorkPageInfoMapper.getHisResult(map);
|
||||
// for (HistoryResult historyResult : hisResultThisList) {
|
||||
// List<HistoryResult> collect = hisResultList.stream().filter(historyResult1 ->
|
||||
// historyResult1.getXmdh().equals(historyResult.getXmdh()) && !historyResult1.getJyrq().equals(historyResult.getJyrq())).collect(Collectors.toList());
|
||||
// if(!collect.isEmpty()) hisResultThisList.addAll(collect);
|
||||
// }
|
||||
|
||||
//排序,先按时间排序,再按项目代号排序
|
||||
hisResultList.sort(new Comparator<HistoryResult>() {
|
||||
@Override
|
||||
@ -151,64 +223,5 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
||||
return new Result("0","获取成功!",historyResultDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收费信息
|
||||
* @param jyrq
|
||||
* @param yq
|
||||
* @param ybh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result getReqdetail(Date jyrq, String yq, String ybh) {
|
||||
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
if(labPatOne == null) return new Result("-1","没有查到对应的上机记录!");
|
||||
String sqh = labPatOne.getSqh();
|
||||
List<Map<String,Object>> labReqdetailList = lisWorkPageInfoMapper.getReqdetail(sqh);
|
||||
return new Result("0","获取数据成功!",labReqdetailList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getOtherinstr(Date jyrq, String yq, String ybh) {
|
||||
//String value = commonUtil.getComOptValue(yq, "COMPAREDA");
|
||||
//先固定一个30天
|
||||
String value = "30";
|
||||
DateTime dayEnd = DateUtil.offsetDay(DateUtil.date(), Integer.parseInt(value));
|
||||
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
String brdh = labPatOne.getBrdh();
|
||||
String brxm = labPatOne.getBrxm();
|
||||
List<Map<String,Object>> queryList = lisWorkPageInfoMapper.getOtherinstr(jyrq,dayEnd,brdh,brxm);
|
||||
return new Result("0","查询数据成功!",queryList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getReqInfo(Date jyrq, String yq, String ybh) {
|
||||
List<Map<String,Object>> reqInfoList = lisWorkPageInfoMapper.getReqInfo(jyrq,yq,ybh);
|
||||
return new Result("0","获取标本流转数据成功!",reqInfoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getOtherinstrDetail(String brdh, String yq, Date jyrq) {
|
||||
List<Map<String,Object>> otherinstrDetailList = lisWorkPageInfoMapper.getOtherinstrDetail(brdh,yq,jyrq);
|
||||
return new Result("0","查询成功!",otherinstrDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请项目明细
|
||||
* @param yq
|
||||
* @param sqxmdh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result getReqdetailMX(String yq, String sqxmdh) {
|
||||
List<Map<String, Object>> bgxmList = lisWorkPageInfoMapper.getbgxm(yq, sqxmdh);
|
||||
return new Result("0","获取数据成功!",bgxmList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getInputmdl(String yq) {
|
||||
List<LabInputmdl> labInputmdlList = lisWorkPageInfoMapper.getInputmdl(yq);
|
||||
return new Result("0","获取数据成功!",labInputmdlList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.czlis.liswork.service.impl.xtwh;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.liswork.mapper.xtwh.LabInputmdlMapper;
|
||||
import com.czlis.interfaceCommon.mapper.LabInputmdlMapper;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
import com.czlis.liswork.service.LabInputmdlService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.xtwh.LabInputmdlMapper">
|
||||
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdl">
|
||||
select * from lab_inputmdl
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryDetail" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdlDetail">
|
||||
select * from lab_inputmdldetail
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
<if test="xh != null "> and xh = #{xh}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into lab_inputmdl(
|
||||
yq,mbmc,srbh,zdsr,qsybh,jsybh,yblx
|
||||
)values(
|
||||
#{yq},#{mbmc},#{srbh},#{zdsr},#{qsybh},#{jsybh},#{yblx}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="addDetail">
|
||||
insert into lab_inputmdldetail(
|
||||
yq,mbmc,xh,xmdh,mrz
|
||||
)values(
|
||||
#{yq},#{mbmc},#{xh},#{xmdh},#{mrz}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update lab_inputmdl
|
||||
<set>
|
||||
<if test="mbmc != null and mbmc != ''"> mbmc = #{mbmc},</if>
|
||||
<if test="srbh != null"> srbh = #{srbh},</if>
|
||||
<if test="zdsr != null and zdsr != ''"> zdsr = #{zdsr},</if>
|
||||
<if test="qsybh != null "> qsybh = #{qsybh},</if>
|
||||
<if test="jsybh != null "> jsybh = #{jsybh},</if>
|
||||
<if test="yblx != null and yblx != ''"> yblx = #{yblx},</if>
|
||||
yq = #{yq},mbmc = #{mbmc}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc}
|
||||
</update>
|
||||
|
||||
<update id="updateDetail">
|
||||
update lab_inputmdldetail
|
||||
<set>
|
||||
<if test="xmdh != null and xmdh != ''">xmdh = #{xmdh},</if>
|
||||
<if test="mrz != null and mrz != ''">mrz = #{mrz},</if>
|
||||
yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from lab_inputmdl where yq = #{yq} and mbmc = #{mbmc}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDetail">
|
||||
delete from lab_inputmdldetail where yq = #{yq} and mbmc = #{mbmc} and xh = #{xh}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -76,7 +76,7 @@
|
||||
<select id="getOtherinstrDetail" resultType="map">
|
||||
select b.jyrq,c.xmmc,b.csjg,b.ybh,b.yq,
|
||||
(case a.brxb when '1' then '男' when '2' then '女' end) as brxb ,
|
||||
a.nl+a.nldw as nl
|
||||
convert(varchar(100),a.nl)+(case a.nldw when '1' then '岁' when '2' then '月' when '3' then '天' end) as nl
|
||||
from lab_pat a, lab_result b,xm_info c
|
||||
where a.jyrq = b.jyrq and a.yq = b.yq and a.ybh = b.ybh and a.jgbz = '2'
|
||||
and c.yq = b.yq and c.xmdh = b.xmdh and a.jyrq = #{jyrq} and a.yq = #{yq} and a.brdh = #{brdh}
|
||||
@ -86,7 +86,8 @@
|
||||
select b.jyrq,c.xmdh, c.xmmc,b.csjg,b.ybh,b.yq,d.yqdl,a.brdh,
|
||||
(case a.brxb when '1' then '男' when '2' then '女' end) as brxb ,
|
||||
c.cksx,c.ckxx,
|
||||
a.nl+a.nldw as nl,a.brxm as brxm,b.result_flag,(select top 1 zdmc from com_dict where zdlb = 'HOS' and zddh = a.yljg) as yljg
|
||||
convert(varchar(100),a.nl)+(case a.nldw when '1' then '岁' when '2' then '月' when '3' then '天' end) as nl,
|
||||
a.brxm as brxm,b.result_flag,(select top 1 zdmc from com_dict where zdlb = 'HOS' and zddh = a.yljg) as yljg
|
||||
from lab_pat a, lab_result b,xm_info c,lab_instr d
|
||||
where a.jyrq = b.jyrq and a.yq = b.yq and a.ybh = b.ybh and a.jgbz = '2'
|
||||
and c.yq = b.yq and c.xmdh = b.xmdh and d.yq = a.yq and a.jyrq > getdate() - 360
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user