zjh
2025-05-19 7b93b49469e5dab9ac01dc154b2e3572e9acfb43
zjh20250519
6个文件已修改
177 ■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/config/timer/DefaultScheduled.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/dto/PutAskMedicalHistoryDto.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjAskMedicalHistory.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/hosp/TjAskMedicalHistoryMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/config/timer/DefaultScheduled.java
@@ -95,7 +95,7 @@
    private void exec() {
        String dsqkssj = configService.selectConfigByKey("dsqkssj");
        String dsqjssj = configService.selectConfigByKey("dsqjssj");
        String yqbm = configService.selectConfigByKey("common_api_service_hospbm");
//        String yqbm = configService.selectConfigByKey("common_api_service_hospbm");
        String dqyyyqbm = configService.selectConfigByKey("dqyyyqbm");
        boolean panduandangqianshijian = panduandangqianshijian(dsqkssj, dsqjssj);
        log.info("定时器自动同步检验检查结果");
@@ -155,7 +155,7 @@
                                                            && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){
                                                        TjJcycxm jcycxm=new TjJcycxm();
                                                        jcycxm.setTjh(s);
                                                        jcycxm.setYqid(yqbm);
                                                        jcycxm.setYqid(dqyyyqbm);
                                                        String[] split1 = jcsqd.getJcxmid().split(";");
                                                        jcycxm.setProId(split1[0]);
                                                        jcycxm.setProName(jcsqd.getJcxmmc());
ltkj-admin/src/main/java/com/ltkj/web/controller/dto/PutAskMedicalHistoryDto.java
@@ -259,6 +259,12 @@
    @ApiModelProperty(value = "接害工龄")
    private String jhgl;
    @ApiModelProperty(value = "体检危害因素")
    private String tjwhys;
    @ApiModelProperty(value = "接触危害因素")
    private String jcwhys;
    /**
     * 单位名称
     */
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -4,6 +4,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.date.DateTime;
@@ -316,6 +317,48 @@
    }
    @GetMapping ("/chaxunjyjcwsxmjg")
    @ApiOperation(value = "查询检验检查项目结果接口")
    public AjaxResult chaxunjyjcwsxmjg(@RequestParam @ApiParam(value = "jy检验 jc检查 jyjc检验和检查") String tblx,
                                       @ApiParam(value = "体检号")@RequestParam String tjh) {
        String hospId = configService.selectConfigByKey("dqyyyqbm");
        log.info("手动查询检验或检查结果开始->{}{}",hospId,DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
        try {
            switch (tblx){
                case "jy":
                    List<Map<String, Object>> hysqdList = testMapper.sysgetCcXZxYyLtkjHysqdByLisVi(tjh,hospId);
                    if (null != hysqdList && !hysqdList.isEmpty()) {
                        for (Map<String, Object> map : hysqdList) {
                            List<Map<String, Object>> hybgdList = testMapper.sysgetCcXZxYyLtkjHybgdByLisVi(map.get("条码号").toString());
                            map.put("jybgd",hybgdList);
                        }
                        DynamicDataSourceContextHolder.clearDataSourceType();
                    }
                    log.info("当前查询的是->{} 结果","检验");
                    return AjaxResult.success(hysqdList);
                case "jc":
                    List<Map<String, Object>> jcsqdList = testMapper.sysgetCcXZxYyPacsLtkjExamJcsqd(tjh,hospId);
                    DynamicDataSourceContextHolder.clearDataSourceType();
                    log.info("当前查询的是->{} 结果","检查");
                    return AjaxResult.success(jcsqdList);
                default:
                    log.info("没有找到所匹配的同步类型");
//                    return AjaxResult.error("没有找到所匹配的同步类型!");
            }
            log.info("手动查询检验或检查结果开始->{}",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
            return AjaxResult.error("没有找到所匹配的同步类型!");
        } catch (Exception e) {
            log.error(String.valueOf(e));
            return AjaxResult.error();
        }
    }
    @GetMapping ("/zxsq")//执行
@@ -370,7 +413,7 @@
//    @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')")
    @ApiOperation (value = "tjjcycxm")
    public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "体检号") String tjh) {
        String yqbm = configService.selectConfigByKey("common_api_service_hospbm");
        String yqbm = configService.selectConfigByKey("dqyyyqbm");
        if(StringUtil.isNotBlank(tjh)){
            zongjianshengchengyichangxiangmu(tjh, yqbm);
            return AjaxResult.success();
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjAskMedicalHistory.java
@@ -255,6 +255,13 @@
    @ApiModelProperty(value = "接害工龄")
    private String jhgl;
    @ApiModelProperty(value = "体检危害因素")
    private String tjwhys;
    @ApiModelProperty(value = "接触危害因素")
    private String jcwhys;
    /**
     * 既往病史 ids
     */
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
@@ -455,4 +455,63 @@
    @Select("select * from v_gnkssctp where gnlx=#{gnlx}")
    List<Map<String ,Object>> getExeUploadImgListByGnLx(@Param("gnlx") String gnlx);
    @DataSource(value = DataSourceType.SLAVE_LIS)
    @Select("SELECT\n" +
            "  a.GH_PATIENTNO '体检号',\n" +
            "  a.SAMPLEID '条码号',\n" +
            "  a.SFXMID '项目ID',\n" +
            "  REPLACE(a.SFXMNAME,'tj_','') '项目名',\n" +
            "  a.SENDDATE '申请时间',\n" +
            "  a.SENDDOCTOR '申请医生',\n" +
            "  a.CHECKDATE '报告时间',\n" +
            "  a.TXM '申请单号',\n" +
            "  a.SENDDOCTOR '申请人姓名',\n" +
            "  '8001' '申请人代码',\n" +
            "  a.AUDITDOCTOR '审核人姓名',\n" +
            "  '已审' '检验报告结果'\n" +
            "  \n" +
            "FROM\n" +
            "  vi_his_patientinfo a\n" +
            "WHERE  a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum} AND a.HOSPITALID = #{hosp}")
    List<Map<String, Object>> sysgetCcXZxYyLtkjHysqdByLisVi(@Param("tjNum") String tjNum,@Param("hosp") String hosp);
    @DataSource(value = DataSourceType.SLAVE_LIS)
    @Select("SELECT\n" +
            "  a.SAMPLEID '条码号',\n" +
            "  a.ITEMCODE '检查项目ID',\n" +
            "  a.ITEMNAME '检查项目',\n" +
            "  a.RESULT '检验结果',\n" +
            "  a.UNIT '结果单位',\n" +
            "  a.RANGEDOWN '范围最小值',\n" +
            "  a.RANGEUP '范围最大值',\n" +
            "  CONCAT(a.RANGEDOWN,'-',a.RANGEUP) '范围值',\n" +
            "  b.CHECKDATE '检验时间',\n" +
            "  b.CHECKER '检验医生',\n" +
            "  b.AUDITDATE '审核时间',\n" +
            "  b.AUDITDOCTOR '审核医生',\n" +
            "  a.JUDGE '异常标志'\n" +
            "FROM\n" +
            "  vi_his_patientresult a JOIN vi_his_patientinfo b ON b.SAMPLEID=a.SAMPLEID\n" +
            "WHERE  b.PATIENTTYPE=3 AND\n" +
            "  a.SAMPLEID = #{tmh}")
    List<Map<String, Object>> sysgetCcXZxYyLtkjHybgdByLisVi(String tmh);
    @DataSource(value = DataSourceType.SLAVE_PACS)
    @Select(" SELECT\n" +
            "  trim(a.HIS_ID) 体检号,\n" +
            "  trim(a.HIS_ID) 条码号,\n" +
            "  trim(a.JCMID) 项目代码,\n" +
            "  a.JCMC 项目名称,\n" +
            "  TRIM(a.JCSJ) 报告内容,\n" +
            "  a.SHYS 审核医生代码,\n" +
            "  a.SHYS 审核医生姓名,\n" +
            "  TRIM(a.JCJL) 异常表现,\n" +
            "  a.BGSJ 诊断时间,\n" +
            "  a.SQRJ 申请时间,\n" +
            "  a.JCBW 检查部位\n" +
            "FROM\n" +
            "V_TJ_JCBGXX_NEWTJ a  WHERE a.HIS_ID=#{tjNum} AND a.HOSTPITALID = #{hosp}")
    List<Map<String, Object>> sysgetCcXZxYyPacsLtkjExamJcsqd(@Param("tjNum") String tjNum,@Param("hosp") String hosp);
}
ltkj-hosp/src/main/resources/mapper/hosp/TjAskMedicalHistoryMapper.xml
@@ -70,42 +70,10 @@
    <sql id="selectTjAskMedicalHistoryVo">
        select ask_id,
               cus_id,
               cus_name,
               work,
               work_status,
               medical_history_ids,
               medical_history,
               medical_history_other,
               chuchao,
               jingqi,
               zhouqi,
               mociage,
               zinv,
               liuchan,
               zaochan,
               sichan,
               yichangtai,
               xiyan,
               xiyanpinlv,
               xiyanyear,
               yinjiu,
               yinjiupinlv,
               yinjiuyear,
               qita,
               remark,
               create_by,
               create_time,
               update_by,
               update_time,
               deleted,
               from_by,
               zzsjj,
               contact_poison,
               gong_zhong,
               gong_ling,
               jhgl,
               dwmc,
               ygdw
               cus_name, work, work_status, medical_history_ids, medical_history, medical_history_other, chuchao,
            jingqi, zhouqi, mociage, zinv, liuchan, zaochan, sichan, yichangtai, xiyan, xiyanpinlv, xiyanyear, yinjiu, yinjiupinlv,
            yinjiuyear, qita, remark, create_by, create_time, update_by, update_time, deleted, from_by, zzsjj, contact_poison,
            gong_zhong, gong_ling, jhgl, dwmc, ygdw, tjwhys, jcwhys,yjsfyc
        from tj_ask_medical_history
    </sql>
@@ -176,8 +144,8 @@
                   sub_update_time,
               b.deleted         as
                   sub_deleted,
            a.dwmc,
            a.ygdw
               a.dwmc,
               a.ygdw
        from tj_ask_medical_history a
                 left join tj_ask_historys b on b.ask_id = a.ask_id
        where a.ask_id = #{askId}
@@ -251,6 +219,12 @@
            </if>
            <if test="ygdw != null">ygdw,
            </if>
            <if test="tjwhys != null">tjwhys,
            </if>
            <if test="jcwhys != null">jcwhys,
            </if>
            <if test="yjsfyc != null">yjsfyc,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="cusId != null">#{cusId},
@@ -317,6 +291,12 @@
            </if>
            <if test="ygdw != null">#{ygdw},
            </if>
            <if test="ygdw != null">#{tjwhys},
            </if>
            <if test="ygdw != null">#{jcwhys},
            </if>
            <if test="ygdw != null">#{yjsfyc},
            </if>
        </trim>
    </insert>