|
@@ -261,7 +261,7 @@ public class DrugConfigFacade {
|
|
* @param hospitalIdVO
|
|
* @param hospitalIdVO
|
|
*/
|
|
*/
|
|
public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
|
|
public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
|
|
- List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 0, 1, DrugConfig.class);
|
|
|
|
|
|
+ List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 1, 1, DrugConfig.class);
|
|
if (ListUtil.isNotEmpty(drugConfigList)) {
|
|
if (ListUtil.isNotEmpty(drugConfigList)) {
|
|
drugConfigList.forEach(drugConfig -> {
|
|
drugConfigList.forEach(drugConfig -> {
|
|
drugConfig.setHospitalId(hospitalIdVO.getHospitalId());
|
|
drugConfig.setHospitalId(hospitalIdVO.getHospitalId());
|
|
@@ -586,7 +586,7 @@ public class DrugConfigFacade {
|
|
.eq("hospital_id", hospitalIdVO.getHospitalId());
|
|
.eq("hospital_id", hospitalIdVO.getHospitalId());
|
|
List<DrugConfig> records = drugConfigService.list(queryWrapper);
|
|
List<DrugConfig> records = drugConfigService.list(queryWrapper);
|
|
String fileName = "药品映射.xls";
|
|
String fileName = "药品映射.xls";
|
|
- ExcelUtils.exportExcel(records, null, "sheet1", DrugConfig.class, fileName, response, 12.8f);
|
|
|
|
|
|
+ ExcelUtils.exportExcel(records, getFrom(), "sheet1", DrugConfig.class, fileName, response, 12.8f);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -606,6 +606,31 @@ public class DrugConfigFacade {
|
|
*/
|
|
*/
|
|
public void exportExcelModule(HttpServletResponse response) {
|
|
public void exportExcelModule(HttpServletResponse response) {
|
|
String fileName = "药品映射模板.xls";
|
|
String fileName = "药品映射模板.xls";
|
|
- ExcelUtils.exportExcel(new ArrayList<>(), null, "sheet1", DrugConfig.class, fileName, response, 12.8f);
|
|
|
|
|
|
+ ExcelUtils.exportExcel(new ArrayList<>(), getFrom(), "sheet1", DrugConfig.class, fileName, response, 12.8f);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 剂型说明
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private String getFrom() {
|
|
|
|
+ String from = "药品模板——药品剂型填写说明[不填";
|
|
|
|
+ //药品剂型
|
|
|
|
+ List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(9);
|
|
|
|
+ List<String> formList = dicTypeMappingList.stream()
|
|
|
|
+ .filter(i -> StringUtil.isNotBlank(i.getName()))
|
|
|
|
+ .map(i -> i.getName())
|
|
|
|
+ .distinct()
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ if (ListUtil.isNotEmpty(formList)) {
|
|
|
|
+ for (String s : formList) {
|
|
|
|
+ if (StringUtil.isNotBlank(s)) {
|
|
|
|
+ from += "、" + s;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ from += "]";
|
|
|
|
+ return from;
|
|
}
|
|
}
|
|
}
|
|
}
|