|
@@ -1,8 +1,6 @@
|
|
|
package thyyxxk.webserver.service.querydata;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -16,11 +14,9 @@ import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.querydata.QueryDrugsAndProjects;
|
|
|
import thyyxxk.webserver.entity.reports.illegalchargesanalysis.IllegalChargeData;
|
|
|
import thyyxxk.webserver.entity.reports.illegalchargesanalysis.IllegalChargeTemplate;
|
|
|
-import thyyxxk.webserver.utils.DateUtil;
|
|
|
-import thyyxxk.webserver.utils.ExcelUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
+import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -111,8 +107,8 @@ public class QueryDrugsAndProjectsService {
|
|
|
} else {
|
|
|
// 每一个 诊断之间使用 ---- 隔开
|
|
|
String pj = pjZhenDuanMap.get(fuZhenDuan);
|
|
|
- // 这个 单纯的拼接把前面的诊断使用 ---- 拼接
|
|
|
- pj = null == pj ? "" : pj + "----";
|
|
|
+ // 这个 单纯的拼接把前面的诊断使用 ---- 拼接 三元表达式
|
|
|
+ pj = (null == pj) ? "" : pj + "----";
|
|
|
// 下面这个 拼接 副诊断
|
|
|
pjZhenDuanMap.put(fuZhenDuan, pj + zhenDuan.getDisDiagComment());
|
|
|
}
|
|
@@ -127,40 +123,6 @@ public class QueryDrugsAndProjectsService {
|
|
|
return ResultVoUtil.success(xiangMuList);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出 使用这个项目的 excel 表
|
|
|
- *
|
|
|
- * @param response 返回
|
|
|
- * @param param 查询条件
|
|
|
- */
|
|
|
- public void xiangMuExcel(HttpServletResponse response, QueryDrugsAndProjects param) {
|
|
|
- IPage<QueryDrugsAndProjects> page = new Page<>(1, -1);
|
|
|
- List<QueryDrugsAndProjects> list;
|
|
|
- if (param.getExcelFlag() == 1) {
|
|
|
- list = dao.chaXunXiangMuHuoYaoPinJuTiXinXi(param.getStartTime(), param.getEndTime(), param.getChargeCode());
|
|
|
- } else {
|
|
|
- list = dao.chaKanYaoPinShiYong(page, param.getStartTime(), param.getEndTime(), param.getChargeCode()).getRecords();
|
|
|
- }
|
|
|
- log.info("导出项目或者药品:{}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE_TIME));
|
|
|
- String[] title = {"患者姓名", "住院号", "住院/门诊次数", "收费日期", "数量", "金额", "项目编码", "项目名称", "来源"};
|
|
|
- String[][] content = new String[list.size()][];
|
|
|
- for (int i = 0; i < list.size(); i++) {
|
|
|
- content[i] = new String[title.length];
|
|
|
- QueryDrugsAndProjects pojo = list.get(i);
|
|
|
- content[i][0] = pojo.getName();
|
|
|
- content[i][1] = pojo.getCode();
|
|
|
- content[i][2] = pojo.getTimes();
|
|
|
- content[i][3] = DateUtil.formatDatetime(pojo.getChargeDate());
|
|
|
- content[i][4] = String.valueOf(pojo.getNumber());
|
|
|
- content[i][5] = String.valueOf(pojo.getAmountOfMoney());
|
|
|
- content[i][6] = pojo.getChargeCode();
|
|
|
- content[i][7] = pojo.getXmName();
|
|
|
- content[i][8] = pojo.getSource();
|
|
|
- }
|
|
|
- //传三个参数 一个是 固定的 response ,excel的头部信息,excel的内容
|
|
|
- ExcelUtil.exportExcel(response, title, content);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 查询药品
|
|
|
*
|
|
@@ -175,17 +137,6 @@ public class QueryDrugsAndProjectsService {
|
|
|
return ResultVoUtil.success(list);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 查询使用该药品 的 患者信息
|
|
|
- *
|
|
|
- * @param param 查询数据
|
|
|
- * @return 返回信息
|
|
|
- */
|
|
|
- public ResultVo<IPage<QueryDrugsAndProjects>> chaKanYaoPing(QueryDrugsAndProjects param) {
|
|
|
- IPage<QueryDrugsAndProjects> page = new Page<>(1, 50);
|
|
|
- return ResultVoUtil.success(dao.chaKanYaoPinShiYong(page, param.getStartTime(), param.getEndTime(), param.getChargeCode()));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 在字典中查询 药品或者项目的 code 以及 name
|
|
|
*
|
|
@@ -195,15 +146,18 @@ public class QueryDrugsAndProjectsService {
|
|
|
*/
|
|
|
public ResultVo<List<GetDropdownBox>> yaoPinHuoXiangMuCode(String pyCode, Integer flag) {
|
|
|
if (flag == 1) {
|
|
|
- return ResultVoUtil.success(dao.chaXunXiangMuhuoYaoPinCode("zd_charge_item", "%" + pyCode.toUpperCase() + "%"));
|
|
|
+ return ResultVoUtil.success(dao.chaXunXiangMuhuoYaoPinCode("zd_charge_item", StringUtil.isContainChinese(pyCode)));
|
|
|
} else if (flag == 2) {
|
|
|
- return ResultVoUtil.success(dao.chaXunXiangMuhuoYaoPinCode("yp_zd_dict", "%" + pyCode.toUpperCase() + "%"));
|
|
|
+ return ResultVoUtil.success(dao.chaXunXiangMuhuoYaoPinCode("yp_zd_dict", StringUtil.isContainChinese(pyCode)));
|
|
|
} else {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @param param 查询条件
|
|
|
+ * @return 返回检验检查的数据
|
|
|
+ */
|
|
|
public ResultVo<List<IllegalChargeData>> chaXunJianYanJianCha(IllegalChargeTemplate param) {
|
|
|
List<IllegalChargeData> list = dao.chaXunJianYanJianCha(param.getStart(), param.getEnd(), param.getResponces());
|
|
|
if (list.isEmpty()) {
|