Commit 9bae4a21 by 刘泽志

批量异常导出

parent be7c11ba
...@@ -9,6 +9,7 @@ import com.tbyf.his.common.annotation.IgnoreWebSecurity; ...@@ -9,6 +9,7 @@ import com.tbyf.his.common.annotation.IgnoreWebSecurity;
import com.tbyf.his.common.core.domain.AjaxResult; import com.tbyf.his.common.core.domain.AjaxResult;
import com.tbyf.his.common.core.page.TableDataInfo; import com.tbyf.his.common.core.page.TableDataInfo;
import com.tbyf.his.common.core.text.StrFormatter; import com.tbyf.his.common.core.text.StrFormatter;
import com.tbyf.his.common.exception.base.BaseException;
import com.tbyf.his.common.utils.StringUtils; import com.tbyf.his.common.utils.StringUtils;
import com.tbyf.his.common.utils.bean.BeanUtils; import com.tbyf.his.common.utils.bean.BeanUtils;
import com.tbyf.his.web.dataImport.DataImportUtils; import com.tbyf.his.web.dataImport.DataImportUtils;
...@@ -65,6 +66,9 @@ public class DataFieldController { ...@@ -65,6 +66,9 @@ public class DataFieldController {
private MetaFieldService metaFieldService; private MetaFieldService metaFieldService;
@Autowired @Autowired
private DataRuleService dataRuleService;
@Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@IgnoreWebSecurity @IgnoreWebSecurity
...@@ -136,15 +140,14 @@ public class DataFieldController { ...@@ -136,15 +140,14 @@ public class DataFieldController {
@ApiOperation("根据基础模板重置字段") @ApiOperation("根据基础模板重置字段")
public AjaxResult resetField(@RequestParam String excelId, @RequestParam(required = false) String year) { public AjaxResult resetField(@RequestParam String excelId, @RequestParam(required = false) String year) {
final ExcelData excelData = excelDataService.getById(excelId); final ExcelData excelData = excelDataService.getById(excelId);
// 获取元字段列表
final List<MetaField> metaFields = metaFieldService.list();
// 获取需要同步的字段列表 // 获取需要同步的字段列表
List<DataField> fieldMatchList = null; List<DataField> fieldMatchList = null;
if (StringUtils.isNotBlank(year)) { if (StringUtils.isNotBlank(year)) {
DataTemplate template = dataTemplateService.getOne(Wrappers.lambdaQuery(DataTemplate.class) DataTemplate template = dataTemplateService.getOne(Wrappers.lambdaQuery(DataTemplate.class)
.eq(DataTemplate::getYear, year).eq(DataTemplate::getOrgName, excelData.getOrgName()), false); .eq(DataTemplate::getYear, year).eq(DataTemplate::getOrgName, excelData.getOrgName()), false);
fieldMatchList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class) fieldMatchList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class)
.eq(DataField::getTemplateId, template.getId()).isNotNull(DataField::getField)); .eq(DataField::getTemplateId, template.getId()).isNotNull(DataField::getField)
.ne(DataField::getField, ""));
} }
// 删除掉之前的模板信息 // 删除掉之前的模板信息
final LambdaQueryWrapper<DataField> wrapper = Wrappers.lambdaQuery(DataField.class).eq(DataField::getTemplateId, excelData.getTemplateId()); final LambdaQueryWrapper<DataField> wrapper = Wrappers.lambdaQuery(DataField.class).eq(DataField::getTemplateId, excelData.getTemplateId());
...@@ -152,6 +155,12 @@ public class DataFieldController { ...@@ -152,6 +155,12 @@ public class DataFieldController {
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
final List<String> fieldIdList = list.stream().map(DataField::getId).collect(Collectors.toList()); final List<String> fieldIdList = list.stream().map(DataField::getId).collect(Collectors.toList());
bindRuleService.remove(Wrappers.lambdaQuery(BindRule.class).in(BindRule::getDataId, fieldIdList)); bindRuleService.remove(Wrappers.lambdaQuery(BindRule.class).in(BindRule::getDataId, fieldIdList));
// 模板规则也要删除
List<BindRule> templateRuleList = bindRuleService.list(Wrappers.lambdaQuery(BindRule.class).eq(BindRule::getDataId, excelData.getTemplateId()));
if (!CollectionUtils.isEmpty(templateRuleList)) {
dataRuleService.remove(Wrappers.lambdaQuery(DataRule.class).in(DataRule::getId, templateRuleList.stream().map(BindRule::getRuleId).collect(Collectors.toList())));
}
bindRuleService.remove(Wrappers.lambdaQuery(BindRule.class).in(BindRule::getDataId, Collections.singletonList(excelData.getTemplateId())));
} }
dataFieldService.remove(Wrappers.lambdaQuery(DataField.class).eq(DataField::getTemplateId, excelData.getTemplateId())); dataFieldService.remove(Wrappers.lambdaQuery(DataField.class).eq(DataField::getTemplateId, excelData.getTemplateId()));
try (InputStream is = new ByteArrayInputStream(excelData.getFile()); Workbook workbook = WorkbookFactory.create(is)) { try (InputStream is = new ByteArrayInputStream(excelData.getFile()); Workbook workbook = WorkbookFactory.create(is)) {
...@@ -177,8 +186,8 @@ public class DataFieldController { ...@@ -177,8 +186,8 @@ public class DataFieldController {
// TODO 这里坐标修改为i+1是因为excel文件中展示的第一行号是1,符合直觉 // TODO 这里坐标修改为i+1是因为excel文件中展示的第一行号是1,符合直觉
dataField.setCoordinate("F," + (i + 1)); dataField.setCoordinate("F," + (i + 1));
dataField.setSort(i + 1); dataField.setSort(i + 1);
// 字段绑定需要进行模糊匹配 // 字段绑定确定进行精确匹配
dataFieldService.fieldMatch(metaFields, dataField, fieldMatchList); dataFieldService.fieldMatch(dataField, fieldMatchList);
fieldList.add(dataField); fieldList.add(dataField);
} }
dataFieldService.saveBatch(fieldList); dataFieldService.saveBatch(fieldList);
...@@ -289,20 +298,20 @@ public class DataFieldController { ...@@ -289,20 +298,20 @@ public class DataFieldController {
@ApiOperation("相同字段检查") @ApiOperation("相同字段检查")
public AjaxResult sameFieldCheck(@RequestParam String templateId) { public AjaxResult sameFieldCheck(@RequestParam String templateId) {
List<CreateFieldVO> fieldList = dataFieldService.getCreateFields(templateId); List<CreateFieldVO> fieldList = dataFieldService.getCreateFields(templateId);
if (CollectionUtils.isEmpty(fieldList)){ if (CollectionUtils.isEmpty(fieldList)) {
return AjaxResult.success(Collections.emptyList()); return AjaxResult.success(Collections.emptyList());
} }
Map<String, Integer> map = new HashMap<>(); Map<String, Integer> map = new HashMap<>();
List<CreateFieldVO> list = new ArrayList<>(); List<CreateFieldVO> list = new ArrayList<>();
for (CreateFieldVO field : fieldList){ for (CreateFieldVO field : fieldList) {
if (map.containsKey(field.getFieldName())){ if (map.containsKey(field.getFieldName())) {
map.put(field.getFieldName(),map.get(field.getFieldName())+1); map.put(field.getFieldName(), map.get(field.getFieldName()) + 1);
}else { } else {
map.put(field.getFieldName(),1); map.put(field.getFieldName(), 1);
} }
} }
map.forEach((key,value)->{ map.forEach((key, value) -> {
if (value > 1){ if (value > 1) {
Optional<CreateFieldVO> first = fieldList.stream().filter(item -> StringUtils.equals(item.getFieldName(), key)).findFirst(); Optional<CreateFieldVO> first = fieldList.stream().filter(item -> StringUtils.equals(item.getFieldName(), key)).findFirst();
first.ifPresent(list::add); first.ifPresent(list::add);
} }
......
...@@ -182,26 +182,33 @@ public class DataRuleController { ...@@ -182,26 +182,33 @@ public class DataRuleController {
@GetMapping("/sync/year") @GetMapping("/sync/year")
@ApiOperation("根据年份同步规则") @ApiOperation("根据年份同步规则")
public AjaxResult syncRuleByYear(@RequestParam String templateId, @RequestParam String year) { public AjaxResult syncRuleByYear(@RequestParam String templateId, @RequestParam String year) {
// 查询两个模板 // 查询两个模板 source-本模板 target-对比同步的模板
DataTemplate sourceTemplate = dataTemplateService.getById(templateId); DataTemplate sourceTemplate = dataTemplateService.getById(templateId);
DataTemplate targetTemplate = dataTemplateService.getOne(Wrappers.lambdaQuery(DataTemplate.class).eq(DataTemplate::getYear, year).eq(DataTemplate::getOrgName, sourceTemplate.getOrgName()), false); DataTemplate targetTemplate = dataTemplateService.getOne(Wrappers.lambdaQuery(DataTemplate.class).eq(DataTemplate::getYear, year).eq(DataTemplate::getOrgName, sourceTemplate.getOrgName()), false);
// 查询本模板的字段
List<DataField> fieldList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class) List<DataField> fieldList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class)
.eq(DataField::getTemplateId, sourceTemplate.getId()) .eq(DataField::getTemplateId, sourceTemplate.getId())
.isNotNull(DataField::getField) .isNotNull(DataField::getField)
.select(DataField::getField, DataField::getId)); .select(DataField::getField, DataField::getId));
// 查询被同步的模板的字段
List<DataField> targetFieldList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class) List<DataField> targetFieldList = dataFieldService.list(Wrappers.lambdaQuery(DataField.class)
.eq(DataField::getTemplateId, targetTemplate.getId()) .eq(DataField::getTemplateId, targetTemplate.getId())
.isNotNull(DataField::getField) .isNotNull(DataField::getField)
.select(DataField::getField, DataField::getId)); .select(DataField::getField, DataField::getId));
Set<String> fieldNameSet = fieldList.stream().map(DataField::getField).collect(Collectors.toSet());
if (!CollectionUtils.isEmpty(fieldList)) { if (!CollectionUtils.isEmpty(fieldList)) {
List<BindRule> rules = new ArrayList<>(); List<BindRule> rules = new ArrayList<>();
// 查询两个模板各自的字段规则
List<BindRule> sourceBindList = bindRuleService.queryRuleList(sourceTemplate.getId()); List<BindRule> sourceBindList = bindRuleService.queryRuleList(sourceTemplate.getId());
List<BindRule> targetBindList = bindRuleService.queryRuleList(targetTemplate.getId()); List<BindRule> targetBindList = bindRuleService.queryRuleList(targetTemplate.getId());
// 字段规则同步 // 字段规则同步
if (!CollectionUtils.isEmpty(targetBindList)) { if (!CollectionUtils.isEmpty(targetBindList)) {
// 遍历字段规则
for (BindRule targetRule : targetBindList) { for (BindRule targetRule : targetBindList) {
// 匹配此规则对应的字段ID是否在本模板中存在
Optional<DataField> first = fieldList.stream().filter(df -> StringUtils.equals(df.getField(), targetRule.getDataId())).findFirst(); Optional<DataField> first = fieldList.stream().filter(df -> StringUtils.equals(df.getField(), targetRule.getDataId())).findFirst();
if (first.isPresent()) { if (first.isPresent()) {
// 判断本模板是否存在相同的字段及规则
boolean match = sourceBindList.stream() boolean match = sourceBindList.stream()
.anyMatch(br -> StringUtils.equals(br.getDataId(), targetRule.getDataId()) && StringUtils.equals(br.getRuleId(), targetRule.getRuleId())); .anyMatch(br -> StringUtils.equals(br.getDataId(), targetRule.getDataId()) && StringUtils.equals(br.getRuleId(), targetRule.getRuleId()));
if (!match) { if (!match) {
...@@ -218,39 +225,30 @@ public class DataRuleController { ...@@ -218,39 +225,30 @@ public class DataRuleController {
root: root:
for (DataRule targetRule : targetRules) { for (DataRule targetRule : targetRules) {
String[] split = targetRule.getContent().split("="); String[] split = targetRule.getContent().split("=");
String[] split1 = split[0].split(","); // 查询出对应的两边的字段ID
String[] split2 = split[1].split(","); List<String> list1 = Arrays.asList(split[0].split(","));
for (int i = 0; i < split1.length; i++) { List<String> list2 = Arrays.asList(split[1].split(","));
int finalI = i; // 先判断其中的每个字段是否在源表中存在
Optional<DataField> first = targetFieldList.stream().filter(item -> StringUtils.equals(item.getId(), split1[finalI])).findFirst(); boolean match1 = fieldNameSet.containsAll(list1);
if (first.isPresent()) { boolean match2 = fieldNameSet.containsAll(list2);
Optional<DataField> first1 = fieldList.stream().filter(item -> StringUtils.equals(item.getField(), first.get().getField())).findFirst(); if (!match1 || !match2){
if (first1.isPresent()) { continue root;
split1[i] = first1.get().getId();
} else {
continue root;
}
} else {
continue root;
}
} }
for (int j = 0; j < split2.length; j++) { // 再判断此规则是否已经在本模板中存在
int finalI = j; boolean match = sourceRules.stream().anyMatch(item -> {
Optional<DataField> first = targetFieldList.stream().filter(item -> StringUtils.equals(item.getId(), split2[finalI])).findFirst(); String[] temp = item.getContent().split("=");
if (first.isPresent()) { // 查询出对应的两边的字段ID
Optional<DataField> first1 = fieldList.stream().filter(item -> StringUtils.equals(item.getField(), first.get().getField())).findFirst(); List<String> temp1 = Arrays.asList(temp[0].split(","));
if (first1.isPresent()) { List<String> temp2 = Arrays.asList(temp[1].split(","));
split2[j] = first1.get().getId(); if (temp1.containsAll(list1) && temp2.containsAll(list2)){
} else { return true;
continue root;
}
} else {
continue root;
} }
return temp1.containsAll(list2) && temp2.containsAll(list1);
});
if (!match){
targetRule.setId(null);
datas.add(targetRule);
} }
targetRule.setId(null);
targetRule.setContent(String.join(",", split1) + "=" + String.join(",", split2));
datas.add(targetRule);
} }
if (!CollectionUtils.isEmpty(datas)) { if (!CollectionUtils.isEmpty(datas)) {
dataRuleService.saveBatch(datas); dataRuleService.saveBatch(datas);
......
...@@ -25,6 +25,7 @@ import org.apache.poi.ss.usermodel.*; ...@@ -25,6 +25,7 @@ import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -95,6 +96,7 @@ public class ExcelDataController { ...@@ -95,6 +96,7 @@ public class ExcelDataController {
@SneakyThrows @SneakyThrows
@IgnoreWebSecurity @IgnoreWebSecurity
@PostMapping("/upload") @PostMapping("/upload")
//@Transactional(rollbackFor = Exception.class)
@ApiOperation("文件导入") @ApiOperation("文件导入")
public AjaxResult bindRule(UploadExcelParam param) { public AjaxResult bindRule(UploadExcelParam param) {
if (StringUtils.equals(param.getType(), "1")) { if (StringUtils.equals(param.getType(), "1")) {
...@@ -110,6 +112,8 @@ public class ExcelDataController { ...@@ -110,6 +112,8 @@ public class ExcelDataController {
} }
excelData.setFile(param.getFile().getBytes()); excelData.setFile(param.getFile().getBytes());
excelData.setFileName(param.getFile().getOriginalFilename()); excelData.setFileName(param.getFile().getOriginalFilename());
// 保存后导入文件数据
excelDataService.importData(excelData);
excelDataService.saveOrUpdate(excelData); excelDataService.saveOrUpdate(excelData);
} else if (StringUtils.equals(param.getType(), "2")) { } else if (StringUtils.equals(param.getType(), "2")) {
ExcelData excelData = excelDataService.getOne(Wrappers.lambdaQuery(ExcelData.class) ExcelData excelData = excelDataService.getOne(Wrappers.lambdaQuery(ExcelData.class)
...@@ -203,7 +207,7 @@ public class ExcelDataController { ...@@ -203,7 +207,7 @@ public class ExcelDataController {
final int rowStart = Integer.parseInt(orgCodeCo.split(",")[1]); final int rowStart = Integer.parseInt(orgCodeCo.split(",")[1]);
try (InputStream is = new ByteArrayInputStream(excelData.getFile()); Workbook workbook = WorkbookFactory.create(is)) { try (InputStream is = new ByteArrayInputStream(excelData.getFile()); Workbook workbook = WorkbookFactory.create(is)) {
final Sheet sheet = workbook.getSheetAt(0); final Sheet sheet = workbook.getSheetAt(0);
String sql = "SELECT ORG_CODE,ORG_NAME,MAILING_ADDRESS,AREA_NUMBER_CODE FROM {} WHERE YEAROOFDATARECORD='{}年'"; String sql = "SELECT ORG_CODE,ORG_NAME,MAILING_ADDRESS,AREA_NUMBER_CODE FROM {} WHERE YEAROOFDATARECORD='{}年' ORDER BY ROWCODE";
try { try {
DataSourceService.switchDb(template.getDataSourceId()); DataSourceService.switchDb(template.getDataSourceId());
final List<Map<String, Object>> mapList = jdbcTemplate.queryForList( final List<Map<String, Object>> mapList = jdbcTemplate.queryForList(
......
...@@ -22,7 +22,7 @@ public class ExcelVO { ...@@ -22,7 +22,7 @@ public class ExcelVO {
@Excel(name = "机构类型") @Excel(name = "机构类型")
private String orgType; private String orgType;
@Excel(name = "医疗机构名称", width = 20) @Excel(name = "医疗机构名称", width = 30)
private String orgName; private String orgName;
@Excel(name = "医疗机构代码") @Excel(name = "医疗机构代码")
...@@ -43,6 +43,9 @@ public class ExcelVO { ...@@ -43,6 +43,9 @@ public class ExcelVO {
@Excel(name = "错误原因", width = 30) @Excel(name = "错误原因", width = 30)
private String message; private String message;
@Excel(isExport=false)
private String areaCode;
public ExcelVO(String message, String value) { public ExcelVO(String message, String value) {
this.message = message; this.message = message;
this.value = value; this.value = value;
......
...@@ -38,6 +38,9 @@ public class VerifyVO { ...@@ -38,6 +38,9 @@ public class VerifyVO {
@ApiModelProperty(value = "排序字段") @ApiModelProperty(value = "排序字段")
private Integer sort; private Integer sort;
@ApiModelProperty(value = "元字段ID")
private String metaFieldId;
@ApiModelProperty(value = "数据库字段名") @ApiModelProperty(value = "数据库字段名")
private String fieldName; private String fieldName;
......
...@@ -29,11 +29,10 @@ public interface DataFieldService extends IService<DataField> { ...@@ -29,11 +29,10 @@ public interface DataFieldService extends IService<DataField> {
/** /**
* 字段匹配 * 字段匹配
* *
* @param list
* @param field * @param field
* @param fieldMatchList * @param fieldMatchList
*/ */
void fieldMatch(List<MetaField> list, DataField field, List<DataField> fieldMatchList); void fieldMatch(DataField field, List<DataField> fieldMatchList);
/** /**
* 获取待匹配的字段 * 获取待匹配的字段
......
...@@ -20,4 +20,9 @@ public interface ExcelDataService extends IService<ExcelData> { ...@@ -20,4 +20,9 @@ public interface ExcelDataService extends IService<ExcelData> {
*/ */
void analyzeExport(ExcelData excelData, HttpServletResponse response); void analyzeExport(ExcelData excelData, HttpServletResponse response);
/**
* 导入文件数据
* @param excelData
*/
void importData(ExcelData excelData);
} }
...@@ -18,6 +18,7 @@ import com.tbyf.his.web.dataImport.mapper.DataFieldMapper; ...@@ -18,6 +18,7 @@ import com.tbyf.his.web.dataImport.mapper.DataFieldMapper;
import com.tbyf.his.web.dataImport.service.DataFieldService; import com.tbyf.his.web.dataImport.service.DataFieldService;
import com.tbyf.his.web.dataImport.service.DataTemplateService; import com.tbyf.his.web.dataImport.service.DataTemplateService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RegExUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -59,63 +60,22 @@ public class DataFieldServiceImpl extends ServiceImpl<DataFieldMapper, DataField ...@@ -59,63 +60,22 @@ public class DataFieldServiceImpl extends ServiceImpl<DataFieldMapper, DataField
} }
@Override @Override
public void fieldMatch(List<MetaField> list, DataField field, List<DataField> fieldMatchList) { public void fieldMatch(DataField field, List<DataField> fieldMatchList) {
if (StringUtils.isBlank(field.getTitle())) { if (StringUtils.isBlank(field.getTitle())) {
return; return;
} }
MetaField metaField = null; Optional<DataField> fieldOptional = fieldMatchList.stream().filter(item -> {
DataField dataField = null; // 1.先判断两个是否相等
if (!CollectionUtils.isEmpty(list)) { if (StringUtils.equals(item.getTitle().trim(), field.getTitle().trim())) {
list.forEach(item -> { return true;
if (StringUtils.isNotBlank(item.getFieldComment())) {
item.setRatio(DataImportUtils.getSimilarityRatio(field.getTitle(), item.getFieldComment()));
} else {
item.setRatio(0);
}
});
Optional<MetaField> max = list.stream().max(Comparator.comparing(MetaField::getRatio));
if (max.isPresent()) {
metaField = max.get();
} }
} // 去除五角星号再判断
if (!CollectionUtils.isEmpty(fieldMatchList)) { return StringUtils.equals(item.getTitle().replaceAll("★","").replaceAll(":","").trim(),
fieldMatchList.forEach(item -> { field.getTitle().replaceAll("★","").replaceAll(":","").trim());
if (StringUtils.isNotBlank(item.getTitle())) { }).findFirst();
item.setRatio(DataImportUtils.getSimilarityRatio(field.getTitle(), item.getTitle())); fieldOptional.ifPresent(f ->{
} else { field.setField(f.getField());
item.setRatio(0); });
}
});
Optional<DataField> max = fieldMatchList.stream().max(Comparator.comparing(DataField::getRatio));
if (max.isPresent()) {
dataField = max.get();
}
}
if (metaField == null) {
if (dataField != null && dataField.getRatio() >= 0.5) {
log.debug("title:[{}],匹配指标名称:[{}],达成字段:[{}],相似度:[{}]",
field.getTitle(), dataField.getTitle(), dataField.getField(), dataField.getRatio());
field.setField(dataField.getField());
}
} else {
if (dataField == null) {
if (metaField.getRatio() >= 0.5) {
log.debug("title:[{}],匹配指标名称:[{}],达成字段:[{}],相似度:[{}]",
field.getTitle(), metaField.getFieldComment(), metaField.getFieldName(), metaField.getRatio());
field.setField(metaField.getId());
}
} else {
if (dataField.getRatio() >= metaField.getRatio() && dataField.getRatio() >= 0.5) {
log.debug("title:[{}],匹配指标名称:[{}],达成字段:[{}],相似度:[{}]",
field.getTitle(), dataField.getTitle(), dataField.getField(), dataField.getRatio());
field.setField(dataField.getField());
} else if (metaField.getRatio() >= 0.5) {
log.debug("title:[{}],匹配指标名称:[{}],达成字段:[{}],相似度:[{}]",
field.getTitle(), metaField.getFieldComment(), metaField.getFieldName(), metaField.getRatio());
field.setField(metaField.getId());
}
}
}
} }
@Override @Override
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<result property="sort" column="sort"/> <result property="sort" column="sort"/>
<result property="fieldName" column="fieldName"/> <result property="fieldName" column="fieldName"/>
<result property="fieldType" column="fieldType"/> <result property="fieldType" column="fieldType"/>
<result property="metaFieldId" column="metaFieldId"/>
<collection property="rules" ofType="com.tbyf.his.web.dataImport.core.RuleVO"> <collection property="rules" ofType="com.tbyf.his.web.dataImport.core.RuleVO">
<id property="id" column="ruleId"/> <id property="id" column="ruleId"/>
<result property="name" column="name"/> <result property="name" column="name"/>
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
df.unit as unit, df.unit as unit,
df.coordinate as coordinate, df.coordinate as coordinate,
df.sort as sort, df.sort as sort,
df.field as metaFieldId,
mf.field_name as fieldName, mf.field_name as fieldName,
mf.field_type as fieldType, mf.field_type as fieldType,
dr.id as ruleId, dr.id as ruleId,
......
...@@ -52,6 +52,11 @@ ...@@ -52,6 +52,11 @@
<artifactId>pinyin4j</artifactId> <artifactId>pinyin4j</artifactId>
<version>2.5.0</version> <version>2.5.0</version>
</dependency> </dependency>
<!--<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.12</version>
</dependency>-->
</dependencies> </dependencies>
</project> </project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment