feat: 合并 upstream/v1.3 新增功能模块
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel额外表头信息注解
|
* Excel额外表头信息注解
|
||||||
@@ -14,7 +15,7 @@ public @interface ExcelExtra {
|
|||||||
/**
|
/**
|
||||||
* 表头名称
|
* 表头名称
|
||||||
*/
|
*/
|
||||||
String name();
|
String name() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期格式,如:yyyy-MM-dd HH:mm:ss
|
* 日期格式,如:yyyy-MM-dd HH:mm:ss
|
||||||
@@ -35,4 +36,15 @@ public @interface ExcelExtra {
|
|||||||
* 是否导出
|
* 是否导出
|
||||||
*/
|
*/
|
||||||
boolean isExport() default true;
|
boolean isExport() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 精度 默认:-1(默认不开启BigDecimal格式化)
|
||||||
|
*/
|
||||||
|
int scale() default -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||||
|
*/
|
||||||
|
int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.core.common.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色枚举
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026-01-29
|
||||||
|
*/
|
||||||
|
public enum RoleEnum {
|
||||||
|
DOCTOR("doctor", "医生"),
|
||||||
|
NURSE("nurse", "护士"),
|
||||||
|
ADMIN("admin", "管理员");
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
RoleEnum(String code, String info) {
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,67 +33,125 @@ public final class AgeCalculatorUtil {
|
|||||||
return period.getYears();
|
return period.getYears();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 当前年龄取得(床位列表表示年龄用)
|
||||||
|
// */
|
||||||
|
// public static String getAge(Date date) {
|
||||||
|
// // 将 Date 转换为 LocalDateTime
|
||||||
|
// LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
|
// LocalDateTime now = LocalDateTime.now();
|
||||||
|
// int years = now.getYear() - dateTime.getYear();
|
||||||
|
// if (years > 2) {
|
||||||
|
// return String.format("%d岁", years);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Period period = Period.between(dateTime.toLocalDate(), now.toLocalDate());
|
||||||
|
// int months = period.getMonths();
|
||||||
|
// int days = period.getDays();
|
||||||
|
// long hours = ChronoUnit.HOURS.between(dateTime, now) - (days * 24L);
|
||||||
|
//
|
||||||
|
// if (hours < 0) {
|
||||||
|
// hours += 24;
|
||||||
|
// days--;
|
||||||
|
// }
|
||||||
|
// if (days < 0) {
|
||||||
|
// months--;
|
||||||
|
// days = getLastDayOfMonth(dateTime) - dateTime.getDayOfMonth() + now.getDayOfMonth();
|
||||||
|
// }
|
||||||
|
// if (months < 0) {
|
||||||
|
// months += 12;
|
||||||
|
// years--;
|
||||||
|
// }
|
||||||
|
// if (years < 0) {
|
||||||
|
// return "1小时";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (years > 0 && months > 0) {
|
||||||
|
// return String.format("%d岁%d月", years, months);
|
||||||
|
// }
|
||||||
|
// if (years > 0) {
|
||||||
|
// return String.format("%d岁", years);
|
||||||
|
// }
|
||||||
|
// if (months > 0 && days > 0) {
|
||||||
|
// return String.format("%d月%d天", months, days);
|
||||||
|
// }
|
||||||
|
// if (months > 0) {
|
||||||
|
// return String.format("%d月", months);
|
||||||
|
// }
|
||||||
|
// if (days > 0 && hours > 0) {
|
||||||
|
// return String.format("%d天%d小时", days, hours);
|
||||||
|
// }
|
||||||
|
// if (days > 0) {
|
||||||
|
// return String.format("%d天", days);
|
||||||
|
// }
|
||||||
|
// if (hours > 0) {
|
||||||
|
// return String.format("%d小时", hours);
|
||||||
|
// }
|
||||||
|
// return "1小时";
|
||||||
|
// }
|
||||||
/**
|
/**
|
||||||
* 当前年龄取得(床位列表表示年龄用)
|
* 复刻Oracle函数FUN_GET_AGE的核心逻辑:返回年龄字符串
|
||||||
|
*
|
||||||
|
* @param birthDate 出生日期
|
||||||
|
* @return 年龄字符串(如:29岁、3岁5月、2月15天、18天),出生日期晚于当前日期返回空字符串
|
||||||
*/
|
*/
|
||||||
public static String getAge(Date date) {
|
public static String getAge(Date birthDate) {
|
||||||
// 添加空值检查
|
// 入参校验
|
||||||
if (date == null) {
|
if (birthDate == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// 将 Date 转换为 LocalDateTime
|
|
||||||
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
// 将Date转换为LocalDate(使用系统默认时区)
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDate birthLocalDate = birthDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
int years = now.getYear() - dateTime.getYear();
|
LocalDate currentDate = LocalDate.now();
|
||||||
if (years > 2) {
|
|
||||||
return String.format("%d岁", years);
|
// 计算总天数(对应Oracle中的IDAY)
|
||||||
|
long totalDays = ChronoUnit.DAYS.between(birthLocalDate, currentDate);
|
||||||
|
|
||||||
|
// 若出生日期晚于当前日期,返回空字符串
|
||||||
|
if (totalDays < 0) {
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
Period period = Period.between(dateTime.toLocalDate(), now.toLocalDate());
|
// 计算年份(复刻Oracle的闰年补偿逻辑:(当前年-出生年)/4 补偿闰年天数)
|
||||||
int months = period.getMonths();
|
int birthYear = birthLocalDate.getYear();
|
||||||
int days = period.getDays();
|
int currentYear = currentDate.getYear();
|
||||||
long hours = ChronoUnit.HOURS.between(dateTime, now) - (days * 24L);
|
long leapYearCompensation = (currentYear - birthYear) / 4;
|
||||||
|
long adjustedDays = totalDays - leapYearCompensation;
|
||||||
|
|
||||||
if (hours < 0) {
|
// 计算年、月、天(按365天/年、30天/月粗略折算,与Oracle逻辑一致)
|
||||||
hours += 24;
|
int iYear = (int) (adjustedDays / 365);
|
||||||
days--;
|
long remainingDaysAfterYear = adjustedDays - iYear * 365;
|
||||||
}
|
int iMonth = (int) (remainingDaysAfterYear / 30);
|
||||||
if (days < 0) {
|
int iDay = (int) (remainingDaysAfterYear - iMonth * 30);
|
||||||
months--;
|
|
||||||
days = getLastDayOfMonth(dateTime) - dateTime.getDayOfMonth() + now.getDayOfMonth();
|
|
||||||
}
|
|
||||||
if (months < 0) {
|
|
||||||
months += 12;
|
|
||||||
years--;
|
|
||||||
}
|
|
||||||
if (years < 0) {
|
|
||||||
return "1小时";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (years > 0 && months > 0) {
|
// 按原函数规则拼接返回字符串
|
||||||
return String.format("%d岁%d月", years, months);
|
if (iYear <= 0) {
|
||||||
|
// 小于1岁
|
||||||
|
if (iMonth <= 0) {
|
||||||
|
// 小于1个月,返回X天
|
||||||
|
return iDay + "天";
|
||||||
|
} else {
|
||||||
|
// 1个月及以上,返回X月X天
|
||||||
|
return iMonth + "月" + iDay + "天";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 1岁及以上
|
||||||
|
if (iYear < 5) {
|
||||||
|
// 1-4岁
|
||||||
|
if (iMonth <= 0) {
|
||||||
|
// 无整月,返回X岁X天
|
||||||
|
return iYear + "岁" + iDay + "天";
|
||||||
|
} else {
|
||||||
|
// 有整月,返回X岁X月
|
||||||
|
return iYear + "岁" + iMonth + "月";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 5岁及以上,仅返回X岁
|
||||||
|
return iYear + "岁";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (years > 0) {
|
|
||||||
return String.format("%d岁", years);
|
|
||||||
}
|
|
||||||
if (months > 0 && days > 0) {
|
|
||||||
return String.format("%d月%d天", months, days);
|
|
||||||
}
|
|
||||||
if (months > 0) {
|
|
||||||
return String.format("%d月", months);
|
|
||||||
}
|
|
||||||
if (days > 0 && hours > 0) {
|
|
||||||
return String.format("%d天%d小时", days, hours);
|
|
||||||
}
|
|
||||||
if (days > 0) {
|
|
||||||
return String.format("%d天", days);
|
|
||||||
}
|
|
||||||
if (hours > 0) {
|
|
||||||
return String.format("%d小时", hours);
|
|
||||||
}
|
|
||||||
return "1小时";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getLastDayOfMonth(LocalDateTime dateTime) {
|
private static int getLastDayOfMonth(LocalDateTime dateTime) {
|
||||||
int[] daysInMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
int[] daysInMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||||
if (isLeapYear(dateTime.getYear()) && dateTime.getMonthValue() == 2) {
|
if (isLeapYear(dateTime.getYear()) && dateTime.getMonthValue() == 2) {
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import java.io.*;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import java.lang.reflect.Field;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import java.lang.reflect.Method;
|
||||||
import com.core.common.annotation.ExcelExtra;
|
import java.lang.reflect.ParameterizedType;
|
||||||
import com.core.common.annotation.Excels;
|
import java.math.BigDecimal;
|
||||||
import com.core.common.config.CoreConfig;
|
import java.text.DecimalFormat;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import java.time.LocalDate;
|
||||||
import com.core.common.core.text.Convert;
|
import java.time.LocalDateTime;
|
||||||
import com.core.common.exception.UtilException;
|
import java.util.*;
|
||||||
import com.core.common.utils.file.FileTypeUtils;
|
import java.util.stream.Collectors;
|
||||||
import com.core.common.utils.file.FileUtils;
|
|
||||||
import com.core.common.utils.file.ImageUtils;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
|
||||||
import com.core.common.utils.reflect.ReflectUtils;
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
@@ -30,17 +29,20 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.core.common.annotation.Excel;
|
||||||
import java.io.*;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import java.lang.reflect.Field;
|
import com.core.common.annotation.Excel.Type;
|
||||||
import java.lang.reflect.Method;
|
import com.core.common.annotation.ExcelExtra;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import com.core.common.annotation.Excels;
|
||||||
import java.math.BigDecimal;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.text.DecimalFormat;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import java.time.LocalDate;
|
import com.core.common.core.text.Convert;
|
||||||
import java.time.LocalDateTime;
|
import com.core.common.exception.UtilException;
|
||||||
import java.util.*;
|
import com.core.common.utils.file.FileTypeUtils;
|
||||||
import java.util.stream.Collectors;
|
import com.core.common.utils.file.FileUtils;
|
||||||
|
import com.core.common.utils.file.ImageUtils;
|
||||||
|
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
||||||
|
import com.core.common.utils.reflect.ReflectUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
@@ -1164,6 +1166,11 @@ public class NewExcelUtil<T> {
|
|||||||
ParameterizedType pt = (ParameterizedType)field.getGenericType();
|
ParameterizedType pt = (ParameterizedType)field.getGenericType();
|
||||||
Class<?> subClass = (Class<?>)pt.getActualTypeArguments()[0];
|
Class<?> subClass = (Class<?>)pt.getActualTypeArguments()[0];
|
||||||
this.subFields = FieldUtils.getFieldsListWithAnnotation(subClass, Excel.class);
|
this.subFields = FieldUtils.getFieldsListWithAnnotation(subClass, Excel.class);
|
||||||
|
if (StringUtils.isNotEmpty(includeFields)) {
|
||||||
|
this.subFields = this.subFields.stream().filter(f -> ArrayUtils.contains(includeFields, f.getName())).collect(Collectors.toList());
|
||||||
|
} else if (StringUtils.isNotEmpty(excludeFields)) {
|
||||||
|
this.subFields = this.subFields.stream().filter(f -> !ArrayUtils.contains(excludeFields, f.getName())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1441,7 +1448,28 @@ public class NewExcelUtil<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// 计算表格体总列数
|
||||||
|
int totalCols = 0;
|
||||||
|
for (Object[] os : fields) {
|
||||||
|
Field field = (Field)os[0];
|
||||||
|
if (Collection.class.isAssignableFrom(field.getType()) && subFields != null) {
|
||||||
|
long subCount = subFields.stream().filter(f -> f.isAnnotationPresent(Excel.class)).count();
|
||||||
|
totalCols += subCount;
|
||||||
|
} else {
|
||||||
|
totalCols++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (totalCols == 0) totalCols = 1;
|
||||||
|
|
||||||
int currentRowNum = rownum;
|
int currentRowNum = rownum;
|
||||||
|
int colIndex = 0;
|
||||||
|
Row row = null;
|
||||||
|
boolean hasVisible = false;
|
||||||
|
|
||||||
|
// 布局配置:Label占用1列,Value占用2列,共3列
|
||||||
|
int labelCols = 1;
|
||||||
|
int valueCols = 2;
|
||||||
|
int itemCols = labelCols + valueCols;
|
||||||
|
|
||||||
for (Object[] os : extraFields) {
|
for (Object[] os : extraFields) {
|
||||||
Field field = (Field)os[0];
|
Field field = (Field)os[0];
|
||||||
@@ -1451,43 +1479,50 @@ public class NewExcelUtil<T> {
|
|||||||
if (isExtraFieldHidden(field.getName())) {
|
if (isExtraFieldHidden(field.getName())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
hasVisible = true;
|
||||||
|
|
||||||
Row row = sheet.createRow(currentRowNum++);
|
// 自动换行:如果不是行首,且剩余空间不足,则换行
|
||||||
|
if (row == null) {
|
||||||
|
row = sheet.createRow(currentRowNum);
|
||||||
|
} else if (colIndex > 0 && colIndex + itemCols > totalCols) {
|
||||||
|
currentRowNum++;
|
||||||
|
row = sheet.createRow(currentRowNum);
|
||||||
|
colIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 创建标签单元格(第0列)
|
// 1. 创建 Label 单元格
|
||||||
Cell labelCell = row.createCell(0);
|
Cell labelCell = row.createCell(colIndex);
|
||||||
labelCell.setCellValue(attr.name());
|
labelCell.setCellValue(attr.name());
|
||||||
labelCell.setCellStyle(styles.get("extraLabel"));
|
labelCell.setCellStyle(styles.get("extraLabel"));
|
||||||
|
|
||||||
// 创建值单元格(第1列)
|
// 2. 创建 Value 单元格
|
||||||
Cell valueCell = row.createCell(1);
|
int valueStartCol = colIndex + labelCols;
|
||||||
|
Cell valueCell = row.createCell(valueStartCol);
|
||||||
Object value = field.get(entity);
|
Object value = field.get(entity);
|
||||||
String cellValue = formatExtraCellValue(value, attr);
|
String cellValue = formatExtraCellValue(value, attr);
|
||||||
valueCell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue);
|
valueCell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue);
|
||||||
valueCell.setCellStyle(styles.get("extraValue"));
|
valueCell.setCellStyle(styles.get("extraValue"));
|
||||||
|
|
||||||
// 创建合并区域(第1列到第2列)
|
// 3. 合并 Value 单元格
|
||||||
CellRangeAddress mergedRegion = new CellRangeAddress(row.getRowNum(), row.getRowNum(), 1, 2);
|
if (valueCols > 1) {
|
||||||
sheet.addMergedRegion(mergedRegion);
|
int valueEndCol = valueStartCol + valueCols - 1;
|
||||||
|
CellRangeAddress mergedRegion = new CellRangeAddress(row.getRowNum(), row.getRowNum(), valueStartCol, valueEndCol);
|
||||||
|
sheet.addMergedRegion(mergedRegion);
|
||||||
|
|
||||||
|
// 设置边框
|
||||||
|
RegionUtil.setBorderTop(BorderStyle.THIN, mergedRegion, sheet);
|
||||||
|
RegionUtil.setBorderBottom(BorderStyle.THIN, mergedRegion, sheet);
|
||||||
|
RegionUtil.setBorderLeft(BorderStyle.THIN, mergedRegion, sheet);
|
||||||
|
RegionUtil.setBorderRight(BorderStyle.THIN, mergedRegion, sheet);
|
||||||
|
}
|
||||||
|
|
||||||
// 手动设置合并区域的边框,确保完整显示
|
colIndex += itemCols;
|
||||||
RegionUtil.setBorderTop(BorderStyle.THIN, mergedRegion, sheet);
|
|
||||||
RegionUtil.setBorderBottom(BorderStyle.THIN, mergedRegion, sheet);
|
|
||||||
RegionUtil.setBorderLeft(BorderStyle.THIN, mergedRegion, sheet);
|
|
||||||
RegionUtil.setBorderRight(BorderStyle.THIN, mergedRegion, sheet);
|
|
||||||
RegionUtil.setTopBorderColor(IndexedColors.BLACK.getIndex(), mergedRegion, sheet);
|
|
||||||
RegionUtil.setBottomBorderColor(IndexedColors.BLACK.getIndex(), mergedRegion, sheet);
|
|
||||||
RegionUtil.setLeftBorderColor(IndexedColors.BLACK.getIndex(), mergedRegion, sheet);
|
|
||||||
RegionUtil.setRightBorderColor(IndexedColors.BLACK.getIndex(), mergedRegion, sheet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置列宽
|
|
||||||
sheet.setColumnWidth(0, 15 * 256); // 标签列宽
|
|
||||||
sheet.setColumnWidth(1, 20 * 256); // 值列宽
|
|
||||||
sheet.setColumnWidth(2, 20 * 256); // 值列宽
|
|
||||||
|
|
||||||
// 更新当前行号,在额外表头和数据表头之间空一行
|
// 更新当前行号,在额外表头和数据表头之间空一行
|
||||||
rownum = currentRowNum + 1;
|
if (hasVisible) {
|
||||||
|
rownum = currentRowNum + 2;
|
||||||
|
}
|
||||||
subMergedFirstRowNum = rownum;
|
subMergedFirstRowNum = rownum;
|
||||||
subMergedLastRowNum = rownum;
|
subMergedLastRowNum = rownum;
|
||||||
|
|
||||||
@@ -1508,6 +1543,10 @@ public class NewExcelUtil<T> {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value instanceof BigDecimal && attr.scale() >= 0) {
|
||||||
|
return ((BigDecimal) value).setScale(attr.scale(), attr.roundingMode()).toString();
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(attr.dateFormat())) {
|
if (StringUtils.isNotEmpty(attr.dateFormat())) {
|
||||||
return parseDateToStr(attr.dateFormat(), value);
|
return parseDateToStr(attr.dateFormat(), value);
|
||||||
}
|
}
|
||||||
@@ -1808,7 +1847,7 @@ public class NewExcelUtil<T> {
|
|||||||
row = sheet.createRow(rowNo);
|
row = sheet.createRow(rowNo);
|
||||||
}
|
}
|
||||||
// 子字段也要排序
|
// 子字段也要排序
|
||||||
List<Field> subFields = FieldUtils.getFieldsListWithAnnotation(obj.getClass(), Excel.class);
|
List<Field> subFields = this.subFields;
|
||||||
List<Field> sortedSubFields = subFields.stream().sorted(Comparator.comparing(subField -> {
|
List<Field> sortedSubFields = subFields.stream().sorted(Comparator.comparing(subField -> {
|
||||||
Excel subExcel = subField.getAnnotation(Excel.class);
|
Excel subExcel = subField.getAnnotation(Excel.class);
|
||||||
return subExcel.sort();
|
return subExcel.sort();
|
||||||
@@ -1832,4 +1871,4 @@ public class NewExcelUtil<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.openhis.web.paymentmanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThreePartCompareDto {
|
||||||
|
/**
|
||||||
|
* 待比较的付款单
|
||||||
|
*/
|
||||||
|
private List<ThreePartComparePaymentDto> payments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待比较的付款请求
|
||||||
|
*/
|
||||||
|
private List<ThreePartCompareRequestDto> paymentRequests;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.openhis.web.paymentmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThreePartComparePaymentDto {
|
||||||
|
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long paymentId;// 支付单id
|
||||||
|
|
||||||
|
private String paymentNo;// 支付单号
|
||||||
|
|
||||||
|
private String patientName;// 患者名称
|
||||||
|
|
||||||
|
private BigDecimal tenderedAmount;// 应收
|
||||||
|
|
||||||
|
private BigDecimal paidAmount;// 实收
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date billDate;// 支付时间
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.openhis.web.paymentmanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThreePartCompareRequestDto {
|
||||||
|
|
||||||
|
private Long requestId;// 请求ID
|
||||||
|
|
||||||
|
private String paymentId;//paymentId
|
||||||
|
|
||||||
|
private BigDecimal amount;//请求金额
|
||||||
|
|
||||||
|
private String requestType;//退or付款
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.openhis.web.paymentmanage.mapper;
|
||||||
|
|
||||||
|
import com.openhis.web.paymentmanage.dto.ThreePartComparePaymentDto;
|
||||||
|
import com.openhis.web.paymentmanage.dto.ThreePartCompareRequestDto;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface ThreePartPayMapper {
|
||||||
|
/**
|
||||||
|
* 获取支付数据
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ThreePartComparePaymentDto> getThreePartComparePaymentDtoList(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取第三方支付请求数据
|
||||||
|
* @param paymentIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ThreePartCompareRequestDto> getThreePartCompareRequestDtoList(@Param("paymentIds")List<Long> paymentIds);
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.pharmacymanage.appservice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.EncounterInfoDto;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.ReturnMedicineDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:概括描述当前类的主要用途和注意事项
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
public interface IInHospitalReturnMedicineAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面初始化
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
R<?> init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药患者分页列表
|
||||||
|
*
|
||||||
|
* @param encounterInfoDto 查询条件
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @param request 请求数据
|
||||||
|
* @return 退药患者分页列表
|
||||||
|
*/
|
||||||
|
R<?> getReturnMedicinePatientPage(EncounterInfoDto encounterInfoDto, String searchKey, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药信息
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊ID
|
||||||
|
* @param refundStatus 退药id
|
||||||
|
* @param itemTable 项目类型
|
||||||
|
* @return 退药信息
|
||||||
|
*/
|
||||||
|
R<?> getReturnMedicineInfo(Long encounterId, Integer refundStatus, String itemTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退药处理
|
||||||
|
*
|
||||||
|
* @param medicineReturnList 退药清单
|
||||||
|
* @return 处理结果
|
||||||
|
*/
|
||||||
|
R<?> medicineReturn(List<ReturnMedicineDto> medicineReturnList);
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.openhis.web.pharmacymanage.appservice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.administration.dto.PrescriptionReviewRecordDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方审方 应用实现接口
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/01/29
|
||||||
|
*/
|
||||||
|
public interface IPrescriptionReviewAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审方
|
||||||
|
*
|
||||||
|
* @param recordDto 处方审方记录dto
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
R<?> review(PrescriptionReviewRecordDto recordDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方审方记录
|
||||||
|
*
|
||||||
|
* @param prescriptionNoList 处方号集合
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @return 处方审方记录
|
||||||
|
*/
|
||||||
|
List<PrescriptionReviewRecordDto> getPrescriptionReviewRecords(List<String> prescriptionNoList,
|
||||||
|
Integer reviewStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方审核信息
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @param request 请求
|
||||||
|
* @return 处方审核信息
|
||||||
|
*/
|
||||||
|
R<?> getPrescriptionReviewPageInfo(Long practitionerId, Integer reviewStatus, String patientName, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出处方审核信息
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
void makeFile(Long practitionerId, Integer reviewStatus, String patientName, HttpServletRequest request,
|
||||||
|
HttpServletResponse response);
|
||||||
|
}
|
||||||
@@ -0,0 +1,686 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.pharmacymanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.exception.ServiceException;
|
||||||
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
|
import com.core.common.utils.DateUtils;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.openhis.administration.domain.*;
|
||||||
|
import com.openhis.administration.service.*;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.*;
|
||||||
|
import com.openhis.common.enums.ybenums.YbInvChgType;
|
||||||
|
import com.openhis.common.enums.ybenums.YbMdtrtCertType;
|
||||||
|
import com.openhis.common.enums.ybenums.YbRxFlag;
|
||||||
|
import com.openhis.common.utils.EnumUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.financial.domain.Contract;
|
||||||
|
import com.openhis.financial.domain.PaymentReconciliation;
|
||||||
|
import com.openhis.financial.service.IContractService;
|
||||||
|
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||||
|
import com.openhis.medication.domain.MedicationDefinition;
|
||||||
|
import com.openhis.medication.domain.MedicationDispense;
|
||||||
|
import com.openhis.medication.domain.MedicationRequest;
|
||||||
|
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||||
|
import com.openhis.medication.service.IMedicationDispenseService;
|
||||||
|
import com.openhis.medication.service.IMedicationRequestService;
|
||||||
|
import com.openhis.web.inventorymanage.appservice.impl.ReceiptApprovalAppServiceImpl;
|
||||||
|
import com.openhis.web.inventorymanage.dto.SupplyItemDetailDto;
|
||||||
|
import com.openhis.web.pharmacymanage.appservice.IInHospitalReturnMedicineAppService;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.*;
|
||||||
|
import com.openhis.web.pharmacymanage.mapper.InHospitalReturnMedicineAppMapper;
|
||||||
|
import com.openhis.web.pharmacymanage.mapper.ReturnMedicineMapper;
|
||||||
|
import com.openhis.workflow.domain.DeviceDispense;
|
||||||
|
import com.openhis.workflow.domain.InventoryItem;
|
||||||
|
import com.openhis.workflow.service.IDeviceDispenseService;
|
||||||
|
import com.openhis.workflow.service.IDeviceRequestService;
|
||||||
|
import com.openhis.workflow.service.IInventoryItemService;
|
||||||
|
import com.openhis.yb.domain.ClinicSettle;
|
||||||
|
import com.openhis.yb.dto.Medical3506Param;
|
||||||
|
import com.openhis.yb.dto.MedicalInventory3511Param;
|
||||||
|
import com.openhis.yb.service.IClinicSettleService;
|
||||||
|
import com.openhis.yb.service.YbManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:概括描述当前类的主要用途和注意事项
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturnMedicineAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITraceNoManageService traceNoManageService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IOrganizationService iOrganizationService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IInventoryItemService iInventoryItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private InHospitalReturnMedicineAppMapper inHospitalReturnMedicineAppMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ReturnMedicineMapper returnMedicineMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMedicationRequestService medicationRequestService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMedicationDispenseService medicationDispenseService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDeviceDispenseService deviceDispenseService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDeviceRequestService deviceRequestService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private YbManager ybService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IChargeItemService iChargeItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPaymentReconciliationService iPaymentReconciliationService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IContractService iContractService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IClinicSettleService clinicSettleService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IEncounterDiagnosisService encounterDiagnosisService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IAccountService accountService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IDeviceDefinitionService deviceDefinitionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IMedicationDefinitionService medicationDefinitionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ReceiptApprovalAppServiceImpl receiptApprovalAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取页面初始化信息
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> init() {
|
||||||
|
|
||||||
|
ReturnMedicineInitDto initDto = new ReturnMedicineInitDto();
|
||||||
|
|
||||||
|
// 获取科室下拉选列表
|
||||||
|
List<Organization> organizationList =
|
||||||
|
iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||||
|
List<ReturnMedicineInitDto.DepartmentOption> organizationOptions = organizationList.stream().map(
|
||||||
|
organization -> new ReturnMedicineInitDto.DepartmentOption(organization.getId(), organization.getName()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 发药状态
|
||||||
|
List<ReturnMedicineInitDto.RefundStatusOption> refundStatusOptions = new ArrayList<>();
|
||||||
|
refundStatusOptions.add(new ReturnMedicineInitDto.RefundStatusOption(DispenseStatus.PENDING_REFUND.getValue(),
|
||||||
|
DispenseStatus.PENDING_REFUND.getInfo()));
|
||||||
|
refundStatusOptions.add(new ReturnMedicineInitDto.RefundStatusOption(DispenseStatus.REFUNDED.getValue(),
|
||||||
|
DispenseStatus.REFUNDED.getInfo()));
|
||||||
|
initDto.setDepartmentOptions(organizationOptions).setRefundStatusOptions(refundStatusOptions);
|
||||||
|
return R.ok(initDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药患者分页列表
|
||||||
|
*
|
||||||
|
* @param encounterInfoDto 查询条件
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @param request 请求数据
|
||||||
|
* @return 退药患者分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getReturnMedicinePatientPage(EncounterInfoDto encounterInfoDto, String searchKey, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request) {
|
||||||
|
Integer refundEnum = encounterInfoDto.getRefundEnum();
|
||||||
|
encounterInfoDto.setRefundEnum(null);
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<EncounterInfoDto> queryWrapper = HisQueryUtils.buildQueryWrapper(encounterInfoDto, searchKey,
|
||||||
|
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientName, CommonConstants.FieldName.IdCard,
|
||||||
|
CommonConstants.FieldName.PatientPyStr, CommonConstants.FieldName.PatientWbStr)),
|
||||||
|
request);
|
||||||
|
// 查询退药患者分页列表
|
||||||
|
Page<EncounterInfoDto> encounterInfoPage = inHospitalReturnMedicineAppMapper.selectEncounterInfoListPage(
|
||||||
|
new Page<>(pageNo, pageSize), queryWrapper, refundEnum, DispenseStatus.PENDING_REFUND.getValue(),
|
||||||
|
DispenseStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
|
||||||
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||||
|
encounterInfoPage.getRecords().forEach(encounterInfo -> {
|
||||||
|
// 性别
|
||||||
|
encounterInfo.setGenderEnum_enumText(
|
||||||
|
EnumUtils.getInfoByValue(AdministrativeGender.class, encounterInfo.getGenderEnum()));
|
||||||
|
// 年龄
|
||||||
|
encounterInfo.setAge(AgeCalculatorUtil.getAge(encounterInfo.getBirthDate()));
|
||||||
|
// 退药状态
|
||||||
|
encounterInfo
|
||||||
|
.setRefundEnum_enumText(EnumUtils.getInfoByValue(DispenseStatus.class, encounterInfo.getRefundEnum()));
|
||||||
|
});
|
||||||
|
return R.ok(encounterInfoPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药信息
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊ID
|
||||||
|
* @param refundStatus 退药id
|
||||||
|
* @param itemTable 项目类型
|
||||||
|
* @return 退药信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getReturnMedicineInfo(Long encounterId, Integer refundStatus, String itemTable) {
|
||||||
|
// 获取退药信息
|
||||||
|
List<ReturnMedicineInfoDto> returnMedicineInfoList = inHospitalReturnMedicineAppMapper.selectReturnMedicineInfo(
|
||||||
|
encounterId, CommonConstants.TableName.WOR_DEVICE_REQUEST, CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||||
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||||
|
itemTable, refundStatus, DispenseStatus.PENDING_REFUND.getValue(), DispenseStatus.REFUNDED.getValue());
|
||||||
|
returnMedicineInfoList.forEach(returnMedicineInfoDto -> {
|
||||||
|
// 退药状态
|
||||||
|
returnMedicineInfoDto.setRefundEnum_enumText(
|
||||||
|
EnumUtils.getInfoByValue(DispenseStatus.class, returnMedicineInfoDto.getRefundEnum()));
|
||||||
|
// 退药请求状态
|
||||||
|
returnMedicineInfoDto.setReqStatus_enumText(
|
||||||
|
EnumUtils.getInfoByValue(RequestStatus.class, returnMedicineInfoDto.getReqStatus()));
|
||||||
|
});
|
||||||
|
return R.ok(returnMedicineInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退药处理
|
||||||
|
*
|
||||||
|
* @param medicineReturnList 退药清单
|
||||||
|
* @return 处理结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> medicineReturn(List<ReturnMedicineDto> medicineReturnList) {
|
||||||
|
if (medicineReturnList == null || medicineReturnList.isEmpty()) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
// 分别处理退药与退耗材的请求
|
||||||
|
List<ReturnMedicineDto> returnMedicineList = new ArrayList<>();
|
||||||
|
List<ReturnMedicineDto> returnDeviceList = new ArrayList<>();
|
||||||
|
// 追溯码列表
|
||||||
|
List<TraceNoManage> traceNoManageList = new ArrayList<>();
|
||||||
|
TraceNoManage traceNoManage;
|
||||||
|
|
||||||
|
medicineReturnList.forEach(item -> {
|
||||||
|
switch (item.getTableName()) {
|
||||||
|
case CommonConstants.TableName.MED_MEDICATION_REQUEST -> returnMedicineList
|
||||||
|
.add(new ReturnMedicineDto().setDispenseId(item.getDispenseId()).setRequestId(item.getRequestId()));
|
||||||
|
case CommonConstants.TableName.WOR_DEVICE_REQUEST -> returnDeviceList
|
||||||
|
.add(new ReturnMedicineDto().setDispenseId(item.getDispenseId()).setRequestId(item.getRequestId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 进销存参数
|
||||||
|
List<SupplyItemDetailDto> supplyItemDetailList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 处理退药
|
||||||
|
// 获取药品退药id列表
|
||||||
|
List<Long> medReturnIdList = new ArrayList<>();
|
||||||
|
if (!returnMedicineList.isEmpty()) {
|
||||||
|
// 获取药品退药id列表
|
||||||
|
medReturnIdList =
|
||||||
|
returnMedicineList.stream().map(ReturnMedicineDto::getDispenseId).collect(Collectors.toList());
|
||||||
|
// 获取药品退药请求id列表
|
||||||
|
List<Long> medRequestIdList =
|
||||||
|
returnMedicineList.stream().map(ReturnMedicineDto::getRequestId).collect(Collectors.toList());
|
||||||
|
if (medReturnIdList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的药品");
|
||||||
|
}
|
||||||
|
if (medRequestIdList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的药品");
|
||||||
|
}
|
||||||
|
// 药品退药信息查询
|
||||||
|
List<MedicationDispense> refundMedList = medicationDispenseService.listByIds(medReturnIdList);
|
||||||
|
// 药品退药请求查询
|
||||||
|
List<MedicationRequest> refundMedRequestList = medicationRequestService.listByIds(medRequestIdList);
|
||||||
|
if (refundMedList == null || refundMedList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的药品");
|
||||||
|
}
|
||||||
|
// 重复退药校验
|
||||||
|
if (refundMedList.stream().map(MedicationDispense::getStatusEnum)
|
||||||
|
.anyMatch(x -> x.equals(DispenseStatus.REFUNDED.getValue()))) {
|
||||||
|
throw new ServiceException("药品已退药,请勿重复退药");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新退药单
|
||||||
|
for (MedicationDispense medicationDispense : refundMedList) {
|
||||||
|
// 退药状态
|
||||||
|
medicationDispense.setStatusEnum(DispenseStatus.REFUNDED.getValue());
|
||||||
|
// 退药数量
|
||||||
|
medicationDispense.setDispenseQuantity(medicationDispense.getQuantity());
|
||||||
|
// 状态变更时间
|
||||||
|
medicationDispense.setStatusChangedTime(DateUtils.getNowDate());
|
||||||
|
// 退药时间
|
||||||
|
medicationDispense.setDispenseTime(DateUtils.getNowDate());
|
||||||
|
// 退药人
|
||||||
|
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||||
|
|
||||||
|
// 设置库存变更参数
|
||||||
|
SupplyItemDetailDto supplyItemDetailDto = new SupplyItemDetailDto();
|
||||||
|
for (MedicationRequest medicationRequest : refundMedRequestList) {
|
||||||
|
// 根据退药id查询退药请求id(用于医保关联)
|
||||||
|
if (medicationDispense.getMedReqId().equals(medicationRequest.getId())) {
|
||||||
|
supplyItemDetailDto.setRequestId(medicationRequest.getRefundMedicineId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
supplyItemDetailDto.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||||
|
.setItemId(medicationDispense.getMedicationId()).setLotNumber(medicationDispense.getLotNumber());
|
||||||
|
supplyItemDetailList.add(supplyItemDetailDto);
|
||||||
|
|
||||||
|
// 追溯码表相关处理
|
||||||
|
if (medicationDispense.getTraceNo() != null) {
|
||||||
|
// 使用逗号分割追溯码并转换为List
|
||||||
|
String[] traceNoList = medicationDispense.getTraceNo().split(CommonConstants.Common.COMMA);
|
||||||
|
for (String item : traceNoList) {
|
||||||
|
traceNoManage = new TraceNoManage();
|
||||||
|
// 追溯码处理
|
||||||
|
traceNoManage.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||||
|
// 项目id
|
||||||
|
.setItemId(medicationDispense.getMedicationId())
|
||||||
|
// 仓库类型
|
||||||
|
.setLocationTypeEnum(null)
|
||||||
|
// 仓库
|
||||||
|
.setLocationId(medicationDispense.getLocationId())
|
||||||
|
// 仓位
|
||||||
|
.setLocationStoreId(null)
|
||||||
|
// 产品批号
|
||||||
|
.setLotNumber(medicationDispense.getLotNumber())
|
||||||
|
// 追溯码
|
||||||
|
.setTraceNo(item)
|
||||||
|
// 追溯码状态
|
||||||
|
.setStatusEnum(TraceNoStatus.IN.getValue())
|
||||||
|
// 追溯码单位
|
||||||
|
.setUnitCode(medicationDispense.getUnitCode())
|
||||||
|
// 操作类型
|
||||||
|
.setOperationType(SupplyType.RETURN_MEDICATION.getValue());
|
||||||
|
traceNoManageList.add(traceNoManage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 退药更新
|
||||||
|
medicationDispenseService.updateBatchById(refundMedList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理退耗材
|
||||||
|
// 获取退耗材id列表
|
||||||
|
List<Long> devReturnIdList = new ArrayList<>();
|
||||||
|
if (!returnDeviceList.isEmpty()) {
|
||||||
|
// 获取退耗材id列表
|
||||||
|
devReturnIdList =
|
||||||
|
returnDeviceList.stream().map(ReturnMedicineDto::getDispenseId).collect(Collectors.toList());
|
||||||
|
// 获取退耗材请求id列表
|
||||||
|
List<Long> devRequestIdList = returnDeviceList.stream().map(ReturnMedicineDto::getRequestId).toList();
|
||||||
|
if (devReturnIdList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的耗材");
|
||||||
|
}
|
||||||
|
if (devRequestIdList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的耗材");
|
||||||
|
}
|
||||||
|
// 退耗材信息查询
|
||||||
|
List<DeviceDispense> refundDevList = deviceDispenseService.listByIds(devReturnIdList);
|
||||||
|
if (refundDevList == null || refundDevList.isEmpty()) {
|
||||||
|
throw new ServiceException("请选择要退的耗材");
|
||||||
|
}
|
||||||
|
// 重复退耗材校验
|
||||||
|
if (refundDevList.stream().map(DeviceDispense::getStatusEnum)
|
||||||
|
.anyMatch(x -> x.equals(DispenseStatus.REFUNDED.getValue()))) {
|
||||||
|
throw new ServiceException("耗材已退,请勿重复操作");
|
||||||
|
}
|
||||||
|
// 更新退耗材单状态
|
||||||
|
for (DeviceDispense deviceDispense : refundDevList) {
|
||||||
|
// 退药时间
|
||||||
|
deviceDispense.setDispenseTime(DateUtils.getNowDate());
|
||||||
|
// 退药数量
|
||||||
|
deviceDispense.setDispenseQuantity(deviceDispense.getQuantity());
|
||||||
|
// 退药状态
|
||||||
|
deviceDispense.setStatusEnum(DispenseStatus.REFUNDED.getValue());
|
||||||
|
// 设置库存变更参数
|
||||||
|
supplyItemDetailList
|
||||||
|
.add(new SupplyItemDetailDto().setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||||
|
.setItemId(deviceDispense.getDeviceDefId()).setLotNumber(deviceDispense.getLotNumber()));
|
||||||
|
// // 使用逗号分割追溯码并转换为List
|
||||||
|
// String[] traceNoList = deviceDispense.getTraceNo().split(CommonConstants.Common.COMMA);
|
||||||
|
// for (String item : traceNoList) {
|
||||||
|
// traceNoManage = new TraceNoManage();
|
||||||
|
// // 追溯码处理
|
||||||
|
// traceNoManage.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||||
|
// // 项目id
|
||||||
|
// .setItemId(deviceDispense.getDeviceDefId())
|
||||||
|
// // 仓库类型
|
||||||
|
// .setLocationTypeEnum(LocationForm.PHARMACY.getValue())
|
||||||
|
// // 仓库
|
||||||
|
// .setLocationId(deviceDispense.getLocationId())
|
||||||
|
// // 产品批号
|
||||||
|
// .setLotNumber(deviceDispense.getLotNumber())
|
||||||
|
// // 追溯码
|
||||||
|
// .setTraceNo(item)
|
||||||
|
// // 追溯码状态
|
||||||
|
// .setStatusEnum(TraceNoStatus.IN.getValue())
|
||||||
|
// // 追溯码单位
|
||||||
|
// .setUnitCode(deviceDispense.getUnitCode())
|
||||||
|
// // 操作类型
|
||||||
|
// .setOperationType(SupplyType.RETURN_MEDICATION.getValue());
|
||||||
|
// traceNoManageList.add(traceNoManage);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
deviceDispenseService.updateBatchById(refundDevList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 追溯码管理表数据追加
|
||||||
|
traceNoManageService.saveBatch(traceNoManageList);
|
||||||
|
|
||||||
|
// 处理退库存
|
||||||
|
// 获取库存信息
|
||||||
|
List<UnDispenseInventoryDto> unDispenseInventoryList =
|
||||||
|
returnMedicineMapper.selectInventoryInfoList(devReturnIdList, medReturnIdList,
|
||||||
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||||
|
// 库存待更新列表
|
||||||
|
List<InventoryItem> inventoryItemList = new ArrayList<>();
|
||||||
|
// 根据批号,发放项目,发放药房进行分组处理
|
||||||
|
Map<String, List<UnDispenseInventoryDto>> unDispenseInventoryMap =
|
||||||
|
unDispenseInventoryList.stream().collect(Collectors.groupingBy(x -> x.getItemId()
|
||||||
|
+ CommonConstants.Common.DASH + x.getLotNumber() + CommonConstants.Common.DASH + x.getLocationId()));
|
||||||
|
if (!unDispenseInventoryMap.isEmpty()) {
|
||||||
|
for (Map.Entry<String, List<UnDispenseInventoryDto>> entry : unDispenseInventoryMap.entrySet()) {
|
||||||
|
List<UnDispenseInventoryDto> inventoryList = entry.getValue();
|
||||||
|
if (!inventoryList.isEmpty()) {
|
||||||
|
// 最小单位数量
|
||||||
|
BigDecimal minQuantity = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
for (UnDispenseInventoryDto unDispenseInventoryDto : inventoryList) {
|
||||||
|
BigDecimal quantity = unDispenseInventoryDto.getQuantity();
|
||||||
|
if (!unDispenseInventoryDto.getDispenseUnit()
|
||||||
|
.equals(unDispenseInventoryDto.getInventoryUnitCode())) {
|
||||||
|
// 转换为小单位进行累加
|
||||||
|
quantity =
|
||||||
|
unDispenseInventoryDto.getQuantity().multiply(unDispenseInventoryDto.getPartPercent());
|
||||||
|
}
|
||||||
|
minQuantity = minQuantity.add(quantity);
|
||||||
|
}
|
||||||
|
// 理论上不出bug的情况下以项目id,批号,仓库进行分组处理库存一定唯一所以get(0)
|
||||||
|
// 设置待更新的库存信息
|
||||||
|
inventoryItemList.add(new InventoryItem().setId(inventoryList.get(0).getInventoryId())
|
||||||
|
.setQuantity(inventoryList.get(0).getInventoryQuantity().add(minQuantity)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 库存更新
|
||||||
|
iInventoryItemService.updateBatchById(inventoryItemList);
|
||||||
|
} else {
|
||||||
|
throw new ServiceException("请检查库存信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理退药医保
|
||||||
|
// 返回信息
|
||||||
|
String returnMsg = null;
|
||||||
|
List<String> uploadFailedNoList;
|
||||||
|
// 调用医保商品销售退货接口
|
||||||
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
|
List<DeviceDefinition> deviceDefinitions = new ArrayList<>();
|
||||||
|
List<MedicationDefinition> medicationDefinitions = new ArrayList<>();
|
||||||
|
if (!returnMedicineList.isEmpty()) {
|
||||||
|
// 设置进销存参数
|
||||||
|
medicationDefinitions = medicationDefinitionService.listByIds(supplyItemDetailList.stream()
|
||||||
|
.filter(x -> x.getItemTable().equals(CommonConstants.TableName.MED_MEDICATION_DEFINITION))
|
||||||
|
.map(SupplyItemDetailDto::getItemId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
if (!returnDeviceList.isEmpty()) {
|
||||||
|
deviceDefinitions = deviceDefinitionService.listByIds(supplyItemDetailList.stream()
|
||||||
|
.filter(x -> x.getItemTable().equals(CommonConstants.TableName.ADM_DEVICE_DEFINITION))
|
||||||
|
.map(SupplyItemDetailDto::getItemId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建映射表,添加空集合保护
|
||||||
|
Map<Long, MedicationDefinition> medicationMap =
|
||||||
|
medicationDefinitions != null ? medicationDefinitions.stream().filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toMap(MedicationDefinition::getId, Function.identity())) : new HashMap<>();
|
||||||
|
|
||||||
|
Map<Long, DeviceDefinition> deviceMap =
|
||||||
|
deviceDefinitions != null ? deviceDefinitions.stream().filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toMap(DeviceDefinition::getId, Function.identity())) : new HashMap<>();
|
||||||
|
|
||||||
|
// 设置库存变更参数,添加完整判空
|
||||||
|
for (SupplyItemDetailDto supplyItemDetailDto : supplyItemDetailList) {
|
||||||
|
if (supplyItemDetailDto == null)
|
||||||
|
continue;
|
||||||
|
if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(supplyItemDetailDto.getItemTable())) {
|
||||||
|
if (supplyItemDetailDto.getItemId() != null) {
|
||||||
|
MedicationDefinition med = medicationMap.get(supplyItemDetailDto.getItemId());
|
||||||
|
if (med != null) {
|
||||||
|
supplyItemDetailDto.setItemBusNo(med.getBusNo()).setPartPercent(med.getPartPercent())
|
||||||
|
.setRxFlag(med.getRxFlag()).setYbNo(med.getYbNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(supplyItemDetailDto.getItemTable())) {
|
||||||
|
if (supplyItemDetailDto.getItemId() != null) {
|
||||||
|
DeviceDefinition dev = deviceMap.get(supplyItemDetailDto.getItemId());
|
||||||
|
if (dev != null) {
|
||||||
|
supplyItemDetailDto.setItemBusNo(dev.getBusNo()).setPartPercent(dev.getPartPercent())
|
||||||
|
.setRxFlag(dev.getRxFlag()).setYbNo(dev.getYbNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uploadFailedNoList = this.ybReturnIntegrated(medReturnIdList, null);
|
||||||
|
uploadFailedNoList = receiptApprovalAppService.ybInventoryIntegrated(supplyItemDetailList,
|
||||||
|
YbInvChgType.OTHER_OUT, DateUtils.getNowDate(), true);
|
||||||
|
if (uploadFailedNoList != null) {
|
||||||
|
returnMsg = "3506商品销售退货上传错误,错误项目编码" + uploadFailedNoList;
|
||||||
|
} else {
|
||||||
|
returnMsg = "3506商品销售退货上传成功";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 返回退药成功信息
|
||||||
|
return R.ok(returnMsg, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"退药"}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保退药相关进销存接口
|
||||||
|
*
|
||||||
|
* @param dispenseMedIdList 退药id列表
|
||||||
|
* @param dispenseDevIdList 退耗材id列表
|
||||||
|
* @return 上传失败的编号集合
|
||||||
|
*/
|
||||||
|
public List<String> ybReturnIntegrated(List<Long> dispenseMedIdList, List<Long> dispenseDevIdList) {
|
||||||
|
List<String> uploadFailedNoList = new ArrayList<>();
|
||||||
|
R<?> result;
|
||||||
|
if (!dispenseMedIdList.isEmpty() || !dispenseDevIdList.isEmpty()) {
|
||||||
|
// 查询退药项目相关信息
|
||||||
|
List<DispenseInventoryDto> dispenseInventoryList = returnMedicineMapper.selectReturnItemDetail(
|
||||||
|
dispenseDevIdList, dispenseMedIdList, CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
||||||
|
CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||||
|
for (DispenseInventoryDto dispenseInventoryDto : dispenseInventoryList) {
|
||||||
|
if (dispenseInventoryDto.getYbNo() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Pair<Medical3506Param, Contract> medical3506Pair = getMedical3506Param(dispenseInventoryDto);
|
||||||
|
// 如果自费则自动取省医保
|
||||||
|
Contract contract = medical3506Pair.getRight();
|
||||||
|
if (contract != null) {
|
||||||
|
if (CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
|
||||||
|
.equals(medical3506Pair.getRight().getBusNo())) {
|
||||||
|
contract = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = ybService.cancelMerchandise(medical3506Pair.getLeft(), contract);
|
||||||
|
if (result.getCode() != 200) {
|
||||||
|
uploadFailedNoList.add(dispenseInventoryDto.getDispenseNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return uploadFailedNoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Pair<Medical3506Param, Contract> getMedical3506Param(DispenseInventoryDto dispenseInventoryDto) {
|
||||||
|
Medical3506Param medical3506Param = new Medical3506Param();
|
||||||
|
ChargeItem chargeItem = null;
|
||||||
|
if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(dispenseInventoryDto.getItemTable())) {
|
||||||
|
// 查询费用结算信息
|
||||||
|
chargeItem = iChargeItemService.getOne(new LambdaQueryWrapper<ChargeItem>()
|
||||||
|
.eq(ChargeItem::getServiceTable, CommonConstants.TableName.MED_MEDICATION_REQUEST)
|
||||||
|
.eq(ChargeItem::getServiceId, dispenseInventoryDto.getRefundId())
|
||||||
|
.eq(ChargeItem::getTenantId, SecurityUtils.getLoginUser().getTenantId()));
|
||||||
|
} else if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(dispenseInventoryDto.getItemTable())) {
|
||||||
|
chargeItem = iChargeItemService.getOne(new LambdaQueryWrapper<ChargeItem>()
|
||||||
|
.eq(ChargeItem::getServiceTable, CommonConstants.TableName.WOR_DEVICE_REQUEST)
|
||||||
|
.eq(ChargeItem::getServiceId, dispenseInventoryDto.getRefundId())
|
||||||
|
.eq(ChargeItem::getTenantId, SecurityUtils.getLoginUser().getTenantId()));
|
||||||
|
}
|
||||||
|
if (chargeItem == null) {
|
||||||
|
throw new ServiceException("未查询到收费项");
|
||||||
|
}
|
||||||
|
// 查询就诊诊断信息
|
||||||
|
EncounterDiagnosis encounterDiagnosis = encounterDiagnosisService.getById(chargeItem.getEncounterDiagnosisId());
|
||||||
|
if (encounterDiagnosis == null) {
|
||||||
|
throw new ServiceException("未查找到就诊诊断信息");
|
||||||
|
}
|
||||||
|
// 查询付款信息
|
||||||
|
PaymentReconciliation paymentReconciliation =
|
||||||
|
iPaymentReconciliationService.getOne(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||||
|
.eq(PaymentReconciliation::getEncounterId, chargeItem.getEncounterId())
|
||||||
|
.like(PaymentReconciliation::getChargeItemIds, chargeItem.getId())
|
||||||
|
.eq(PaymentReconciliation::getStatusEnum, PaymentStatus.SUCCESS.getValue())
|
||||||
|
.eq(PaymentReconciliation::getPatientId, chargeItem.getPatientId())
|
||||||
|
.eq(PaymentReconciliation::getPaymentEnum, PaymentType.PAY.getValue()));
|
||||||
|
if (paymentReconciliation == null) {
|
||||||
|
throw new ServiceException("未查询到收费");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询账户信息
|
||||||
|
Account account = accountService
|
||||||
|
.getOne(new LambdaQueryWrapper<Account>().eq(Account::getEncounterId, chargeItem.getEncounterId())
|
||||||
|
.eq(Account::getEncounterFlag, Whether.YES.getValue()));
|
||||||
|
if (account == null) {
|
||||||
|
throw new ServiceException("未查询到账户");
|
||||||
|
}
|
||||||
|
// 查询合同实体
|
||||||
|
Contract contract =
|
||||||
|
iContractService.getOne(new LambdaQueryWrapper<Contract>().eq(Contract::getBusNo, account.getContractNo()));
|
||||||
|
if (contract == null) {
|
||||||
|
throw new ServiceException("未查询到合同信息");
|
||||||
|
}
|
||||||
|
YbMdtrtCertType mdtrtCertType;
|
||||||
|
if (AccountType.PERSONAL_CASH_ACCOUNT.getCode().equals(account.getTypeCode())) {
|
||||||
|
mdtrtCertType = YbMdtrtCertType.MDTRT_CERT_TYPE02;
|
||||||
|
} else {
|
||||||
|
mdtrtCertType = YbMdtrtCertType.getByValue(account.getTypeCode());// 2025/05/28 该值存01/02/03
|
||||||
|
}
|
||||||
|
if (mdtrtCertType == null) {
|
||||||
|
throw new ServiceException("未查询到电子凭证");
|
||||||
|
}
|
||||||
|
// 查询就诊id
|
||||||
|
if (contract.getCategoryEnum().equals(Category.SELF.getValue())
|
||||||
|
|| contract.getCategoryEnum().equals(Category.PUBLIC.getValue())) {
|
||||||
|
medical3506Param.setMdtrtSn(dispenseInventoryDto.getEncounterNo());
|
||||||
|
} else {
|
||||||
|
ClinicSettle clinicSettle = clinicSettleService.getOne(new LambdaQueryWrapper<ClinicSettle>()
|
||||||
|
.in(ClinicSettle::getSetlId, List.of(paymentReconciliation.getYbSettleIds()))
|
||||||
|
.eq(ClinicSettle::getMedType, encounterDiagnosis.getMedTypeCode()).last(" LIMIT 1"));
|
||||||
|
if (clinicSettle != null) {
|
||||||
|
medical3506Param.setMdtrtSn(clinicSettle.getMdtrtId());
|
||||||
|
} else {
|
||||||
|
medical3506Param.setMdtrtSn(dispenseInventoryDto.getEncounterNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// // 查询发票信息
|
||||||
|
// Invoice invoice = iInvoiceService.getById(paymentReconciliation.getInvoiceId());
|
||||||
|
// if (invoice == null) {
|
||||||
|
// throw new ServiceException("未查询到发票信息");
|
||||||
|
// }
|
||||||
|
// 转换为JSON
|
||||||
|
JSONArray medicalTraceNo = new JSONArray();
|
||||||
|
// 获取追溯码信息
|
||||||
|
if (dispenseInventoryDto.getTraceNo() != null) {
|
||||||
|
List<String> traceNoList =
|
||||||
|
Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty()).toList();
|
||||||
|
for (String traceNo : traceNoList) {
|
||||||
|
Map<String, String> traceNoMap = new HashMap<>();
|
||||||
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
|
medicalTraceNo.add(traceNoMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
medical3506Param.setMedListCodg(dispenseInventoryDto.getYbNo())
|
||||||
|
.setFixmedinsBchno(dispenseInventoryDto.getRefundId().toString())
|
||||||
|
.setFixmedinsHilistId(dispenseInventoryDto.getItemNo())
|
||||||
|
.setFixmedinsHilistName(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||||
|
.setPsnCertType(mdtrtCertType.getValue()).setManuLotnum(dispenseInventoryDto.getLotNumber())
|
||||||
|
.setManuDate(dispenseInventoryDto.getProductionDate())
|
||||||
|
.setSelRetnCnt(new BigDecimal(dispenseInventoryDto.getDispenseQuantity().toString()))
|
||||||
|
.setSelRetnTime(dispenseInventoryDto.getDispenseTime()).setExpyEnd(dispenseInventoryDto.getExpirationDate())
|
||||||
|
.setDrugtracinfo(medicalTraceNo).setCertno(dispenseInventoryDto.getIdCard());
|
||||||
|
// 查看所属医院
|
||||||
|
String fixmedinsCode =
|
||||||
|
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
|
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
|
medical3506Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
||||||
|
} else {
|
||||||
|
medical3506Param.setSelRetnOpterName(dispenseInventoryDto.getPreparerName());
|
||||||
|
}
|
||||||
|
if (dispenseInventoryDto.getInventoryUnitCode().equals(dispenseInventoryDto.getDispenseUnitCode())) {
|
||||||
|
medical3506Param.setTrdnFlag(Whether.YES.getCode());
|
||||||
|
} else {
|
||||||
|
medical3506Param.setTrdnFlag(Whether.NO.getCode());
|
||||||
|
}
|
||||||
|
if (YbRxFlag.IMPORTANT_HERBAL_SLICES.getCode() == dispenseInventoryDto.getRxFlag()) {
|
||||||
|
medical3506Param.setRxFlag(YbRxFlag.IMPORTANT_HERBAL_SLICES.getName());
|
||||||
|
} else if (YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getCode() == dispenseInventoryDto.getRxFlag()) {
|
||||||
|
medical3506Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName());
|
||||||
|
} else if (YbRxFlag.SELF_PREPARED_MEDICATION.getCode() == dispenseInventoryDto.getRxFlag()) {
|
||||||
|
medical3506Param.setRxFlag(YbRxFlag.WESTERN_AND_CHINESE_PATENT_MEDICINE.getName());
|
||||||
|
}
|
||||||
|
if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(dispenseInventoryDto.getItemTable())) {
|
||||||
|
medical3506Param.setFixmedinsHilistName(CommonConstants.TableName.MED_MEDICATION_DEFINITION);
|
||||||
|
} else if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(dispenseInventoryDto.getItemTable())) {
|
||||||
|
medical3506Param.setFixmedinsHilistName(CommonConstants.TableName.ADM_DEVICE_DEFINITION);
|
||||||
|
}
|
||||||
|
return Pair.of(medical3506Param, contract);
|
||||||
|
}
|
||||||
|
|
||||||
|
private MedicalInventory3511Param getMedical3511Param(DispenseInventoryDto dispenseInventoryDto) {
|
||||||
|
MedicalInventory3511Param medicalInventory3511Param = new MedicalInventory3511Param();
|
||||||
|
|
||||||
|
String fixmedinsCode =
|
||||||
|
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
|
// TODO
|
||||||
|
medicalInventory3511Param.setFixmedinsCode(fixmedinsCode).setMedinsListCodg(dispenseInventoryDto.getYbNo())
|
||||||
|
.setFixmedinsBchno(dispenseInventoryDto.getLotNumber()).setBegndate(dispenseInventoryDto.getDispenseTime())
|
||||||
|
.setEnddate(dispenseInventoryDto.getDispenseTime());
|
||||||
|
|
||||||
|
return medicalInventory3511Param;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
package com.openhis.web.pharmacymanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
|
import com.core.common.utils.NewExcelUtil;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
|
import com.openhis.administration.domain.PrescriptionReviewRecord;
|
||||||
|
import com.openhis.administration.dto.PrescriptionReviewRecordDto;
|
||||||
|
import com.openhis.administration.service.IPrescriptionReviewRecordService;
|
||||||
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
|
import com.openhis.common.enums.EncounterClass;
|
||||||
|
import com.openhis.common.enums.ReviewReasonEnum;
|
||||||
|
import com.openhis.common.enums.ReviewReasonableStatus;
|
||||||
|
import com.openhis.common.utils.EnumUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.common.utils.PageUtils;
|
||||||
|
import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
|
||||||
|
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
|
||||||
|
import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper;
|
||||||
|
import com.openhis.web.pharmacymanage.appservice.IPrescriptionReviewAppService;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方审方 应用实现类
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/30
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class PrescriptionReviewAppServiceImpl implements IPrescriptionReviewAppService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IPrescriptionReviewRecordService prescriptionReviewRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
DoctorStationMainAppMapper doctorStationMainAppMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审方
|
||||||
|
*
|
||||||
|
* @param recordDto 处方审方记录dto
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> review(PrescriptionReviewRecordDto recordDto) {
|
||||||
|
if (recordDto.getEncounterId() == null) {
|
||||||
|
return R.fail("就诊id不能为空");
|
||||||
|
}
|
||||||
|
if (recordDto.getPrescriptionNo() == null) {
|
||||||
|
return R.fail("处方号不能为空");
|
||||||
|
}
|
||||||
|
if (recordDto.getReasonableFlag() == null) {
|
||||||
|
return R.fail("是否合理标识不能为空");
|
||||||
|
}
|
||||||
|
List<PrescriptionInfoDetailDto> prescriptionDetailInfo = doctorStationMainAppMapper
|
||||||
|
.getPrescriptionDetailInfo(recordDto.getPrescriptionNo(), recordDto.getEncounterId());
|
||||||
|
List<Long> requestIds = prescriptionDetailInfo.stream().map(PrescriptionInfoDetailDto::getRequestId).toList();
|
||||||
|
recordDto.setMedRequestIds(StringUtils.join(requestIds, ","));
|
||||||
|
recordDto.setPractitioner(SecurityUtils.getLoginUser().getPractitionerId());
|
||||||
|
boolean review = prescriptionReviewRecordService.review(recordDto);
|
||||||
|
if (!review) {
|
||||||
|
return R.fail("审方失败");
|
||||||
|
}
|
||||||
|
return R.ok("审方成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处方审方记录列表
|
||||||
|
*
|
||||||
|
* @param prescriptionNoList 处方号集合
|
||||||
|
* @param reviewStatus 审方状态
|
||||||
|
* @return 处方审方记录列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PrescriptionReviewRecordDto> getPrescriptionReviewRecords(List<String> prescriptionNoList,
|
||||||
|
Integer reviewStatus) {
|
||||||
|
List<PrescriptionReviewRecord> prescriptionReviewRecords =
|
||||||
|
prescriptionReviewRecordService.getPrescriptionReviewRecords(prescriptionNoList, null, null, reviewStatus);
|
||||||
|
return prescriptionReviewRecords.stream().map(e -> {
|
||||||
|
PrescriptionReviewRecordDto prescriptionReviewRecordDto = new PrescriptionReviewRecordDto();
|
||||||
|
prescriptionReviewRecordDto.setPractitioner(e.getPractitionerId());
|
||||||
|
BeanUtils.copyProperties(e, prescriptionReviewRecordDto);
|
||||||
|
return prescriptionReviewRecordDto;
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处方审方记录分页列表
|
||||||
|
*
|
||||||
|
* @param doctorId 医生id
|
||||||
|
* @param reviewStatus 审方状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param request 请求
|
||||||
|
* @return 处方审方记录分页列表
|
||||||
|
*/
|
||||||
|
public List<PrescriptionInfoBaseDto> getPrescriptionReviewInfo(Long doctorId, Integer reviewStatus,
|
||||||
|
String patientName, HttpServletRequest request) {
|
||||||
|
QueryWrapper<PrescriptionInfoBaseDto> queryWrapper =
|
||||||
|
HisQueryUtils.buildQueryWrapper(new PrescriptionInfoBaseDto().setPractitionerId(doctorId), patientName,
|
||||||
|
new HashSet<>(List.of("patient_name")), request);
|
||||||
|
List<PrescriptionInfoBaseDto> prescriptionInfos =
|
||||||
|
doctorStationMainAppMapper.getPrescriptionInfos(queryWrapper, EncounterClass.AMB.getValue());
|
||||||
|
// 处方列表为空时直接返回空集合
|
||||||
|
if (prescriptionInfos == null || prescriptionInfos.isEmpty()) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
// 处方号列表
|
||||||
|
List<String> prescriptionNoList =
|
||||||
|
prescriptionInfos.stream().map(PrescriptionInfoBaseDto::getPrescriptionNo).toList();
|
||||||
|
// 本次就诊的处方信息
|
||||||
|
List<PrescriptionInfoDetailDto> prescriptionDetailInfo =
|
||||||
|
doctorStationMainAppMapper.getPrescriptionDetailInfoByPrescriptionNo(prescriptionNoList);
|
||||||
|
for (PrescriptionInfoBaseDto infoBaseDto : prescriptionInfos) {
|
||||||
|
// 性别
|
||||||
|
infoBaseDto.setGenderEnum_enumText(
|
||||||
|
EnumUtils.getInfoByValue(AdministrativeGender.class, infoBaseDto.getGenderEnum()));
|
||||||
|
// 计算年龄
|
||||||
|
infoBaseDto
|
||||||
|
.setAge(infoBaseDto.getBirthDate() != null ? AgeCalculatorUtil.getAge(infoBaseDto.getBirthDate()) : "");
|
||||||
|
// 处方单详情
|
||||||
|
List<PrescriptionInfoDetailDto> prescriptionInfoDetailList = prescriptionDetailInfo.stream()
|
||||||
|
.filter(e -> infoBaseDto.getPrescriptionNo().equals(e.getPrescriptionNo()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
infoBaseDto.setPrescriptionInfoDetailList(prescriptionInfoDetailList);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!prescriptionInfos.isEmpty()) {
|
||||||
|
List<PrescriptionReviewRecordDto> prescriptionReviewRecords =
|
||||||
|
getPrescriptionReviewRecords(prescriptionNoList, reviewStatus);
|
||||||
|
if (reviewStatus != null) {
|
||||||
|
// 处方审方记录
|
||||||
|
if (prescriptionReviewRecords != null && !prescriptionReviewRecords.isEmpty()) {
|
||||||
|
List<String> prescriptionNos =
|
||||||
|
prescriptionReviewRecords.stream().map(PrescriptionReviewRecordDto::getPrescriptionNo).toList();
|
||||||
|
// 根据是否合理筛选
|
||||||
|
prescriptionInfos = prescriptionInfos.stream()
|
||||||
|
.filter(e -> prescriptionNos.contains(e.getPrescriptionNo())).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 根据处方号分组
|
||||||
|
Map<String, List<PrescriptionReviewRecordDto>> prescriptionMap;
|
||||||
|
if (prescriptionReviewRecords != null && !prescriptionReviewRecords.isEmpty()) {
|
||||||
|
prescriptionMap = prescriptionReviewRecords.stream()
|
||||||
|
.collect(Collectors.groupingBy(PrescriptionReviewRecordDto::getPrescriptionNo));
|
||||||
|
} else {
|
||||||
|
prescriptionMap = null;
|
||||||
|
}
|
||||||
|
prescriptionInfos.forEach(record -> {
|
||||||
|
if (prescriptionMap != null && prescriptionMap.containsKey(record.getPrescriptionNo())) {
|
||||||
|
PrescriptionReviewRecordDto prescription = prescriptionMap.get(record.getPrescriptionNo()).get(0);
|
||||||
|
// 审方ID
|
||||||
|
record.setPrescriberReviewId(prescription.getId());
|
||||||
|
// 审方人
|
||||||
|
record.setReviewer(prescription.getPractitioner());
|
||||||
|
// 是否合理
|
||||||
|
record.setIsReasonable(prescription.getReasonableFlag());
|
||||||
|
// 存在问题
|
||||||
|
record.setReasonEnum(prescription.getReasonEnum());
|
||||||
|
record.setReasonEnum_enumText(ReviewReasonEnum.getByValue(prescription.getReasonEnum()));
|
||||||
|
// 其他问题
|
||||||
|
record.setReason(prescription.getReasonText());
|
||||||
|
} else {
|
||||||
|
// 是否合理:设置为待点评
|
||||||
|
record.setIsReasonable(ReviewReasonableStatus.TO_BE_COMMENTED.getValue());
|
||||||
|
// 审方人
|
||||||
|
// record.setReviewer(SecurityUtils.getLoginUser().getPractitionerId());
|
||||||
|
}
|
||||||
|
List<PrescriptionInfoDetailDto> detailList = record.getPrescriptionInfoDetailList();
|
||||||
|
if (detailList != null && !detailList.isEmpty()) {
|
||||||
|
// 基药数量
|
||||||
|
int baseDrugQuantity = detailList.stream().filter(e -> e.getBasicFlag() == 1).toList().size();
|
||||||
|
// 抗菌药数量
|
||||||
|
int antibioticQuantity =
|
||||||
|
detailList.stream().filter(e -> e.getAntibioticFlag() == 1).toList().size();
|
||||||
|
// 注射剂数量
|
||||||
|
int injectionQuantity = detailList.stream().filter(e -> e.getInjectFlag() == 1).toList().size();
|
||||||
|
// 是否包含抗菌药
|
||||||
|
boolean antibioticFlag = antibioticQuantity > 0;
|
||||||
|
// 是否包含注射剂
|
||||||
|
boolean injectFlag = injectionQuantity > 0;
|
||||||
|
// 药品品种数量
|
||||||
|
int drugVarietyQuantity = detailList.stream()
|
||||||
|
.collect(Collectors.groupingBy(PrescriptionInfoDetailDto::getAdviceName)).size();
|
||||||
|
// 处方总金额
|
||||||
|
BigDecimal totalAmount = detailList.stream().map(PrescriptionInfoDetailDto::getTotalPrice)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
// 是否包含注射药品
|
||||||
|
record.setIsIncludeInjections(injectFlag);
|
||||||
|
// 是否包含抗生素
|
||||||
|
record.setIsContainAntibiotics(antibioticFlag);
|
||||||
|
// 基药数量
|
||||||
|
record.setBaseDrugQuantity(baseDrugQuantity);
|
||||||
|
// 抗菌药数量
|
||||||
|
record.setAntibioticQuantity(antibioticQuantity);
|
||||||
|
// 注射剂数量
|
||||||
|
record.setInjectionQuantity(injectionQuantity);
|
||||||
|
// 药品品种数量
|
||||||
|
record.setDrugVarietyQuantity(drugVarietyQuantity);
|
||||||
|
// 处方总金额
|
||||||
|
record.setTotalAmount(totalAmount);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return prescriptionInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方审核信息(分页)
|
||||||
|
*
|
||||||
|
* @param doctorId 医生id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @param request 请求
|
||||||
|
* @return 处方审核信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getPrescriptionReviewPageInfo(Long doctorId, Integer reviewStatus, String patientName, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request) {
|
||||||
|
List<PrescriptionInfoBaseDto> prescriptionInfos =
|
||||||
|
getPrescriptionReviewInfo(doctorId, reviewStatus, patientName, request);
|
||||||
|
prescriptionInfos.sort(Comparator.comparing(PrescriptionInfoBaseDto::getRequestTime).reversed());
|
||||||
|
return R.ok(PageUtils.buildPage(prescriptionInfos, pageNo, pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出处方审核信息
|
||||||
|
*
|
||||||
|
* @param doctorId 医生id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void makeFile(Long doctorId, Integer reviewStatus, String patientName, HttpServletRequest request,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
List<PrescriptionInfoBaseDto> prescriptionInfos =
|
||||||
|
getPrescriptionReviewInfo(doctorId, reviewStatus, patientName, request);
|
||||||
|
if (prescriptionInfos != null && !prescriptionInfos.isEmpty()) {
|
||||||
|
try {
|
||||||
|
NewExcelUtil<PrescriptionInfoBaseDto> excelUtil = new NewExcelUtil<>(PrescriptionInfoBaseDto.class);
|
||||||
|
excelUtil.exportExcel(response, prescriptionInfos, "处方审核信息");
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.pharmacymanage.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.pharmacymanage.appservice.IInHospitalReturnMedicineAppService;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.EncounterInfoDto;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.ReturnMedicineDto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:概括描述当前类的主要用途和注意事项
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pharmacy-manage/inHospital-return-medicine")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class InHospitalReturnMedicineController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
public IInHospitalReturnMedicineAppService inHospitalReturnMedicineAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取页面初始化信息
|
||||||
|
*
|
||||||
|
* @return 初始化信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> returnMedicineInit() {
|
||||||
|
return inHospitalReturnMedicineAppService.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药患者分页列表
|
||||||
|
*
|
||||||
|
* @param encounterInfoDto 查询条件
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @param request 请求数据
|
||||||
|
* @return 退药患者分页列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/return-patient-page")
|
||||||
|
public R<?> getReturnMedicinePatientPage(EncounterInfoDto encounterInfoDto,
|
||||||
|
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
return inHospitalReturnMedicineAppService.getReturnMedicinePatientPage(encounterInfoDto, searchKey, pageNo,
|
||||||
|
pageSize, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药信息
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊ID
|
||||||
|
* @param refundStatus 退药id
|
||||||
|
* @param itemTable 项目类型
|
||||||
|
* @return 退药信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/medicine-return-list")
|
||||||
|
public R<?> getReturnMedicineInfo(@RequestParam Long encounterId, @RequestParam Integer refundStatus,
|
||||||
|
String itemTable) {
|
||||||
|
return inHospitalReturnMedicineAppService.getReturnMedicineInfo(encounterId, refundStatus, itemTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退药处理
|
||||||
|
*
|
||||||
|
* @param medicineReturnList 退药清单
|
||||||
|
* @return 处理结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/medicine-return")
|
||||||
|
public R<?> medicineReturn(@RequestBody List<ReturnMedicineDto> medicineReturnList) {
|
||||||
|
return inHospitalReturnMedicineAppService.medicineReturn(medicineReturnList);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.openhis.web.pharmacymanage.controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方审方Controller
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/30
|
||||||
|
*/
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.administration.dto.PrescriptionReviewRecordDto;
|
||||||
|
import com.openhis.web.pharmacymanage.appservice.IPrescriptionReviewAppService;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方审方Controller
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pharmacy-manage/prescription-review")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class PrescriptionReviewController {
|
||||||
|
@Autowired
|
||||||
|
private IPrescriptionReviewAppService prescriptionReviewAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审方
|
||||||
|
*
|
||||||
|
* @param recordDto 审方记录dto
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@PostMapping("/review")
|
||||||
|
public R<?> review(@RequestBody PrescriptionReviewRecordDto recordDto) {
|
||||||
|
return prescriptionReviewAppService.review(recordDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询处方审核信息
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @param request 请求
|
||||||
|
* @return 处方审核信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/info")
|
||||||
|
public R<?> getPrescriptionReviewInfo(@RequestParam(required = false) Long practitionerId,
|
||||||
|
@RequestParam(required = false) Integer reviewStatus, @RequestParam(required = false) String patientName,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
return prescriptionReviewAppService.getPrescriptionReviewPageInfo(practitionerId, reviewStatus, patientName,
|
||||||
|
pageNo, pageSize, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方点评导出
|
||||||
|
*
|
||||||
|
* @param practitionerId 参与者id
|
||||||
|
* @param reviewStatus 审核状态
|
||||||
|
* @param patientName 患者姓名
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/export")
|
||||||
|
public void makeFile(@RequestParam(required = false) Long practitionerId,
|
||||||
|
@RequestParam(required = false) Integer reviewStatus, @RequestParam(required = false) String patientName,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
prescriptionReviewAppService.makeFile(practitionerId, reviewStatus, patientName, request, response);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.pharmacymanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 农大门诊配/发药 参数类
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class JlauDispenseParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配/发药信息
|
||||||
|
*/
|
||||||
|
private List<DispenseItemDto> dispenseMedicineList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UI选择的发药时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date dispenseTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.pharmacymanage.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.EncounterInfoDto;
|
||||||
|
import com.openhis.web.pharmacymanage.dto.ReturnMedicineInfoDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:概括描述当前类的主要用途和注意事项
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface InHospitalReturnMedicineAppMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退药患者分页列表
|
||||||
|
*
|
||||||
|
* @param page 分页
|
||||||
|
* @param queryWrapper 查询条件
|
||||||
|
* @param refundStatus 退药状态
|
||||||
|
* @param pendingRefund 退药状态:待退药
|
||||||
|
* @param refunded 退药状态:已退药
|
||||||
|
* @param imp 患者类型:住院
|
||||||
|
* @param medMedicationDefinition 药品表
|
||||||
|
* @param admDeviceDefinition 耗材表
|
||||||
|
* @return 退药患者分页列表
|
||||||
|
*/
|
||||||
|
Page<EncounterInfoDto> selectEncounterInfoListPage(@Param("page") Page<EncounterInfoDto> page,
|
||||||
|
@Param(Constants.WRAPPER) QueryWrapper<EncounterInfoDto> queryWrapper,
|
||||||
|
@Param("refundStatus") Integer refundStatus, @Param("pendingRefund") Integer pendingRefund,
|
||||||
|
@Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
||||||
|
@Param("medMedicationDefinition") String medMedicationDefinition,
|
||||||
|
@Param("admDeviceDefinition") String admDeviceDefinition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请退药清单查询
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊ID
|
||||||
|
* @param medMedicationRequest 药品请求表
|
||||||
|
* @param worDeviceRequest 耗材请求表
|
||||||
|
* @param medMedicationDefinition 药品表
|
||||||
|
* @param admDeviceDefinition 耗材表
|
||||||
|
* @param itemTable 项目所在表
|
||||||
|
* @param refundStatus 退药状态
|
||||||
|
* @param pendingRefund 退药状态:待退药
|
||||||
|
* @param refunded 退药状态:已退药
|
||||||
|
* @return 申请退药清单
|
||||||
|
*/
|
||||||
|
List<ReturnMedicineInfoDto> selectReturnMedicineInfo(@Param("encounterId") Long encounterId,
|
||||||
|
@Param("worDeviceRequest") String worDeviceRequest, @Param("medMedicationRequest") String medMedicationRequest,
|
||||||
|
@Param("medMedicationDefinition") String medMedicationDefinition,
|
||||||
|
@Param("admDeviceDefinition") String admDeviceDefinition, @Param("itemTable") String itemTable,
|
||||||
|
@Param("refundStatus") Integer refundStatus, @Param("pendingRefund") Integer pendingRefund,
|
||||||
|
@Param("refunded") Integer refunded);
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.appservice;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊医嘱统计 appService
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
public interface IAmbAdviceStatisticsAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊药品医嘱统计
|
||||||
|
*/
|
||||||
|
R<?> getMedStatistics(String startTime, String endTime, String contractNo, String patientName, Long openOrgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
void exportMedExcel(String startTime, String endTime, String contractNo, String patientName, Long openOrgId,
|
||||||
|
HttpServletRequest request, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊诊疗医嘱统计
|
||||||
|
*/
|
||||||
|
R<?> getActStatistics(String startTime, String endTime, String contractNo, String patientName, Long openOrgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
void exportActExcel(String startTime, String endTime, String contractNo, String patientName, Long openOrgId,
|
||||||
|
HttpServletRequest request, HttpServletResponse response);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.openhis.web.reportmanage.appservice;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.reportmanage.dto.OutpatientManageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录相关报表 appservice
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/2/27
|
||||||
|
*/
|
||||||
|
public interface IOutpatientManageReportAppService {
|
||||||
|
/**
|
||||||
|
* 门诊就诊记录初始化
|
||||||
|
*
|
||||||
|
* @return 门诊就诊记录数据
|
||||||
|
*/
|
||||||
|
R<?> init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门诊就诊记录分页数据
|
||||||
|
*
|
||||||
|
* @param outpatientManageParam 查询参数
|
||||||
|
* @param searchKey 模糊查询条件
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页数量
|
||||||
|
* @param request 请求
|
||||||
|
* @return 门诊就诊记录分页数据
|
||||||
|
*/
|
||||||
|
R<?> getOutpatientRecordPage(OutpatientManageParam outpatientManageParam, String searchKey, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request);
|
||||||
|
|
||||||
|
void ExportExcel(OutpatientManageParam outpatientManageParam, String searchKey, HttpServletRequest request, HttpServletResponse response);
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.appservice;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 appService
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
public interface IPharmacySettlementReportAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @return 药房结算列表
|
||||||
|
*/
|
||||||
|
R<?> getListInfo(String startTime, String endTime, String searchKey, Long locationId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
void exportExcel(String startTime, String endTime, String searchKey, Long locationId, HttpServletRequest request,
|
||||||
|
HttpServletResponse response);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
|
import com.openhis.common.enums.EncounterClass;
|
||||||
|
import com.openhis.common.enums.RequestStatus;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IAmbAdviceStatisticsAppService;
|
||||||
|
import com.openhis.web.reportmanage.dto.AmbActAdviceStatisticsDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.AmbMedAdviceStatisticsDto;
|
||||||
|
import com.openhis.web.reportmanage.mapper.AmbAdviceStatisticsAppMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊医嘱统计 impl
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AmbAdviceStatisticsAppServiceImpl implements IAmbAdviceStatisticsAppService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AmbAdviceStatisticsAppMapper ambAdviceStatisticsAppMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊药品医嘱统计
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getMedStatistics(String startTime, String endTime, String contractNo, String patientName,
|
||||||
|
Long openOrgId) {
|
||||||
|
List<AmbMedAdviceStatisticsDto> medStatistics =
|
||||||
|
ambAdviceStatisticsAppMapper.getMedStatistics(startTime, endTime, contractNo, patientName, openOrgId,
|
||||||
|
RequestStatus.COMPLETED.getValue(), EncounterClass.AMB.getValue());
|
||||||
|
return R.ok(medStatistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void exportMedExcel(String startTime, String endTime, String contractNo, String patientName, Long openOrgId,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
Object data = this.getMedStatistics(startTime, endTime, contractNo, patientName, openOrgId).getData();
|
||||||
|
List<AmbMedAdviceStatisticsDto> dataList = (List<AmbMedAdviceStatisticsDto>)data;
|
||||||
|
if (dataList != null && !dataList.isEmpty()) {
|
||||||
|
// 导出
|
||||||
|
ExcelUtil<AmbMedAdviceStatisticsDto> util = new ExcelUtil<>(AmbMedAdviceStatisticsDto.class);
|
||||||
|
util.exportExcel(response, dataList, "门诊药品医嘱统计");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊诊疗医嘱统计
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getActStatistics(String startTime, String endTime, String contractNo, String patientName,
|
||||||
|
Long openOrgId) {
|
||||||
|
List<AmbActAdviceStatisticsDto> actStatistics =
|
||||||
|
ambAdviceStatisticsAppMapper.getActStatistics(startTime, endTime, contractNo, patientName, openOrgId,
|
||||||
|
RequestStatus.COMPLETED.getValue(), EncounterClass.AMB.getValue());
|
||||||
|
return R.ok(actStatistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void exportActExcel(String startTime, String endTime, String contractNo, String patientName, Long openOrgId,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
Object data = this.getActStatistics(startTime, endTime, contractNo, patientName, openOrgId).getData();
|
||||||
|
List<AmbActAdviceStatisticsDto> dataList = (List<AmbActAdviceStatisticsDto>)data;
|
||||||
|
if (dataList != null && !dataList.isEmpty()) {
|
||||||
|
// 导出
|
||||||
|
ExcelUtil<AmbActAdviceStatisticsDto> util = new ExcelUtil<>(AmbActAdviceStatisticsDto.class);
|
||||||
|
util.exportExcel(response, dataList, "门诊诊疗医嘱统计");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
package com.openhis.web.reportmanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.core.common.exception.NonCaptureException;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.NewExcelUtil;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.*;
|
||||||
|
import com.openhis.web.document.util.EnumUtil;
|
||||||
|
import com.openhis.web.inventorymanage.dto.ProductDetailPageDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.InboundReportPageDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.InboundReportSearchParam;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.administration.dto.OutpatientManageDto;
|
||||||
|
import com.openhis.administration.service.IEncounterService;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.common.utils.PageUtils;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IOutpatientManageReportAppService;
|
||||||
|
import com.openhis.web.reportmanage.dto.OutpatientManageParam;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录相关报表 应用实现类
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/2/27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OutpatientManageReportAppServiceImpl implements IOutpatientManageReportAppService {
|
||||||
|
@Autowired
|
||||||
|
IEncounterService encounterService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊就诊记录初始化
|
||||||
|
*
|
||||||
|
* @return 门诊就诊记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> init() {
|
||||||
|
List<OutpatientManageDto> medicalRecord =
|
||||||
|
encounterService.getMedicalRecord(HisQueryUtils.buildQueryWrapper(null, null, null, null));
|
||||||
|
Page<OutpatientManageDto> page = PageUtils.buildPage(medicalRecord, 1, 10);
|
||||||
|
return R.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊就诊记录
|
||||||
|
*
|
||||||
|
* @param outpatientManageParam 查询参数
|
||||||
|
* @param searchKey 模糊查询条件
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页数量
|
||||||
|
* @param request 请求
|
||||||
|
* @return 门诊就诊记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getOutpatientRecordPage(OutpatientManageParam outpatientManageParam, String searchKey, Integer pageNo,
|
||||||
|
Integer pageSize, HttpServletRequest request) {
|
||||||
|
QueryWrapper<OutpatientManageDto> wrapper = HisQueryUtils.buildQueryWrapper(outpatientManageParam, searchKey,
|
||||||
|
new HashSet<>(Arrays.asList("encounterStatus","id_card", "patient_bus_no", "encounter_bus_no", "name")), request);
|
||||||
|
// 查询挂号记录
|
||||||
|
List<OutpatientManageDto> medicalRecords = encounterService.getMedicalRecord(wrapper);
|
||||||
|
Page<OutpatientManageDto> page = PageUtils.buildPage(medicalRecords, pageNo, pageSize);
|
||||||
|
return R.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊记录导出
|
||||||
|
*
|
||||||
|
* @param outpatientManageParam 查询条件
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param request 请求数据
|
||||||
|
* @param response 响应数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void ExportExcel(OutpatientManageParam outpatientManageParam, String searchKey, HttpServletRequest request,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<OutpatientManageDto> wrapper = HisQueryUtils.buildQueryWrapper(outpatientManageParam, searchKey,
|
||||||
|
new HashSet<>(Arrays.asList("encounterStatus","id_card", "patient_bus_no", "encounter_bus_no", "name")), request);
|
||||||
|
|
||||||
|
// 查询门诊记录数据
|
||||||
|
List<OutpatientManageDto> medicalRecords = encounterService.getMedicalRecord(wrapper);
|
||||||
|
List<OutpatientManageDto> receiptDetailList = medicalRecords;
|
||||||
|
|
||||||
|
// 记录为空的情况下,直接通过响应返回提示
|
||||||
|
if (receiptDetailList.isEmpty()) {
|
||||||
|
try {
|
||||||
|
// 设置响应为JSON格式,返回无数据提示
|
||||||
|
response.setContentType("application/json;charset=utf-8");
|
||||||
|
response.getWriter().write("{\"code\":500,\"msg\":\"导出Excel失败,无数据。\",\"data\":null}");
|
||||||
|
return;
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 执行Excel导出(ExcelUtil需正确设置响应头为Excel格式)
|
||||||
|
String excelName = CommonConstants.SheetName.OUTPATIENT_MEDICAL_RECORD;
|
||||||
|
ExcelUtil<OutpatientManageDto> util = new ExcelUtil<>(OutpatientManageDto.class);
|
||||||
|
util.exportExcel(response, receiptDetailList, excelName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
try {
|
||||||
|
// 异常时返回JSON格式的错误提示
|
||||||
|
response.setContentType("application/json;charset=utf-8");
|
||||||
|
response.getWriter().write("{\"code\":500,\"msg\":\"导出Excel失败:" + e.getMessage() + "\",\"data\":null}");
|
||||||
|
} catch (IOException ioException) {
|
||||||
|
throw new NonCaptureException(StringUtils.format("导出excel失败"), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,473 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.appservice.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
import com.openhis.common.enums.ConditionCode;
|
||||||
|
import com.openhis.common.enums.DispenseStatus;
|
||||||
|
import com.openhis.common.enums.SupplyType;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IPharmacySettlementReportAppService;
|
||||||
|
import com.openhis.web.reportmanage.dto.PharmacySettlementMedDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.PharmacySettlementReportDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.UnitTransformationDto;
|
||||||
|
import com.openhis.web.reportmanage.mapper.PharmacySettlementReportAppMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 impl
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PharmacySettlementReportAppServiceImpl implements IPharmacySettlementReportAppService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PharmacySettlementReportAppMapper pharmacySettlementReportAppMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @return 药房结算列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> getListInfo(String startTime, String endTime, String searchKey, Long locationId) {
|
||||||
|
// 药品列表
|
||||||
|
List<PharmacySettlementReportDto> listInfo = pharmacySettlementReportAppMapper.getListInfo(searchKey);
|
||||||
|
// 发药信息 (已按药品定义id分组)
|
||||||
|
List<PharmacySettlementMedDto> dispenseInfo = pharmacySettlementReportAppMapper.getDispenseInfo(startTime,
|
||||||
|
endTime, locationId, DispenseStatus.COMPLETED.getValue(), DispenseStatus.REFUNDED.getValue());
|
||||||
|
// 创建映射(发药)
|
||||||
|
Map<Long,
|
||||||
|
PharmacySettlementMedDto> dispenseMap = dispenseInfo.stream()
|
||||||
|
.collect(Collectors.toMap(PharmacySettlementMedDto::getMedicationId, dto -> dto,
|
||||||
|
// 处理重复key的情况 - 可以选择第一个或最后一个,这里选择第一个
|
||||||
|
(existing, replacement) -> existing));
|
||||||
|
// 药房供应信息
|
||||||
|
List<PharmacySettlementMedDto> supplyRequestInfo = pharmacySettlementReportAppMapper.getSupplyRequestInfo(
|
||||||
|
startTime, endTime, locationId, DispenseStatus.COMPLETED.getValue(),
|
||||||
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, SupplyType.PRODUCT_BATCH_STOCKTAKING.getValue(),
|
||||||
|
SupplyType.PRODUCT_STOCKTAKING.getValue(), SupplyType.PRODUCT_TRANSFER.getValue(),
|
||||||
|
SupplyType.PRODUCT_BATCH_TRANSFER.getValue(), SupplyType.LOSS_REPORT_FORM.getValue(),
|
||||||
|
SupplyType.ISSUE_INVENTORY.getValue(), SupplyType.RETURN_ISSUE.getValue());
|
||||||
|
// 供应信息按药品id分组
|
||||||
|
Map<Long, List<PharmacySettlementMedDto>> medSupplyRequestMap =
|
||||||
|
supplyRequestInfo.stream().collect(Collectors.groupingBy(PharmacySettlementMedDto::getMedicationId));
|
||||||
|
// 药品库存信息
|
||||||
|
List<PharmacySettlementMedDto> inventoryInfo = pharmacySettlementReportAppMapper.getInventoryInfo(locationId,
|
||||||
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, ConditionCode.LOT_NUMBER_COST.getCode());
|
||||||
|
// 库存信息按药品id分组
|
||||||
|
Map<Long, List<PharmacySettlementMedDto>> medInventoryMap =
|
||||||
|
inventoryInfo.stream().collect(Collectors.groupingBy(PharmacySettlementMedDto::getMedicationId));
|
||||||
|
|
||||||
|
for (PharmacySettlementReportDto li : listInfo) {
|
||||||
|
// 发药信息赋值
|
||||||
|
PharmacySettlementMedDto dispenseDto = dispenseMap.get(li.getItemId());
|
||||||
|
if (dispenseDto != null) {
|
||||||
|
this.handleDispense(li, dispenseDto);
|
||||||
|
}
|
||||||
|
// 供应信息赋值
|
||||||
|
List<PharmacySettlementMedDto> medSupplyRequestList = medSupplyRequestMap.get(li.getItemId());
|
||||||
|
if (medSupplyRequestList != null && !medSupplyRequestList.isEmpty()) {
|
||||||
|
// 调拨入
|
||||||
|
List<PharmacySettlementMedDto> transferInList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> locationId.equals(e.getPurposeLocationId())
|
||||||
|
&& (SupplyType.PRODUCT_TRANSFER.getValue().equals(e.getTypeEnum())
|
||||||
|
|| SupplyType.PRODUCT_BATCH_TRANSFER.getValue().equals(e.getTypeEnum())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!transferInList.isEmpty()) {
|
||||||
|
this.handleTransferIn(li, transferInList);
|
||||||
|
}
|
||||||
|
// 调拨出
|
||||||
|
List<PharmacySettlementMedDto> transferOutList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> locationId.equals(e.getSourceLocationId())
|
||||||
|
&& (SupplyType.PRODUCT_TRANSFER.getValue().equals(e.getTypeEnum())
|
||||||
|
|| SupplyType.PRODUCT_BATCH_TRANSFER.getValue().equals(e.getTypeEnum())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!transferOutList.isEmpty()) {
|
||||||
|
this.handleTransferOut(li, transferOutList);
|
||||||
|
}
|
||||||
|
// 盘点
|
||||||
|
List<PharmacySettlementMedDto> stockTakeList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> SupplyType.PRODUCT_BATCH_STOCKTAKING.getValue().equals(e.getTypeEnum())
|
||||||
|
|| SupplyType.PRODUCT_STOCKTAKING.getValue().equals(e.getTypeEnum()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!stockTakeList.isEmpty()) {
|
||||||
|
this.handleStockTake(li, stockTakeList);
|
||||||
|
}
|
||||||
|
// 报损
|
||||||
|
List<PharmacySettlementMedDto> lossList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> SupplyType.LOSS_REPORT_FORM.getValue().equals(e.getTypeEnum()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!lossList.isEmpty()) {
|
||||||
|
this.handleLoss(li, lossList);
|
||||||
|
}
|
||||||
|
// 领用
|
||||||
|
List<PharmacySettlementMedDto> issueList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> SupplyType.ISSUE_INVENTORY.getValue().equals(e.getTypeEnum()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!issueList.isEmpty()) {
|
||||||
|
this.handleIssue(li, issueList);
|
||||||
|
}
|
||||||
|
// 领用退
|
||||||
|
List<PharmacySettlementMedDto> returnIssueList = medSupplyRequestList.stream()
|
||||||
|
.filter(e -> SupplyType.RETURN_ISSUE.getValue().equals(e.getTypeEnum()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!returnIssueList.isEmpty()) {
|
||||||
|
this.handleReturnIssue(li, returnIssueList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 库存信息赋值
|
||||||
|
List<PharmacySettlementMedDto> medInventoryList = medInventoryMap.get(li.getItemId());
|
||||||
|
if (medInventoryList != null && !medInventoryList.isEmpty()) {
|
||||||
|
this.handleInventory(li, medInventoryList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok(listInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void exportExcel(String startTime, String endTime, String searchKey, Long locationId,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
// 查询药房结算列表
|
||||||
|
Object data = this.getListInfo(startTime, endTime, searchKey, locationId).getData();
|
||||||
|
List<PharmacySettlementReportDto> dataList = (List<PharmacySettlementReportDto>)data;
|
||||||
|
if (dataList != null && !dataList.isEmpty()) {
|
||||||
|
// 导出
|
||||||
|
ExcelUtil<PharmacySettlementReportDto> util = new ExcelUtil<>(PharmacySettlementReportDto.class);
|
||||||
|
util.exportExcel(response, dataList, "药房结算列表");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理库存信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param medInventoryList 库存信息
|
||||||
|
*/
|
||||||
|
private void handleInventory(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> medInventoryList) {
|
||||||
|
// 库存数量(小单位)
|
||||||
|
BigDecimal inventoryQuantity = medInventoryList.stream().map(PharmacySettlementMedDto::getInventoryQuantity)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 库存数量(小单位)
|
||||||
|
pharmacySettlementReportDto.setInventoryQuantity(inventoryQuantity);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getInventoryQuantity());
|
||||||
|
// 库存数量(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setInventoryStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
// 库存金额
|
||||||
|
BigDecimal inventoryPrice = BigDecimal.ZERO;
|
||||||
|
for (PharmacySettlementMedDto psmd : medInventoryList) {
|
||||||
|
// 库存数量
|
||||||
|
BigDecimal quantity = psmd.getInventoryQuantity();
|
||||||
|
// 批次号
|
||||||
|
String lotNumber = psmd.getLotNumber();
|
||||||
|
// 药品进价(包装单位)
|
||||||
|
BigDecimal amount = psmd.getAmount();
|
||||||
|
// 药品进价(小单位)
|
||||||
|
BigDecimal minAmount = amount.divide(pharmacySettlementReportDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto utf = this.handleUnitTransformation(pharmacySettlementReportDto.getPartPercent(),
|
||||||
|
pharmacySettlementReportDto.getUnitCode(), pharmacySettlementReportDto.getUnitCodeText(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCode(), pharmacySettlementReportDto.getMinUnitCodeText(),
|
||||||
|
quantity);
|
||||||
|
// 商 | 整数部分,包装单位
|
||||||
|
BigDecimal quotientQuantity = utf.getQuotientQuantity();
|
||||||
|
// 余数 | 余数部分,小单位
|
||||||
|
BigDecimal remainderQuantity = utf.getRemainderQuantity();
|
||||||
|
// 计算本次循环的金额: amount * quotientQuantity + minAmount * remainderQuantity
|
||||||
|
BigDecimal currentAmount = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
// 处理商的部分
|
||||||
|
if (quotientQuantity != null && quotientQuantity.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
currentAmount = currentAmount.add(amount.multiply(quotientQuantity));
|
||||||
|
}
|
||||||
|
// 处理余数的部分
|
||||||
|
if (remainderQuantity != null && remainderQuantity.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
currentAmount = currentAmount.add(minAmount.multiply(remainderQuantity));
|
||||||
|
}
|
||||||
|
// 累加到总库存金额
|
||||||
|
inventoryPrice = inventoryPrice.add(currentAmount);
|
||||||
|
}
|
||||||
|
// 库存金额
|
||||||
|
pharmacySettlementReportDto.setInventoryPrice(inventoryPrice);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理领用退信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param returnIssueList 领用退信息
|
||||||
|
*/
|
||||||
|
private void handleReturnIssue(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> returnIssueList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minReturnIssueQuantity =
|
||||||
|
returnIssueList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity).filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal returnIssuePrice = returnIssueList.stream().map(PharmacySettlementMedDto::getTotalPrice)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 领用退数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinReturnIssueQuantity(minReturnIssueQuantity);
|
||||||
|
// 领用退金额
|
||||||
|
pharmacySettlementReportDto.setReturnIssuePrice(returnIssuePrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinReturnIssueQuantity());
|
||||||
|
// 领用退数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setReturnIssueStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理领用信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param issueList 领用信息
|
||||||
|
*/
|
||||||
|
private void handleIssue(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> issueList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minIssueQuantity = issueList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal issuePrice = issueList.stream().map(PharmacySettlementMedDto::getTotalPrice).filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 领用数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinIssueQuantity(minIssueQuantity);
|
||||||
|
// 领用金额
|
||||||
|
pharmacySettlementReportDto.setIssuePrice(issuePrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinIssueQuantity());
|
||||||
|
// 领用数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setIssueStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理报损信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param lossList 报损信息
|
||||||
|
*/
|
||||||
|
private void handleLoss(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> lossList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minLossQuantity = lossList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal lossPrice = lossList.stream().map(PharmacySettlementMedDto::getTotalPrice).filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 报损数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinLossQuantity(minLossQuantity);
|
||||||
|
// 报损金额
|
||||||
|
pharmacySettlementReportDto.setLossPrice(lossPrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinLossQuantity());
|
||||||
|
// 报损数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setLossStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理盘点信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param stockTakeList 盘点信息
|
||||||
|
*/
|
||||||
|
private void handleStockTake(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> stockTakeList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minStockTakeQuantity = stockTakeList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal stockTakePrice = stockTakeList.stream().map(PharmacySettlementMedDto::getProfitLossPrice)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 盘点数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinStockTakeQuantity(minStockTakeQuantity);
|
||||||
|
// 盘点盈亏金额
|
||||||
|
pharmacySettlementReportDto.setStockTakePrice(stockTakePrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinStockTakeQuantity());
|
||||||
|
// 盘点数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setStockTakeStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理调拨出信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param transferOutList 调拨出信息
|
||||||
|
*/
|
||||||
|
private void handleTransferOut(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> transferOutList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minTransferOutQuantity =
|
||||||
|
transferOutList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity).filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal transferOutPrice = transferOutList.stream().map(PharmacySettlementMedDto::getTotalPrice)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 调拨出数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinTransferOutQuantity(minTransferOutQuantity);
|
||||||
|
// 调拨出金额
|
||||||
|
pharmacySettlementReportDto.setTransferOutPrice(transferOutPrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinTransferOutQuantity());
|
||||||
|
// 调拨出数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setTransferOutStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理调拨入信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param transferInList 调拨入信息
|
||||||
|
*/
|
||||||
|
private void handleTransferIn(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
List<PharmacySettlementMedDto> transferInList) {
|
||||||
|
// 小单位数
|
||||||
|
BigDecimal minTransferInQuantity =
|
||||||
|
transferInList.stream().map(PharmacySettlementMedDto::getSupplyRequestQuantity).filter(Objects::nonNull)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 总金额
|
||||||
|
BigDecimal transferInPrice = transferInList.stream().map(PharmacySettlementMedDto::getTotalPrice)
|
||||||
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// 调拨入数(小单位)
|
||||||
|
pharmacySettlementReportDto.setMinTransferInQuantity(minTransferInQuantity);
|
||||||
|
// 调拨入金额
|
||||||
|
pharmacySettlementReportDto.setTransferInPrice(transferInPrice);
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinTransferInQuantity());
|
||||||
|
// 调拨入数(整体单位,即XXX盒XXX粒)
|
||||||
|
pharmacySettlementReportDto.setTransferInStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理发药信息
|
||||||
|
*
|
||||||
|
* @param pharmacySettlementReportDto 药品基础信息
|
||||||
|
* @param pharmacySettlementMedDto 药品发药信息
|
||||||
|
*/
|
||||||
|
private void handleDispense(PharmacySettlementReportDto pharmacySettlementReportDto,
|
||||||
|
PharmacySettlementMedDto pharmacySettlementMedDto) {
|
||||||
|
pharmacySettlementReportDto.setMinDispenseQuantity(pharmacySettlementMedDto.getActualQuantity()); // 实际发药数(小单位)
|
||||||
|
pharmacySettlementReportDto.setDispensePrice(pharmacySettlementMedDto.getDispensePrice()); // 发放金额
|
||||||
|
// 小单位转换包装单位
|
||||||
|
UnitTransformationDto unitTransformationDto = this.handleUnitTransformation(
|
||||||
|
pharmacySettlementReportDto.getPartPercent(), pharmacySettlementReportDto.getUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getUnitCodeText(), pharmacySettlementReportDto.getMinUnitCode(),
|
||||||
|
pharmacySettlementReportDto.getMinUnitCodeText(), pharmacySettlementReportDto.getMinDispenseQuantity());
|
||||||
|
pharmacySettlementReportDto.setDispenseStrQuantity(
|
||||||
|
unitTransformationDto.getStrQuantity() != null ? unitTransformationDto.getStrQuantity() : ""); // 发药数(整体单位,即XXX盒XXX粒)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小单位转换包装单位
|
||||||
|
*
|
||||||
|
* @param partPercent 拆零比
|
||||||
|
* @param unitCode 包装单位编码
|
||||||
|
* @param unitCodeText 包装单位
|
||||||
|
* @param minUnitCode 小单位编码
|
||||||
|
* @param minUnitCodeText 小单位
|
||||||
|
* @param minUnitQuantity 小单位数量
|
||||||
|
* @return 小单位转换包装单位
|
||||||
|
*/
|
||||||
|
private UnitTransformationDto handleUnitTransformation(BigDecimal partPercent, String unitCode, String unitCodeText,
|
||||||
|
String minUnitCode, String minUnitCodeText, BigDecimal minUnitQuantity) {
|
||||||
|
|
||||||
|
UnitTransformationDto unitTransformationDto = new UnitTransformationDto();
|
||||||
|
unitTransformationDto.setPartPercent(partPercent); // 拆零比
|
||||||
|
|
||||||
|
// 处理负数情况:取绝对值
|
||||||
|
if (minUnitQuantity != null && minUnitQuantity.compareTo(BigDecimal.ZERO) < 0) {
|
||||||
|
minUnitQuantity = minUnitQuantity.abs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只有当小单位数量非空且大于0时才进行计算
|
||||||
|
if (minUnitQuantity != null && minUnitQuantity.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
// 计算商(包装单位数量)和余数(小单位数量)
|
||||||
|
BigDecimal[] divideResult = minUnitQuantity.divideAndRemainder(partPercent);
|
||||||
|
BigDecimal quotient = divideResult[0]; // 商
|
||||||
|
BigDecimal remainder = divideResult[1]; // 余数
|
||||||
|
|
||||||
|
unitTransformationDto.setMinUnitQuantity(minUnitQuantity); // 小单位数量
|
||||||
|
unitTransformationDto.setQuotientQuantity(quotient); // 商
|
||||||
|
unitTransformationDto.setRemainderQuantity(remainder); // 余数
|
||||||
|
|
||||||
|
// 构建拼接字符串
|
||||||
|
StringBuilder strQuantityBuilder = new StringBuilder();
|
||||||
|
if (quotient.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
strQuantityBuilder.append(quotient.stripTrailingZeros().toPlainString()).append(unitCodeText);
|
||||||
|
}
|
||||||
|
if (remainder.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
strQuantityBuilder.append(remainder.stripTrailingZeros().toPlainString()).append(minUnitCodeText);
|
||||||
|
}
|
||||||
|
// 如果商为0,只显示余数
|
||||||
|
unitTransformationDto.setStrQuantity(strQuantityBuilder.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return unitTransformationDto;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.controller;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IAmbAdviceStatisticsAppService;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊医嘱统计 controller
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/report-manage/amb-advice")
|
||||||
|
@Slf4j
|
||||||
|
public class AmbAdviceStatisticsAppController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAmbAdviceStatisticsAppService ambAdviceStatisticsAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊药品医嘱统计
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/med-statistics")
|
||||||
|
public R<?> getMedStatistics(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "contractNo", required = false) String contractNo,
|
||||||
|
@RequestParam(name = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(name = "openOrgId", required = false) Long openOrgId) {
|
||||||
|
return ambAdviceStatisticsAppService.getMedStatistics(startTime, endTime, contractNo, patientName, openOrgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/export-med-excel")
|
||||||
|
public void exportMedExcel(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "contractNo", required = false) String contractNo,
|
||||||
|
@RequestParam(name = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(name = "openOrgId", required = false) Long openOrgId, HttpServletRequest request,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
ambAdviceStatisticsAppService.exportMedExcel(startTime, endTime, contractNo, patientName, openOrgId, request,
|
||||||
|
response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @return 门诊诊疗医嘱统计
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/act-statistics")
|
||||||
|
public R<?> getActStatistics(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "contractNo", required = false) String contractNo,
|
||||||
|
@RequestParam(name = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(name = "openOrgId", required = false) Long openOrgId) {
|
||||||
|
return ambAdviceStatisticsAppService.getActStatistics(startTime, endTime, contractNo, patientName, openOrgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出 门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/export-act-excel")
|
||||||
|
public void exportActExcel(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "contractNo", required = false) String contractNo,
|
||||||
|
@RequestParam(name = "patientName", required = false) String patientName,
|
||||||
|
@RequestParam(name = "openOrgId", required = false) Long openOrgId, HttpServletRequest request,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
ambAdviceStatisticsAppService.exportActExcel(startTime, endTime, contractNo, patientName, openOrgId, request,
|
||||||
|
response);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.openhis.web.reportmanage.controller;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.openhis.common.enums.EncounterStatus;
|
||||||
|
import com.openhis.web.document.util.EnumUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IOutpatientManageReportAppService;
|
||||||
|
import com.openhis.web.reportmanage.dto.OutpatientManageParam;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录相关报表 controller
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/2/27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/patient-manage/records")
|
||||||
|
@Slf4j
|
||||||
|
public class OutpatientManageReportController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IOutpatientManageReportAppService outpatientManageReportAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊就诊记录初始化
|
||||||
|
*
|
||||||
|
* @return 门诊就诊记录
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> init() {
|
||||||
|
return outpatientManageReportAppService.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取就诊状态枚举
|
||||||
|
*
|
||||||
|
* @return 就诊状态
|
||||||
|
*/
|
||||||
|
|
||||||
|
@GetMapping("/encounterStatusInit")
|
||||||
|
public R<?> encounterStatusInit() {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
// 获取就诊状态枚举列表
|
||||||
|
map.put("encounterStatus", EnumUtil.toMapList(EncounterStatus.class));
|
||||||
|
return R.ok(map);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查询门诊就诊记录
|
||||||
|
*
|
||||||
|
* @param outpatientManageParam 查询参数
|
||||||
|
* @param searchKey 模糊查询条件
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页数量
|
||||||
|
* @param request 请求
|
||||||
|
* @return 门诊就诊记录
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/outpatient-record-page")
|
||||||
|
public R<?> getOutpatientRecordPage(OutpatientManageParam outpatientManageParam,
|
||||||
|
@RequestParam(value = "searchKey", required = false) String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
return outpatientManageReportAppService.getOutpatientRecordPage(outpatientManageParam, searchKey, pageNo,
|
||||||
|
pageSize, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊记录导出
|
||||||
|
*
|
||||||
|
* @param outpatientManageParam 搜索条件
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param request 请求数据
|
||||||
|
* @param response 响应数据
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/export-excel")
|
||||||
|
public void ExportExcel(OutpatientManageParam outpatientManageParam,
|
||||||
|
@RequestParam(value = "searchKey", required = false) String searchKey,
|
||||||
|
HttpServletRequest request, HttpServletResponse response){
|
||||||
|
outpatientManageReportAppService.ExportExcel(outpatientManageParam, searchKey, request, response);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.controller;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.web.reportmanage.appservice.IPharmacySettlementReportAppService;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 controller
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/report-manage/pharmacy-settlement")
|
||||||
|
@Slf4j
|
||||||
|
public class PharmacySettlementReportAppController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPharmacySettlementReportAppService pharmacySettlementReportAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @return 药房结算列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/list-info")
|
||||||
|
public R<?> getListInfo(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "searchKey", required = false) String searchKey,
|
||||||
|
@RequestParam(value = "locationId") Long locationId) {
|
||||||
|
return pharmacySettlementReportAppService.getListInfo(startTime, endTime, searchKey, locationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出药房结算列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param request 请求
|
||||||
|
* @param response 响应
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/export-excel")
|
||||||
|
public void exportExcel(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||||
|
@RequestParam(name = "searchKey", required = false) String searchKey,
|
||||||
|
@RequestParam(value = "locationId") Long locationId, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
pharmacySettlementReportAppService.exportExcel(startTime, endTime, searchKey, locationId, request, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊诊疗医嘱统计 dto
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class AmbActAdviceStatisticsDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医嘱开立时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "医嘱开立时间", sort = 1, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date reqAuthoredTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "患者名称", sort = 2)
|
||||||
|
private String patientName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用性质编码
|
||||||
|
*/
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用性质
|
||||||
|
*/
|
||||||
|
@Excel(name = "费用性质", sort = 3)
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "诊断名称", sort = 4)
|
||||||
|
private String conditionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断医保码
|
||||||
|
*/
|
||||||
|
@Excel(name = "诊断医保码", sort = 5)
|
||||||
|
private String conditionYbNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医嘱名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "医嘱名称", sort = 6)
|
||||||
|
private String adviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@Excel(name = "数量", sort = 7, scale = 0)
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "金额", sort = 8, scale = 2)
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立医生
|
||||||
|
*/
|
||||||
|
@Excel(name = "开立医生", sort = 9)
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立科室id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long openOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立科室
|
||||||
|
*/
|
||||||
|
@Excel(name = "开立科室", sort = 10)
|
||||||
|
private String openOrgName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊药品医嘱统计 dto
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class AmbMedAdviceStatisticsDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方号
|
||||||
|
*/
|
||||||
|
@Excel(name = "处方号", sort = 1)
|
||||||
|
private String prescriptionNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医嘱开立时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "医嘱开立时间", sort = 2, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date reqAuthoredTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "患者名称", sort = 3)
|
||||||
|
private String patientName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用性质编码
|
||||||
|
*/
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用性质
|
||||||
|
*/
|
||||||
|
@Excel(name = "费用性质", sort = 4)
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "诊断名称", sort = 5)
|
||||||
|
private String conditionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断医保码
|
||||||
|
*/
|
||||||
|
@Excel(name = "诊断医保码", sort = 6)
|
||||||
|
private String conditionYbNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医嘱名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "医嘱名称", sort = 7)
|
||||||
|
private String adviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@Excel(name = "数量", sort = 8, scale = 0)
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "单位", sort = 9)
|
||||||
|
private String unitCodeText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "金额", sort = 10, scale = 2)
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立医生
|
||||||
|
*/
|
||||||
|
@Excel(name = "开立医生", sort = 11)
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立科室id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long openOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开立科室
|
||||||
|
*/
|
||||||
|
@Excel(name = "开立科室", sort = 12)
|
||||||
|
private String openOrgName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 金额数量 dto
|
* 金额数量 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表统计 dto
|
* 报表统计 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.openhis.common.annotation.Dict;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 护士输液的瓶签实体类
|
* 护士输液的瓶签实体类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用明细报表导出专用DTO
|
* 费用明细报表导出专用DTO
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.openhis.administration.domain.Practitioner;
|
import com.openhis.administration.domain.Practitioner;
|
||||||
|
import com.openhis.web.doctorstation.dto.ElepPrescriptionInitDto;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,16 +3,17 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用明细报表 dto
|
* 费用明细报表 dto
|
||||||
*
|
*
|
||||||
@@ -133,7 +134,7 @@ public class ChargeReportPageDto {
|
|||||||
* 收费时间
|
* 收费时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "收费时间", sort = 24, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "收费时间", sort = 24, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private String chargeTime;
|
private Date chargeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格
|
* 规格
|
||||||
@@ -152,4 +153,7 @@ public class ChargeReportPageDto {
|
|||||||
*/
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long encounterId;
|
private Long encounterId;
|
||||||
|
|
||||||
|
@Excel(name = "折后金额", sort = 25, scale = 4)
|
||||||
|
private BigDecimal systemDiscountPrice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表统计 dto
|
* 报表统计 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室收入统计 dto
|
* 科室收入统计 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品用量结算 dto
|
* 药品用量结算 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库明细报表初始化 dto
|
* 入库明细报表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,17 +3,20 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库明细报表 dto
|
* 入库明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库明细查询条件
|
* 入库明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 住院病案首页采集信息
|
* 住院病案首页采集信息
|
||||||
@@ -13,8 +12,8 @@ import java.util.Date;
|
|||||||
* @author yuxj
|
* @author yuxj
|
||||||
* @date 2025/8/25
|
* @date 2025/8/25
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Data
|
||||||
@Setter
|
@Accessors(chain = true)
|
||||||
public class InpatientMedicalRecordHomePageCollectionDto {
|
public class InpatientMedicalRecordHomePageCollectionDto {
|
||||||
|
|
||||||
// 组织机构代码 字符 30 必填
|
// 组织机构代码 字符 30 必填
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 住院病案首页采集信息搜索
|
* 住院病案首页采集信息搜索
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,17 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存商品明细报表 dto
|
* 库存商品明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存商品明细查询条件
|
* 库存商品明细查询条件
|
||||||
*
|
*
|
||||||
@@ -38,10 +38,4 @@ public class InventoryProductReportSearchParam {
|
|||||||
|
|
||||||
/** 供应商 */
|
/** 供应商 */
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
/** 厂家/产地(供应商名称) */
|
|
||||||
private String manufacturerText;
|
|
||||||
|
|
||||||
/** 仓库ID(药房ID) */
|
|
||||||
private Long purposeLocationId;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报损明细报表 dto
|
* 报损明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报损明细查询条件
|
* 报损明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品、耗材月结(筛选统计时间区间内的) dto
|
* 药品、耗材月结(筛选统计时间区间内的) dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,16 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计科室药品开立情况 dto
|
* 统计科室药品开立情况 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用情况查询参数
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/2/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class MedicationUsageParam {
|
||||||
|
/**
|
||||||
|
* 药品目录
|
||||||
|
*/
|
||||||
|
private List<String> categoryCodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
|
}
|
||||||
@@ -3,14 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 月末结算报表 dto
|
* 月末结算报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 月末结算报表 dto
|
* 月末结算报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出库明细报表初始化 dto
|
* 出库明细报表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,166 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊收费结算报表Dto
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/4
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientBillingDto {
|
||||||
|
/**
|
||||||
|
* 放射费
|
||||||
|
*/
|
||||||
|
private BigDecimal radiology;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他费用
|
||||||
|
*/
|
||||||
|
private BigDecimal otherFees;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊查费
|
||||||
|
*/
|
||||||
|
private BigDecimal consultationFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料费
|
||||||
|
*/
|
||||||
|
private BigDecimal medicalConsumables;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 治疗费
|
||||||
|
*/
|
||||||
|
private BigDecimal treatment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位费
|
||||||
|
*/
|
||||||
|
private BigDecimal bed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中成药费用
|
||||||
|
*/
|
||||||
|
private BigDecimal chinesePatentMedicine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 西药费用
|
||||||
|
*/
|
||||||
|
private BigDecimal westernMedicine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 化验费
|
||||||
|
*/
|
||||||
|
private BigDecimal labTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查费
|
||||||
|
*/
|
||||||
|
private BigDecimal inspection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电诊费
|
||||||
|
*/
|
||||||
|
private BigDecimal electroDiagnosis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中草药费用
|
||||||
|
*/
|
||||||
|
private BigDecimal chineseHerbs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目
|
||||||
|
*/
|
||||||
|
private String project;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 挂号数
|
||||||
|
*/
|
||||||
|
private Integer registrationCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退号数
|
||||||
|
*/
|
||||||
|
private Integer refundCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效号
|
||||||
|
*/
|
||||||
|
private Integer validCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 挂号费
|
||||||
|
*/
|
||||||
|
private BigDecimal registrationFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退号
|
||||||
|
*/
|
||||||
|
private String refundBusNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合计
|
||||||
|
*/
|
||||||
|
private BigDecimal total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票张数
|
||||||
|
*/
|
||||||
|
private Integer totalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始发票号
|
||||||
|
*/
|
||||||
|
private String startInvoiceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束发票号
|
||||||
|
*/
|
||||||
|
private String endInvoiceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费发票号
|
||||||
|
*/
|
||||||
|
private String refundInvoiceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费合计
|
||||||
|
*/
|
||||||
|
private BigDecimal refundFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户金额
|
||||||
|
*/
|
||||||
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现金
|
||||||
|
*/
|
||||||
|
private BigDecimal cash;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统筹金额
|
||||||
|
*/
|
||||||
|
private BigDecimal pooled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校垫金
|
||||||
|
*/
|
||||||
|
private BigDecimal school;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 舍入金额
|
||||||
|
*/
|
||||||
|
private BigDecimal rounded;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应收金额
|
||||||
|
*/
|
||||||
|
private BigDecimal receivable;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊就诊记录查询参数
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/2/27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientManageParam {
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医生
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long doctorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊状态
|
||||||
|
*/
|
||||||
|
private Integer subjectStatusEnum;
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 药品 dto
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class PharmacySettlementMedDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品定义id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long medicationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小单位编码
|
||||||
|
*/
|
||||||
|
private String minUnitCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际发药数(小单位)
|
||||||
|
*/
|
||||||
|
private BigDecimal actualQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发放金额
|
||||||
|
*/
|
||||||
|
private BigDecimal dispensePrice;
|
||||||
|
|
||||||
|
/** 供应类型 */
|
||||||
|
private Integer typeEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 源仓库id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long sourceLocationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的仓库id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long purposeLocationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨/盘点数(小单位)
|
||||||
|
*/
|
||||||
|
private BigDecimal supplyRequestQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总金额
|
||||||
|
*/
|
||||||
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点盈亏金额
|
||||||
|
*/
|
||||||
|
private BigDecimal profitLossPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数量(小单位)
|
||||||
|
*/
|
||||||
|
private BigDecimal inventoryQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String lotNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品进价(包装单位)
|
||||||
|
*/
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 dto
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class PharmacySettlementReportDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品分类
|
||||||
|
*/
|
||||||
|
@Excel(name = "药品分类", sort = 1)
|
||||||
|
private String categoryCodeText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品编码
|
||||||
|
*/
|
||||||
|
@Excel(name = "药品编码", sort = 2)
|
||||||
|
private String itemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "名称", sort = 3)
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
@Excel(name = "规格", sort = 4)
|
||||||
|
private String totalVolume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装单位编码
|
||||||
|
*/
|
||||||
|
private String unitCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包装单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "包装单位", sort = 5)
|
||||||
|
private String unitCodeText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小单位编码
|
||||||
|
*/
|
||||||
|
private String minUnitCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "小单位", sort = 6)
|
||||||
|
private String minUnitCodeText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拆零比
|
||||||
|
*/
|
||||||
|
@Excel(name = "拆零比", sort = 7, scale = 0)
|
||||||
|
private BigDecimal partPercent;
|
||||||
|
|
||||||
|
// -------------------------------------发药-----------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发药数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "发药数(小单位)", sort = 8, scale = 0)
|
||||||
|
private BigDecimal minDispenseQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发药数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "发药数", sort = 9)
|
||||||
|
private String dispenseStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发放金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "发放金额", sort = 10, scale = 2)
|
||||||
|
private BigDecimal dispensePrice;
|
||||||
|
|
||||||
|
// -------------------------------------调拨入-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 调拨入数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨入数(小单位)", sort = 11, scale = 0)
|
||||||
|
private BigDecimal minTransferInQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨入数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨入数", sort = 12)
|
||||||
|
private String transferInStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨入金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨入金额", sort = 13, scale = 2)
|
||||||
|
private BigDecimal transferInPrice;
|
||||||
|
|
||||||
|
// -------------------------------------调拨出-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 调拨出数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨出数(小单位)", sort = 14, scale = 0)
|
||||||
|
private BigDecimal minTransferOutQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨出数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨出数", sort = 15)
|
||||||
|
private String transferOutStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调拨出金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "调拨出金额", sort = 16, scale = 2)
|
||||||
|
private BigDecimal transferOutPrice;
|
||||||
|
// -------------------------------------盘点-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 盘点数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "盘点数(小单位)", sort = 17, scale = 0)
|
||||||
|
private BigDecimal minStockTakeQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "盘点数", sort = 18)
|
||||||
|
private String stockTakeStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点盈亏金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "盘点盈亏金额", sort = 19, scale = 2)
|
||||||
|
private BigDecimal stockTakePrice;
|
||||||
|
// -------------------------------------报损-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 报损数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "报损数(小单位)", sort = 20, scale = 0)
|
||||||
|
private BigDecimal minLossQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报损数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "报损数", sort = 21)
|
||||||
|
private String lossStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报损金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "报损金额", sort = 22, scale = 2)
|
||||||
|
private BigDecimal lossPrice;
|
||||||
|
// -------------------------------------领用-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 领用数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用数(小单位)", sort = 23, scale = 0)
|
||||||
|
private BigDecimal minIssueQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用数", sort = 24)
|
||||||
|
private String issueStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用金额", sort = 25, scale = 2)
|
||||||
|
private BigDecimal issuePrice;
|
||||||
|
// -------------------------------------领用退-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 领用退数(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用退数(小单位)", sort = 26, scale = 0)
|
||||||
|
private BigDecimal minReturnIssueQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用退数(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用退数", sort = 27)
|
||||||
|
private String returnIssueStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用退金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "领用退金额", sort = 28, scale = 2)
|
||||||
|
private BigDecimal returnIssuePrice;
|
||||||
|
|
||||||
|
// -------------------------------------当前库存-----------------------------------------
|
||||||
|
/**
|
||||||
|
* 库存数量(小单位)
|
||||||
|
*/
|
||||||
|
@Excel(name = "库存数量(小单位)", sort = 29, scale = 0)
|
||||||
|
private BigDecimal inventoryQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数量(整体单位,即XXX盒XXX粒)
|
||||||
|
*/
|
||||||
|
@Excel(name = "库存数量", sort = 30)
|
||||||
|
private String inventoryStrQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "库存金额", sort = 31, scale = 2)
|
||||||
|
private BigDecimal inventoryPrice;
|
||||||
|
|
||||||
|
public PharmacySettlementReportDto() {
|
||||||
|
this.minDispenseQuantity = BigDecimal.ZERO;
|
||||||
|
this.minTransferInQuantity = BigDecimal.ZERO;
|
||||||
|
this.minTransferOutQuantity = BigDecimal.ZERO;
|
||||||
|
this.minStockTakeQuantity = BigDecimal.ZERO;
|
||||||
|
this.minLossQuantity = BigDecimal.ZERO;
|
||||||
|
this.minIssueQuantity = BigDecimal.ZERO;
|
||||||
|
this.minReturnIssueQuantity = BigDecimal.ZERO;
|
||||||
|
this.inventoryQuantity = BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.openhis.common.annotation.Dict;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 西药(中成药)处方单 实体类
|
* 西药(中成药)处方单 实体类
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购退货明细报表初始化 dto
|
* 采购退货明细报表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,15 +3,16 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购退货明细报表 dto
|
* 采购退货明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购退货明细查询条件
|
* 采购退货明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.openhis.administration.domain.Practitioner;
|
import com.openhis.administration.domain.Practitioner;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 挂号明细报表下拉框 dto
|
* 挂号明细报表下拉框 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,17 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 挂号明细报表 dto
|
* 挂号明细报表 dto
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ package com.openhis.web.reportmanage.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 挂号明细查询条件
|
* 挂号明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基本情况 dto
|
* 基本情况 dto
|
||||||
*
|
*
|
||||||
@@ -20,48 +21,32 @@ import java.math.BigDecimal;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class ReportBasicInformationDetailsDto {
|
public class ReportBasicInformationDetailsDto {
|
||||||
|
|
||||||
/**
|
/** 序号 */
|
||||||
* 序号
|
|
||||||
*/
|
|
||||||
private String no;
|
private String no;
|
||||||
|
|
||||||
/**
|
/** 数据上报日期 */
|
||||||
* 数据上报日期
|
|
||||||
*/
|
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private String dataReportingDate;
|
private String dataReportingDate;
|
||||||
|
|
||||||
/**
|
/** 省级行政区划代码 */
|
||||||
* 省级行政区划代码
|
|
||||||
*/
|
|
||||||
private String provinceCodes;
|
private String provinceCodes;
|
||||||
|
|
||||||
/**
|
/** 组织机构代码 */
|
||||||
* 组织机构代码
|
|
||||||
*/
|
|
||||||
private String organizationCode;
|
private String organizationCode;
|
||||||
|
|
||||||
/**
|
/** 医疗机构代码 */
|
||||||
* 医疗机构代码
|
|
||||||
*/
|
|
||||||
@Excel(name = "医疗机构代码", sort = 1)
|
@Excel(name = "医疗机构代码", sort = 1)
|
||||||
private String medicalCode;
|
private String medicalCode;
|
||||||
|
|
||||||
/**
|
/** 组织机构名称 */
|
||||||
* 组织机构名称
|
|
||||||
*/
|
|
||||||
@Excel(name = "组织机构名称", sort = 2)
|
@Excel(name = "组织机构名称", sort = 2)
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
|
|
||||||
/**
|
/** 年度药品总收入(元) */
|
||||||
* 年度药品总收入(元)
|
|
||||||
*/
|
|
||||||
@Excel(name = "年度药品总收入(元)", sort = 3, scale = 2)
|
@Excel(name = "年度药品总收入(元)", sort = 3, scale = 2)
|
||||||
private BigDecimal yearMedicineTotalRevenue;
|
private BigDecimal yearMedicineTotalRevenue;
|
||||||
|
|
||||||
/**
|
/** 实有床位数 */
|
||||||
* 实有床位数
|
|
||||||
*/
|
|
||||||
private BigDecimal actualBedsNo;
|
private BigDecimal actualBedsNo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报表查询条件
|
* 新增报表查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品费用增长率 dto
|
* 药品费用增长率 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表:药品入库情况初始化 dto
|
* 报表:药品入库情况初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品出库情况 dto
|
* 药品出库情况 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品使用情况报表始化 dto
|
* 药品使用情况报表始化 dto
|
||||||
*
|
*
|
||||||
@@ -19,56 +21,86 @@ import java.math.BigDecimal;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class ReportMedicationUsageDto {
|
public class ReportMedicationUsageDto {
|
||||||
|
|
||||||
/**
|
/** 医疗机构代码 */
|
||||||
* 医疗机构代码
|
|
||||||
*/
|
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
|
||||||
/**
|
/** 组织机构名称 */
|
||||||
* 组织机构名称
|
|
||||||
*/
|
|
||||||
private String orgName;
|
private String orgName;
|
||||||
|
|
||||||
/**
|
/** 国家药品编码(YPID) */
|
||||||
* 国家药品编码(YPID)
|
|
||||||
*/
|
|
||||||
private String nationalDrugCode;
|
private String nationalDrugCode;
|
||||||
|
|
||||||
/**
|
/** 院内药品唯一码 */
|
||||||
* 院内药品唯一码
|
|
||||||
*/
|
|
||||||
private String busNo;
|
private String busNo;
|
||||||
|
|
||||||
/**
|
/** 省级药品集中采购平台药品编码 */
|
||||||
* 省级药品集中采购平台药品编码
|
|
||||||
*/
|
|
||||||
private String provincialDrugCode;
|
private String provincialDrugCode;
|
||||||
|
|
||||||
/**
|
/** 产品名称 */
|
||||||
* 产品名称
|
|
||||||
*/
|
|
||||||
private String itemName;
|
private String itemName;
|
||||||
|
|
||||||
/**
|
/** 销售总金额(元) */
|
||||||
* 销售总金额(元)
|
|
||||||
*/
|
|
||||||
private BigDecimal totalSalesPrice;
|
private BigDecimal totalSalesPrice;
|
||||||
|
|
||||||
/**
|
/** 销售数量(最小销售包装单位) */
|
||||||
* 销售数量(最小销售包装单位)
|
|
||||||
*/
|
|
||||||
private BigDecimal packageSalesQuantity;
|
private BigDecimal packageSalesQuantity;
|
||||||
|
|
||||||
/**
|
/** 销售数量(最小制剂单位) */
|
||||||
* 销售数量(最小制剂单位)
|
|
||||||
*/
|
|
||||||
private BigDecimal dosageSalesQuantity;
|
private BigDecimal dosageSalesQuantity;
|
||||||
|
|
||||||
/**
|
/** 单位 */
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@Dict(dictCode = "unit_code")
|
@Dict(dictCode = "unit_code")
|
||||||
|
@Excel(name = "包装", sort = 5, dictType = "unit_code")
|
||||||
private Integer unitCode;
|
private Integer unitCode;
|
||||||
private String unitCode_dictText;
|
private String unitCode_dictText;
|
||||||
|
|
||||||
|
/** 药品通用名 */
|
||||||
|
@Excel(name = "药品通用名", sort = 1)
|
||||||
|
private String medName;
|
||||||
|
|
||||||
|
/** 产品名称 */
|
||||||
|
@Excel(name = "产品名称", sort = 2)
|
||||||
|
private String merchandiseName;
|
||||||
|
|
||||||
|
/** 药品剂型 */
|
||||||
|
@Dict(dictCode = "dose_form_code")
|
||||||
|
@Excel(name = "剂型", sort = 3, dictType = "dose_form_code")
|
||||||
|
private Integer doseFormCode;
|
||||||
|
private String doseFormCode_dictText;
|
||||||
|
|
||||||
|
/** 药品规格 */
|
||||||
|
@Excel(name = "规格", sort = 4)
|
||||||
|
private String totalVolume;
|
||||||
|
|
||||||
|
/** 计价单位 */
|
||||||
|
@Dict(dictCode = "unit_code")
|
||||||
|
@Excel(name = "计价单位", sort = 6, dictType = "unit_code")
|
||||||
|
private Integer priceUnit;
|
||||||
|
private String priceUnit_dictText;
|
||||||
|
|
||||||
|
/** 生产厂家 */
|
||||||
|
@Excel(name = "生产企业", sort = 7)
|
||||||
|
private String manufacturerText;
|
||||||
|
|
||||||
|
/** 价格(每盒瓶/元) */
|
||||||
|
@Excel(name = "价格(每盒瓶/元)", sort = 8, scale = 2)
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 患者参保地 */
|
||||||
|
private String insuplcAdmdvs;
|
||||||
|
@Excel(name = "患者参保地", sort = 9)
|
||||||
|
private String insuplcAdmdvsText;
|
||||||
|
|
||||||
|
/** 参保类型 */
|
||||||
|
@Excel(name = "参保类型", sort = 10)
|
||||||
|
private String insutype;
|
||||||
|
|
||||||
|
/** 使用数量(片袋支) */
|
||||||
|
@Excel(name = "使用数量(片袋支)", sort = 11, scale = 2)
|
||||||
|
private BigDecimal dispenseQuantity;
|
||||||
|
|
||||||
|
/** 使用金额(片袋支) */
|
||||||
|
@Excel(name = "使用金额(片袋支)", sort = 12, scale = 2)
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 非中选产品采购量占比 dto
|
* 非中选产品采购量占比 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线下采购占比报表初始化 dto
|
* 线下采购占比报表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表例子:患者明细初始化 dto
|
* 报表例子:患者明细初始化 dto
|
||||||
*
|
*
|
||||||
@@ -19,77 +21,64 @@ import java.math.BigDecimal;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class ReportPatientDetailsDto {
|
public class ReportPatientDetailsDto {
|
||||||
|
|
||||||
/**
|
/** 门诊住院号 */
|
||||||
* 门诊住院号
|
@Excel(name = "门诊住院号", sort = 1)
|
||||||
*/
|
|
||||||
private String encounterBusNo;
|
private String encounterBusNo;
|
||||||
|
|
||||||
/**
|
/** 药品通用名 */
|
||||||
* 药品通用名
|
@Excel(name = "药品通用名", sort = 2)
|
||||||
*/
|
|
||||||
private String medName;
|
private String medName;
|
||||||
|
|
||||||
/**
|
/** 药品医保编码 */
|
||||||
* 药品医保编码
|
@Excel(name = "药品医保编码", sort = 3)
|
||||||
*/
|
|
||||||
private String medYbNo;
|
private String medYbNo;
|
||||||
|
|
||||||
/**
|
/** 药品类别 */
|
||||||
* 药品类别
|
|
||||||
*/
|
|
||||||
@Dict(dictCode = "med_category_code")
|
@Dict(dictCode = "med_category_code")
|
||||||
|
@Excel(name = "药品类别", sort = 4, dictType = "med_category_code")
|
||||||
private String categoryCode;
|
private String categoryCode;
|
||||||
private String categoryCode_dictText;
|
private String categoryCode_dictText;
|
||||||
|
|
||||||
/**
|
/** 剂型 */
|
||||||
* 剂型
|
|
||||||
*/
|
|
||||||
@Dict(dictCode = "dose_form_code")
|
@Dict(dictCode = "dose_form_code")
|
||||||
|
@Excel(name = "剂型", sort = 5, dictType = "dose_form_code")
|
||||||
private String doseFormCode;
|
private String doseFormCode;
|
||||||
private String doseFormCode_dictText;
|
private String doseFormCode_dictText;
|
||||||
|
|
||||||
/**
|
/** 规格 */
|
||||||
* 规格
|
@Excel(name = "规格", sort = 6)
|
||||||
*/
|
|
||||||
private String totalVolume;
|
private String totalVolume;
|
||||||
|
|
||||||
/**
|
/** 包装 */
|
||||||
* 包装
|
|
||||||
*/
|
|
||||||
@Dict(dictCode = "unit_code")
|
@Dict(dictCode = "unit_code")
|
||||||
|
@Excel(name = "包装", sort = 7, dictType = "unit_code")
|
||||||
private String packageUnit;
|
private String packageUnit;
|
||||||
private String packageUnit_dictText;
|
private String packageUnit_dictText;
|
||||||
|
|
||||||
/**
|
/** 计价单位 */
|
||||||
* 计价单位
|
|
||||||
*/
|
|
||||||
@Dict(dictCode = "unit_code")
|
@Dict(dictCode = "unit_code")
|
||||||
|
@Excel(name = "计价单位", sort = 8, dictType = "unit_code")
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitCode_dictText;
|
private String unitCode_dictText;
|
||||||
|
|
||||||
/**
|
/** 是否中选产品 */
|
||||||
* 是否中选产品
|
@Excel(name = "是否中选产品", sort = 9)
|
||||||
*/
|
|
||||||
private String isSelected;
|
private String isSelected;
|
||||||
|
|
||||||
/**
|
/** 生产企业 */
|
||||||
* 生产企业
|
@Excel(name = "生产企业", sort = 10)
|
||||||
*/
|
|
||||||
private String manufacturerText;
|
private String manufacturerText;
|
||||||
|
|
||||||
/**
|
/** 单价(元) */
|
||||||
* 单价(元)
|
@Excel(name = "单价(元)", sort = 11, scale = 2)
|
||||||
*/
|
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
/**
|
/** 使用数量(片袋支) */
|
||||||
* 使用数量(片袋支)
|
@Excel(name = "使用数量(片袋支)", sort = 12, scale = 2)
|
||||||
*/
|
|
||||||
private BigDecimal quantity;
|
private BigDecimal quantity;
|
||||||
|
|
||||||
/**
|
/** 使用总金额(元) */
|
||||||
* 使用总金额(元)
|
@Excel(name = "使用总金额(元)", sort = 13, scale = 2)
|
||||||
*/
|
|
||||||
private BigDecimal totalPrice;
|
private BigDecimal totalPrice;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -26,9 +28,19 @@ public class ReportPatientDetailsSearchParam {
|
|||||||
private String medYbNo;
|
private String medYbNo;
|
||||||
|
|
||||||
/** 药品类别 */
|
/** 药品类别 */
|
||||||
private String categoryCode;
|
private List<String> categoryCodes;
|
||||||
|
|
||||||
/** 生产企业 */
|
/** 生产企业 */
|
||||||
private String manufacturerText;
|
private String manufacturerText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用 开始时间
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品使用 结束时间
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表例子:患者明细主表初始化 dto
|
* 报表例子:患者明细主表初始化 dto
|
||||||
*
|
*
|
||||||
@@ -21,45 +23,58 @@ import java.util.Date;
|
|||||||
public class ReportPatientMasterDetailDto {
|
public class ReportPatientMasterDetailDto {
|
||||||
|
|
||||||
/** 门诊住院号 */
|
/** 门诊住院号 */
|
||||||
|
@Excel(name = "门诊住院号", sort = 1)
|
||||||
private String encounterBusNo;
|
private String encounterBusNo;
|
||||||
|
|
||||||
/** 患者姓名 */
|
/** 患者姓名 */
|
||||||
|
@Excel(name = "患者姓名", sort = 2)
|
||||||
private String patientName;
|
private String patientName;
|
||||||
|
|
||||||
/** 身份证号 */
|
/** 身份证号 */
|
||||||
|
@Excel(name = "身份证号", sort = 3)
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|
||||||
/** 人员编码 */
|
/** 人员编码 */
|
||||||
|
@Excel(name = "人员编码", sort = 4)
|
||||||
private String psnNo;
|
private String psnNo;
|
||||||
|
|
||||||
/** 参保地区编码 */
|
/** 参保地区编码 */
|
||||||
|
@Excel(name = "参保地区", sort = 5)
|
||||||
private String insuPlcNo;
|
private String insuPlcNo;
|
||||||
|
|
||||||
/** 参保类型 */
|
/** 参保类型 */
|
||||||
|
@Excel(name = "参保类型", sort = 6)
|
||||||
private String ybType;
|
private String ybType;
|
||||||
|
|
||||||
/** 入院时间 */
|
/** 入院时间 */
|
||||||
|
@Excel(name = "入院时间", sort = 7, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date encounterStartTime;
|
private Date encounterStartTime;
|
||||||
|
|
||||||
/** 出院时间 */
|
/** 出院时间 */
|
||||||
|
@Excel(name = "出院时间", sort = 8, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date encounterEndTime;
|
private Date encounterEndTime;
|
||||||
|
|
||||||
/** 处方日期 */
|
/** 处方日期 */
|
||||||
|
@Excel(name = "处方日期", sort = 9, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date issueTime;
|
private Date issueTime;
|
||||||
|
|
||||||
/** 出院诊断 */
|
/** 出院诊断 */
|
||||||
|
@Excel(name = "出院诊断", sort = 10)
|
||||||
private String outDiagnoseName;
|
private String outDiagnoseName;
|
||||||
|
|
||||||
/** 总费用(元) */
|
/** 总费用(元) */
|
||||||
|
@Excel(name = "总费用(元)", sort = 11, scale = 2)
|
||||||
private BigDecimal feeAmount;
|
private BigDecimal feeAmount;
|
||||||
|
|
||||||
/** 政策范围内 */
|
/** 政策范围内 */
|
||||||
|
@Excel(name = "政策范围内", sort = 12, scale = 2)
|
||||||
private BigDecimal inscpScpAmt;
|
private BigDecimal inscpScpAmt;
|
||||||
|
|
||||||
/** 基本医保统筹支付金额(元) */
|
/** 基本医保统筹支付金额(元) */
|
||||||
|
@Excel(name = "基本医保统筹支付金额(元)", sort = 13, scale = 2)
|
||||||
private BigDecimal tcPayAmount;
|
private BigDecimal tcPayAmount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -25,4 +30,12 @@ public class ReportPatientMasterDetailsSearchParam {
|
|||||||
/** 身份证号 */
|
/** 身份证号 */
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|
||||||
|
/** 药品目录 */
|
||||||
|
private List<String> categoryCodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药品名称
|
||||||
|
*/
|
||||||
|
private String medName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同一:医生工作量报表 dto
|
* 同一:医生工作量报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,12 +3,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品使用情况始化 dto
|
* 产品使用情况始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,16 +3,18 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表例子:出库明细表初始化 dto
|
* 报表例子:出库明细表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表例子:30天回款率 dto
|
* 报表例子:30天回款率 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退库明细报表初始化 dto
|
* 退库明细报表初始化 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退库明细账分页列表 dto
|
* 退库明细账分页列表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领用退库明细查询条件
|
* 领用退库明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
@@ -10,12 +13,10 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存盘点明细报表 dto
|
* 库存盘点明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存盘点明细查询条件
|
* 库存盘点明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,18 +3,19 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品调拨明细报表 dto
|
* 商品调拨明细报表 dto
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品调拨明细查询条件
|
* 商品调拨明细查询条件
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位转换 dto
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class UnitTransformationDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拆零比
|
||||||
|
*/
|
||||||
|
private BigDecimal partPercent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小单位数量
|
||||||
|
*/
|
||||||
|
private BigDecimal minUnitQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商 | 整数部分,包装单位
|
||||||
|
*/
|
||||||
|
private BigDecimal quotientQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余数 | 余数部分,小单位
|
||||||
|
*/
|
||||||
|
private BigDecimal remainderQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼接单位 | 即XXX盒XXX粒
|
||||||
|
*/
|
||||||
|
private String strQuantity;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作量统计查询参数
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/8
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WorkloadQueryParam {
|
||||||
|
/**
|
||||||
|
* 绩效类型
|
||||||
|
*/
|
||||||
|
private String performanceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务类别
|
||||||
|
*/
|
||||||
|
private List<String> codes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private List<Long> itemIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费类型 1.实收 2.应收
|
||||||
|
*/
|
||||||
|
private Integer amountType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 护士ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long nurseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库ID列表
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private List<Long> locationIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行科室ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long orgId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.core.common.annotation.Excel;
|
||||||
|
import com.openhis.web.paymentmanage.dto.ChargeItemDto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住院费用详情导出
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZyCostDetailDto {
|
||||||
|
|
||||||
|
@Excel(name = "开单人", needMerge = true, sort = 1)
|
||||||
|
private String doctor;
|
||||||
|
|
||||||
|
@Excel(name = "住院号", needMerge = true, sort = 2)
|
||||||
|
private String iptNo;
|
||||||
|
|
||||||
|
@Excel(name = "病人", needMerge = true, sort = 3)
|
||||||
|
private String patientName;
|
||||||
|
|
||||||
|
@Excel(name = "收费项", needMerge = true, sort = 4)
|
||||||
|
private String mergeTypeName;
|
||||||
|
|
||||||
|
@Excel()
|
||||||
|
private List<ChargeItemDto> dataList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住院费用详情查询参数
|
||||||
|
*
|
||||||
|
* @author swb
|
||||||
|
* @date 2026/1/20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ZyCostDetailParam {
|
||||||
|
/**
|
||||||
|
* 统计类型
|
||||||
|
*/
|
||||||
|
private String statisticalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算状态
|
||||||
|
*/
|
||||||
|
private Integer settleStatus = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用类型
|
||||||
|
*/
|
||||||
|
private List<String> feeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医生
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long doctorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long bedId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
package com.openhis.web.reportmanage.dto;
|
package com.openhis.web.reportmanage.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class workloadReportDto {
|
public class workloadReportDto {
|
||||||
@@ -32,14 +33,14 @@ public class workloadReportDto {
|
|||||||
*/
|
*/
|
||||||
@Dict(dictCode = "fin_type_code")
|
@Dict(dictCode = "fin_type_code")
|
||||||
private String chargeCode;
|
private String chargeCode;
|
||||||
private String chargeCodeText;
|
private String chargeCode_dictText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保类型
|
* 医保类型
|
||||||
*/
|
*/
|
||||||
@Dict(dictCode = "med_chrgitm_type")
|
@Dict(dictCode = "med_chrgitm_type")
|
||||||
private String ybChargeCode;
|
private String ybChargeCode;
|
||||||
private String ybChargeCodeText;
|
private String ybChargeCode_dictText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型 1缴费 2退费
|
* 类型 1缴费 2退费
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.openhis.web.reportmanage.dto.AmbActAdviceStatisticsDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.AmbMedAdviceStatisticsDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊医嘱统计 mapper
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface AmbAdviceStatisticsAppMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊药品医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param statusEnum 医嘱状态 | 已完成
|
||||||
|
* @param classEnum 就诊类别 | 门诊
|
||||||
|
* @return 门诊药品医嘱统计
|
||||||
|
*/
|
||||||
|
List<AmbMedAdviceStatisticsDto> getMedStatistics(@Param("startTime") String startTime,
|
||||||
|
@Param("endTime") String endTime, @Param("contractNo") String contractNo,
|
||||||
|
@Param("patientName") String patientName, @Param("openOrgId") Long openOrgId,
|
||||||
|
@Param("statusEnum") Integer statusEnum, @Param("classEnum") Integer classEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门诊诊疗医嘱统计
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param contractNo 费用性质编码
|
||||||
|
* @param patientName 患者名称
|
||||||
|
* @param openOrgId 开立科室id
|
||||||
|
* @param statusEnum 医嘱状态 | 已完成
|
||||||
|
* @param classEnum 就诊类别 | 门诊
|
||||||
|
* @return 门诊诊疗医嘱统计
|
||||||
|
*/
|
||||||
|
List<AmbActAdviceStatisticsDto> getActStatistics(@Param("startTime") String startTime,
|
||||||
|
@Param("endTime") String endTime, @Param("contractNo") String contractNo,
|
||||||
|
@Param("patientName") String patientName, @Param("openOrgId") Long openOrgId,
|
||||||
|
@Param("statusEnum") Integer statusEnum, @Param("classEnum") Integer classEnum);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.reportmanage.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.openhis.web.reportmanage.dto.PharmacySettlementMedDto;
|
||||||
|
import com.openhis.web.reportmanage.dto.PharmacySettlementReportDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药房结算报表 mapper
|
||||||
|
*
|
||||||
|
* @author GYY
|
||||||
|
* @date 2025-04-22
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface PharmacySettlementReportAppMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品列表
|
||||||
|
*
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @return 药品列表
|
||||||
|
*/
|
||||||
|
List<PharmacySettlementReportDto> getListInfo(@Param("searchKey") String searchKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发药信息
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param completed 发药
|
||||||
|
* @param refunded 退药
|
||||||
|
* @return 发药信息
|
||||||
|
*/
|
||||||
|
List<PharmacySettlementMedDto> getDispenseInfo(@Param("startTime") String startTime,
|
||||||
|
@Param("endTime") String endTime, @Param("locationId") Long locationId, @Param("completed") Integer completed,
|
||||||
|
@Param("refunded") Integer refunded);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药房供应信息 | 因盘点和调拨等业务单据数量存储的永远是小单位数量,故该查询数量和单位固定查小单位
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param completed 发药
|
||||||
|
* @param medTableName 药品定义表名
|
||||||
|
* @param productBatchStocktaking 单据类型:批量盘点
|
||||||
|
* @param productStocktaking 单据类型:盘点
|
||||||
|
* @param productTransfer 单据类型:调拨
|
||||||
|
* @param productBatchTransfer 单据类型:批量调拨
|
||||||
|
* @param lossReportForm 单据类型:报损
|
||||||
|
* @param issueInventory 单据类型:领用
|
||||||
|
* @param returnIssue 单据类型:领用退货
|
||||||
|
* @return 药房供应信息
|
||||||
|
*/
|
||||||
|
List<PharmacySettlementMedDto> getSupplyRequestInfo(@Param("startTime") String startTime,
|
||||||
|
@Param("endTime") String endTime, @Param("locationId") Long locationId, @Param("completed") Integer completed,
|
||||||
|
@Param("medTableName") String medTableName, @Param("productBatchStocktaking") Integer productBatchStocktaking,
|
||||||
|
@Param("productStocktaking") Integer productStocktaking, @Param("productTransfer") Integer productTransfer,
|
||||||
|
@Param("productBatchTransfer") Integer productBatchTransfer, @Param("lossReportForm") Integer lossReportForm,
|
||||||
|
@Param("issueInventory") Integer issueInventory, @Param("returnIssue") Integer returnIssue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询药品库存信息
|
||||||
|
*
|
||||||
|
* @param locationId 药房id
|
||||||
|
* @param medTableName 药品定义表名
|
||||||
|
* @param conditionCode 命中条件: 药品进价
|
||||||
|
* @return 药品库存信
|
||||||
|
*/
|
||||||
|
List<PharmacySettlementMedDto> getInventoryInfo(@Param("locationId") Long locationId,
|
||||||
|
@Param("medTableName") String medTableName, @Param("conditionCode") String conditionCode);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.openhis.web.paymentmanage.mapper.ThreePartPayMapper">
|
||||||
|
|
||||||
|
<select id="getThreePartComparePaymentDtoList"
|
||||||
|
resultType="com.openhis.web.paymentmanage.dto.ThreePartComparePaymentDto">
|
||||||
|
SELECT
|
||||||
|
fin.ID AS payment_id,
|
||||||
|
fin.payment_no AS payment_no,
|
||||||
|
fin.tendered_amount AS tendered_amount,
|
||||||
|
del.amount AS paid_amount,
|
||||||
|
fin.bill_date AS bill_date,
|
||||||
|
pat."name" AS patient_name
|
||||||
|
FROM
|
||||||
|
fin_payment_reconciliation fin
|
||||||
|
LEFT JOIN fin_payment_rec_detail del ON fin."id" = del.reconciliation_id
|
||||||
|
AND del.pay_enum = 500000
|
||||||
|
LEFT JOIN adm_patient pat ON fin.patient_id = pat."id"
|
||||||
|
WHERE
|
||||||
|
fin.delete_flag = '0' AND fin.status_enum != 0 AND
|
||||||
|
fin.bill_date BETWEEN
|
||||||
|
to_timestamp(#{startTime}, 'YYYY-MM-DD HH24:MI:SS')::timestamptz
|
||||||
|
AND
|
||||||
|
to_timestamp(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')::timestamptz
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getThreePartCompareRequestDtoList"
|
||||||
|
resultType="com.openhis.web.paymentmanage.dto.ThreePartCompareRequestDto">
|
||||||
|
SELECT
|
||||||
|
req.ID AS request_id,
|
||||||
|
req.payment_id,
|
||||||
|
req.amount,
|
||||||
|
req.request_type
|
||||||
|
FROM
|
||||||
|
fin_three_part_pay_request req
|
||||||
|
LEFT JOIN fin_payment_reconciliation fin ON fin."id" = req.payment_id
|
||||||
|
WHERE
|
||||||
|
req.payment_id IN
|
||||||
|
<foreach item="paymentId" collection="paymentIds" separator="," close=")" open="(" index="">
|
||||||
|
#{paymentId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user