From 04fe1d26f00a4dcc25047efa9d5f1fa23d26892c Mon Sep 17 00:00:00 2001 From: dazer007 Date: Thu, 6 Mar 2025 16:14:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E6=96=B0=E5=A2=9Ewinlis.LasRolPer?= =?UTF-8?q?son?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/entity/winlis/LasRolPerson.java | 127 +++++++++++++ .../domain/vo/winlis/LasSapSampleregVo.java | 4 + .../his/mapper/winlis/LasRolPersonMapper.java | 76 ++++++++ .../mapper/winlis/LasSapSampleregMapper.java | 4 +- .../winlis/LasSapSampleregServiceImpl.java | 18 +- .../impl/winlis/WinLisServiceImpl.java | 109 ++++++----- .../mapper/winlis/LasRolPersonMapper.xml | 172 ++++++++++++++++++ 7 files changed, 459 insertions(+), 51 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/neuhis/his/domain/entity/winlis/LasRolPerson.java create mode 100644 ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasRolPersonMapper.java create mode 100644 ruoyi-admin/src/main/resources/mapper/winlis/LasRolPersonMapper.xml diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/domain/entity/winlis/LasRolPerson.java b/ruoyi-admin/src/main/java/com/neuhis/his/domain/entity/winlis/LasRolPerson.java new file mode 100644 index 000000000..03ee436cc --- /dev/null +++ b/ruoyi-admin/src/main/java/com/neuhis/his/domain/entity/winlis/LasRolPerson.java @@ -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; +} diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/domain/vo/winlis/LasSapSampleregVo.java b/ruoyi-admin/src/main/java/com/neuhis/his/domain/vo/winlis/LasSapSampleregVo.java index 05bb0452c..e33be6622 100644 --- a/ruoyi-admin/src/main/java/com/neuhis/his/domain/vo/winlis/LasSapSampleregVo.java +++ b/ruoyi-admin/src/main/java/com/neuhis/his/domain/vo/winlis/LasSapSampleregVo.java @@ -19,5 +19,9 @@ import java.util.List; @Setter @NoArgsConstructor public class LasSapSampleregVo extends LasSapSamplereg { + /** + * CA唯一码,实际是身份证 + */ + private String cacardid; private List rtResultList = new ArrayList<>(); } diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasRolPersonMapper.java b/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasRolPersonMapper.java new file mode 100644 index 000000000..8fa81b176 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasRolPersonMapper.java @@ -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 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); +} diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasSapSampleregMapper.java b/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasSapSampleregMapper.java index 0878f376f..10047130a 100644 --- a/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasSapSampleregMapper.java +++ b/ruoyi-admin/src/main/java/com/neuhis/his/mapper/winlis/LasSapSampleregMapper.java @@ -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 selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg); + List selectLasSapSampleregList(LasSapSamplereg lasSapSamplereg); } diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/LasSapSampleregServiceImpl.java b/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/LasSapSampleregServiceImpl.java index 0301abdaf..b058be544 100644 --- a/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/LasSapSampleregServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/LasSapSampleregServiceImpl.java @@ -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 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; } diff --git a/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/WinLisServiceImpl.java b/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/WinLisServiceImpl.java index 4c1dfe87d..1e9f8c3a1 100644 --- a/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/WinLisServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/neuhis/his/service/impl/winlis/WinLisServiceImpl.java @@ -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,50 +31,53 @@ public class WinLisServiceImpl implements IWinLisService { if (regVo == null) { return ""; } - String srcItem = "ITEMID:IL-6" + - ",ITEMNAME:白介素6" + - ",REPORTVALUE:5" + - ",ORGVALUE:" + - ",DESCVALUE:" + - ",CUTOFF:" + - ",ODVALUE:" + - ",SCO:" + - ",MEMOVALUE:" + - ",ALERTEXPLAIN:" + //ALERTEXPLAIN 不存在 - ",ALERTFLAG:5" + - ",AUTOCONFIRMINFO:" + - ",AUTOCONFIRMSIGN:" + - ",BARCODE:1010449586" + - ",Calfomula:" + - ",CHECKSTATE:" + - ",COMMTIME:2025-02-28 14:42:49" + - ",CONFIRMTIME:" +//CONFIRMTIME 不存在 - ",DOTNUM:-1" +//DOTNUM 不存在 - ",ENGNAME:bjs6" + - ",EXECSQN:" +//las_sap_samplereg#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: "; - + List items = new ArrayList<>(); + for (int i = 0; regVo.getRtResultList() != null && i < regVo.getRtResultList().size(); i++) { + String srcItem = "ITEMID:IL-6" + + ",ITEMNAME:白介素6" + + ",REPORTVALUE:5" + + ",ORGVALUE:" + + ",DESCVALUE:" + + ",CUTOFF:" + + ",ODVALUE:" + + ",SCO:" + + ",MEMOVALUE:" + + ",ALERTEXPLAIN:" + //ALERTEXPLAIN 不存在 + ",ALERTFLAG:5" + + ",AUTOCONFIRMINFO:" + + ",AUTOCONFIRMSIGN:" + + ",BARCODE:1010449586" + + ",Calfomula:" + + ",CHECKSTATE:" + + ",COMMTIME:2025-02-28 14:42:49" + + ",CONFIRMTIME:" +//CONFIRMTIME 不存在 + ",DOTNUM:-1" +//DOTNUM 不存在 + ",ENGNAME:bjs6" + + ",EXECSQN:" +//las_sap_samplereg#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: "; + 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; } } diff --git a/ruoyi-admin/src/main/resources/mapper/winlis/LasRolPersonMapper.xml b/ruoyi-admin/src/main/resources/mapper/winlis/LasRolPersonMapper.xml new file mode 100644 index 000000000..e248f9731 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/winlis/LasRolPersonMapper.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into las_rol_person + + personname, + loginname, + loginpass, + testerpass, + groupid, + roleid, + logingroup, + manuscript, + issourcehis, + isopenca, + isenabled, + begindate, + enddate, + applylimit, + persontype, + cacardid, + isreadedftpcon, + pswerrcount, + islock, + loginboardtime, + testerboardtime, + logingrouprole, + enmanuscript, + enpersonname, + + + #{personname}, + #{loginname}, + #{loginpass}, + #{testerpass}, + #{groupid}, + #{roleid}, + #{logingroup}, + #{manuscript}, + #{issourcehis}, + #{isopenca}, + #{isenabled}, + #{begindate}, + #{enddate}, + #{applylimit}, + #{persontype}, + #{cacardid}, + #{isreadedftpcon}, + #{pswerrcount}, + #{islock}, + #{loginboardtime}, + #{testerboardtime}, + #{logingrouprole}, + #{enmanuscript}, + #{enpersonname}, + + + + + update las_rol_person + + personname = #{personname}, + loginname = #{loginname}, + loginpass = #{loginpass}, + testerpass = #{testerpass}, + groupid = #{groupid}, + roleid = #{roleid}, + logingroup = #{logingroup}, + manuscript = #{manuscript}, + issourcehis = #{issourcehis}, + isopenca = #{isopenca}, + isenabled = #{isenabled}, + begindate = #{begindate}, + enddate = #{enddate}, + applylimit = #{applylimit}, + persontype = #{persontype}, + cacardid = #{cacardid}, + isreadedftpcon = #{isreadedftpcon}, + pswerrcount = #{pswerrcount}, + islock = #{islock}, + loginboardtime = #{loginboardtime}, + testerboardtime = #{testerboardtime}, + logingrouprole = #{logingrouprole}, + enmanuscript = #{enmanuscript}, + enpersonname = #{enpersonname}, + + where personid = #{personid} + + + + delete from las_rol_person where personid = #{personid} + + + + delete from las_rol_person where personid in + + #{personid} + + + + \ No newline at end of file