feat(all): 增加:winlistCaTask

pull/544/head
dazer007 2025-03-09 08:36:35 +08:00
parent 80786eedf7
commit 3beba7e7b2
15 changed files with 199 additions and 359 deletions

View File

@ -25,11 +25,11 @@
</dependency>
<!-- spring-boot-devtools -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-devtools</artifactId>-->
<!-- <optional>true</optional> &lt;!&ndash; 表示依赖不会传递 &ndash;&gt;-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger3-->
<dependency>
@ -119,6 +119,11 @@
<artifactId>gson</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
</dependency>
</dependencies>
<build>

View File

@ -5,6 +5,7 @@ import com.neuhis.his.domain.vo.bjca.BjCaResult;
import com.neuhis.his.domain.vo.bjca.CaResultVo;
import com.neuhis.his.domain.vo.bjca.CaStartVo;
import com.neuhis.his.service.IBjCaService;
import com.neuhis.his.service.winlis.ILasSapSampleregService;
import com.neuhis.his.service.winlis.IWinLisService;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
@ -31,6 +32,8 @@ public class AppBjCaController {
private IBjCaService bjCaService;
@Resource
private IWinLisService winLisService;
@Resource
private ILasSapSampleregService lasSapSampleregService;
/**
* startAutoSign[id]
* 使id: SD_4c6ec5f6-22e3-4fae-b2aa-681e5beacf1e
@ -64,7 +67,9 @@ public class AppBjCaController {
@ApiOperation(value = "获取Winlis的CA原文", notes = "获取Winlis的CA原文;生成CA信息签名结果、证书、时间戳")
public AjaxResult getWinLisCaInfo() {
//String caOriginText = winLisService.getWinLisCaOriginText("20250228", "WSW_caris200", "9999");
CaResultVo caResultVo = winLisService.generateBjCaInfo("20250228", "WSW_caris200", "9999", autoSignSignDataId);
return AjaxResult.success(caResultVo);
//CaResultVo caResultVo = winLisService.generateBjCaInfo("20250228", "WSW_caris200", "9999", autoSignSignDataId);
//return AjaxResult.success(caResultVo);
//return AjaxResult.success(lasSapSampleregService.selectWaitingCaSignList("202503", 10));
return AjaxResult.success(winLisService.winlistCaTask("202503", 10));
}
}

View File

@ -2,18 +2,22 @@ package com.neuhis.his.domain.entity.winlis;
import java.util.Date;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* CA
las_sap_cadata
*
* CA las_sap_cadata
* @author ruoyi
* @date 2025-03-07
*/
@Getter
@Setter
@NoArgsConstructor
public class LasSapCadata extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -34,124 +38,27 @@ public class LasSapCadata extends BaseEntity
@Excel(name = "条码号")
private String barcode;
/** 原始数据 */
@Excel(name = "原始数据")
private String srcdata;
/** CA数据 */
@Excel(name = "CA数据")
private String caclobdata;
/** CA原始数据 */
@Excel(name = "CA原始数据")
/** CA原始数据原始数据的BASE64形式 */
@Excel(name = "CA原始数据原始数据的BASE64形式")
private String srcclobdata;
/**
* CA,
* <pre>
*
*
*
* </pre>
*/
@Excel(name = "CA数据包含签名结果、时间戳、证书")
private String caclobdata;
/** CAID */
@Excel(name = "CAID")
private String caid;
public void setCatime(Date catime)
{
this.catime = catime;
}
public Date getCatime()
{
return catime;
}
public void setTestdate(String testdate)
{
this.testdate = testdate;
}
public String getTestdate()
{
return testdate;
}
public void setMachineid(String machineid)
{
this.machineid = machineid;
}
public String getMachineid()
{
return machineid;
}
public void setSampleid(String sampleid)
{
this.sampleid = sampleid;
}
public String getSampleid()
{
return sampleid;
}
public void setBarcode(String barcode)
{
this.barcode = barcode;
}
public String getBarcode()
{
return barcode;
}
public void setSrcdata(String srcdata)
{
this.srcdata = srcdata;
}
public String getSrcdata()
{
return srcdata;
}
public void setCaclobdata(String caclobdata)
{
this.caclobdata = caclobdata;
}
public String getCaclobdata()
{
return caclobdata;
}
public void setSrcclobdata(String srcclobdata)
{
this.srcclobdata = srcclobdata;
}
public String getSrcclobdata()
{
return srcclobdata;
}
public void setCaid(String caid)
{
this.caid = caid;
}
public String getCaid()
{
return caid;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("catime", getCatime())
.append("testdate", getTestdate())
.append("machineid", getMachineid())
.append("sampleid", getSampleid())
.append("barcode", getBarcode())
.append("srcdata", getSrcdata())
.append("caclobdata", getCaclobdata())
.append("srcclobdata", getSrcclobdata())
.append("caid", getCaid())
.toString();
}
}

View File

@ -0,0 +1,24 @@
package com.neuhis.his.domain.vo.winlis;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* CA
*
* @author dazer
* @date 2025/3/7 08:55
**/
@Getter
@Setter
@NoArgsConstructor
public class LasSapCadataWatingSignVo {
private String testdate;
private String machineid;
private String sampleid;
/**
*
*/
private String barcode;
}

View File

@ -1,77 +1,35 @@
package com.neuhis.his.mapper.winlis;
import com.neuhis.his.domain.entity.winlis.LasSapCadata;
import com.neuhis.his.domain.vo.winlis.LasSapCadataWatingSignVo;
import java.util.Date;
import java.util.List;
/**
* CA
Mapper
* CA Mapper
*
* @author ruoyi
* @date 2025-03-07
*/
public interface LasSapCadataMapper
{
/**
* CA
*/
List<LasSapCadataWatingSignVo> selectWaitingCaSignList(String testdateLike, Integer limit);
/**
* CA
* CA
*
* @param catime CA
* @return CA
*/
public LasSapCadata selectLasSapCadataByCatime(Date catime);
/**
* CA
*
* @param lasSapCadata CA
* @return CA
*/
public List<LasSapCadata> selectLasSapCadataList(LasSapCadata lasSapCadata);
/**
* CA
*
* @param lasSapCadata CA
* @param lasSapCadata CA
* @return
*/
public int insertLasSapCadata(LasSapCadata lasSapCadata);
int insertLasSapCadata(LasSapCadata lasSapCadata);
/**
* CA
*
* @param lasSapCadata CA
* CA
* @param lasSapCadata CA
* @return
*/
public int updateLasSapCadata(LasSapCadata lasSapCadata);
/**
* CA
*
* @param catime CA
* @return
*/
public int deleteLasSapCadataByCatime(Date catime);
/**
* CA
*
* @param catimes
* @return
*/
public int deleteLasSapCadataByCatimes(String[] catimes);
int updateLasSapCadata(LasSapCadata lasSapCadata);
}

View File

@ -15,22 +15,9 @@ Mapper接口
public interface LasSapSampleregMapper
{
/**
*
*
*
* @param testdate
* @return
*/
LasSapSamplereg selectLasSapSampleregByTestdate(@Param("testdate")String testdate,@Param("machineid") String machineid,@Param("sampleId") String sampleId);
/**
*
*
* @param lasSapSamplereg
* @return
*/
List<LasSapSamplereg> selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg);
}

View File

@ -33,7 +33,6 @@ import java.util.Map;
public class BjCaServiceImpl implements IBjCaService {
@Autowired
private BjCaConfig bjCaConfig;
/**
* https://demo-system.isignet.cn/signHelper/sign.html 校验签名值是否正确
* @return
@ -87,7 +86,7 @@ public class BjCaServiceImpl implements IBjCaService {
params.put("attachCert", StrUtil.isNotEmpty(signature) ? "true" : "false");//最终产生的时间戳是否带证书 (true/false)
params.put("signature", signature);//最终产生的时间戳是否带证书 (true/false)
BjCaResult<CaCreateAndGetTssInfoVo> result = postBjCa(bjCaConfig.getServerTssInfo(), params, CaCreateAndGetTssInfoVo.class);
return result != null && result.isSuccess() ? result.getData().getTsResp() : "";
return result.isSuccess() ? result.getData().getTsResp() : "";
}
@SuppressWarnings("all")
@ -109,6 +108,10 @@ public class BjCaServiceImpl implements IBjCaService {
"北京CA开始HTTP请求URL" + (bjCaConfig.getServerBase()+url) + "\n," +
"请求入参:" + requestJson + "\n" +
"响应结果:" + resultJson);
//89003046 自动签未开启或已过期, 如果提示这个需要重新【协同签名】app后续所有的操作都无法进行
if (bjCaResult.getStatus() != null && bjCaResult.getStatus().equals(89003046L)) {
throw new RuntimeException("错误码89003046错误信息自动签未开启或已过期请重新【协同签名】app后续所有的操作都无法进行,所有操作需要中断!");
}
return bjCaResult;
}

View File

@ -1,6 +1,8 @@
package com.neuhis.his.service.impl;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.ListUtil;
import com.fasterxml.jackson.databind.ser.Serializers;
import com.neuhis.his.domain.dto.DeadLockRac;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;

View File

@ -1,5 +1,7 @@
package com.neuhis.his.service.impl.winlis;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
@ -7,10 +9,14 @@ import cn.hutool.core.lang.Opt;
import cn.hutool.core.util.StrUtil;
import com.neuhis.his.domain.entity.winlis.LasRolPerson;
import com.neuhis.his.domain.entity.winlis.LasRtResult;
import com.neuhis.his.domain.entity.winlis.LasSapCadata;
import com.neuhis.his.domain.entity.winlis.LasSapSamplereg;
import com.neuhis.his.domain.vo.bjca.CaResultVo;
import com.neuhis.his.domain.vo.winlis.LasSapCadataWatingSignVo;
import com.neuhis.his.domain.vo.winlis.LasSapSampleregVo;
import com.neuhis.his.mapper.winlis.LasRolPersonMapper;
import com.neuhis.his.mapper.winlis.LasRtResultMapper;
import com.neuhis.his.mapper.winlis.LasSapCadataMapper;
import com.neuhis.his.mapper.winlis.LasSapSampleregMapper;
import com.neuhis.his.service.winlis.ILasSapSampleregService;
import com.ruoyi.common.annotation.DataSource;
@ -35,23 +41,10 @@ public class LasSapSampleregServiceImpl implements ILasSapSampleregService
private LasRtResultMapper lasRtResultMapper;
@Autowired
private LasRolPersonMapper latestRolPersonMapper;
@Autowired
private LasSapCadataMapper lasSapCadataMapper;
/**
*
*
* @param testdate
* @return
*/
@Override
public LasSapSamplereg selectLasSapSampleregByTestdate(String testdate, String machineid, String sampleId)
{
return lasSapSampleregMapper.selectLasSapSampleregByTestdate(testdate, machineid, sampleId);
}
@Override
public LasSapSampleregVo selectLasSapSampleregVo(String testdate, String machineid, String sampleId) {
//region 查询1条码信息 Winlis.las_sap_samplereg
@ -78,14 +71,39 @@ public class LasSapSampleregServiceImpl implements ILasSapSampleregService
return vo;
}
/**
*
* @param lasSapSamplereg
* @return
*/
@Override
public List<LasSapSamplereg> selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg)
{
return lasSapSampleregMapper.selectLasSapSampleregList(lasSapSamplereg);
public List<LasSapCadataWatingSignVo> selectWaitingCaSignList(String testdateLike, Integer limit) {
return lasSapCadataMapper.selectWaitingCaSignList(testdateLike, limit);
}
@Override
public int insertLasSapCaData(LasSapCadataWatingSignVo watingSignVo, CaResultVo caResultVo) {
if (watingSignVo == null || caResultVo == null) {
return 0;
}
LasSapCadata cadata = new LasSapCadata();
cadata.setTestdate(watingSignVo.getTestdate());
cadata.setMachineid(watingSignVo.getMachineid());
cadata.setSampleid(watingSignVo.getSampleid());
cadata.setBarcode(watingSignVo.getBarcode());
cadata.setSrcdata(caResultVo.getOriData());
cadata.setSrcclobdata(caResultVo.getOriDataBase64());
cadata.setCatime(new Date());
cadata.setCaid(caResultVo.getSignDataId());
/**
* CA,
*
*
*
*/
String caclobdata =
"签名结果:" + caResultVo.getSignResult() + "\n"
+"时间戳:" + caResultVo.getTimeciphertext() + "\n"
+"证书:" + caResultVo.getSignCert()
;
cadata.setCaclobdata(caclobdata);
return lasSapCadataMapper.insertLasSapCadata(cadata);
}
}

View File

@ -4,10 +4,12 @@ import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.neuhis.his.domain.entity.winlis.LasRtResult;
import com.neuhis.his.domain.vo.bjca.BjCaResult;
import com.neuhis.his.domain.vo.bjca.CaResultVo;
import com.neuhis.his.domain.vo.bjca.CaStartVo;
import com.neuhis.his.domain.vo.winlis.LasSapCadataWatingSignVo;
import com.neuhis.his.domain.vo.winlis.LasSapSampleregVo;
import com.neuhis.his.service.IBjCaService;
import com.neuhis.his.service.winlis.ILasSapSampleregService;
@ -20,8 +22,10 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Winlis
@ -33,10 +37,27 @@ import static cn.hutool.core.date.DatePattern.NORM_DATETIME_PATTERN;
@Service
@DataSource(value = DataSourceType.WINLIS)
public class WinLisServiceImpl implements IWinLisService {
/**
* 线
* Executors.newFixedThreadPool(10);
* 线10 线
* 线60线线线120500
* oom
*/
private static ThreadPoolExecutor executorService = new ThreadPoolExecutor(20, 50, 60L, TimeUnit.SECONDS,
new ArrayBlockingQueue<>(5000), new ThreadFactoryBuilder().setNameFormat("winlisca-task-thread-pool-%d").build());
@Autowired
private ILasSapSampleregService lasSapSampleregService;
@Autowired
private IBjCaService bjCaService;
/**
* startAutoSign[id]
* 使id: SD_4c6ec5f6-22e3-4fae-b2aa-681e5beacf1e
* 使id: SD_892d8817-4a96-445c-a5c1-2eb9f334fecc
*/
private String autoSignSignDataId = "SD_4c6ec5f6-22e3-4fae-b2aa-681e5beacf1e";
@Override
public String getWinLisCaOriginText(String testdate, String machineid, String sampleId) {
LasSapSampleregVo reg = lasSapSampleregService.selectLasSapSampleregVo(testdate, machineid, sampleId);
@ -230,7 +251,7 @@ public class WinLisServiceImpl implements IWinLisService {
//region 2、北京CA自动签名
BjCaResult<CaStartVo> autoSignRe = bjCaService.autoSign(autoSignSignDataId, Base64.encode(originText));
if (autoSignRe == null || !autoSignRe.isSuccess()) {
if (autoSignRe == null) {
return null;
}
//endregion
@ -255,6 +276,26 @@ public class WinLisServiceImpl implements IWinLisService {
return caResultVo;
}
@Override
public int winlistCaTask(String testdateLike, Integer limit) {
AtomicInteger successNum = new AtomicInteger();
List<LasSapCadataWatingSignVo> watingSignVos = lasSapSampleregService.selectWaitingCaSignList(testdateLike, limit);
for (LasSapCadataWatingSignVo vo : watingSignVos) {
AtomicInteger i = new AtomicInteger();
executorService.execute(() -> {
log.debug("开始winlistCaTask index = {}", i.incrementAndGet());
String originText = getWinLisCaOriginText(vo.getTestdate(), vo.getMachineid(), vo.getSampleid());
CaResultVo caResultVo = generateBjCaInfo(vo.getTestdate(), vo.getMachineid(), vo.getSampleid(), autoSignSignDataId);
if (StrUtil.isEmpty(originText) || caResultVo == null) {
return;
}
int result = lasSapSampleregService.insertLasSapCaData(vo, caResultVo);
successNum.addAndGet(result);
});
}
return successNum.get();
}
private String strDef(String str) {
if ("null".equalsIgnoreCase(str)) {
return "";

View File

@ -1,6 +1,9 @@
package com.neuhis.his.service.winlis;
import com.neuhis.his.domain.entity.winlis.LasSapCadata;
import com.neuhis.his.domain.entity.winlis.LasSapSamplereg;
import com.neuhis.his.domain.vo.bjca.CaResultVo;
import com.neuhis.his.domain.vo.winlis.LasSapCadataWatingSignVo;
import com.neuhis.his.domain.vo.winlis.LasSapSampleregVo;
import java.util.List;
@ -14,29 +17,21 @@ Service接口
*/
public interface ILasSapSampleregService
{
/**
*
*
* @param testdate
* @return
*/
LasSapSamplereg selectLasSapSampleregByTestdate(String testdate, String machineid, String sampleId);
/**
*
* @param testdate
* @param barcode
* @param machineid
* @param sampleId
*/
LasSapSampleregVo selectLasSapSampleregVo(String testdate, String machineid, String sampleId);
/**
* CA
* @param testdateLike2025202503
*/
List<LasSapCadataWatingSignVo> selectWaitingCaSignList(String testdateLike, Integer limit);
/**
*
* @param lasSapSamplereg
* @return
* CA
*/
List<LasSapSamplereg> selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg);
int insertLasSapCaData(LasSapCadataWatingSignVo watingSignVo, CaResultVo caResultVo);
}

View File

@ -22,4 +22,6 @@ public interface IWinLisService {
* CA
*/
CaResultVo generateBjCaInfo(String testdate, String machineid, String sampleId, String autoSignSignDataId);
int winlistCaTask(String testdateLike, Integer limit);
}

View File

@ -5,6 +5,7 @@ import com.neuhis.his.domain.dto.DeadLock;
import com.neuhis.his.domain.dto.DeadLockRac;
import com.neuhis.his.push.OracleSlaveDataAutoPushService;
import com.neuhis.his.service.IOracleSysService;
import com.neuhis.his.service.winlis.IWinLisService;
import com.neuhis.quartz.task.common.JobService;
import com.ruoyi.common.config.RuoYiConfig;
import com.neuhis.quartz.task.common.JobSwitchConstant;
@ -31,6 +32,8 @@ public class HisTask {
private IOracleSysService oracleSysService;
@Autowired
private RuoYiConfig ruoYiConfig;
@Autowired
private IWinLisService winLisService;
public void pushData()
{
@ -82,4 +85,13 @@ public class HisTask {
log.info("日志数据删除结束,共删除 "+num+" 条日志。" + DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss"));
}
}
public void winlisCaTask(String testdateLike, Integer limit)
{
if (ruoYiConfig.isQuzrtzTask()) {
log.info("winlisCA数据推送开始" + DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss"));
winLisService.winlistCaTask(testdateLike,limit);
log.info("winlisCA数据推送结束" + DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss"));
}
}
}

View File

@ -20,20 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select catime, testdate, machineid, sampleid, barcode, srcdata, caclobdata, srcclobdata, caid from las_sap_cadata
</sql>
<select id="selectLasSapCadataList" parameterType="com.neuhis.his.domain.entity.winlis.LasSapCadata" resultMap="LasSapCadataResult">
<include refid="selectLasSapCadataVo"/>
<where>
<if test="barcode != null and barcode != ''"> and barcode = #{barcode}</if>
<if test="srcdata != null and srcdata != ''"> and srcdata = #{srcdata}</if>
<if test="caclobdata != null and caclobdata != ''"> and caclobdata = #{caclobdata}</if>
<if test="srcclobdata != null and srcclobdata != ''"> and srcclobdata = #{srcclobdata}</if>
<if test="caid != null and caid != ''"> and caid = #{caid}</if>
</where>
</select>
<select id="selectLasSapCadataByCatime" parameterType="Date" resultMap="LasSapCadataResult">
<include refid="selectLasSapCadataVo"/>
where catime = #{catime}
<select id="selectWaitingCaSignList" resultType="com.neuhis.his.domain.vo.winlis.LasSapCadataWatingSignVo">
select r.* from (
select t.testdate, t.machineid, t.sampleid, t.barcode from Winlis.las_sap_samplereg t where not exists
(select 1 from winlis.las_sap_cadata c where c.testdate = t.testdate and c.machineid = t.machineid and c.sampleid = t.sampleid)
and t.approvetime is not null
and t.testdate like #{srcclobdata}||'%' order by t.testdate desc
) r where rownum <![CDATA[<=]]> #{rownum}
</select>
<insert id="insertLasSapCadata" parameterType="com.neuhis.his.domain.entity.winlis.LasSapCadata" useGeneratedKeys="true" keyProperty="catime">
@ -74,16 +67,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where catime = #{catime}
</update>
<delete id="deleteLasSapCadataByCatime" parameterType="Date">
delete from las_sap_cadata where catime = #{catime}
</delete>
<delete id="deleteLasSapCadataByCatimes" parameterType="String">
delete from las_sap_cadata where catime in
<foreach item="catime" collection="array" open="(" separator="," close=")">
#{catime}
</foreach>
</delete>
</mapper>

View File

@ -108,106 +108,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select testdate, machineid, sampleid, barcode, patienttype, patientid, patientseq, patientname, patientsex, patientage, patientageunit, patienttel, patientbedno, patientidenno, patientrace, patientsite, execsqn, emc, hisitemidlist, hisitemnamelist, hisitemprice, doctorid, doctorname, deptid, deptname, ordertime, execdeptid, execdeptname, wardid, wardname, sampletype, urineqty, samplestate, sampleposition, diagnosis, confirmstate, printstate, alertstate, state, testtype, groupid, nurseid, nursename, sampletime, senderid, sendername, sendtime, sendformid, inceptorid, inceptorname, incepttime, accepterid, acceptername, accepttime, approverid, approvername, approvetime, memo, rackcup, printedtime, printerid, printername, checktime, resulttime, hospitalid, sampleid2, lismemo, birthday, extrainfo, planitemcount, actualitemcount, testeditemcount, ishighrisk, isgcp, barcode2, barprinttime, documenttime, documentid, documentname, reporttime, samplegetname, samplegetid, state2, lsptestform, execsqn2, diagnosisid, patientid2, patientid3, patientinfo, autoconfirminfo, barcodememo, tjflag, menstrualcycle, translationinfo, mixcode, passportno, patientnameen from las_sap_samplereg
</sql>
<select id="selectLasSapSampleregList" parameterType="com.neuhis.his.domain.entity.winlis.LasSapSamplereg" resultMap="LasSapSampleregResult">
<include refid="selectLasSapSampleregVo"/>
<where>
<if test="barcode != null and barcode != ''"> and barcode = #{barcode}</if>
<if test="patienttype != null and patienttype != ''"> and patienttype = #{patienttype}</if>
<if test="patientid != null and patientid != ''"> and patientid = #{patientid}</if>
<if test="patientseq != null and patientseq != ''"> and patientseq = #{patientseq}</if>
<if test="patientname != null and patientname != ''"> and patientname like concat('%', #{patientname}, '%')</if>
<if test="patientsex != null and patientsex != ''"> and patientsex = #{patientsex}</if>
<if test="patientage != null and patientage != ''"> and patientage = #{patientage}</if>
<if test="patientageunit != null and patientageunit != ''"> and patientageunit = #{patientageunit}</if>
<if test="patienttel != null and patienttel != ''"> and patienttel = #{patienttel}</if>
<if test="patientbedno != null and patientbedno != ''"> and patientbedno = #{patientbedno}</if>
<if test="patientidenno != null and patientidenno != ''"> and patientidenno = #{patientidenno}</if>
<if test="patientrace != null and patientrace != ''"> and patientrace = #{patientrace}</if>
<if test="patientsite != null and patientsite != ''"> and patientsite = #{patientsite}</if>
<if test="execsqn != null and execsqn != ''"> and execsqn = #{execsqn}</if>
<if test="emc != null and emc != ''"> and emc = #{emc}</if>
<if test="hisitemidlist != null and hisitemidlist != ''"> and hisitemidlist = #{hisitemidlist}</if>
<if test="hisitemnamelist != null and hisitemnamelist != ''"> and hisitemnamelist = #{hisitemnamelist}</if>
<if test="hisitemprice != null "> and hisitemprice = #{hisitemprice}</if>
<if test="doctorid != null and doctorid != ''"> and doctorid = #{doctorid}</if>
<if test="doctorname != null and doctorname != ''"> and doctorname like concat('%', #{doctorname}, '%')</if>
<if test="deptid != null and deptid != ''"> and deptid = #{deptid}</if>
<if test="deptname != null and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if>
<if test="ordertime != null "> and ordertime = #{ordertime}</if>
<if test="execdeptid != null and execdeptid != ''"> and execdeptid = #{execdeptid}</if>
<if test="execdeptname != null and execdeptname != ''"> and execdeptname like concat('%', #{execdeptname}, '%')</if>
<if test="wardid != null and wardid != ''"> and wardid = #{wardid}</if>
<if test="wardname != null and wardname != ''"> and wardname like concat('%', #{wardname}, '%')</if>
<if test="sampletype != null and sampletype != ''"> and sampletype = #{sampletype}</if>
<if test="urineqty != null and urineqty != ''"> and urineqty = #{urineqty}</if>
<if test="samplestate != null and samplestate != ''"> and samplestate = #{samplestate}</if>
<if test="sampleposition != null and sampleposition != ''"> and sampleposition = #{sampleposition}</if>
<if test="diagnosis != null and diagnosis != ''"> and diagnosis = #{diagnosis}</if>
<if test="confirmstate != null and confirmstate != ''"> and confirmstate = #{confirmstate}</if>
<if test="printstate != null and printstate != ''"> and printstate = #{printstate}</if>
<if test="alertstate != null and alertstate != ''"> and alertstate = #{alertstate}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="testtype != null and testtype != ''"> and testtype = #{testtype}</if>
<if test="groupid != null and groupid != ''"> and groupid = #{groupid}</if>
<if test="nurseid != null and nurseid != ''"> and nurseid = #{nurseid}</if>
<if test="nursename != null and nursename != ''"> and nursename like concat('%', #{nursename}, '%')</if>
<if test="sampletime != null "> and sampletime = #{sampletime}</if>
<if test="senderid != null and senderid != ''"> and senderid = #{senderid}</if>
<if test="sendername != null and sendername != ''"> and sendername like concat('%', #{sendername}, '%')</if>
<if test="sendtime != null "> and sendtime = #{sendtime}</if>
<if test="sendformid != null and sendformid != ''"> and sendformid = #{sendformid}</if>
<if test="inceptorid != null and inceptorid != ''"> and inceptorid = #{inceptorid}</if>
<if test="inceptorname != null and inceptorname != ''"> and inceptorname like concat('%', #{inceptorname}, '%')</if>
<if test="incepttime != null "> and incepttime = #{incepttime}</if>
<if test="accepterid != null and accepterid != ''"> and accepterid = #{accepterid}</if>
<if test="acceptername != null and acceptername != ''"> and acceptername like concat('%', #{acceptername}, '%')</if>
<if test="accepttime != null "> and accepttime = #{accepttime}</if>
<if test="approverid != null and approverid != ''"> and approverid = #{approverid}</if>
<if test="approvername != null and approvername != ''"> and approvername like concat('%', #{approvername}, '%')</if>
<if test="approvetime != null "> and approvetime = #{approvetime}</if>
<if test="memo != null and memo != ''"> and memo = #{memo}</if>
<if test="rackcup != null and rackcup != ''"> and rackcup = #{rackcup}</if>
<if test="printedtime != null "> and printedtime = #{printedtime}</if>
<if test="printerid != null and printerid != ''"> and printerid = #{printerid}</if>
<if test="printername != null and printername != ''"> and printername like concat('%', #{printername}, '%')</if>
<if test="checktime != null "> and checktime = #{checktime}</if>
<if test="resulttime != null "> and resulttime = #{resulttime}</if>
<if test="hospitalid != null and hospitalid != ''"> and hospitalid = #{hospitalid}</if>
<if test="sampleid2 != null and sampleid2 != ''"> and sampleid2 = #{sampleid2}</if>
<if test="lismemo != null and lismemo != ''"> and lismemo = #{lismemo}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="extrainfo != null and extrainfo != ''"> and extrainfo = #{extrainfo}</if>
<if test="planitemcount != null "> and planitemcount = #{planitemcount}</if>
<if test="actualitemcount != null "> and actualitemcount = #{actualitemcount}</if>
<if test="testeditemcount != null "> and testeditemcount = #{testeditemcount}</if>
<if test="ishighrisk != null and ishighrisk != ''"> and ishighrisk = #{ishighrisk}</if>
<if test="isgcp != null and isgcp != ''"> and isgcp = #{isgcp}</if>
<if test="barcode2 != null and barcode2 != ''"> and barcode2 = #{barcode2}</if>
<if test="barprinttime != null "> and barprinttime = #{barprinttime}</if>
<if test="documenttime != null "> and documenttime = #{documenttime}</if>
<if test="documentid != null and documentid != ''"> and documentid = #{documentid}</if>
<if test="documentname != null and documentname != ''"> and documentname like concat('%', #{documentname}, '%')</if>
<if test="reporttime != null "> and reporttime = #{reporttime}</if>
<if test="samplegetname != null and samplegetname != ''"> and samplegetname like concat('%', #{samplegetname}, '%')</if>
<if test="samplegetid != null and samplegetid != ''"> and samplegetid = #{samplegetid}</if>
<if test="state2 != null and state2 != ''"> and state2 = #{state2}</if>
<if test="lsptestform != null and lsptestform != ''"> and lsptestform = #{lsptestform}</if>
<if test="execsqn2 != null and execsqn2 != ''"> and execsqn2 = #{execsqn2}</if>
<if test="diagnosisid != null and diagnosisid != ''"> and diagnosisid = #{diagnosisid}</if>
<if test="patientid2 != null and patientid2 != ''"> and patientid2 = #{patientid2}</if>
<if test="patientid3 != null and patientid3 != ''"> and patientid3 = #{patientid3}</if>
<if test="patientinfo != null and patientinfo != ''"> and patientinfo = #{patientinfo}</if>
<if test="autoconfirminfo != null and autoconfirminfo != ''"> and autoconfirminfo = #{autoconfirminfo}</if>
<if test="barcodememo != null and barcodememo != ''"> and barcodememo = #{barcodememo}</if>
<if test="tjflag != null and tjflag != ''"> and tjflag = #{tjflag}</if>
<if test="menstrualcycle != null and menstrualcycle != ''"> and menstrualcycle = #{menstrualcycle}</if>
<if test="translationinfo != null and translationinfo != ''"> and translationinfo = #{translationinfo}</if>
<if test="mixcode != null and mixcode != ''"> and mixcode = #{mixcode}</if>
<if test="passportno != null and passportno != ''"> and passportno = #{passportno}</if>
<if test="patientnameen != null and patientnameen != ''"> and patientnameen = #{patientnameen}</if>
</where>
</select>
<select id="selectLasSapSampleregByTestdate" parameterType="String" resultMap="LasSapSampleregResult">
<include refid="selectLasSapSampleregVo"/>
where testdate = #{testdate} and machineid = #{machineid} and sampleid = #{sampleId}