初步整合主界面前后端
This commit is contained in:
parent
8d263a96d0
commit
b86fff9a80
@ -2,6 +2,7 @@ package com.czlis.common.core.domain.entity;
|
||||
|
||||
|
||||
import com.czlis.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -12,6 +13,7 @@ import java.util.Date;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabPat extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
@ -76,5 +78,4 @@ public class LabPat extends BaseEntity {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.czlis.common.core.domain.entity;
|
||||
|
||||
|
||||
import com.czlis.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -12,6 +13,7 @@ import java.util.Date;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabResult extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date jyrq;
|
||||
private String yq;
|
||||
private String ybh;
|
||||
@ -30,9 +32,9 @@ public class LabResult extends BaseEntity {
|
||||
private String refs;
|
||||
private String flag;
|
||||
private String dw;
|
||||
private String result_flag;
|
||||
private String alarm_flag;
|
||||
private String redo_flag;
|
||||
private String resultFlag;
|
||||
private String alarmFlag;
|
||||
private String redoFlag;
|
||||
private String sqxmdh;
|
||||
|
||||
private String xmmc;
|
||||
}
|
||||
|
||||
@ -1,12 +1,23 @@
|
||||
package com.czlis.interfaceCommon.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.LabPat;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface LabPatMapper {
|
||||
List<LabPat> getLabPatList(String sqh);
|
||||
LabPat getLabPatOne(Date jyrq, String yq,String ybh);
|
||||
List<LabPat> getLabPatListBySqh(String sqh);
|
||||
LabPat getLabPatOne(@Param("jyrq") Date jyrq, @Param("yq")String yq,@Param("ybh") String ybh);
|
||||
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);
|
||||
int delLabPat(@Param("jyrq") String jyrq, @Param("yq") String yq,@Param("ybh") String ybh);
|
||||
int updateLabPat(LabPat labPat);
|
||||
//根据主键判断是否存在数据
|
||||
int getCountByKey(@Param("jyrq") String jyrq, @Param("yq") String yq,@Param("ybh") String ybh) ;
|
||||
//根据编号查sqh
|
||||
String getSqhByKey(@Param("jyrq")String jyrq,@Param("yq") String yq,@Param("ybh") String ybh);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package com.czlis.interfaceCommon.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.LabResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface LabResultMapper {
|
||||
List<LabResult> getLabResultList(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh);
|
||||
List<LabResult> getLabResult(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh,@Param("xmdh") String xmdh);
|
||||
int insertLabResult(LabResult labResult);
|
||||
int delLabResult(LabResult labResult);
|
||||
int updateLabResult(LabResult labResult);
|
||||
}
|
||||
@ -1,8 +1,11 @@
|
||||
package com.czlis.interfaceCommon.utils;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.LabPat;
|
||||
import com.czlis.common.core.domain.entity.LabReqmain;
|
||||
import com.czlis.common.core.domain.entity.LabResult;
|
||||
import com.czlis.interfaceCommon.mapper.*;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -22,34 +25,47 @@ public class CommonUtil {
|
||||
CommonMapper commonMapper;
|
||||
@Autowired
|
||||
ComDictMapper comDictMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private LabResultMapper labResultMapper;
|
||||
//====检验主表操作方法集合===
|
||||
public LabPat getLabPatOne(Date jyrq, String yq, String ybh){
|
||||
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
|
||||
}
|
||||
|
||||
public String getComOptValue(String yq,String xxdh){
|
||||
return comOptMapper.getComOptValue(yq,xxdh);
|
||||
}
|
||||
|
||||
public List<LabPat> getLabPatListBySqh(String sqh){return labPatMapper.getLabPatListBySqh(sqh);}
|
||||
public List<LabPat> getLabPatList(LabPat labPat) {return labPatMapper.getLabPat(labPat);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertLabPat(LabPat labPat) {return labPatMapper.updateLabPat(labPat);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int delLabPat(LabPat labPat){return labPatMapper.updateLabPat(labPat);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateLabPat(LabPat labPat){return labPatMapper.updateLabPat(labPat);}
|
||||
public int getCountByKey(String jyrq, String yq,String ybh) {return labPatMapper.getCountByKey(jyrq,yq,ybh);}
|
||||
public String getSqhByKey(String jyrq,String yq,String ybh){return labPatMapper.getSqhByKey(jyrq,yq,ybh);}
|
||||
//申请单主表方法集合
|
||||
public LabReqmain getLabReqmainOne(String sqh){
|
||||
return labReqmainMapper.getLabReqmainOne(sqh);
|
||||
}
|
||||
//申请单明细表集合
|
||||
|
||||
public List<LabPat> getLabPatList(String sqh){
|
||||
return labPatMapper.getLabPatList(sqh);
|
||||
}
|
||||
|
||||
|
||||
//====检验结果表操作方法集合===
|
||||
public List<LabResult> getLabResult(Date jyrq, String yq, String ybh, String xmdh) {return labResultMapper.getLabResult(jyrq, yq, ybh,xmdh);}
|
||||
public List<LabResult> getLabResultList(Date jyrq, String yq, String ybh) {return labResultMapper.getLabResultList(jyrq, yq, ybh);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertLabPat(LabPat labPat){
|
||||
labPatMapper.insertLabPat(labPat);
|
||||
}
|
||||
public int insertLabResult(LabResult labResult) {return labResultMapper.updateLabResult(labResult);}
|
||||
public List<LabResult> getresultinfo(Date jyrq, String yq, String ybh) {return labResultMapper.getLabResultList(jyrq, yq, ybh);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int delLabResult(LabResult labResult) {return labResultMapper.delLabResult(labResult);}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateLabResult(LabResult labResult) {return labResultMapper.updateLabResult(labResult);}
|
||||
|
||||
public Date getCurrentTime(){
|
||||
return commonMapper.getCurrentTime();
|
||||
}
|
||||
|
||||
|
||||
//服务器时间方法
|
||||
public Date getCurrentTime(){return commonMapper.getCurrentTime();}
|
||||
public String getCurrentDate(){return DateFormatUtils.format(commonMapper.getCurrentTime(), "yyyy-MM-dd");}
|
||||
public String getCurrentDateTime(){return DateFormatUtils.format(commonMapper.getCurrentTime(), "yyyy-MM-dd HH:mm:ss");}
|
||||
|
||||
//字典查询方法集合
|
||||
public String getComDictNameById(String zdlb,String xxdh){
|
||||
String zdmc = comDictMapper.getComDictNameById(zdlb,xxdh);
|
||||
if(zdmc == null || zdmc.equals("")){
|
||||
@ -67,4 +83,8 @@ public class CommonUtil {
|
||||
return zddh;
|
||||
}
|
||||
}
|
||||
public String getComOptValue(String yq,String xxdh){
|
||||
return comOptMapper.getComOptValue(yq,xxdh);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,6 +9,29 @@
|
||||
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.LabPat">
|
||||
select * from lab_pat where where sqh = #{sqh}
|
||||
</select>
|
||||
<sql id="selectLabPatVo">
|
||||
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg from lab_pat
|
||||
</sql>
|
||||
<select id="getSampleList" resultType="com.czlis.common.core.domain.entity.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.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="getCountByKey" resultType="int">
|
||||
select count(1) from lab_pat where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
|
||||
</select>
|
||||
<select id="getSqhByKey" resultType="String">
|
||||
select sqh from lab_pat where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
|
||||
</select>
|
||||
|
||||
<insert id="insertLabPat">
|
||||
insert into lab_pat (
|
||||
@ -163,8 +186,212 @@
|
||||
#{jyrq},#{yq},#{ybh}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="delLabPat" parameterType="com.czlis.common.core.domain.entity.LabPat">
|
||||
delete from lab_pat where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
|
||||
</delete>
|
||||
<update id="updateLabPat" parameterType="com.czlis.common.core.domain.entity.LabPat">
|
||||
update lab_pat
|
||||
<set>
|
||||
<if test="wyh != null">
|
||||
wyh = #{wyh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yblx != null">
|
||||
yblx = #{yblx,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fb != null">
|
||||
fb = #{fb,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ksdh != null">
|
||||
ksdh = #{ksdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sjys != null">
|
||||
sjys = #{sjys,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="hdys != null">
|
||||
hdys = #{hdys,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yhdh != null">
|
||||
yhdh = #{yhdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brdh != null">
|
||||
brdh = #{brdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brxm != null">
|
||||
brxm = #{brxm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brxb != null">
|
||||
brxb = #{brxb,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brly != null">
|
||||
brly = #{brly,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ch != null">
|
||||
ch = #{ch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nl != null">
|
||||
nl = #{nl,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="nldw != null">
|
||||
nldw = #{nldw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sqh != null">
|
||||
sqh = #{sqh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sqsj != null">
|
||||
sqsj = #{sqsj,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="dysj != null">
|
||||
dysj = #{dysj,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="dybz != null">
|
||||
dybz = #{dybz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="jgbz != null">
|
||||
jgbz = #{jgbz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="bbbz != null">
|
||||
bbbz = #{bbbz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="zd != null">
|
||||
zd = #{zd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz != null">
|
||||
bz = #{bz,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz1 != null">
|
||||
bz1 = #{bz1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="zjf != null">
|
||||
zjf = #{zjf,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cyrq != null">
|
||||
cyrq = #{cyrq,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bq != null">
|
||||
bq = #{bq,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="czybh != null">
|
||||
czybh = #{czybh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cjbw != null">
|
||||
cjbw = #{cjbw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="jymd != null">
|
||||
jymd = #{jymd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastuser != null">
|
||||
lastuser = #{lastuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastdt != null">
|
||||
lastdt = #{lastdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="confirmer != null">
|
||||
confirmer = #{confirmer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="confirmdt != null">
|
||||
confirmdt = #{confirmdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="mzdy != null">
|
||||
mzdy = #{mzdy,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="fslx != null">
|
||||
fslx = #{fslx,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="ybzt != null">
|
||||
ybzt = #{ybzt,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="instrid != null">
|
||||
instrid = #{instrid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="jzbz != null">
|
||||
jzbz = #{jzbz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="sbbr != null">
|
||||
sbbr = #{sbbr,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qrr != null">
|
||||
qrr = #{qrr,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qrsj != null">
|
||||
qrsj = #{qrsj,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="alarmflag != null">
|
||||
alarmflag = #{alarmflag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="alarmconfirm != null">
|
||||
alarmconfirm = #{alarmconfirm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alarmconfirmdt != null">
|
||||
alarmconfirmdt = #{alarmconfirmdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="shcs != null">
|
||||
shcs = #{shcs,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sn_tss != null">
|
||||
sn_tss = #{snTss,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mzh != null">
|
||||
mzh = #{mzh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yljg != null">
|
||||
yljg = #{yljg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="finish != null">
|
||||
finish = #{finish,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="send_flag != null">
|
||||
send_flag = #{sendFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="sfzh != null">
|
||||
sfzh = #{sfzh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone1 != null">
|
||||
phone1 = #{phone1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="addr != null">
|
||||
addr = #{addr,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faultman != null">
|
||||
faultman = #{faultman,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fault != null">
|
||||
fault = #{fault,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="faults != null">
|
||||
faults = #{faults,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faultdt != null">
|
||||
faultdt = #{faultdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lstd != null">
|
||||
lstd = #{lstd,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="zjlx != null">
|
||||
zjlx = #{zjlx,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="slzq != null">
|
||||
slzq = #{slzq,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uploaddate != null">
|
||||
uploaddate = #{uploaddate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="whonetupdate != null">
|
||||
whonetupdate = #{whonetupdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="checker != null">
|
||||
checker = #{checker,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="autojgbz != null">
|
||||
autojgbz = #{autojgbz,jdbcType=CHAR},
|
||||
</if>
|
||||
</set>
|
||||
where jyrq = #{jyrq}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -0,0 +1,349 @@
|
||||
<?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.interfaceCommon.mapper.LabResultMapper">
|
||||
<select id="getLabResult" parameterType="com.czlis.common.core.domain.entity.LabResult" resultType="com.czlis.common.core.domain.entity.LabResult">
|
||||
select *
|
||||
from lab_result
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getLabResultList" parameterType="com.czlis.common.core.domain.entity.LabResult" resultType="com.czlis.common.core.domain.entity.LabResult">
|
||||
select
|
||||
lab_result.jyrq, lab_result.yq, lab_result.ybh, lab_result.xmdh, wyh, csjg, od, cutoff, lab_result.jgbz, bz1, bz2, yhdh, instrid, operdt,
|
||||
operna, refs, flag, lab_result.dw, result_flag, alarm_flag, redo_flag, sqxmdh, redo_text,xm_info.xmmc
|
||||
,textresult
|
||||
from lab_result join xm_info on xm_info.yq=lab_result.yq and xm_info.xmdh=lab_result.xmdh
|
||||
<where>
|
||||
<if test="jyrq != null ">
|
||||
and lab_result.jyrq = #{jyrq}
|
||||
</if>
|
||||
<if test="yq != null and yq != ''">
|
||||
and lab_result.yq = #{yq}
|
||||
</if>
|
||||
<if test="ybh != null and ybh != ''">
|
||||
and lab_result.ybh = #{ybh}
|
||||
</if>
|
||||
</where> ORDER BY xm_info.dyxh
|
||||
</select>
|
||||
<delete id="delLabResult" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
delete from lab_result
|
||||
where jyrq = #{jyrq}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insertLabResult" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
insert into lab_result (jyrq, yq, ybh,
|
||||
xmdh, wyh, csjg, od,
|
||||
cutoff, jgbz, bz1, bz2,
|
||||
yhdh, instrid, operdt,
|
||||
operna, refs, flag,
|
||||
dw, result_flag, alarm_flag,
|
||||
redo_flag, sqxmdh, redo_text,
|
||||
bz3, textresult)
|
||||
values (#{jyrq}, #{yq,jdbcType=CHAR}, #{ybh,jdbcType=VARCHAR},
|
||||
#{xmdh,jdbcType=VARCHAR}, #{wyh,jdbcType=VARCHAR}, #{csjg,jdbcType=VARCHAR}, #{od,jdbcType=VARCHAR},
|
||||
#{cutoff,jdbcType=VARCHAR}, #{jgbz,jdbcType=CHAR}, #{bz1,jdbcType=VARCHAR}, #{bz2,jdbcType=VARCHAR},
|
||||
#{yhdh,jdbcType=VARCHAR}, #{instrid,jdbcType=INTEGER}, #{operdt,jdbcType=TIMESTAMP},
|
||||
#{operna,jdbcType=VARCHAR}, #{refs,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR},
|
||||
#{dw,jdbcType=VARCHAR}, #{resultFlag,jdbcType=CHAR}, #{alarmFlag,jdbcType=CHAR},
|
||||
#{redoFlag,jdbcType=CHAR}, #{sqxmdh,jdbcType=VARCHAR}, #{redoText,jdbcType=VARCHAR},
|
||||
#{bz3,jdbcType=VARCHAR}, #{textresult,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
insert into lab_result
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="jyrq != null">
|
||||
jyrq,
|
||||
</if>
|
||||
<if test="yq != null">
|
||||
yq,
|
||||
</if>
|
||||
<if test="ybh != null">
|
||||
ybh,
|
||||
</if>
|
||||
<if test="xmdh != null">
|
||||
xmdh,
|
||||
</if>
|
||||
<if test="wyh != null">
|
||||
wyh,
|
||||
</if>
|
||||
<if test="csjg != null">
|
||||
csjg,
|
||||
</if>
|
||||
<if test="od != null">
|
||||
od,
|
||||
</if>
|
||||
<if test="cutoff != null">
|
||||
cutoff,
|
||||
</if>
|
||||
<if test="jgbz != null">
|
||||
jgbz,
|
||||
</if>
|
||||
<if test="bz1 != null">
|
||||
bz1,
|
||||
</if>
|
||||
<if test="bz2 != null">
|
||||
bz2,
|
||||
</if>
|
||||
<if test="yhdh != null">
|
||||
yhdh,
|
||||
</if>
|
||||
<if test="instrid != null">
|
||||
instrid,
|
||||
</if>
|
||||
<if test="operdt != null">
|
||||
operdt,
|
||||
</if>
|
||||
<if test="operna != null">
|
||||
operna,
|
||||
</if>
|
||||
<if test="refs != null">
|
||||
refs,
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
flag,
|
||||
</if>
|
||||
<if test="dw != null">
|
||||
dw,
|
||||
</if>
|
||||
<if test="resultFlag != null">
|
||||
result_flag,
|
||||
</if>
|
||||
<if test="alarmFlag != null">
|
||||
alarm_flag,
|
||||
</if>
|
||||
<if test="redoFlag != null">
|
||||
redo_flag,
|
||||
</if>
|
||||
<if test="sqxmdh != null">
|
||||
sqxmdh,
|
||||
</if>
|
||||
<if test="redoText != null">
|
||||
redo_text,
|
||||
</if>
|
||||
<if test="bz3 != null">
|
||||
bz3,
|
||||
</if>
|
||||
<if test="textresult != null">
|
||||
textresult,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="jyrq != null">
|
||||
#{jyrq},
|
||||
</if>
|
||||
<if test="yq != null">
|
||||
#{yq,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="ybh != null">
|
||||
#{ybh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="xmdh != null">
|
||||
#{xmdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="wyh != null">
|
||||
#{wyh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="csjg != null">
|
||||
#{csjg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="od != null">
|
||||
#{od,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cutoff != null">
|
||||
#{cutoff,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="jgbz != null">
|
||||
#{jgbz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="bz1 != null">
|
||||
#{bz1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz2 != null">
|
||||
#{bz2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yhdh != null">
|
||||
#{yhdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="instrid != null">
|
||||
#{instrid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operdt != null">
|
||||
#{operdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="operna != null">
|
||||
#{operna,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refs != null">
|
||||
#{refs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
#{flag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dw != null">
|
||||
#{dw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resultFlag != null">
|
||||
#{resultFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="alarmFlag != null">
|
||||
#{alarmFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="redoFlag != null">
|
||||
#{redoFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="sqxmdh != null">
|
||||
#{sqxmdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="redoText != null">
|
||||
#{redoText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz3 != null">
|
||||
#{bz3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="textresult != null">
|
||||
#{textresult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
update lab_result
|
||||
<set>
|
||||
<if test="wyh != null">
|
||||
wyh = #{wyh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="csjg != null">
|
||||
csjg = #{csjg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="od != null">
|
||||
od = #{od,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cutoff != null">
|
||||
cutoff = #{cutoff,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="jgbz != null">
|
||||
jgbz = #{jgbz,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="bz1 != null">
|
||||
bz1 = #{bz1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz2 != null">
|
||||
bz2 = #{bz2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yhdh != null">
|
||||
yhdh = #{yhdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="instrid != null">
|
||||
instrid = #{instrid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operdt != null">
|
||||
operdt = #{operdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="operna != null">
|
||||
operna = #{operna,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refs != null">
|
||||
refs = #{refs,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
flag = #{flag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dw != null">
|
||||
dw = #{dw,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resultFlag != null">
|
||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="alarmFlag != null">
|
||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="redoFlag != null">
|
||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="sqxmdh != null">
|
||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="redoText != null">
|
||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bz3 != null">
|
||||
bz3 = #{bz3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="textresult != null">
|
||||
textresult = #{textresult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where jyrq = #{jyrq}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
update lab_result
|
||||
set wyh = #{wyh,jdbcType=VARCHAR},
|
||||
csjg = #{csjg,jdbcType=VARCHAR},
|
||||
od = #{od,jdbcType=VARCHAR},
|
||||
cutoff = #{cutoff,jdbcType=VARCHAR},
|
||||
jgbz = #{jgbz,jdbcType=CHAR},
|
||||
bz1 = #{bz1,jdbcType=VARCHAR},
|
||||
bz2 = #{bz2,jdbcType=VARCHAR},
|
||||
yhdh = #{yhdh,jdbcType=VARCHAR},
|
||||
instrid = #{instrid,jdbcType=INTEGER},
|
||||
operdt = #{operdt,jdbcType=TIMESTAMP},
|
||||
operna = #{operna,jdbcType=VARCHAR},
|
||||
refs = #{refs,jdbcType=VARCHAR},
|
||||
flag = #{flag,jdbcType=VARCHAR},
|
||||
dw = #{dw,jdbcType=VARCHAR},
|
||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
||||
bz3 = #{bz3,jdbcType=VARCHAR},
|
||||
textresult = #{textresult,jdbcType=LONGVARCHAR}
|
||||
where jyrq = #{jyrq}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateLabResult" parameterType="com.czlis.common.core.domain.entity.LabResult">
|
||||
update lab_result
|
||||
set wyh = #{wyh,jdbcType=VARCHAR},
|
||||
csjg = #{csjg,jdbcType=VARCHAR},
|
||||
od = #{od,jdbcType=VARCHAR},
|
||||
cutoff = #{cutoff,jdbcType=VARCHAR},
|
||||
jgbz = #{jgbz,jdbcType=CHAR},
|
||||
bz1 = #{bz1,jdbcType=VARCHAR},
|
||||
bz2 = #{bz2,jdbcType=VARCHAR},
|
||||
yhdh = #{yhdh,jdbcType=VARCHAR},
|
||||
instrid = #{instrid,jdbcType=INTEGER},
|
||||
operdt = #{operdt,jdbcType=TIMESTAMP},
|
||||
operna = #{operna,jdbcType=VARCHAR},
|
||||
refs = #{refs,jdbcType=VARCHAR},
|
||||
flag = #{flag,jdbcType=VARCHAR},
|
||||
dw = #{dw,jdbcType=VARCHAR},
|
||||
result_flag = #{resultFlag,jdbcType=CHAR},
|
||||
alarm_flag = #{alarmFlag,jdbcType=CHAR},
|
||||
redo_flag = #{redoFlag,jdbcType=CHAR},
|
||||
sqxmdh = #{sqxmdh,jdbcType=VARCHAR},
|
||||
redo_text = #{redoText,jdbcType=VARCHAR},
|
||||
bz3 = #{bz3,jdbcType=VARCHAR}
|
||||
where jyrq = #{jyrq}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
and xmdh = #{xmdh,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -68,23 +68,22 @@ public class DictController extends BaseController {
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response,ComDict comDict) {
|
||||
List<ComDict> list = comDictService.getComDictList(comDict);
|
||||
ExcelUtil<ComDict> util = new ExcelUtil<ComDict>(ComDict.class);
|
||||
ExcelUtil<ComDict> util = new ExcelUtil<>(ComDict.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
}
|
||||
|
||||
@GetMapping("/importTemplate")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response){
|
||||
ExcelUtil<ComDict> util = new ExcelUtil<>(ComDict.class);
|
||||
util.exportExcel(response);
|
||||
util.importTemplateExcel(response, "字典数据");
|
||||
}
|
||||
@ApiOperation("导入字典")
|
||||
@PostMapping("/importData")
|
||||
public Result importData(@RequestBody MultipartFile file,boolean updateDlCeshi) throws Exception{
|
||||
|
||||
ExcelUtil<ComDict> util = new ExcelUtil<ComDict>(ComDict.class);
|
||||
public Result importData(MultipartFile file,boolean updateSupport) throws Exception{
|
||||
ExcelUtil<ComDict> util = new ExcelUtil<>(ComDict.class);
|
||||
List<ComDict> comDictList = util.importExcel(file.getInputStream());
|
||||
log.info("调用导入字典{}",comDictList);
|
||||
return comDictService.insertComDictList(comDictList,updateDlCeshi);
|
||||
return comDictService.insertComDictList(comDictList,updateSupport);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -30,7 +30,13 @@ public class InstrController extends BaseController {
|
||||
List<LabInstr> labInstrList = instrService.query(yq);
|
||||
return getDataTable(labInstrList);
|
||||
}
|
||||
|
||||
@ApiOperation("按组查询数据")
|
||||
@GetMapping("/querybylisgroup")
|
||||
public TableDataInfo querybylisgroup(String lisgroup){
|
||||
startPage();
|
||||
List<LabInstr> labInstrList = instrService.querybylisgroup(lisgroup);
|
||||
return getDataTable(labInstrList);
|
||||
}
|
||||
@ApiOperation("新增数据")
|
||||
@PostMapping("/add")
|
||||
public Result add(LabInstr labInstr){
|
||||
|
||||
@ -1,15 +1,21 @@
|
||||
package com.czlis.liswork.controller.work;
|
||||
|
||||
import com.czlis.common.core.controller.BaseController;
|
||||
import com.czlis.common.core.domain.AjaxResult;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.LabPat;
|
||||
import com.czlis.common.core.domain.entity.LabResult;
|
||||
import com.czlis.common.core.page.TableDataInfo;
|
||||
import com.czlis.liswork.service.LabPatService;
|
||||
import com.czlis.liswork.service.LabResultService;
|
||||
import com.czlis.liswork.service.LisWorkService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -17,11 +23,15 @@ import java.util.Date;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/liswork")
|
||||
@Slf4j
|
||||
public class LisWorkController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private LisWorkService lisWorkService;
|
||||
|
||||
@Autowired
|
||||
private LabPatService labPatService;
|
||||
@Autowired
|
||||
private LabResultService labResultService;
|
||||
/**
|
||||
* 可操作仪器查询
|
||||
* @return
|
||||
@ -52,11 +62,15 @@ public class LisWorkController extends BaseController {
|
||||
*/
|
||||
@ApiOperation("获取样本列表")
|
||||
@GetMapping("/samplelist")
|
||||
public Result getSampleList(Date jyrq,String yq,String days){
|
||||
return lisWorkService.getSampleList(jyrq,yq,days);
|
||||
// public Result getSampleList(Date jyrq,String yq,Long days){
|
||||
// return lisWorkService.getSampleList(jyrq,yq,days);
|
||||
// }
|
||||
public TableDataInfo getsamplelist(Date jyrq,String yq,Long days){
|
||||
startPage();
|
||||
List<LabPat> labPatList = labPatService.getSampleList(jyrq,yq,days);
|
||||
return getDataTable(labPatList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取普通样本信息
|
||||
* @param jyrq
|
||||
@ -67,7 +81,8 @@ public class LisWorkController extends BaseController {
|
||||
@ApiOperation("获取普通样本信息")
|
||||
@GetMapping("/sampleinfo")
|
||||
public Result sampleInfo(Date jyrq,String yq,String ybh){
|
||||
return lisWorkService.sampleInfo(jyrq,yq,ybh);
|
||||
|
||||
return labPatService.getLabPat(jyrq,yq,ybh);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,5 +104,16 @@ public class LisWorkController extends BaseController {
|
||||
return lisWorkService.checkUser(yhdh,mm);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/resultinfo")
|
||||
public Result getresultinfo(LabResult labResult){
|
||||
Date jyrq=labResult.getJyrq();
|
||||
String yq=labResult.getYq();
|
||||
String ybh=labResult.getYbh();
|
||||
log.info("jyrq,{}",jyrq.toString());
|
||||
return labResultService.getresultinfo(jyrq,yq,ybh);
|
||||
}
|
||||
@PostMapping("/deleteresult")
|
||||
public Result deleteresult(@RequestBody List<LabResult> labResultlist){
|
||||
return labResultService.delLabResultList(labResultlist);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.czlis.liswork.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.*;
|
||||
import com.czlis.liswork.pojo.ComUsrpower;
|
||||
import com.czlis.liswork.pojo.LabPatInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -10,9 +10,11 @@ import java.util.Map;
|
||||
|
||||
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(Date jyrq, String yq, String days);
|
||||
List<LabPat> sampleInfo(Date jyrq, String yq, String ybh);
|
||||
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<LabResult> getLabResult(LabResult labResult);
|
||||
List<LabPatInfo> getLabPatInfo(LabPatInfo labPatInfo);
|
||||
|
||||
@ -9,4 +9,6 @@ public interface InstrMapper {
|
||||
void add(LabInstr labInstr);
|
||||
void update(LabInstr labInstr);
|
||||
void delete(String yq);
|
||||
|
||||
List<LabInstr> querybylisgroup(String lisgroup);
|
||||
}
|
||||
|
||||
@ -7,7 +7,12 @@ import java.util.List;
|
||||
|
||||
public interface InstrService {
|
||||
List<LabInstr> query(String yq);
|
||||
|
||||
Result add(LabInstr labInstr);
|
||||
|
||||
Result update(LabInstr labInstr);
|
||||
|
||||
Result delete(String yq);
|
||||
|
||||
List<LabInstr> querybylisgroup(String lisgroup);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.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(String jyrq, String yq,String ybh) ;
|
||||
//根据编号查sqh
|
||||
String getSqhById(String jyrq,String yq,String ybh);
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.LabResult;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface LabResultService {
|
||||
List<LabResult> getLabResultList(Date jyrq, String yq, String ybh);
|
||||
Result getresultinfo(Date jyrq, String yq, String ybh);
|
||||
List<LabResult> getLabResult(Date jyrq, String yq, String ybh,String xmdh);
|
||||
Result insertLabResult(LabResult labResult);
|
||||
Result delLabResult(LabResult labResult);
|
||||
Result updateLabResult(LabResult labResult);
|
||||
Result delLabResultList(List<LabResult> labResultlist);
|
||||
}
|
||||
@ -8,9 +8,10 @@ import java.util.Date;
|
||||
|
||||
public interface LisWorkService {
|
||||
Result getInstrdList(Long userId);
|
||||
Result getGroupInstrdList(Long userId,String groupId);
|
||||
Result getInstrdConfig(String yq);
|
||||
Result getSampleList(Date jyrq, String yq, String days);
|
||||
Result sampleInfo(Date jyrq, String yq, String ybh);
|
||||
Result getSampleList(Date jyrq, String yq, Long days);
|
||||
Result getLabPat(Date jyrq, String yq, String ybh);
|
||||
Result sampleMedInfo(Date jyrq, String yq, String ybh);
|
||||
Result checkUser(String yhdh, String mm);
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.czlis.liswork.service.ComDictService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
@ -64,7 +65,7 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* 导入数据,事务查询方式为脏读,防止重复提交的数据存在
|
||||
* @param comDictList
|
||||
* @param updateDlCeshi
|
||||
* @return
|
||||
@ -72,10 +73,11 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result insertComDictList(List<ComDict> comDictList, boolean updateDlCeshi) {
|
||||
int row = 0, fail = 0, row0 = 0;
|
||||
String zdlb = "", pinyin = "", zddh = "", yljg = "", zdbz = "";
|
||||
int row, fail;
|
||||
boolean haveRow =false;
|
||||
String zdlb = "", pinyin, zddh, yljg, zdbz;
|
||||
//判断传入的List 是否为空
|
||||
if (StringUtils.isNull(comDictList) || comDictList.size() == 0) {
|
||||
if (StringUtils.isNull(comDictList) || comDictList.isEmpty()) {
|
||||
return new Result("-1", "导入数据不能为空!");
|
||||
}
|
||||
//定义失败条数,接收导入失败数据量
|
||||
@ -85,8 +87,9 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
zdlb = comDict.getZdlb();
|
||||
zddh = comDict.getZddh();
|
||||
//是否覆盖数据,不覆盖跳过
|
||||
row0 = comDictMapper.getCountById(zdlb, zddh);
|
||||
if (row0 > 0 && updateDlCeshi == false) continue;
|
||||
int row0 = comDictMapper.getCountById(zdlb, zddh);
|
||||
if (row0 != 0) {haveRow=true;}
|
||||
if (haveRow && !updateDlCeshi) continue;
|
||||
|
||||
pinyin = PinyinUtil.getFirstLetter(comDict.getZdmc(), ""); //拼音首字母
|
||||
if (pinyin.length() >= 9) {
|
||||
@ -96,13 +99,9 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
|
||||
yljg = comDict.getYljg();
|
||||
zdbz = comDict.getZdbz();
|
||||
if (yljg == null || yljg.equals("")) comDict.setYljg("1");
|
||||
if (zdbz == null || zdbz.equals("")) comDict.setZdbz("N");
|
||||
if (row0 > 0) {
|
||||
row = comDictMapper.updateComDict(comDict);
|
||||
} else {
|
||||
row = comDictMapper.insertComDict(comDict);
|
||||
}
|
||||
if (yljg == null || yljg.isEmpty()) comDict.setYljg("1");
|
||||
if (zdbz == null || zdbz.isEmpty()) comDict.setZdbz("N");
|
||||
row=updateComDictList(comDict,haveRow);
|
||||
if (row > 0) failureNum++;
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
@ -120,7 +119,22 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
return new Result("-1", "导入失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新,REQUIRES_NEW提交独立,保证部分成功部分失败互不影响
|
||||
* @param comDict
|
||||
* @param haveRow
|
||||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
|
||||
public int updateComDictList(ComDict comDict,boolean haveRow) {
|
||||
int row;
|
||||
if (haveRow) {
|
||||
row = comDictMapper.updateComDict(comDict);
|
||||
} else {
|
||||
row = comDictMapper.insertComDict(comDict);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
|
||||
@ -24,6 +24,11 @@ public class InstrServiceImpl implements InstrService {
|
||||
return instrMapper.query(yq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LabInstr> querybylisgroup(String lisgroup) {
|
||||
return instrMapper.querybylisgroup(lisgroup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result add(LabInstr labInstr) {
|
||||
instrMapper.add(labInstr);
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
package com.czlis.liswork.service.impl;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.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(String jyrq, String yq,String ybh) {
|
||||
return labPatMapper.getCountByKey(jyrq,yq,ybh);
|
||||
}
|
||||
//根据编号查sqh
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String getSqhById(String jyrq,String yq,String ybh){
|
||||
return labPatMapper.getSqhByKey(jyrq,yq,ybh);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.czlis.liswork.service.impl;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.LabResult;
|
||||
import com.czlis.interfaceCommon.mapper.LabResultMapper;
|
||||
import com.czlis.liswork.service.LabResultService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LabResultImpl implements LabResultService {
|
||||
@Autowired
|
||||
private LabResultMapper labResultMapper;
|
||||
@Override
|
||||
public List<LabResult> getLabResult(Date jyrq, String yq, String ybh,String xmdh) {
|
||||
return labResultMapper.getLabResult(jyrq, yq, ybh,xmdh);
|
||||
}
|
||||
@Override
|
||||
public List<LabResult> getLabResultList(Date jyrq, String yq, String ybh) {
|
||||
return labResultMapper.getLabResultList(jyrq, yq, ybh);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result insertLabResult(LabResult labResult) {
|
||||
int row = labResultMapper.updateLabResult(labResult);
|
||||
if (row > 0)
|
||||
return new Result("0", "新增成功!");
|
||||
else
|
||||
return new Result("-1", "新增失败!");
|
||||
}
|
||||
@Override
|
||||
public Result getresultinfo(Date jyrq, String yq, String ybh) {
|
||||
List<LabResult> labResult=labResultMapper.getLabResultList(jyrq, yq, ybh);
|
||||
return new Result("0", "查询成功!",labResult);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result delLabResult(LabResult labResult) {
|
||||
|
||||
int row = labResultMapper.delLabResult(labResult);
|
||||
if (row > 0)
|
||||
return new Result("0", "删除成功!");
|
||||
else
|
||||
return new Result("-1", "删除失败!");
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result delLabResultList(List<LabResult> labResultlist) {
|
||||
int row = 0, failureNum = 0, fail = 0;
|
||||
String xmdh="";
|
||||
for (LabResult labResult : labResultlist) {
|
||||
xmdh = labResult.getXmdh();
|
||||
if (xmdh == null || xmdh.isEmpty()){
|
||||
failureNum++;
|
||||
continue;
|
||||
}
|
||||
row = labResultMapper.delLabResult(labResult);
|
||||
if (row > 0) failureNum++;
|
||||
}
|
||||
if (failureNum ==0) return new Result("-1", "删除失败!");
|
||||
if (failureNum == labResultlist.size()) {
|
||||
return new Result("0", "数据已删除!共 " + labResultlist.size() + " 条");
|
||||
} else {
|
||||
fail = labResultlist.size() - failureNum;
|
||||
return new Result("0", "数据部分删除!成功 " + failureNum + " 条,失败 " + fail + " 条");
|
||||
}
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result updateLabResult(LabResult labResult) {
|
||||
int row = labResultMapper.updateLabResult(labResult);
|
||||
if (row > 0)
|
||||
return new Result("0", "修改成功!");
|
||||
else
|
||||
return new Result("-1", "修改失败!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if(zt.equals("2")){
|
||||
if(SP_GETTOWREQOK.equals("1")) return new Result("-1","当前条码已经上机!");
|
||||
if(SP_GETTOWREQOKYQ.equals("1")){
|
||||
List<LabPat> labPatList = commonUtil.getLabPatList(sqh);
|
||||
List<LabPat> labPatList = commonUtil.getLabPatListBySqh(sqh);
|
||||
for (LabPat labPat : labPatList) {
|
||||
String yq1 = labPat.getYq();
|
||||
if(yq.equals(yq1)) return new Result("-1","该条码已经在当前仪器上机,不允许重复上机!");
|
||||
|
||||
@ -4,8 +4,9 @@ import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.*;
|
||||
import com.czlis.liswork.mapper.LisWorkMapper;
|
||||
|
||||
import com.czlis.liswork.pojo.ComUsrpower;
|
||||
import com.czlis.liswork.pojo.LabPatInfo;
|
||||
|
||||
import com.czlis.liswork.mapper.xtwh.InstrMapper;
|
||||
import com.czlis.liswork.pojo.LabInstr;
|
||||
import com.czlis.liswork.service.LisWorkService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -20,12 +21,25 @@ public class LisWorkServiceImpl implements LisWorkService {
|
||||
@Autowired
|
||||
private LisWorkMapper lisWorkMapper;
|
||||
|
||||
@Autowired
|
||||
private InstrMapper instrMapper;
|
||||
@Override
|
||||
public Result getInstrdList(Long userId) {
|
||||
List<Map<String,Object>> comUsrpowerList = lisWorkMapper.getInstrdList(String.valueOf(userId));
|
||||
return new Result("0","获取权限列表成功!",comUsrpowerList);
|
||||
return new Result("0","获取仪器列表成功!",comUsrpowerList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getGroupInstrdList(Long userId,String groupId) {
|
||||
if(userId==1){
|
||||
List<LabInstr> labInstr=instrMapper.querybylisgroup(groupId);
|
||||
return new Result("0","获取分组仪器列表成功!",labInstr);
|
||||
}else{
|
||||
List<Map<String,Object>> comUsrpowerList = lisWorkMapper.getGroupInstrdList(String.valueOf(userId),groupId);
|
||||
return new Result("0","获取分组仪器列表成功!",comUsrpowerList);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Result getInstrdConfig(String yq) {
|
||||
List<ComOpt> instrdConfig = lisWorkMapper.getInstrdConfig(yq);
|
||||
@ -33,33 +47,20 @@ public class LisWorkServiceImpl implements LisWorkService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getSampleList(Date jyrq, String yq, String days) {
|
||||
LabPat labPat = new LabPat();
|
||||
labPat.setJyrq(jyrq);
|
||||
labPat.setYq(yq);
|
||||
List<LabPat> labPatList = lisWorkMapper.getLabPatList(labPat);
|
||||
LabPatInfo labPatInfo = new LabPatInfo();
|
||||
labPatInfo.setJyrq(jyrq);
|
||||
labPatInfo.setYq(yq);
|
||||
List<LabPatInfo> labPatInfoList = lisWorkMapper.getLabPatInfo(labPatInfo);
|
||||
List<Map<String,Object>> queryList = new ArrayList<>();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("labPatInfoList",labPatInfoList);
|
||||
map.put("labPatList",labPatList);
|
||||
queryList.add(map);
|
||||
return new Result("0","获取样本数据成功!",queryList);
|
||||
public Result getSampleList(Date jyrq, String yq, Long days) {
|
||||
if(days>1) {
|
||||
List<LabPat> labPatListday = lisWorkMapper.getSampleListday(yq, days);
|
||||
return new Result("0", "获取该样本数据成功!", labPatListday);
|
||||
}else {
|
||||
List<LabPat> labPatListday = lisWorkMapper.getSampleList(jyrq, yq);
|
||||
return new Result("0", "获取该样本数据成功!", labPatListday);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result sampleInfo(Date jyrq, String yq, String ybh) {
|
||||
LabResult labResult = new LabResult();
|
||||
labResult.setJyrq(jyrq);
|
||||
labResult.setYq(yq);
|
||||
labResult.setYbh(ybh);
|
||||
List<LabResult> labResultList = lisWorkMapper.getLabResult(labResult);
|
||||
return new Result("0","获取该样本数据成功!",labResultList);
|
||||
public Result getLabPat(Date jyrq, String yq, String ybh) {
|
||||
List<LabPat> labPat = lisWorkMapper.getLabPat(jyrq, yq, ybh);
|
||||
return new Result("0", "获取该样本数据成功!", labPat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result sampleMedInfo(Date jyrq, String yq, String ybh) {
|
||||
LabResult labResult = new LabResult();
|
||||
|
||||
@ -9,7 +9,12 @@
|
||||
<if test="yq != null and yq != ''">and yq = #{yq}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="querybylisgroup">
|
||||
select * from lab_instr
|
||||
<where>
|
||||
<if test="lisgroup != null and lisgroup != ''">and lisgroup = #{lisgroup}</if>
|
||||
</where>
|
||||
</select>
|
||||
<insert id="add">
|
||||
insert into lab_instr(
|
||||
<if test="yqmc != null and yqmc != ''">yqmc,</if>
|
||||
|
||||
@ -2,13 +2,19 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.LisWorkMapper">
|
||||
|
||||
<sql id="selectLabPatVo">
|
||||
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg from lab_pat
|
||||
</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.ComOpt">
|
||||
select * from com_opt where yq = #{yq}
|
||||
</select>
|
||||
@ -18,8 +24,21 @@
|
||||
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
||||
<if test="xmdh != null and xmdh !=''">and xmdh = #{xmdh}</if>
|
||||
</select>
|
||||
|
||||
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.LabPat">
|
||||
<select id="getSampleList" resultType="com.czlis.common.core.domain.entity.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.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.LabPat">
|
||||
select * from lab_pat
|
||||
<where>
|
||||
<if test="jyrq != null">and jyrq = #{jyrq}</if>
|
||||
@ -27,7 +46,35 @@
|
||||
<if test="ybh != null and ybh != ''">and ybh = #{ybh}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.LabPat">
|
||||
select * from lab_pat
|
||||
<where>
|
||||
<if test="jyrq != null and jyrq != ''">
|
||||
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="brxm != null and brxm != ''">
|
||||
and brxm like '%'+#{brxm}+'%'
|
||||
</if>
|
||||
<if test="sqh != null and sqh != ''">
|
||||
and sqh = #{sqh}
|
||||
</if>
|
||||
<if test="jgbz != null and jgbz != ''">
|
||||
and jgbz = #{jgbz}
|
||||
</if>
|
||||
<if test="jzbz != null and jzbz != ''">
|
||||
and jzbz = #{jzbz}
|
||||
</if>
|
||||
<if test="yljg != null and yljg != ''">
|
||||
and yljg = #{yljg}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getLabPatInfo" resultType="com.czlis.liswork.pojo.LabPatInfo">
|
||||
select * from lab_patinfo where jyrq = #{jyrq} and yq = #{yq}
|
||||
<if test="ybh != null and ybh !=''">and ybh = #{ybh}</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user