Commit e26083c871d45ebe79200c2220349c87bf614f61

Authored by liquanyu
1 parent 95c8917557

update code

Showing 1 changed file with 38 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ e26083c
... ... @@ -58,12 +58,49 @@
58 58  
59 59  
60 60 public void queryFmPatient(String start,String end) {
  61 +
  62 + String cloumns = " SYXH as syxh,\n" +
  63 + " YEXH as yexh,\n" +
  64 + " JLRQ as jlrq,\t\n" +
  65 + " SSRQ as ssrq,\n" +
  66 + " SSJ as ssj,\n" +
  67 + " yexb as yexb,\n" +
  68 + " RC as rc,\n" +
  69 + " JTS as jts,\n" +
  70 + " DJT as djt,\n" +
  71 + " CJC as cjc,\n" +
  72 + " ZX as zx,\n" +
  73 + " TZ as tz,\n" +
  74 + " SC as sc,\n" +
  75 + " SH as sh,\n" +
  76 + " JX as jx,\n" +
  77 + " YFZ as yfz,\n" +
  78 + " WFZ as wfz,\n" +
  79 + " SFZ as sfz,\n" +
  80 + " PFZ as pfz,\n" +
  81 + " CCQK as ccqk,\n" +
  82 + " FMFS as fmfs,\n" +
  83 + " TPMCFS as tpmcfs,\n" +
  84 + " YEQK as yeqk,\n" +
  85 + " SW as sw,\n" +
  86 + " SFFQ as sffq,\n" +
  87 + " FQYY as fqyy,\n" +
  88 + " HYQK as hyqk,\n" +
  89 + " HYQK1 as hyqk1,\n" +
  90 + " YC as yc,\n" +
  91 + " SFGW as sfgw,\n" +
  92 + " MCTPSLXL as mctpslxl,\n" +
  93 + " CHEXXSXL as chexxsxl,\n" +
  94 + " QJQK as qjqk,\n" +
  95 + " SRKS as srks,\n" +
  96 + " JSZ as jsz";
  97 +
61 98 Connection conn = ConnTools.makeFmConnection();
62 99 QueryRunner queryRunner = new QueryRunner();
63 100 SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHH:mm:ss");
64 101 SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
65 102 try {//select count(*) from JHMK_FMJL where CONVERT(varchar(16),SSRQ, 20) > CONVERT(varchar(16),'20170110', 20)
66   - List<FmItem> list = queryRunner.query(conn, "select * from JHMK_FMJL where " +
  103 + List<FmItem> list = queryRunner.query(conn, "select "+cloumns+" from JHMK_FMJL where " +
67 104 " CONVERT(varchar(50),SSRQ, 20) > CONVERT(varchar(50),'"+start+"', 20) and CONVERT(varchar(50),SSRQ, 20) <= CONVERT(varchar(50),'"+end+"', 20)" +
68 105 " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 '))", new BeanListHandler<FmItem>(FmItem.class));
69 106