|
@@ -254,24 +254,39 @@ public class ExcelController {
|
|
|
// 样式
|
|
|
Sheet sheet = writer.getSheet();
|
|
|
// 内容
|
|
|
- writer.merge(0, 1, 0, 6, "为了保证成功导入,请勿修改模板格式", false);
|
|
|
+ writer.merge(0, 1, 0, 16, "为了保证成功导入,请勿修改模板格式", false);
|
|
|
writer.passCurrentRow();
|
|
|
writer.passCurrentRow();
|
|
|
- writer.merge(2, 2, 0, 6, "医院收入数据批量导入", false);
|
|
|
+ writer.merge(2, 2, 0, 16, "医院收入数据批量导入", false);
|
|
|
writer.passCurrentRow();
|
|
|
// 冻结前四行
|
|
|
writer.setFreezePane(4);
|
|
|
- writer.writeRow(Arrays.asList("成本项目代码", "成本项目名称", "开单科室", "开单科室代码", "执行科室", "执行科室代码", "金额"));
|
|
|
+ writer.writeRow(Arrays.asList("成本项目代码", "成本项目名称", "开单科室", "开单科室代码", "执行科室", "执行科室代码", "医生编码","开单医生",
|
|
|
+ "病人ID", "住院号/门诊号", "患者姓名", "病人费别", "收据费别", "数量", "单位", "金额", "费用发生时间"));
|
|
|
int accountType = NumberConstant.ONE;
|
|
|
int column = NumberConstant.FOUR;
|
|
|
getProductByAccountType(hospId, writer, accountType, column);
|
|
|
writer.setColumnWidth(0, 20);
|
|
|
writer.setColumnWidth(1, 20);
|
|
|
- writer.setColumnWidth(2, 20);
|
|
|
- writer.setColumnWidth(3, 20);
|
|
|
- writer.setColumnWidth(4, 20);
|
|
|
- writer.setColumnWidth(5, 20);
|
|
|
- writer.setColumnWidth(6, 20);
|
|
|
+ writer.setColumnWidth(2, 10);
|
|
|
+ writer.setColumnWidth(3, 13);
|
|
|
+ writer.setColumnWidth(4, 10);
|
|
|
+ writer.setColumnWidth(5, 13);
|
|
|
+ writer.setColumnWidth(6, 10);
|
|
|
+ writer.setColumnWidth(7, 10);
|
|
|
+ writer.setColumnWidth(8, 10);
|
|
|
+ writer.setColumnWidth(9, 15);
|
|
|
+ writer.setColumnWidth(10, 10);
|
|
|
+ writer.setColumnWidth(11, 10);
|
|
|
+ writer.setColumnWidth(12, 10);
|
|
|
+ writer.setColumnWidth(13, 10);
|
|
|
+ writer.setColumnWidth(14, 10);
|
|
|
+ writer.setColumnWidth(15, 10);
|
|
|
+ writer.setColumnWidth(16, 15);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + uuid + ".xls");
|
|
|
ServletOutputStream out = null;
|
|
@@ -436,10 +451,11 @@ public class ExcelController {
|
|
|
*/
|
|
|
@PostMapping("/importDataByFileType")
|
|
|
@ApiOperation("批量导入指定类型数据信息")
|
|
|
- public Result importProductAccount(@RequestParam("file") MultipartFile file, Integer year, Integer month) {
|
|
|
+ public Result importProductAccount(@RequestParam("file") MultipartFile file,Integer fileType, String dateTime) {
|
|
|
if (Objects.isNull(file)) {
|
|
|
throw new CostException(500, "请选择文件");
|
|
|
}
|
|
|
+
|
|
|
InputStream in;
|
|
|
// 导入的是收入数据
|
|
|
try {
|
|
@@ -449,7 +465,7 @@ public class ExcelController {
|
|
|
log.info("最开始:read={}", read);
|
|
|
log.info("-------------------------------------------------------------------");
|
|
|
User user = UserContext.getCurrentUser();
|
|
|
- return costIncomeGroupService.importIncomeGroup(read, user, file, year, month);
|
|
|
+ return costIncomeGroupService.importIncomeGroup(read, user, file, dateTime,fileType);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
;
|