Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
1
GIT_TEST_ZHANGFEI.md
Normal file
1
GIT_TEST_ZHANGFEI.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
张飞 Git测试 - Mon Apr 13 01:38:12 PM CST 2026
|
||||||
@@ -4,7 +4,7 @@ import com.core.common.core.domain.R;
|
|||||||
import com.openhis.web.reportManagement.dto.InfectiousCardParam;
|
import com.openhis.web.reportManagement.dto.InfectiousCardParam;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
// import java.util.List; // 批量操作功能暂未实现
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 传染病报卡 AppService 接口
|
* 传染病报卡 AppService 接口
|
||||||
@@ -41,44 +41,44 @@ public interface IInfectiousCardAppService {
|
|||||||
R<?> getByCardNo(String cardNo);
|
R<?> getByCardNo(String cardNo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核传染病报卡(功能暂未实现)
|
* 审核传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNo 报卡编号
|
* @param cardNo 报卡编号
|
||||||
* @param auditOpinion 审核意见
|
* @param auditOpinion 审核意见
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// R<?> audit(String cardNo, String auditOpinion, String status);
|
R<?> audit(String cardNo, String auditOpinion, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回传染病报卡(功能暂未实现)
|
* 退回传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNo 报卡编号
|
* @param cardNo 报卡编号
|
||||||
* @param returnReason 退回原因
|
* @param returnReason 退回原因
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// R<?> returnCard(String cardNo, String returnReason, String status);
|
R<?> returnCard(String cardNo, String returnReason, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量审核传染病报卡(功能暂未实现)
|
* 批量审核传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNos 报卡编号列表
|
* @param cardNos 报卡编号列表
|
||||||
* @param auditOpinion 审核意见
|
* @param auditOpinion 审核意见
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// R<?> batchAudit(List<String> cardNos, String auditOpinion, String status);
|
R<?> batchAudit(List<String> cardNos, String auditOpinion, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量退回传染病报卡(功能暂未实现)
|
* 批量退回传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNos 报卡编号列表
|
* @param cardNos 报卡编号列表
|
||||||
* @param returnReason 退回原因
|
* @param returnReason 退回原因
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// R<?> batchReturn(List<String> cardNos, String returnReason, String status);
|
R<?> batchReturn(List<String> cardNos, String returnReason, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出传染病报卡
|
* 导出传染病报卡
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.administration.domain.InfectiousDiseaseReport;
|
|
||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
import com.openhis.administration.mapper.InfectiousDiseaseReportMapper;
|
|
||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
import com.openhis.web.reportManagement.appservice.IInfectiousCardAppService;
|
import com.openhis.web.reportManagement.appservice.IInfectiousCardAppService;
|
||||||
import com.openhis.web.reportManagement.dto.InfectiousCardDto;
|
import com.openhis.web.reportManagement.dto.InfectiousCardDto;
|
||||||
@@ -17,8 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,9 +32,6 @@ public class InfectiousCardAppServiceImpl implements IInfectiousCardAppService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ReportManageCardMapper reportManageCardMapper;
|
private ReportManageCardMapper reportManageCardMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private InfectiousDiseaseReportMapper infectiousDiseaseReportMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOrganizationService organizationService;
|
private IOrganizationService organizationService;
|
||||||
|
|
||||||
@@ -104,110 +99,122 @@ public class InfectiousCardAppServiceImpl implements IInfectiousCardAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核传染病报卡(功能暂未实现)
|
* 审核传染病报卡
|
||||||
* @param cardNo 卡号
|
* @param cardNo 卡号
|
||||||
* @param auditOpinion 审核意见
|
* @param auditOpinion 审核意见
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 审核结果
|
* @return 审核结果
|
||||||
*/
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public R<?> audit(String cardNo, String auditOpinion, String status) {
|
public R<?> audit(String cardNo, String auditOpinion, String status) {
|
||||||
// try {
|
try {
|
||||||
// InfectiousDiseaseReport report = infectiousDiseaseReportMapper.selectById(cardNo);
|
InfectiousCardDto dto = reportManageCardMapper.selectCardByCardNo(cardNo);
|
||||||
// if (report == null) {
|
if (dto == null) {
|
||||||
// return R.fail("报卡不存在");
|
return R.fail("报卡不存在");
|
||||||
// }
|
}
|
||||||
|
|
||||||
// report.setStatus(Integer.parseInt(status));
|
int rows = reportManageCardMapper.auditCard(cardNo, Integer.parseInt(status));
|
||||||
// report.setUpdateTime(new Date());
|
if (rows > 0) {
|
||||||
|
return R.ok("审核成功");
|
||||||
// infectiousDiseaseReportMapper.updateById(report);
|
} else {
|
||||||
|
return R.fail("审核失败:未更新任何记录");
|
||||||
// return R.ok("审核成功");
|
}
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// log.error("审核传染病报卡失败", e);
|
log.error("审核传染病报卡失败", e);
|
||||||
// return R.fail("审核失败:" + e.getMessage());
|
return R.fail("审核失败:" + e.getMessage());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回传染病报卡(功能暂未实现)
|
* 退回传染病报卡
|
||||||
* @param cardNo 卡号
|
* @param cardNo 卡号
|
||||||
* @param returnReason 退回原因
|
* @param returnReason 退回原因
|
||||||
* @param status 退回状态
|
* @param status 退回状态
|
||||||
* @return 退回结果
|
* @return 退回结果
|
||||||
*/
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public R<?> returnCard(String cardNo, String returnReason, String status) {
|
public R<?> returnCard(String cardNo, String returnReason, String status) {
|
||||||
// try {
|
try {
|
||||||
// InfectiousDiseaseReport report = infectiousDiseaseReportMapper.selectById(cardNo);
|
InfectiousCardDto dto = reportManageCardMapper.selectCardByCardNo(cardNo);
|
||||||
// if (report == null) {
|
if (dto == null) {
|
||||||
// return R.fail("报卡不存在");
|
return R.fail("报卡不存在");
|
||||||
// }
|
}
|
||||||
|
|
||||||
// report.setStatus(Integer.parseInt(status));
|
int rows = reportManageCardMapper.returnCard(cardNo, Integer.parseInt(status), returnReason);
|
||||||
// report.setWithdrawReason(returnReason);
|
if (rows > 0) {
|
||||||
// report.setUpdateTime(new Date());
|
return R.ok("退回成功");
|
||||||
|
} else {
|
||||||
// infectiousDiseaseReportMapper.updateById(report);
|
return R.fail("退回失败:未更新任何记录");
|
||||||
|
}
|
||||||
// return R.ok("退回成功");
|
} catch (Exception e) {
|
||||||
// } catch (Exception e) {
|
log.error("退回传染病报卡失败", e);
|
||||||
// log.error("退回传染病报卡失败", e);
|
return R.fail("退回失败:" + e.getMessage());
|
||||||
// return R.fail("退回失败:" + e.getMessage());
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量审核传染病报卡(功能暂未实现)
|
* 批量审核传染病报卡
|
||||||
* @param cardNos 卡号列表
|
* @param cardNos 卡号列表
|
||||||
* @param auditOpinion 审核意见
|
* @param auditOpinion 审核意见
|
||||||
* @param status 审核状态
|
* @param status 审核状态
|
||||||
* @return 批量审核结果
|
* @return 批量审核结果
|
||||||
*/
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public R<?> batchAudit(List<String> cardNos, String auditOpinion, String status) {
|
public R<?> batchAudit(List<String> cardNos, String auditOpinion, String status) {
|
||||||
// try {
|
try {
|
||||||
// for (String cardNo : cardNos) {
|
int successCount = 0;
|
||||||
// InfectiousDiseaseReport report = infectiousDiseaseReportMapper.selectById(cardNo);
|
int failCount = 0;
|
||||||
// if (report != null) {
|
for (String cardNo : cardNos) {
|
||||||
// report.setStatus(Integer.parseInt(status));
|
try {
|
||||||
// report.setUpdateTime(new Date());
|
int rows = reportManageCardMapper.auditCard(cardNo, Integer.parseInt(status));
|
||||||
// infectiousDiseaseReportMapper.updateById(report);
|
if (rows > 0) {
|
||||||
// }
|
successCount++;
|
||||||
// }
|
} else {
|
||||||
// return R.ok("批量审核成功");
|
failCount++;
|
||||||
// } catch (Exception e) {
|
}
|
||||||
// log.error("批量审核传染病报卡失败", e);
|
} catch (Exception e) {
|
||||||
// return R.fail("批量审核失败:" + e.getMessage());
|
log.error("批量审核卡号 {} 失败", cardNo, e);
|
||||||
// }
|
failCount++;
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
return R.ok(String.format("批量审核完成:成功 %d 条,失败 %d 条", successCount, failCount));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("批量审核传染病报卡失败", e);
|
||||||
|
return R.fail("批量审核失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量退回传染病报卡(功能暂未实现)
|
* 批量退回传染病报卡
|
||||||
* @param cardNos 卡号列表
|
* @param cardNos 卡号列表
|
||||||
* @param returnReason 退回原因
|
* @param returnReason 退回原因
|
||||||
* @param status 退回状态
|
* @param status 退回状态
|
||||||
* @return 批量退回结果
|
* @return 批量退回结果
|
||||||
*/
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public R<?> batchReturn(List<String> cardNos, String returnReason, String status) {
|
public R<?> batchReturn(List<String> cardNos, String returnReason, String status) {
|
||||||
// try {
|
try {
|
||||||
// for (String cardNo : cardNos) {
|
int successCount = 0;
|
||||||
// InfectiousDiseaseReport report = infectiousDiseaseReportMapper.selectById(cardNo);
|
int failCount = 0;
|
||||||
// if (report != null) {
|
for (String cardNo : cardNos) {
|
||||||
// report.setStatus(Integer.parseInt(status));
|
try {
|
||||||
// report.setWithdrawReason(returnReason);
|
int rows = reportManageCardMapper.returnCard(cardNo, Integer.parseInt(status), returnReason);
|
||||||
// report.setUpdateTime(new Date());
|
if (rows > 0) {
|
||||||
// infectiousDiseaseReportMapper.updateById(report);
|
successCount++;
|
||||||
// }
|
} else {
|
||||||
// }
|
failCount++;
|
||||||
// return R.ok("批量退回成功");
|
}
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// log.error("批量退回传染病报卡失败", e);
|
log.error("批量退回卡号 {} 失败", cardNo, e);
|
||||||
// return R.fail("批量退回失败:" + e.getMessage());
|
failCount++;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
return R.ok(String.format("批量退回完成:成功 %d 条,失败 %d 条", successCount, failCount));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("批量退回传染病报卡失败", e);
|
||||||
|
return R.fail("批量退回失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出传染病报卡数据
|
* 导出传染病报卡数据
|
||||||
@@ -216,7 +223,143 @@ public class InfectiousCardAppServiceImpl implements IInfectiousCardAppService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void export(InfectiousCardParam param, HttpServletResponse response) {
|
public void export(InfectiousCardParam param, HttpServletResponse response) {
|
||||||
log.warn("导出功能暂未实现");
|
try {
|
||||||
|
// 查询所有符合条件的数据
|
||||||
|
List<InfectiousCardDto> list = reportManageCardMapper.selectAllCards(param);
|
||||||
|
|
||||||
|
// 设置响应头
|
||||||
|
response.setContentType("text/csv;charset=UTF-8");
|
||||||
|
response.setHeader("Content-Disposition",
|
||||||
|
"attachment; filename=infectious_cards_" + System.currentTimeMillis() + ".csv");
|
||||||
|
|
||||||
|
// 写入 CSV 内容
|
||||||
|
java.io.PrintWriter writer = response.getWriter();
|
||||||
|
|
||||||
|
// 写入 BOM,防止中文乱码
|
||||||
|
writer.print('\uFEFF');
|
||||||
|
|
||||||
|
// 写入表头
|
||||||
|
writer.println("报卡编号,报卡名称,病种名称,患者姓名,性别,年龄,上报科室,登记来源,上报时间,审核状态," +
|
||||||
|
"身份证号,联系电话,现住地址,职业,病例分类,发病日期,诊断日期,报告单位,报告医生,填卡日期,备注");
|
||||||
|
|
||||||
|
// 写入数据
|
||||||
|
for (InfectiousCardDto dto : list) {
|
||||||
|
writer.println(String.format("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s",
|
||||||
|
escapeCsv(dto.getCardNo()),
|
||||||
|
escapeCsv(dto.getCardName()),
|
||||||
|
escapeCsv(dto.getDiseaseName()),
|
||||||
|
escapeCsv(dto.getPatientName()),
|
||||||
|
"1".equals(dto.getSex()) ? "男" : "2".equals(dto.getSex()) ? "女" : "未知",
|
||||||
|
dto.getAge() + getAgeUnit(dto.getAgeUnit()),
|
||||||
|
escapeCsv(dto.getDeptName()),
|
||||||
|
getRegistrationSourceName(dto.getRegistrationSource()),
|
||||||
|
dto.getReportDate(),
|
||||||
|
getStatusName(dto.getStatus()),
|
||||||
|
escapeCsv(dto.getIdNo()),
|
||||||
|
escapeCsv(dto.getPhone()),
|
||||||
|
escapeCsv(getFullAddress(dto)),
|
||||||
|
escapeCsv(dto.getOccupation()),
|
||||||
|
getCaseClassName(dto.getCaseClass()),
|
||||||
|
dto.getOnsetDate(),
|
||||||
|
dto.getDiagDate() != null ? dto.getDiagDate().toString().substring(0, 10) : "",
|
||||||
|
escapeCsv(dto.getReportOrg()),
|
||||||
|
escapeCsv(dto.getReportDoc()),
|
||||||
|
dto.getReportDate(),
|
||||||
|
escapeCsv(dto.getRemark() != null ? dto.getRemark() : "")
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
writer.flush();
|
||||||
|
log.info("导出传染病报卡数据成功,共 {} 条", list.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导出传染病报卡数据失败", e);
|
||||||
|
throw new RuntimeException("导出失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSV 字段转义
|
||||||
|
*/
|
||||||
|
private String escapeCsv(String value) {
|
||||||
|
if (value == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (value.contains(",") || value.contains("\"") || value.contains("\n")) {
|
||||||
|
return "\"" + value.replace("\"", "\"\"") + "\"";
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取年龄单位
|
||||||
|
*/
|
||||||
|
private String getAgeUnit(String unit) {
|
||||||
|
if (unit == null) return "岁";
|
||||||
|
switch (unit) {
|
||||||
|
case "1": return "岁";
|
||||||
|
case "2": return "月";
|
||||||
|
case "3": return "天";
|
||||||
|
default: return "岁";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登记来源名称
|
||||||
|
*/
|
||||||
|
private String getRegistrationSourceName(Integer source) {
|
||||||
|
if (source == null) return "未知";
|
||||||
|
switch (source) {
|
||||||
|
case 1: return "门诊";
|
||||||
|
case 2: return "住院";
|
||||||
|
case 3: return "急诊";
|
||||||
|
case 4: return "体检";
|
||||||
|
default: return "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取状态名称
|
||||||
|
*/
|
||||||
|
private String getStatusName(Integer status) {
|
||||||
|
if (status == null) return "未知";
|
||||||
|
switch (status) {
|
||||||
|
case 0: return "草稿";
|
||||||
|
case 1: return "待审核";
|
||||||
|
case 2: return "审核通过";
|
||||||
|
case 3: return "已上报";
|
||||||
|
case 4: return "已撤回";
|
||||||
|
case 5: return "审核失败";
|
||||||
|
default: return "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取病例分类名称
|
||||||
|
*/
|
||||||
|
private String getCaseClassName(Integer caseClass) {
|
||||||
|
if (caseClass == null) return "未知";
|
||||||
|
switch (caseClass) {
|
||||||
|
case 1: return "疑似病例";
|
||||||
|
case 2: return "临床诊断病例";
|
||||||
|
case 3: return "确诊病例";
|
||||||
|
case 4: return "病原携带者";
|
||||||
|
case 5: return "阳性检测结果";
|
||||||
|
default: return "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取完整地址
|
||||||
|
*/
|
||||||
|
private String getFullAddress(InfectiousCardDto dto) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
if (dto.getAddressProv() != null) sb.append(dto.getAddressProv());
|
||||||
|
if (dto.getAddressCity() != null) sb.append(dto.getAddressCity());
|
||||||
|
if (dto.getAddressCounty() != null) sb.append(dto.getAddressCounty());
|
||||||
|
if (dto.getAddressTown() != null) sb.append(dto.getAddressTown());
|
||||||
|
if (dto.getAddressVillage() != null) sb.append(dto.getAddressVillage());
|
||||||
|
if (dto.getAddressHouse() != null) sb.append(dto.getAddressHouse());
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,11 +3,16 @@ package com.openhis.web.reportManagement.controller;
|
|||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.web.reportManagement.appservice.IInfectiousCardAppService;
|
import com.openhis.web.reportManagement.appservice.IInfectiousCardAppService;
|
||||||
import com.openhis.web.reportManagement.dto.InfectiousCardParam;
|
import com.openhis.web.reportManagement.dto.InfectiousCardParam;
|
||||||
|
import com.openhis.web.reportManagement.dto.AuditInfectiousCardRequest;
|
||||||
|
import com.openhis.web.reportManagement.dto.ReturnInfectiousCardRequest;
|
||||||
|
import com.openhis.web.reportManagement.dto.BatchAuditInfectiousCardRequest;
|
||||||
|
import com.openhis.web.reportManagement.dto.BatchReturnInfectiousCardRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
// import java.util.List; // 批量操作功能暂未实现
|
// import java.util.List; // 批量操作功能暂未实现
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,64 +67,48 @@ public class reportManagementController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核传染病报卡(功能暂未实现)
|
* 审核传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNo 报卡编号
|
* @param request 审核请求
|
||||||
* @param auditOpinion 审核意见
|
|
||||||
* @param status 审核状态
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// @PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
// public R<?> audit(@RequestParam String cardNo,
|
public R<?> audit(@RequestBody AuditInfectiousCardRequest request) {
|
||||||
// @RequestParam String auditOpinion,
|
return infectiousCardAppService.audit(request.getCardNo(), request.getAuditOpinion(), request.getStatus());
|
||||||
// @RequestParam String status) {
|
}
|
||||||
// return infectiousCardAppService.audit(cardNo, auditOpinion, status);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回传染病报卡(功能暂未实现)
|
* 退回传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNo 报卡编号
|
* @param request 退回请求
|
||||||
* @param returnReason 退回原因
|
|
||||||
* @param status 审核状态
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// @PostMapping("/return")
|
@PostMapping("/return")
|
||||||
// public R<?> returnCard(@RequestParam String cardNo,
|
public R<?> returnCard(@Valid @RequestBody ReturnInfectiousCardRequest request) {
|
||||||
// @RequestParam String returnReason,
|
return infectiousCardAppService.returnCard(request.getCardNo(), request.getReturnReason(), request.getStatus());
|
||||||
// @RequestParam String status) {
|
}
|
||||||
// return infectiousCardAppService.returnCard(cardNo, returnReason, status);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量审核传染病报卡(功能暂未实现)
|
* 批量审核传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNos 报卡编号列表
|
* @param request 批量审核请求
|
||||||
* @param auditOpinion 审核意见
|
|
||||||
* @param status 审核状态
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// @PostMapping("/batchAudit")
|
@PostMapping("/batchAudit")
|
||||||
// public R<?> batchAudit(@RequestBody List<String> cardNos,
|
public R<?> batchAudit(@RequestBody BatchAuditInfectiousCardRequest request) {
|
||||||
// @RequestParam String auditOpinion,
|
return infectiousCardAppService.batchAudit(request.getCardNos(), request.getAuditOpinion(), request.getStatus());
|
||||||
// @RequestParam String status) {
|
}
|
||||||
// return infectiousCardAppService.batchAudit(cardNos, auditOpinion, status);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量退回传染病报卡(功能暂未实现)
|
* 批量退回传染病报卡
|
||||||
*
|
*
|
||||||
* @param cardNos 报卡编号列表
|
* @param request 批量退回请求
|
||||||
* @param returnReason 退回原因
|
|
||||||
* @param status 审核状态
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
// @PostMapping("/batchReturn")
|
@PostMapping("/batchReturn")
|
||||||
// public R<?> batchReturn(@RequestBody List<String> cardNos,
|
public R<?> batchReturn(@Valid @RequestBody BatchReturnInfectiousCardRequest request) {
|
||||||
// @RequestParam String returnReason,
|
return infectiousCardAppService.batchReturn(request.getCardNos(), request.getReturnReason(), request.getStatus());
|
||||||
// @RequestParam String status) {
|
}
|
||||||
// return infectiousCardAppService.batchReturn(cardNos, returnReason, status);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出传染病报卡
|
* 导出传染病报卡
|
||||||
@@ -127,7 +116,7 @@ public class reportManagementController {
|
|||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @param response 响应对象
|
* @param response 响应对象
|
||||||
*/
|
*/
|
||||||
@PostMapping("/export")
|
@GetMapping("/export")
|
||||||
public void export(InfectiousCardParam param, HttpServletResponse response) {
|
public void export(InfectiousCardParam param, HttpServletResponse response) {
|
||||||
infectiousCardAppService.export(param, response);
|
infectiousCardAppService.export(param, response);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.openhis.web.reportManagement.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核传染病报卡请求 DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2026-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AuditInfectiousCardRequest {
|
||||||
|
|
||||||
|
/** 卡片编号(主键) */
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
/** 审核意见 */
|
||||||
|
private String auditOpinion;
|
||||||
|
|
||||||
|
/** 审核状态 (0 暂存/1 待审核/2 已审核/3 已上报/4 失败/5 退回) */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.openhis.web.reportManagement.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量审核传染病报卡请求 DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2026-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchAuditInfectiousCardRequest {
|
||||||
|
|
||||||
|
/** 卡片编号列表 */
|
||||||
|
private List<String> cardNos;
|
||||||
|
|
||||||
|
/** 审核意见 */
|
||||||
|
private String auditOpinion;
|
||||||
|
|
||||||
|
/** 审核状态 (0 暂存/1 待审核/2 已审核/3 已上报/4 失败/5 退回) */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.openhis.web.reportManagement.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量退回传染病报卡请求 DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2026-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchReturnInfectiousCardRequest {
|
||||||
|
|
||||||
|
/** 卡片编号列表 */
|
||||||
|
private List<String> cardNos;
|
||||||
|
|
||||||
|
/** 退回原因 */
|
||||||
|
@Size(max = 50, message = "退回原因不能超过50个字符")
|
||||||
|
private String returnReason;
|
||||||
|
|
||||||
|
/** 审核状态 (0 暂存/1 待审核/2 已审核/3 已上报/4 失败/5 退回) */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.openhis.web.reportManagement.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退回传染病报卡请求 DTO
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2026-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ReturnInfectiousCardRequest {
|
||||||
|
|
||||||
|
/** 卡片编号(主键) */
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
/** 退回原因 */
|
||||||
|
@Size(max = 50, message = "退回原因不能超过50个字符")
|
||||||
|
private String returnReason;
|
||||||
|
|
||||||
|
/** 审核状态 (0 暂存/1 待审核/2 已审核/3 已上报/4 失败/5 退回) */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,6 +7,8 @@ import com.openhis.web.reportManagement.dto.InfectiousCardParam;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 传染病报卡 Mapper 接口
|
* 传染病报卡 Mapper 接口
|
||||||
*
|
*
|
||||||
@@ -30,4 +32,28 @@ public interface ReportManageCardMapper {
|
|||||||
* @return 报卡详情
|
* @return 报卡详情
|
||||||
*/
|
*/
|
||||||
InfectiousCardDto selectCardByCardNo(@Param("cardNo") String cardNo);
|
InfectiousCardDto selectCardByCardNo(@Param("cardNo") String cardNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核传染病报卡
|
||||||
|
* @param cardNo 卡号
|
||||||
|
* @param status 审核状态
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int auditCard(@Param("cardNo") String cardNo, @Param("status") Integer status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退回传染病报卡
|
||||||
|
* @param cardNo 卡号
|
||||||
|
* @param status 退回状态
|
||||||
|
* @param returnReason 退回原因
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int returnCard(@Param("cardNo") String cardNo, @Param("status") Integer status, @Param("returnReason") String returnReason);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有报卡数据(用于导出)
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return 报卡列表
|
||||||
|
*/
|
||||||
|
List<InfectiousCardDto> selectAllCards(@Param("param") InfectiousCardParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
AND t1.pat_name LIKE CONCAT('%', #{param.patientName}, '%')
|
AND t1.pat_name LIKE CONCAT('%', #{param.patientName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.status != null">
|
<if test="param.status != null">
|
||||||
AND t1.status = #{param.status}
|
AND t1.status::INTEGER = #{param.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.registrationSource != null">
|
<if test="param.registrationSource != null">
|
||||||
AND t1.registration_source = #{param.registrationSource}
|
AND t1.registration_source = #{param.registrationSource}
|
||||||
@@ -150,4 +150,106 @@
|
|||||||
WHERE t1.delete_flag = '0' AND t1.card_no = #{cardNo}
|
WHERE t1.delete_flag = '0' AND t1.card_no = #{cardNo}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 审核传染病报卡 -->
|
||||||
|
<update id="auditCard">
|
||||||
|
UPDATE infectious_card
|
||||||
|
SET status = #{status}::INTEGER,
|
||||||
|
update_time = CURRENT_TIMESTAMP
|
||||||
|
WHERE card_no = #{cardNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 退回传染病报卡 -->
|
||||||
|
<update id="returnCard">
|
||||||
|
UPDATE infectious_card
|
||||||
|
SET status = #{status}::INTEGER,
|
||||||
|
return_reason = #{returnReason},
|
||||||
|
update_time = CURRENT_TIMESTAMP
|
||||||
|
WHERE card_no = #{cardNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 查询所有报卡数据(用于导出) -->
|
||||||
|
<select id="selectAllCards" resultType="com.openhis.web.reportManagement.dto.InfectiousCardDto">
|
||||||
|
SELECT
|
||||||
|
t1.card_no AS cardNo,
|
||||||
|
'传染病报告卡' AS cardName,
|
||||||
|
t1.disease_code AS diseaseCode,
|
||||||
|
CASE
|
||||||
|
WHEN t1.disease_code = '0101' THEN '鼠疫'
|
||||||
|
WHEN t1.disease_code = '0102' THEN '霍乱'
|
||||||
|
WHEN t1.disease_code = '0201' THEN '传染性非典型肺炎'
|
||||||
|
WHEN t1.disease_code = '0202' THEN '艾滋病'
|
||||||
|
WHEN t1.disease_code = '0203' THEN '病毒性肝炎'
|
||||||
|
WHEN t1.disease_code = '0211' THEN '炭疽'
|
||||||
|
WHEN t1.disease_code = '0213' THEN '肺结核'
|
||||||
|
WHEN t1.disease_code = '0222' THEN '梅毒'
|
||||||
|
WHEN t1.disease_code = '0224' THEN '血吸虫病'
|
||||||
|
WHEN t1.disease_code = '0225' THEN '疟疾'
|
||||||
|
WHEN t1.disease_code = '0301' THEN '流行性感冒'
|
||||||
|
WHEN t1.disease_code = '0302' THEN '流行性腮腺炎'
|
||||||
|
WHEN t1.disease_code = '0303' THEN '风疹'
|
||||||
|
WHEN t1.disease_code = '0310' THEN '其它感染性腹泻病'
|
||||||
|
WHEN t1.disease_code = '0311' THEN '手足口病'
|
||||||
|
ELSE t1.disease_code
|
||||||
|
END AS diseaseName,
|
||||||
|
t1.pat_name AS patientName,
|
||||||
|
t1.sex AS sex,
|
||||||
|
t1.age AS age,
|
||||||
|
t1.dept_id AS deptId,
|
||||||
|
t2.name AS deptName,
|
||||||
|
t1.registration_source AS registrationSource,
|
||||||
|
t1.report_date AS reportDate,
|
||||||
|
t1.status AS status,
|
||||||
|
t1.id_type AS idType,
|
||||||
|
t1.id_no AS idNo,
|
||||||
|
t1.parent_name AS parentName,
|
||||||
|
t1.birthday AS birthday,
|
||||||
|
t1.age_unit AS ageUnit,
|
||||||
|
t1.workplace AS workplace,
|
||||||
|
t1.phone AS phone,
|
||||||
|
t1.contact_phone AS contactPhone,
|
||||||
|
t1.address_prov AS addressProv,
|
||||||
|
t1.address_city AS addressCity,
|
||||||
|
t1.address_county AS addressCounty,
|
||||||
|
t1.address_town AS addressTown,
|
||||||
|
t1.address_village AS addressVillage,
|
||||||
|
t1.address_house AS addressHouse,
|
||||||
|
t1.patient_belong AS patientBelong,
|
||||||
|
t1.occupation AS occupation,
|
||||||
|
t1.disease_type AS diseaseType,
|
||||||
|
t1.case_class AS caseClass,
|
||||||
|
t1.onset_date AS onsetDate,
|
||||||
|
t1.diag_date AS diagDate,
|
||||||
|
t1.death_date AS deathDate,
|
||||||
|
t1.report_org AS reportOrg,
|
||||||
|
t1.report_doc AS reportDoc,
|
||||||
|
t1.withdraw_reason AS withdrawReason,
|
||||||
|
t1.correct_name AS correctName,
|
||||||
|
t1.other_disease AS otherDisease
|
||||||
|
FROM infectious_card t1
|
||||||
|
LEFT JOIN adm_organization t2 ON t1.dept_id = t2.id
|
||||||
|
WHERE t1.delete_flag = '0'
|
||||||
|
<if test="param.cardNo != null and param.cardNo != ''">
|
||||||
|
AND t1.card_no = #{param.cardNo}
|
||||||
|
</if>
|
||||||
|
<if test="param.patientName != null and param.patientName != ''">
|
||||||
|
AND t1.pat_name LIKE CONCAT('%', #{param.patientName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND t1.status::INTEGER = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.registrationSource != null">
|
||||||
|
AND t1.registration_source = #{param.registrationSource}
|
||||||
|
</if>
|
||||||
|
<if test="param.deptId != null">
|
||||||
|
AND t1.dept_id = #{param.deptId}
|
||||||
|
</if>
|
||||||
|
<if test="param.startDate != null and param.startDate != ''">
|
||||||
|
AND t1.report_date >= TO_DATE(#{param.startDate}, 'YYYY-MM-DD')
|
||||||
|
</if>
|
||||||
|
<if test="param.endDate != null and param.endDate != ''">
|
||||||
|
AND t1.report_date <= TO_DATE(#{param.endDate}, 'YYYY-MM-DD')
|
||||||
|
</if>
|
||||||
|
ORDER BY t1.report_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
@@ -121,7 +122,8 @@ public class InfectiousDiseaseReport extends HisBaseEntity {
|
|||||||
/** 订正病名(订正报告必填) */
|
/** 订正病名(订正报告必填) */
|
||||||
private String correctName;
|
private String correctName;
|
||||||
|
|
||||||
/** 退卡原因(退卡时必填<EFBFBD>?*/
|
/** 退卡原因(退卡时必填) */
|
||||||
|
@TableField("return_reason")
|
||||||
private String withdrawReason;
|
private String withdrawReason;
|
||||||
|
|
||||||
/** 报告单位(统一信用代码/医院名称<E5908D>?*/
|
/** 报告单位(统一信用代码/医院名称<E5908D>?*/
|
||||||
|
|||||||
@@ -68,64 +68,64 @@ export function deleteInfectiousCard(cardNo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核传染病报卡(功能暂未实现)
|
* 审核传染病报卡
|
||||||
* @param {Object} data - 审核数据
|
* @param {Object} data - 审核数据
|
||||||
* @param {string} data.cardNo - 报卡编号
|
* @param {string} data.cardNo - 报卡编号
|
||||||
* @param {string} data.auditOpinion - 审核意见
|
* @param {string} data.auditOpinion - 审核意见
|
||||||
* @param {string} data.status - 审核状态(2:通过)
|
* @param {string} data.status - 审核状态(2:通过)
|
||||||
*/
|
*/
|
||||||
// export function auditInfectiousCard(data) {
|
export function auditInfectiousCard(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: '/report-manage/infectiousDiseaseReport/audit',
|
url: '/report-manage/infectiousDiseaseReport/audit',
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// data,
|
data,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回传染病报卡(功能暂未实现)
|
* 退回传染病报卡
|
||||||
* @param {Object} data - 退回数据
|
* @param {Object} data - 退回数据
|
||||||
* @param {string} data.cardNo - 报卡编号
|
* @param {string} data.cardNo - 报卡编号
|
||||||
* @param {string} data.returnReason - 退回原因
|
* @param {string} data.returnReason - 退回原因
|
||||||
* @param {string} data.status - 审核状态(5:审核失败)
|
* @param {string} data.status - 审核状态(5:审核失败)
|
||||||
*/
|
*/
|
||||||
// export function returnInfectiousCard(data) {
|
export function returnInfectiousCard(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: '/report-manage/infectiousDiseaseReport/return',
|
url: '/report-manage/infectiousDiseaseReport/return',
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// data,
|
data,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量审核传染病报卡(功能暂未实现)
|
* 批量审核传染病报卡
|
||||||
* @param {Object} data - 批量审核数据
|
* @param {Object} data - 批量审核数据
|
||||||
* @param {Array<string>} data.cardNos - 报卡编号数组
|
* @param {Array<string>} data.cardNos - 报卡编号数组
|
||||||
* @param {string} data.auditOpinion - 审核意见
|
* @param {string} data.auditOpinion - 审核意见
|
||||||
* @param {string} data.status - 审核状态(2:通过)
|
* @param {string} data.status - 审核状态(2:通过)
|
||||||
*/
|
*/
|
||||||
// export function batchAuditCards(data) {
|
export function batchAuditCards(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: '/report-manage/infectiousDiseaseReport/batchAudit',
|
url: '/report-manage/infectiousDiseaseReport/batchAudit',
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// data,
|
data,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量退回传染病报卡(功能暂未实现)
|
* 批量退回传染病报卡
|
||||||
* @param {Object} data - 批量退回数据
|
* @param {Object} data - 批量退回数据
|
||||||
* @param {Array<string>} data.cardNos - 报卡编号数组
|
* @param {Array<string>} data.cardNos - 报卡编号数组
|
||||||
* @param {string} data.returnReason - 退回原因
|
* @param {string} data.returnReason - 退回原因
|
||||||
* @param {string} data.status - 审核状态(5:审核失败)
|
* @param {string} data.status - 审核状态(5:审核失败)
|
||||||
*/
|
*/
|
||||||
// export function batchReturnCards(data) {
|
export function batchReturnCards(data) {
|
||||||
// return request({
|
return request({
|
||||||
// url: '/report-manage/infectiousDiseaseReport/batchReturn',
|
url: '/report-manage/infectiousDiseaseReport/batchReturn',
|
||||||
// method: 'post',
|
method: 'post',
|
||||||
// data,
|
data,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取科室树
|
* 获取科室树
|
||||||
@@ -149,3 +149,16 @@ export function getAuditRecords(cardNo) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出传染病报卡
|
||||||
|
* @param {Object} params - 查询参数
|
||||||
|
*/
|
||||||
|
export function exportInfectiousCards(params) {
|
||||||
|
return request({
|
||||||
|
url: '/report-manage/infectiousDiseaseReport/export',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
responseType: 'blob'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -497,6 +497,8 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
placeholder="如需退回,请填写退回原因"
|
placeholder="如需退回,请填写退回原因"
|
||||||
|
maxlength="50"
|
||||||
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -556,6 +558,8 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
placeholder="请填写退回原因"
|
placeholder="请填写退回原因"
|
||||||
|
maxlength="50"
|
||||||
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -576,11 +580,12 @@ import useUserStore from '@/store/modules/user';
|
|||||||
import {
|
import {
|
||||||
listInfectiousCards,
|
listInfectiousCards,
|
||||||
getInfectiousCard,
|
getInfectiousCard,
|
||||||
// auditInfectiousCard, // 功能暂未实现
|
auditInfectiousCard,
|
||||||
// returnInfectiousCard, // 功能暂未实现
|
returnInfectiousCard,
|
||||||
// batchAuditCards, // 功能暂未实现
|
batchAuditCards,
|
||||||
// batchReturnCards, // 功能暂未实现
|
batchReturnCards,
|
||||||
getDeptTree
|
getDeptTree,
|
||||||
|
exportInfectiousCards
|
||||||
} from './api';
|
} from './api';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
@@ -876,67 +881,77 @@ function handleDrawerClose() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 审核通过
|
// 审核通过
|
||||||
function handlePassCard() {
|
async function handlePassCard() {
|
||||||
ElMessage.info('审核通过功能暂未实现');
|
if (!auditForm.value.auditOpinion) {
|
||||||
// if (!auditForm.value.auditOpinion) {
|
ElMessage.warning('请填写审核意见');
|
||||||
// ElMessage.warning('请填写审核意见');
|
return;
|
||||||
// return;
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
// const res = await auditInfectiousCard({
|
const res = await auditInfectiousCard({
|
||||||
// cardNo: currentCard.value.cardNo,
|
cardNo: currentCard.value.cardNo,
|
||||||
// auditOpinion: auditForm.value.auditOpinion,
|
auditOpinion: auditForm.value.auditOpinion,
|
||||||
// status: '2'
|
status: '2'
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// ElMessage.success('审核通过');
|
ElMessage.success('审核通过');
|
||||||
// handleDrawerClose();
|
handleDrawerClose();
|
||||||
// loadTableData();
|
loadTableData();
|
||||||
// loadStats();
|
loadStats();
|
||||||
// } else {
|
} else {
|
||||||
// ElMessage.error(res.msg || '审核失败');
|
ElMessage.error(res.msg || '审核失败');
|
||||||
// }
|
}
|
||||||
// } catch (err) {
|
} catch (err) {
|
||||||
// ElMessage.error('审核失败');
|
ElMessage.error('审核失败');
|
||||||
// console.error(err);
|
console.error(err);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 退回修改
|
// 退回修改
|
||||||
function handleReturnCard() {
|
async function handleReturnCard() {
|
||||||
ElMessage.info('退回修改功能暂未实现');
|
if (!auditForm.value.returnReason) {
|
||||||
// if (!auditForm.value.returnReason) {
|
ElMessage.warning('请填写退回原因');
|
||||||
// ElMessage.warning('请填写退回原因');
|
return;
|
||||||
// return;
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// try {
|
// 验证退回原因长度
|
||||||
// const res = await returnInfectiousCard({
|
if (auditForm.value.returnReason.length > 50) {
|
||||||
// cardNo: currentCard.value.cardNo,
|
ElMessage.warning('退回原因不能超过50个字符');
|
||||||
// returnReason: auditForm.value.returnReason,
|
return;
|
||||||
// status: '5'
|
}
|
||||||
// });
|
|
||||||
|
|
||||||
// if (res.code === 200) {
|
try {
|
||||||
// ElMessage.success('已退回修改');
|
const res = await returnInfectiousCard({
|
||||||
// handleDrawerClose();
|
cardNo: currentCard.value.cardNo,
|
||||||
// loadTableData();
|
returnReason: auditForm.value.returnReason,
|
||||||
// loadStats();
|
status: '5'
|
||||||
// } else {
|
});
|
||||||
// ElMessage.error(res.msg || '退回失败');
|
|
||||||
// }
|
if (res.code === 200) {
|
||||||
// } catch (err) {
|
ElMessage.success('已退回修改');
|
||||||
// ElMessage.error('退回失败');
|
handleDrawerClose();
|
||||||
// console.error(err);
|
loadTableData();
|
||||||
// }
|
loadStats();
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg || '退回失败');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
ElMessage.error('退回失败');
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量审核
|
// 批量审核
|
||||||
function handleBatchAudit() {
|
function handleBatchAudit() {
|
||||||
ElMessage.info('批量审核功能暂未实现');
|
// 检查是否包含非待审核状态的报卡
|
||||||
// batchAuditDialogVisible.value = true;
|
const nonPendingCards = selectedRows.value.filter(row => row.status !== 1);
|
||||||
|
if (nonPendingCards.length > 0) {
|
||||||
|
ElMessage.warning('只能选择待审核状态的报卡');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
batchAuditDialogVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleBatchAuditClose() {
|
function handleBatchAuditClose() {
|
||||||
@@ -944,41 +959,47 @@ function handleBatchAuditClose() {
|
|||||||
batchAuditForm.auditOpinion = '';
|
batchAuditForm.auditOpinion = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function confirmBatchAudit() {
|
async function confirmBatchAudit() {
|
||||||
// if (!batchAuditForm.auditOpinion) {
|
if (!batchAuditForm.auditOpinion) {
|
||||||
// ElMessage.warning('请填写审核意见');
|
ElMessage.warning('请填写审核意见');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// batchLoading.value = true;
|
batchLoading.value = true;
|
||||||
// try {
|
try {
|
||||||
// const cardNos = selectedRows.value.map(row => row.cardNo);
|
const cardNos = selectedRows.value.map(row => row.cardNo);
|
||||||
// const res = await batchAuditCards({
|
const res = await batchAuditCards({
|
||||||
// cardNos,
|
cardNos,
|
||||||
// auditOpinion: batchAuditForm.auditOpinion,
|
auditOpinion: batchAuditForm.auditOpinion,
|
||||||
// status: '2'
|
status: '2'
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// ElMessage.success('批量审核成功');
|
ElMessage.success('批量审核成功');
|
||||||
// handleBatchAuditClose();
|
handleBatchAuditClose();
|
||||||
// loadTableData();
|
loadTableData();
|
||||||
// loadStats();
|
loadStats();
|
||||||
// } else {
|
} else {
|
||||||
// ElMessage.error(res.msg || '批量审核失败');
|
ElMessage.error(res.msg || '批量审核失败');
|
||||||
// }
|
}
|
||||||
// } catch (err) {
|
} catch (err) {
|
||||||
// ElMessage.error('批量审核失败');
|
ElMessage.error('批量审核失败');
|
||||||
// console.error(err);
|
console.error(err);
|
||||||
// } finally {
|
} finally {
|
||||||
// batchLoading.value = false;
|
batchLoading.value = false;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 批量退回
|
// 批量退回
|
||||||
function handleBatchReturn() {
|
function handleBatchReturn() {
|
||||||
ElMessage.info('批量退回功能暂未实现');
|
// 检查是否包含非待审核状态的报卡
|
||||||
// batchReturnDialogVisible.value = true;
|
const nonPendingCards = selectedRows.value.filter(row => row.status !== 1);
|
||||||
|
if (nonPendingCards.length > 0) {
|
||||||
|
ElMessage.warning('只能选择待审核状态的报卡');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
batchReturnDialogVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleBatchReturnClose() {
|
function handleBatchReturnClose() {
|
||||||
@@ -986,40 +1007,84 @@ function handleBatchReturnClose() {
|
|||||||
batchReturnForm.returnReason = '';
|
batchReturnForm.returnReason = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function confirmBatchReturn() {
|
async function confirmBatchReturn() {
|
||||||
// if (!batchReturnForm.returnReason) {
|
if (!batchReturnForm.returnReason) {
|
||||||
// ElMessage.warning('请填写退回原因');
|
ElMessage.warning('请填写退回原因');
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// batchLoading.value = true;
|
// 验证退回原因长度
|
||||||
// try {
|
if (batchReturnForm.returnReason.length > 50) {
|
||||||
// const cardNos = selectedRows.value.map(row => row.cardNo);
|
ElMessage.warning('退回原因不能超过50个字符');
|
||||||
// const res = await batchReturnCards({
|
return;
|
||||||
// cardNos,
|
}
|
||||||
// returnReason: batchReturnForm.returnReason,
|
|
||||||
// status: '5'
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (res.code === 200) {
|
batchLoading.value = true;
|
||||||
// ElMessage.success('批量退回成功');
|
try {
|
||||||
// handleBatchReturnClose();
|
const cardNos = selectedRows.value.map(row => row.cardNo);
|
||||||
// loadTableData();
|
const res = await batchReturnCards({
|
||||||
// loadStats();
|
cardNos,
|
||||||
// } else {
|
returnReason: batchReturnForm.returnReason,
|
||||||
// ElMessage.error(res.msg || '批量退回失败');
|
status: '5'
|
||||||
// }
|
});
|
||||||
// } catch (err) {
|
|
||||||
// ElMessage.error('批量退回失败');
|
if (res.code === 200) {
|
||||||
// console.error(err);
|
ElMessage.success('批量退回成功');
|
||||||
// } finally {
|
handleBatchReturnClose();
|
||||||
// batchLoading.value = false;
|
loadTableData();
|
||||||
// }
|
loadStats();
|
||||||
// }
|
} else {
|
||||||
|
ElMessage.error(res.msg || '批量退回失败');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
ElMessage.error('批量退回失败');
|
||||||
|
console.error(err);
|
||||||
|
} finally {
|
||||||
|
batchLoading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
function handleExport() {
|
async function handleExport() {
|
||||||
ElMessage.info('导出功能暂未实现');
|
try {
|
||||||
|
// 构建查询参数
|
||||||
|
const params = {
|
||||||
|
cardNo: filterForm.cardNo,
|
||||||
|
patientName: filterForm.patientName,
|
||||||
|
status: filterForm.status,
|
||||||
|
registrationSource: filterForm.source,
|
||||||
|
deptId: filterForm.deptId,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (filterForm.dateRange && filterForm.dateRange.length === 2) {
|
||||||
|
params.startDate = filterForm.dateRange[0];
|
||||||
|
params.endDate = filterForm.dateRange[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用导出 API 发起请求,携带认证信息
|
||||||
|
const res = await exportInfectiousCards(params);
|
||||||
|
|
||||||
|
// 创建 Blob 对象
|
||||||
|
const blob = new Blob([res], { type: 'text/csv;charset=utf-8' });
|
||||||
|
|
||||||
|
// 创建下载链接
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = '传染病报告卡_' + new Date().getTime() + '.csv';
|
||||||
|
link.style.display = 'none';
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// 释放资源
|
||||||
|
document.body.removeChild(link);
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
|
||||||
|
ElMessage.success('导出成功');
|
||||||
|
} catch (err) {
|
||||||
|
ElMessage.error('导出失败');
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分页处理
|
// 分页处理
|
||||||
|
|||||||
Reference in New Issue
Block a user