| | |
| | | import java.util.Map; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.LtkjJianchajianyanTree; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.vodomain.LineChartsVo; |
| | |
| | | // List<Map<Object, Object>> getLine(); |
| | | |
| | | @Select("select aa.date,\n" + |
| | | " sum(if(c.tj_type='团队', ifnull(c.coun,0),0)) as tdcoun,\n" + |
| | | " sum(if(c.tj_type='个人', ifnull(c.coun,0),0)) as grcoun,\n" + |
| | | " sum(if(c.tj_type='报告', ifnull(c.coun,0),0)) as bgcoun \n" + |
| | | " from (\n" + |
| | | " SELECT date_sub(CURDATE(),interval @i:=@i+1 day) as date\n" + |
| | | " from (select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1) as a,\n" + |
| | | " (select @i:= -1) b) aa \n" + |
| | | " left join (\n" + |
| | | " select date_format(create_time, '%Y-%m-%d') dat, tj_type, count(*) coun\n" + |
| | | " from tj_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)\n" + |
| | | " group by date_format(create_time, '%Y-%m-%d'),tj_type\n" + |
| | | " union\n" + |
| | | " select date_format(report_time, '%Y-%m-%d') dat, '报告' tj_type, count(*) coun\n" + |
| | | " from tj_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)\n" + |
| | | " group by date_format(report_time, '%Y-%m-%d')\n" + |
| | | " ) c on c.dat =aa.date\n" + |
| | | "group by aa.date") |
| | | " sum(if(c.tj_type='1', ifnull(c.coun,0),0)) as tdcoun,\n" + |
| | | " sum(if(c.tj_type='2', ifnull(c.coun,0),0)) as grcoun,\n" + |
| | | " sum(if(c.tj_type='3', ifnull(c.coun,0),0)) as bgcoun \n" + |
| | | " from (\n" + |
| | | " SELECT date_sub(CURDATE(),interval @i:=@i+1 day) as date\n" + |
| | | " from (select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all select 1 union all \n" + |
| | | " select 1 union all select 1) as a,\n" + |
| | | " (select @i:= -1) b) aa\n" + |
| | | " left join (\n" + |
| | | " select date_format(create_time, '%Y-%m-%d') dat, tj_type, count(*) coun\n" + |
| | | " from tj_order where deleted=0 AND tj_type=2 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)\n" + |
| | | " group by date_format(create_time, '%Y-%m-%d')\t\n" + |
| | | "\t\t\t\tunion\n" + |
| | | " select date_format(create_time, '%Y-%m-%d') dat,tj_type, count(*) coun\n" + |
| | | " from tj_order where deleted=0 AND tj_type=1 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)\n" + |
| | | " group by date_format(create_time, '%Y-%m-%d')\t\t\t\t\t\n" + |
| | | "\t\t\t\tunion\n" + |
| | | " select date_format(create_time, '%Y-%m-%d') dat, 3 tj_type, count(*) coun\n" + |
| | | " from tj_order where deleted=0 AND !ISNULL(report_time) AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(create_time)\n" + |
| | | " group by date_format(create_time, '%Y-%m-%d')\n" + |
| | | " ) c on c.dat =aa.date\n" + |
| | | " group by aa.date") |
| | | List<LineChartsVo> getLine(); |
| | | |
| | | |
| | |
| | | |
| | | @Select("SELECT * FROM tj_order WHERE tj_number = #{tjNum} AND deleted='0' ") |
| | | public TjOrder getOrderByTjNum(String tjNum); |
| | | |
| | | @Select("SELECT * FROM tj_order WHERE card_id = #{cardId} AND deleted='0' ") |
| | | public TjOrder getOrderByCardId(String cardId); |
| | | |
| | | List<TjOrder> getTjOrderList(@Param("tjNum")String tjNum, |
| | | @Param("checkStatus")Integer checkStatus, |
| | |
| | | Map<String ,Object > selectDjdUserInfo(@Param("tjNumber")String tjNumber); |
| | | |
| | | |
| | | @Select("SELECT a.jcsqdh FROM ltkj_outpinexamapply a WHERE a.cardId=#{cardId}") |
| | | String getHuoQuJcsqdh(String cardId); |
| | | @Delete("DELETE FROM ltkj_outpinexamapply WHERE cardId=#{cardId}") |
| | | String delHuoQuJcsqdh(String cardId); |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.type='检查' GROUP BY a.sqdh") |
| | | List<String> getHuoQuJcsqdh(String cardId); |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} AND type='检查'") |
| | | Boolean delHuoQuJcsqdh(String cardId); |
| | | |
| | | |
| | | |
| | | @Select("SELECT a.jysqdh FROM ltkj_outpintestapply a WHERE a.cardId='20240604000001'") |
| | | String getHuoQuJysqdh(String cardId); |
| | | @Delete("DELETE FROM ltkj_outpintestapply WHERE cardId=#{cardId}") |
| | | String delHuoQuJysqdh(String cardId); |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.type='检验' GROUP BY a.sqdh") |
| | | List<String> getHuoQuJysqdh(String cardId); |
| | | |
| | | |
| | | |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} AND type='检验'") |
| | | Boolean delHuoQuJysqdh(String cardId); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.type='处置' GROUP BY a.sqdh") |
| | | List<String> getHuoQuZlsqdh(String cardId); |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} AND type='处置'") |
| | | Boolean delHuoQuZlsqdha(String cardId); |
| | | |
| | | |
| | | List<Map<String, Object>> getTjTongJiJieKou(Map<String, Object> map); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} and a.jxbz=#{bldh} AND a.type='检查' GROUP BY a.sqdh") |
| | | List<String> getHuoQuBlJcsqdh(@Param("cardId") String cardId,@Param("bldh") String bldh); |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} and jxbz=#{bldh} AND type='检查'") |
| | | Boolean delHuoQuBlJcsqdh(@Param("cardId")String cardId, @Param("bldh")String bldh); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} and a.jxbz=#{bldh} AND a.type='检验' GROUP BY a.sqdh") |
| | | List<String> getHuoQuBlJysqdh(@Param("cardId")String cardId,@Param("bldh") String bldh); |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} and jxbz=#{bldh} AND type='检验'") |
| | | Boolean delHuoQuBlJysqdh(@Param("cardId")String cardId,@Param("bldh") String bldh); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} and a.jxbz=#{bldh} AND a.type='处置' GROUP BY a.sqdh") |
| | | List<String> getHuoQuBlZlsqdh(@Param("cardId")String cardId,@Param("bldh") String bldh); |
| | | @Delete("DELETE FROM ltkj_jianchajianyan_tree WHERE card_id=#{cardId} and jxbz=#{bldh} AND type='处置'") |
| | | Boolean delHuoQuZlsqdh(@Param("cardId")String cardId,@Param("bldh") String bldh); |
| | | |
| | | |
| | | List<List<?>> getgetBghsList(Map<String,Object> map); |
| | | |
| | | |
| | | @Select({"<script>","SELECT * FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.jxbz IN ","<foreach collection='bldh' item='id' open='(' separator=',' close=')'>", |
| | | "#{id}", |
| | | "</foreach>", |
| | | "</script>" }) |
| | | List<LtkjJianchajianyanTree> getBuLuXmXinXi(@Param("bldh") List<String> bldh,@Param("cardId")String cardId); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} and a.jxbz=#{bldh} AND a.type='检查' AND a.service = 'pacs' GROUP BY a.sqdh") |
| | | List<String> getBlJcsqdhByPacsAndBldh(@Param("cardId") String cardId,@Param("bldh") String bldh); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} and a.jxbz=#{bldh} AND a.type='检验' AND a.service = 'lis' GROUP BY a.sqdh") |
| | | List<String> getBlJysqdhByLisAndBldh(@Param("cardId") String cardId,@Param("bldh") String bldh); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.type='检查' AND a.service = 'pacs' GROUP BY a.sqdh") |
| | | List<String> getBlJcsqdhByPacs(String cardId); |
| | | |
| | | @Select("SELECT a.sqdh FROM ltkj_jianchajianyan_tree a WHERE a.card_id=#{cardId} AND a.type='检验' AND a.service = 'lis' GROUP BY a.sqdh") |
| | | List<String> getBlJysqdhByLis(String cardId); |
| | | |
| | | |
| | | @Select("SELECT\n" + |
| | | " DISTINCT a.tj_number \n" + |
| | | "FROM\n" + |
| | | " tj_order_remark a\n" + |
| | | " JOIN sys_dept b ON b.dept_id = a.dept_id \n" + |
| | | "WHERE\n" + |
| | | " a.deleted = 0 \n" + |
| | | " AND b.org_type = 1 \n" + |
| | | " AND a.type=0") |
| | | List<String> getDingShiTongBuJianYanTjNum(); |
| | | |
| | | |
| | | @Select(" SELECT\n" + |
| | | " DISTINCT a.tj_number \n" + |
| | | "FROM\n" + |
| | | " tj_order_remark a\n" + |
| | | " JOIN sys_dept b ON b.dept_id = a.dept_id \n" + |
| | | "WHERE\n" + |
| | | " a.deleted = 0 \n" + |
| | | " AND b.org_type = 2 \n" + |
| | | " AND a.type =0") |
| | | List<String> getDingShiTongBuJianChaTjNum(); |
| | | |
| | | |
| | | |
| | | |
| | | void tjQiandaodengji(Map<String,Object> map); |
| | | |
| | | void tjLispacstongbujianyi(Map<String, Object> map); |
| | | |
| | | List<List<?>> getTjBgdyList(Map<String, Object> map); |
| | | |
| | | } |