| | |
| | | |
| | | List<String> jc = orderService.getDingShiTongBuJianChaTjNum(); |
| | | |
| | | |
| | | if(null !=jy && !jy.isEmpty()){ |
| | | log.info("同步检验人员 执行数量->{}", jy.size()); |
| | | for (String s : jy) { |
| | | TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjianyan(s,order); |
| | | // TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjianyan(s); |
| | | } |
| | | } |
| | | |
| | | |
| | | if(null !=jc && !jc.isEmpty()){ |
| | | log.info("同步检查人员 执行数量->{}", jc.size()); |
| | | for (String s : jc) { |
| | | TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjiancha(s,order); |
| | | // TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjiancha(s); |
| | | } |
| | | } |
| | | Map<String,Object> map=new HashMap<>(); |
| | | testMapper.tjplUpdateDetatilByVi(map); |
| | | Integer object = (Integer) map.get("total"); |
| | | log.info("执行存储过程后出参->{}",object); |
| | | if(null !=object && object.equals(1)){ |
| | | long end = System.currentTimeMillis(); |
| | | log.info("同步结束 耗时:{}秒", (end - start) / 1000); |
| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("定时器执行报错"); |
| | | e.printStackTrace(); |
| | | } finally { |
| | | scheduleNextTask(Long.parseLong(dsrwsjjg)); |
| | |
| | | } |
| | | } |
| | | |
| | | private void extractedjianyan(String s,TjOrder order) { |
| | | List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(order.getTjNumber()); |
| | | private void extractedjianyan(String s) { |
| | | try { |
| | | List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(s); |
| | | if(null != hysqdList && !hysqdList.isEmpty()){ |
| | | for (LtkjHysqd hysqd : hysqdList) { |
| | | LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(hysqd.getTjh(),hysqd.getTmh()); |
| | |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | // String tjNumber1 = order.getTjNumber(); |
| | | // log.info("查询出来的体检号是: " + tjNumber1); |
| | | // log.info("传过来的的体检号是: "+ s); |
| | | // Map<String,Object> map=new HashMap<>(); |
| | | // map.put("tjnum", s); |
| | | // testMapper.tjUpdateDetatilByVi(map); |
| | | // asyncService.tjUpdateDetatilByVi(s); |
| | | // log.info("定时任务存储过程已执行!!!"); |
| | | } catch (Exception e) { |
| | | log.info("同步检验数据失败"); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | private void extractedjiancha(String s,TjOrder order) { |
| | | private void extractedjiancha(String s) { |
| | | |
| | | List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd(order.getTjNumber()); |
| | | try { |
| | | List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd(s); |
| | | if(null !=jcsqdList && !jcsqdList.isEmpty()){ |
| | | jcsqdService.deletedLtkjJcsqdByTjhAndTmh(order.getCardId()); |
| | | jcbgdService.deletedLtkjJcbgdByTjhAndTmh(order.getCardId()); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | jcsqdService.deletedLtkjJcsqdByTjhAndTmh(s); |
| | | jcbgdService.deletedLtkjJcbgdByTjhAndTmh(s); |
| | | jcsqdService.saveBatch(jcsqdList); |
| | | List<LtkjExamJcbgd> jcbgdList = testMapper.getCcXZxYyPacsLtkjExamJcbgd(order.getCardId()); |
| | | List<LtkjExamJcbgd> jcbgdList = testMapper.getCcXZxYyPacsLtkjExamJcbgd(s); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | if(null != jcbgdList && !jcbgdList.isEmpty())jcbgdService.saveBatch(jcbgdList); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | // String tjNumber1 = order.getTjNumber(); |
| | | // log.info("查询出来的体检号是: " + tjNumber1); |
| | | // log.info("传过来的的体检号是: "+ s); |
| | | // Map<String,Object> map=new HashMap<>(); |
| | | // map.put("tjnum", s); |
| | | // testMapper.tjUpdateDetatilByVi(map); |
| | | // log.info("定时任务存储过程已执行!!!"); |
| | | } catch (Exception e) { |
| | | log.info("同步检查数据失败"); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | @ApiOperation (value = "测试调用存储过程耗时接口") |
| | | @RepeatSubmit |
| | | // @Transactional |
| | | public AjaxResult ceshicc(String s) { |
| | | public AjaxResult ceshicc() { |
| | | |
| | | Map<String,Object> map=new HashMap<>(); |
| | | List<List<?>> tjpled = testMapper.tjplUpdateDetatilByVi(map); |
| | | log.info(tjpled.toString()); |
| | | Integer object = (Integer) map.get("total"); |
| | | return AjaxResult.success(object); |
| | | List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd1("8003241206085556"); |
| | | if(null !=jcsqdList && !jcsqdList.isEmpty()){ |
| | | jcsqdService.deletedLtkjJcsqdByTjhAndTmh("8003241206085556"); |
| | | jcbgdService.deletedLtkjJcbgdByTjhAndTmh("8003241206085556"); |
| | | jcsqdService.saveBatch(jcsqdList); |
| | | List<LtkjExamJcbgd> jcbgdList = testMapper.getCcXZxYyPacsLtkjExamJcbgd1("8003241206085556"); |
| | | if(null != jcbgdList && !jcbgdList.isEmpty())jcbgdService.saveBatch(jcbgdList); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping ("/ceshi") |
| | | @ApiOperation (value = "测试调用lis视图数据接口") |
| | | @RepeatSubmit |
| | | // @Transactional |
| | | public AjaxResult ceshi() { |
| | | List<Map<String, Object>> ccXZxYyLisJgSt = testMapper.getCcXZxYyLisJgSt(); |
| | | return AjaxResult.success(ccXZxYyLisJgSt); |
| | | } |
| | | // @GetMapping ("/ceshi") |
| | | // @ApiOperation (value = "测试调用lis视图数据接口") |
| | | // @RepeatSubmit |
| | | //// @Transactional |
| | | // public AjaxResult ceshi() { |
| | | // List<Map<String, Object>> ccXZxYyLisJgSt = testMapper.getCcXZxYyLisJgSt(); |
| | | // return AjaxResult.success(ccXZxYyLisJgSt); |
| | | // } |
| | | |
| | | |
| | | @GetMapping ("/pacs") |
| | | @ApiOperation (value = "测试调用pacs视图数据接口") |
| | | @RepeatSubmit |
| | | public AjaxResult pacs() { |
| | | List<Map<String, Object>> ccXZxYyPacsJgSt = testMapper.getCcXZxYyPacsJgSt(); |
| | | // @GetMapping ("/pacs") |
| | | // @ApiOperation (value = "测试调用pacs视图数据接口") |
| | | // @RepeatSubmit |
| | | // public AjaxResult pacs() { |
| | | // List<Map<String, Object>> ccXZxYyPacsJgSt = testMapper.getCcXZxYyPacsJgSt(); |
| | | // |
| | | // List<LtkjExamJcsqd> list = testMapper.getCcXZxYyPacsLtkjExamJcsqd(""); |
| | | // |
| | | // log.info(list.toString()); |
| | | // |
| | | // List<LtkjExamJcbgd> list1 = testMapper.getCcXZxYyPacsLtkjExamJcbgd(""); |
| | | // |
| | | // log.info(list1.toString()); |
| | | // |
| | | // return AjaxResult.success(ccXZxYyPacsJgSt); |
| | | // } |
| | | |
| | | List<LtkjExamJcsqd> list = testMapper.getCcXZxYyPacsLtkjExamJcsqd(""); |
| | | |
| | | log.info(list.toString()); |
| | | |
| | | List<LtkjExamJcbgd> list1 = testMapper.getCcXZxYyPacsLtkjExamJcbgd(""); |
| | | |
| | | log.info(list1.toString()); |
| | | |
| | | return AjaxResult.success(ccXZxYyPacsJgSt); |
| | | } |
| | | |
| | | @GetMapping ("/getOperationPermissionsByTjNum") |
| | | @ApiOperation (value = "(初审页面 和 医生页面)根据体检号获取是否可操作权限接口 true可操作 反之不可") |
| | |
| | | wq.eq(TjOrderRemark::getTjNumber, tjNUm); |
| | | wq.eq(TjOrderRemark::getProId, proId); |
| | | TjOrderRemark remark = remarkService.getOne(wq); |
| | | remark.setType(1); |
| | | remark.setType(2); |
| | | remarkService.updateById(remark); |
| | | return AjaxResult.success("操作成功!"); |
| | | } |
| | |
| | | wqa.eq(TjReport::getType, "体检报告"); |
| | | Integer count = tjReportService.getSelectCount(wqa); |
| | | if (tjOrder.getReportTime() !=null || count != 0 ) { |
| | | tjOrder.setReportTime(null); |
| | | tjOrder.setCheckTime(null); |
| | | tjOrder.setCheckStatus(0); |
| | | tjOrder.setPrintLastTime(null); |
| | | tjOrderService.updateById(tjOrder); |
| | | // tjOrder.setReportTime(null); |
| | | // tjOrder.setCheckTime(null); |
| | | // tjOrder.setCheckStatus(0); |
| | | // tjOrder.setPrintLastTime(null); |
| | | // tjOrderService.updateById(tjOrder); |
| | | return AjaxResult.error("该客户报告已生成!不能重复生成!可直接预览或打印!"); |
| | | } |
| | | |
| | |
| | | " a.SENDDOCTOR sqrxm,\n" + |
| | | " '8001' sqrdm,\n" + |
| | | " a.AUDITDOCTOR shrxm,\n" + |
| | | " '已审' jybgjg\n" + |
| | | " '已审' jybgjg,\n" + |
| | | " SYSDATE() create_time\n" + |
| | | " \n" + |
| | | "FROM\n" + |
| | | " vi_his_patientinfo a\n" + |
| | |
| | | " NULL shys,\n" + |
| | | " b.AUDITDOCTOR shysmc,\n" + |
| | | " NULL tpurl,\n" + |
| | | " a.JUDGE ycbz\n" + |
| | | " a.JUDGE ycbz,\n" + |
| | | " SYSDATE() create_time\n" + |
| | | "FROM\n" + |
| | | " vi_his_patientresult a JOIN vi_his_patientinfo b ON b.SAMPLEID=a.SAMPLEID\n" + |
| | | "WHERE b.HOSPITALID='chkwyy' AND b.PATIENTTYPE=3 AND\n" + |
| | |
| | | |
| | | @DataSource(value = DataSourceType.SLAVE_PACS) |
| | | @Select("SELECT\n" + |
| | | " a.HIS_ID tjh,\n" + |
| | | " a.HIS_ID tmh,\n" + |
| | | " trim(a.HIS_ID) tjh,\n" + |
| | | " trim(a.HIS_ID) tmh,\n" + |
| | | " a.JCLX jclx,\n" + |
| | | " NULL jczlx,\n" + |
| | | " a.BGYS bgys,\n" + |
| | |
| | | " a.SQRJ sqsj,\n" + |
| | | " a.BGSJ jgsj,\n" + |
| | | " REPLACE(a.JCMC,'tj_','') jcxmmc,\n" + |
| | | " a.JCMCID jcxmid,\n" + |
| | | " trim(a.JCMID) jcxmid,\n" + |
| | | " a.JCBW bw,\n" + |
| | | " TRIM(a.JCJL) jgzt,\n" + |
| | | " TRIM(a.JCSJ) jgbx\n" + |
| | | " TRIM(a.JCSJ) jgbx,\n" + |
| | | " SYSDATE create_time\n" + |
| | | " \n" + |
| | | "FROM\n" + |
| | | " ris.V_TJ_JCBGXX_NEWTJ a WHERE a.HIS_ID=#{tjNum}") |
| | | " ris.V_TJ_JCBGXX_NEWTJ a WHERE trim(a.HIS_ID)=#{tjNum}") |
| | | List<LtkjExamJcsqd> getCcXZxYyPacsLtkjExamJcsqd(String tjNum); |
| | | |
| | | |
| | | @DataSource(value = DataSourceType.SLAVE_PACS) |
| | | @Select(" SELECT\n" + |
| | | " a.HIS_ID tjh,\n" + |
| | | " a.HIS_ID tmh,\n" + |
| | | " a.JCMCID xmdm,\n" + |
| | | " trim(a.HIS_ID) tjh,\n" + |
| | | " trim(a.HIS_ID) tmh,\n" + |
| | | " trim(a.JCMID) xmdm,\n" + |
| | | " a.JCMC xmmc,\n" + |
| | | " NULL bg_mig,\n" + |
| | | " NULL bg_url,\n" + |
| | |
| | | " TRIM(a.JCJL) yxbx,\n" + |
| | | " a.BGSJ zdsj,\n" + |
| | | " a.SQRJ sqsj,\n" + |
| | | " a.JCBW jcbw\n" + |
| | | " a.JCBW jcbw,\n" + |
| | | " SYSDATE create_time\n" + |
| | | "FROM\n" + |
| | | " ris.V_TJ_JCBGXX_NEWTJ a WHERE a.HIS_ID=#{tjNum}") |
| | | List<LtkjExamJcbgd> getCcXZxYyPacsLtkjExamJcbgd(String tjNum); |
| | | |
| | | |
| | | List<List<?>> tjplUpdateDetatilByVi(Map<String,Object> map); |
| | | |
| | | |
| | | @DataSource(value = DataSourceType.SLAVE_PACS) |
| | | @Select("SELECT\n" + |
| | | " trim(a.HIS_ID) tjh,\n" + |
| | | " trim(a.HIS_ID) tmh,\n" + |
| | | " a.JCLX jclx,\n" + |
| | | " NULL jczlx,\n" + |
| | | " a.BGYS bgys,\n" + |
| | | " NULL bgysid,\n" + |
| | | " a.SQRJ sqsj,\n" + |
| | | " a.BGSJ jgsj,\n" + |
| | | " REPLACE(a.JCMC,'tj_','') jcxmmc,\n" + |
| | | " trim(a.JCMID) jcxmid,\n" + |
| | | " a.JCBW bw,\n" + |
| | | " TRIM(a.JCJL) jgzt,\n" + |
| | | " TRIM(a.JCSJ) jgbx,\n" + |
| | | " SYSDATE create_time \n" + |
| | | " \n" + |
| | | "FROM\n" + |
| | | " LTEMR.V_TJ_JCBGXX_NEWTJ a WHERE trim(a.HIS_ID)=#{tjNum}") |
| | | List<LtkjExamJcsqd> getCcXZxYyPacsLtkjExamJcsqd1(String tjNum); |
| | | |
| | | |
| | | @DataSource(value = DataSourceType.SLAVE_PACS) |
| | | @Select(" SELECT\n" + |
| | | " trim(a.HIS_ID) tjh,\n" + |
| | | " trim(a.HIS_ID) tmh,\n" + |
| | | " trim(a.JCMID) xmdm,\n" + |
| | | " a.JCMC xmmc,\n" + |
| | | " NULL bg_mig,\n" + |
| | | " NULL bg_url,\n" + |
| | | " TRIM(a.JCSJ) bg_nr,\n" + |
| | | " a.SHYS shysdm,\n" + |
| | | " a.SHYS shysxm,\n" + |
| | | " TRIM(a.JCJL) yxbx,\n" + |
| | | " a.BGSJ zdsj,\n" + |
| | | " a.SQRJ sqsj,\n" + |
| | | " a.JCBW jcbw,\n" + |
| | | " SYSDATE create_time\n" + |
| | | "FROM\n" + |
| | | " LTEMR.V_TJ_JCBGXX_NEWTJ a WHERE trim(a.HIS_ID)=#{tjNum}") |
| | | List<LtkjExamJcbgd> getCcXZxYyPacsLtkjExamJcbgd1(String tjNum); |
| | | } |
| | |
| | | "WHERE\n" + |
| | | " a.deleted = 0 \n" + |
| | | " AND b.org_type = 2 \n" + |
| | | " AND a.type !=1") |
| | | " AND a.type =0") |
| | | List<String> getDingShiTongBuJianChaTjNum(); |
| | | |
| | | |
| | |
| | | " LEFT JOIN tj_project pro ON re.pro_id = pro.pro_id\n" + |
| | | " LEFT JOIN sys_user us ON us.user_id = re.doctor_name\n" + |
| | | " WHERE\n" + |
| | | " re.type != 2\n" + |
| | | " AND re.tj_number = #{tjNumber} and re.dept_id !=532 and pro.pro_name not like '%费%'" + |
| | | // " re.type != 2 AND\n" + |
| | | " re.tj_number = #{tjNumber} and re.dept_id !=532 and pro.pro_name not like '%费%'" + |
| | | " <when test='sfzpacs == true'> " + |
| | | " AND dep.org_type = 2"+ |
| | | " </when>"+ |
| | |
| | | package com.ltkj.hosp.sqlDomain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | private String zdsj; |
| | | private String sqsj; |
| | | private String jcbw; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | } |
| | |
| | | package com.ltkj.hosp.sqlDomain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | private String jgzt; |
| | | private String jgbx; |
| | | private String jgsj; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | } |
| | |
| | | package com.ltkj.hosp.sqlDomain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | private String tpurl; |
| | | @ApiModelProperty(value = "ycbz") |
| | | private String ycbz; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | } |
| | |
| | | package com.ltkj.hosp.sqlDomain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | private String shrxm; |
| | | @ApiModelProperty(value = "检验报告结果") |
| | | private String jybgjg; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | |
| | | } |