feat(all): 新增winlis.LasRolPerson

pull/544/head
dazer007 2025-03-06 16:14:33 +08:00
parent 22d7784143
commit 04fe1d26f0
7 changed files with 459 additions and 51 deletions

View File

@ -0,0 +1,127 @@
package com.neuhis.his.domain.entity.winlis;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
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;
/**
*
,,,,. las_rol_person
*
* @author ruoyi
* @date 2025-03-06
*/
@Setter
@Getter
@ToString
public class LasRolPerson extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 人员ID */
private String personid;
/** 人员姓名 */
@Excel(name = "人员姓名")
private String personname;
/** 帐户名称 */
@Excel(name = "帐户名称")
private String loginname;
/** 帐户密码 */
@Excel(name = "帐户密码")
private String loginpass;
/** 检验者密码 */
@Excel(name = "检验者密码")
private String testerpass;
/** 小组编码(生化组...) */
@Excel(name = "小组编码(生化组...)")
private String groupid;
/** 角色标识(超级,主任,组长等),可设置多角色 */
@Excel(name = "角色标识(超级,主任,组长等),可设置多角色")
private String roleid;
/** 可登录小组(01,02,03,)等 */
@Excel(name = "可登录小组(01,02,03,)等")
private String logingroup;
/** 手写签名 */
@Excel(name = "手写签名")
private String manuscript;
/** (1)来自HIS等外部系统;(0)自行维护人员 */
@Excel(name = "(1)来自HIS等外部系统;(0)自行维护人员")
private String issourcehis;
/** 使用CA:1是0否 */
@Excel(name = "使用CA:1是0否")
private String isopenca;
/** 有效:1是0否 */
@Excel(name = "有效:1是0否")
private String isenabled;
/** 账号起始时间 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Excel(name = "账号起始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date begindate;
/** 账号终结时间 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Excel(name = "账号终结时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date enddate;
/** 特批申请上限 */
@Excel(name = "特批申请上限")
private Long applylimit;
/** 人员类别(检验员、医生、护士) */
@Excel(name = "人员类别", readConverterExp = "检=验员、医生、护士")
private String persontype;
/** CA唯一码 */
@Excel(name = "CA唯一码")
private String cacardid;
/** 是否已经读取更新列表 */
@Excel(name = "是否已经读取更新列表")
private String isreadedftpcon;
/** 密码输入错误次数 */
@Excel(name = "密码输入错误次数")
private String pswerrcount;
/** 是否锁定0未锁定1锁定 */
@Excel(name = "是否锁定", readConverterExp = "0=未锁定1锁定")
private String islock;
/** 审核者(账户)登出时间 */
@Excel(name = "审核者", readConverterExp = "账=户")
private Long loginboardtime;
/** 检验者登出时间 */
@Excel(name = "检验者登出时间")
private Long testerboardtime;
/** 可登录小组和角色(小组编码1@角色编码1,角色编码2...;小组编码2@角色编码1...) */
@Excel(name = "可登录小组和角色(小组编码1@角色编码1,角色编码2...;小组编码2@角色编码1...)")
private String logingrouprole;
/** 外语手写签名 */
@Excel(name = "外语手写签名")
private String enmanuscript;
/** 外语姓名 */
@Excel(name = "外语姓名")
private String enpersonname;
}

View File

@ -19,5 +19,9 @@ import java.util.List;
@Setter
@NoArgsConstructor
public class LasSapSampleregVo extends LasSapSamplereg {
/**
* CA
*/
private String cacardid;
private List<LasRtResult> rtResultList = new ArrayList<>();
}

View File

@ -0,0 +1,76 @@
package com.neuhis.his.mapper.winlis;
import com.neuhis.his.domain.entity.winlis.LasRolPerson;
import java.util.List;
/**
*
,,,,.Mapper
*
* @author ruoyi
* @date 2025-03-06
*/
public interface LasRolPersonMapper
{
/**
*
,,,,.
*
* @param personid
,,,,.
* @return
,,,,.
*/
LasRolPerson selectLasRolPersonByPersonid(String personid);
/**
*
,,,,.
*
* @param lasRolPerson
,,,,.
* @return
,,,,.
*/
List<LasRolPerson> selectLasRolPersonList(LasRolPerson lasRolPerson);
/**
*
,,,,.
*
* @param lasRolPerson
,,,,.
* @return
*/
int insertLasRolPerson(LasRolPerson lasRolPerson);
/**
*
,,,,.
*
* @param lasRolPerson
,,,,.
* @return
*/
int updateLasRolPerson(LasRolPerson lasRolPerson);
/**
*
,,,,.
*
* @param personid
,,,,.
* @return
*/
int deleteLasRolPersonByPersonid(String personid);
/**
*
,,,,.
*
* @param personids
* @return
*/
int deleteLasRolPersonByPersonids(String[] personids);
}

View File

@ -20,7 +20,7 @@ public interface LasSapSampleregMapper
* @param testdate
* @return
*/
public LasSapSamplereg selectLasSapSampleregByTestdate(String testdate, String barcode, String machineid);
LasSapSamplereg selectLasSapSampleregByTestdate(String testdate, String barcode, String machineid);
/**
*
@ -31,5 +31,5 @@ public interface LasSapSampleregMapper
* @return
*/
public List<LasSapSamplereg> selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg);
List<LasSapSamplereg> selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg);
}

View File

@ -3,9 +3,13 @@ package com.neuhis.his.service.impl.winlis;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
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.LasSapSamplereg;
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.LasSapSampleregMapper;
import com.neuhis.his.service.winlis.ILasSapSampleregService;
@ -29,6 +33,8 @@ public class LasSapSampleregServiceImpl implements ILasSapSampleregService
private LasSapSampleregMapper lasSapSampleregMapper;
@Autowired
private LasRtResultMapper lasRtResultMapper;
@Autowired
private LasRolPersonMapper latestRolPersonMapper;
/**
@ -48,16 +54,24 @@ public class LasSapSampleregServiceImpl implements ILasSapSampleregService
@Override
public LasSapSampleregVo selectLasSapSampleregVo(String testdate, String barcode, String machineid) {
//region 查询1条码信息
//region 查询1条码信息 Winlis.las_sap_samplereg
LasSapSampleregVo vo = new LasSapSampleregVo();
LasSapSamplereg entity = lasSapSampleregMapper.selectLasSapSampleregByTestdate(testdate, barcode, machineid);
BeanUtil.copyProperties(entity, vo);
//endregion
//region 查询2检验结果信息
//region 查询2检验结果信息 Winlis.LAS_RT_RESULT
List<LasRtResult> rtResults = lasRtResultMapper.selectLasRtResultByTestdate(testdate, barcode, machineid);
vo.setRtResultList(rtResults);
//endregion
//region 查询3: 检验人员信息 Winlis.las_rol_person
String approverid = entity.getApproverid();
if (!StrUtil.isEmpty(approverid)) {
LasRolPerson lasRolPerson = latestRolPersonMapper.selectLasRolPersonByPersonid(approverid);
Opt.of(lasRolPerson).ifPresent(en -> en.setCacardid(en.getCacardid()));
}
//endregion
return vo;
}

View File

@ -1,19 +1,25 @@
package com.neuhis.his.service.impl.winlis;
import cn.hutool.core.util.StrUtil;
import com.neuhis.his.domain.vo.winlis.LasSapSampleregVo;
import com.neuhis.his.service.winlis.ILasSapSampleregService;
import com.neuhis.his.service.winlis.IWinLisService;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* Winlis
*
* @author dazer
* @date 2025/3/4 17:38
**/
@Slf4j
@Service
@DataSource(value = DataSourceType.WINLIS)
public class WinLisServiceImpl implements IWinLisService {
@ -25,6 +31,8 @@ public class WinLisServiceImpl implements IWinLisService {
if (regVo == null) {
return "";
}
List<String> items = new ArrayList<>();
for (int i = 0; regVo.getRtResultList() != null && i < regVo.getRtResultList().size(); i++) {
String srcItem = "ITEMID:IL-6" +
",ITEMNAME:白介素6" +
",REPORTVALUE:5" +
@ -68,7 +76,8 @@ public class WinLisServiceImpl implements IWinLisService {
",PRINTROW:1" +
",RANGELIMIT:" +
",METHOD: ";
items.add(srcItem);
}
String srcRegData = "#REG:TESTDATE:20250228" + //reg.testdate
"|MACHINEID:WSW_caris200" +//reg.machineid
"|SAMPLEID:9999" +//reg.sampleid
@ -178,10 +187,16 @@ public class WinLisServiceImpl implements IWinLisService {
"|MorphologyDesc2:" +//MorphologyDesc2 没有字段
"|MorphologyDesc3:" +//MorphologyDesc3 没有字段
"|MorphologyDesc4:" +//MorphologyDesc4 没有字段
"|#RESULT:ITEMID:IL-6,ITEMNAME:白介素6,REPORTVALUE:5,ORGVALUE:,DESCVALUE:,CUTOFF:,ODVALUE:,SCO:,MEMOVALUE:,ALERTEXPLAIN:,ALERTFLAG:5,AUTOCONFIRMINFO:,AUTOCONFIRMSIGN:,BARCODE:1010449586,Calfomula:,CHECKSTATE:,COMMTIME:2025-02-28 14:42:49,CONFIRMTIME:,DOTNUM:-1,ENGNAME:bjs6,EXECSQN:,TESTDATE:20250228,MACHINEID:WSW_caris200,HISITEMID:F00000019999,LOINCID:IL-6,SAMPLEID:9999,PRINTSEQ:10000,TESTTIME:2025-02-28 14:42:49,RERUNVALUE:,RESULTLIST:5,VALUESRC:,RERUNFLAG:,RANGEINFO:0--7,UNIT:pg/ml,RESULTFLAG:Normal,PATIENTID:,PATIENTTYPE:其他,SAMPLETYPE:血清,TESTMACHINEID:,RACKCUP:,PRINTROW:1,RANGELIMIT:,METHOD:" +
//"|#RESULT:ITEMID:IL-6,ITEMNAME:白介素6,REPORTVALUE:5,ORGVALUE:,DESCVALUE:,CUTOFF:,ODVALUE:,SCO:,MEMOVALUE:,ALERTEXPLAIN:,ALERTFLAG:5,AUTOCONFIRMINFO:,AUTOCONFIRMSIGN:,BARCODE:1010449586,Calfomula:,CHECKSTATE:,COMMTIME:2025-02-28 14:42:49,CONFIRMTIME:,DOTNUM:-1,ENGNAME:bjs6,EXECSQN:,TESTDATE:20250228,MACHINEID:WSW_caris200,HISITEMID:F00000019999,LOINCID:IL-6,SAMPLEID:9999,PRINTSEQ:10000,TESTTIME:2025-02-28 14:42:49,RERUNVALUE:,RESULTLIST:5,VALUESRC:,RERUNFLAG:,RANGEINFO:0--7,UNIT:pg/ml,RESULTFLAG:Normal,PATIENTID:,PATIENTTYPE:其他,SAMPLETYPE:血清,TESTMACHINEID:,RACKCUP:,PRINTROW:1,RANGELIMIT:,METHOD:" +
"|#RESULT:" + StrUtil.join("|", items) +
"|#APPROVER:PERSONID:003142" +//approverid
"|PERSONNAME:" + regVo.getApprovername() +//approvername
"|PERSONNAME:" + "" +//approvername
"|CACARDID:" + ""; //身份证号码, select t.cacardid from las_rol_person t where t.personid = '003142'
return "";
log.info("开始生成代签名原文\n" +
"testdate=" + testdate + "\n"+
"barcode=" + barcode + "\n"+
"machineid" + machineid + "\n"+
"生成原文:" + srcRegData);
return srcRegData;
}
}

View File

@ -0,0 +1,172 @@
<?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.neuhis.his.mapper.winlis.LasRolPersonMapper">
<resultMap type="com.neuhis.his.domain.entity.winlis.LasRolPerson" id="LasRolPersonResult">
<result property="personid" column="personid" />
<result property="personname" column="personname" />
<result property="loginname" column="loginname" />
<result property="loginpass" column="loginpass" />
<result property="testerpass" column="testerpass" />
<result property="groupid" column="groupid" />
<result property="roleid" column="roleid" />
<result property="logingroup" column="logingroup" />
<result property="manuscript" column="manuscript" />
<result property="issourcehis" column="issourcehis" />
<result property="isopenca" column="isopenca" />
<result property="isenabled" column="isenabled" />
<result property="begindate" column="begindate" />
<result property="enddate" column="enddate" />
<result property="applylimit" column="applylimit" />
<result property="persontype" column="persontype" />
<result property="cacardid" column="cacardid" />
<result property="isreadedftpcon" column="isreadedftpcon" />
<result property="pswerrcount" column="pswerrcount" />
<result property="islock" column="islock" />
<result property="loginboardtime" column="loginboardtime" />
<result property="testerboardtime" column="testerboardtime" />
<result property="logingrouprole" column="logingrouprole" />
<result property="enmanuscript" column="enmanuscript" />
<result property="enpersonname" column="enpersonname" />
</resultMap>
<sql id="selectLasRolPersonVo">
select personid, personname, loginname, loginpass, testerpass, groupid, roleid, logingroup, manuscript, issourcehis, isopenca, isenabled, begindate, enddate, applylimit, persontype, cacardid, isreadedftpcon, pswerrcount, islock, loginboardtime, testerboardtime, logingrouprole, enmanuscript, enpersonname from las_rol_person
</sql>
<select id="selectLasRolPersonList" parameterType="com.neuhis.his.domain.entity.winlis.LasRolPerson" resultMap="LasRolPersonResult">
<include refid="selectLasRolPersonVo"/>
<where>
<if test="personname != null and personname != ''"> and personname like concat('%', #{personname}, '%')</if>
<if test="loginname != null and loginname != ''"> and loginname like concat('%', #{loginname}, '%')</if>
<if test="loginpass != null and loginpass != ''"> and loginpass = #{loginpass}</if>
<if test="testerpass != null and testerpass != ''"> and testerpass = #{testerpass}</if>
<if test="groupid != null and groupid != ''"> and groupid = #{groupid}</if>
<if test="roleid != null and roleid != ''"> and roleid = #{roleid}</if>
<if test="logingroup != null and logingroup != ''"> and logingroup = #{logingroup}</if>
<if test="manuscript != null and manuscript != ''"> and manuscript = #{manuscript}</if>
<if test="issourcehis != null and issourcehis != ''"> and issourcehis = #{issourcehis}</if>
<if test="isopenca != null and isopenca != ''"> and isopenca = #{isopenca}</if>
<if test="isenabled != null and isenabled != ''"> and isenabled = #{isenabled}</if>
<if test="begindate != null "> and begindate = #{begindate}</if>
<if test="enddate != null "> and enddate = #{enddate}</if>
<if test="applylimit != null "> and applylimit = #{applylimit}</if>
<if test="persontype != null and persontype != ''"> and persontype = #{persontype}</if>
<if test="cacardid != null and cacardid != ''"> and cacardid = #{cacardid}</if>
<if test="isreadedftpcon != null and isreadedftpcon != ''"> and isreadedftpcon = #{isreadedftpcon}</if>
<if test="pswerrcount != null and pswerrcount != ''"> and pswerrcount = #{pswerrcount}</if>
<if test="islock != null and islock != ''"> and islock = #{islock}</if>
<if test="loginboardtime != null "> and loginboardtime = #{loginboardtime}</if>
<if test="testerboardtime != null "> and testerboardtime = #{testerboardtime}</if>
<if test="logingrouprole != null and logingrouprole != ''"> and logingrouprole = #{logingrouprole}</if>
<if test="enmanuscript != null and enmanuscript != ''"> and enmanuscript = #{enmanuscript}</if>
<if test="enpersonname != null and enpersonname != ''"> and enpersonname like concat('%', #{enpersonname}, '%')</if>
</where>
</select>
<select id="selectLasRolPersonByPersonid" parameterType="String" resultMap="LasRolPersonResult">
<include refid="selectLasRolPersonVo"/>
where personid = #{personid}
</select>
<insert id="insertLasRolPerson" parameterType="com.neuhis.his.domain.entity.winlis.LasRolPerson" useGeneratedKeys="true" keyProperty="personid">
insert into las_rol_person
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="personname != null">personname,</if>
<if test="loginname != null">loginname,</if>
<if test="loginpass != null">loginpass,</if>
<if test="testerpass != null">testerpass,</if>
<if test="groupid != null">groupid,</if>
<if test="roleid != null">roleid,</if>
<if test="logingroup != null">logingroup,</if>
<if test="manuscript != null">manuscript,</if>
<if test="issourcehis != null">issourcehis,</if>
<if test="isopenca != null">isopenca,</if>
<if test="isenabled != null">isenabled,</if>
<if test="begindate != null">begindate,</if>
<if test="enddate != null">enddate,</if>
<if test="applylimit != null">applylimit,</if>
<if test="persontype != null">persontype,</if>
<if test="cacardid != null">cacardid,</if>
<if test="isreadedftpcon != null">isreadedftpcon,</if>
<if test="pswerrcount != null">pswerrcount,</if>
<if test="islock != null">islock,</if>
<if test="loginboardtime != null">loginboardtime,</if>
<if test="testerboardtime != null">testerboardtime,</if>
<if test="logingrouprole != null">logingrouprole,</if>
<if test="enmanuscript != null">enmanuscript,</if>
<if test="enpersonname != null">enpersonname,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="personname != null">#{personname},</if>
<if test="loginname != null">#{loginname},</if>
<if test="loginpass != null">#{loginpass},</if>
<if test="testerpass != null">#{testerpass},</if>
<if test="groupid != null">#{groupid},</if>
<if test="roleid != null">#{roleid},</if>
<if test="logingroup != null">#{logingroup},</if>
<if test="manuscript != null">#{manuscript},</if>
<if test="issourcehis != null">#{issourcehis},</if>
<if test="isopenca != null">#{isopenca},</if>
<if test="isenabled != null">#{isenabled},</if>
<if test="begindate != null">#{begindate},</if>
<if test="enddate != null">#{enddate},</if>
<if test="applylimit != null">#{applylimit},</if>
<if test="persontype != null">#{persontype},</if>
<if test="cacardid != null">#{cacardid},</if>
<if test="isreadedftpcon != null">#{isreadedftpcon},</if>
<if test="pswerrcount != null">#{pswerrcount},</if>
<if test="islock != null">#{islock},</if>
<if test="loginboardtime != null">#{loginboardtime},</if>
<if test="testerboardtime != null">#{testerboardtime},</if>
<if test="logingrouprole != null">#{logingrouprole},</if>
<if test="enmanuscript != null">#{enmanuscript},</if>
<if test="enpersonname != null">#{enpersonname},</if>
</trim>
</insert>
<update id="updateLasRolPerson" parameterType="com.neuhis.his.domain.entity.winlis.LasRolPerson">
update las_rol_person
<trim prefix="SET" suffixOverrides=",">
<if test="personname != null">personname = #{personname},</if>
<if test="loginname != null">loginname = #{loginname},</if>
<if test="loginpass != null">loginpass = #{loginpass},</if>
<if test="testerpass != null">testerpass = #{testerpass},</if>
<if test="groupid != null">groupid = #{groupid},</if>
<if test="roleid != null">roleid = #{roleid},</if>
<if test="logingroup != null">logingroup = #{logingroup},</if>
<if test="manuscript != null">manuscript = #{manuscript},</if>
<if test="issourcehis != null">issourcehis = #{issourcehis},</if>
<if test="isopenca != null">isopenca = #{isopenca},</if>
<if test="isenabled != null">isenabled = #{isenabled},</if>
<if test="begindate != null">begindate = #{begindate},</if>
<if test="enddate != null">enddate = #{enddate},</if>
<if test="applylimit != null">applylimit = #{applylimit},</if>
<if test="persontype != null">persontype = #{persontype},</if>
<if test="cacardid != null">cacardid = #{cacardid},</if>
<if test="isreadedftpcon != null">isreadedftpcon = #{isreadedftpcon},</if>
<if test="pswerrcount != null">pswerrcount = #{pswerrcount},</if>
<if test="islock != null">islock = #{islock},</if>
<if test="loginboardtime != null">loginboardtime = #{loginboardtime},</if>
<if test="testerboardtime != null">testerboardtime = #{testerboardtime},</if>
<if test="logingrouprole != null">logingrouprole = #{logingrouprole},</if>
<if test="enmanuscript != null">enmanuscript = #{enmanuscript},</if>
<if test="enpersonname != null">enpersonname = #{enpersonname},</if>
</trim>
where personid = #{personid}
</update>
<delete id="deleteLasRolPersonByPersonid" parameterType="String">
delete from las_rol_person where personid = #{personid}
</delete>
<delete id="deleteLasRolPersonByPersonids" parameterType="String">
delete from las_rol_person where personid in
<foreach item="personid" collection="array" open="(" separator="," close=")">
#{personid}
</foreach>
</delete>
</mapper>