表头数据字典
This commit is contained in:
+14
@@ -256,6 +256,20 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-ocr表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-ocr表头和查询条件", notes="文档库信息表-ocr表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForOcr")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForOcr(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForOcr(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据查询
|
||||
* @param id
|
||||
|
||||
+7
@@ -163,5 +163,12 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
||||
*/
|
||||
void exportTemplate(Map<String,Object> map,HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut);
|
||||
|
||||
}
|
||||
|
||||
+90
@@ -21,6 +21,7 @@ import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.log.entity.BussLogEO;
|
||||
import com.jero.modules.log.service.IBussLogEOService;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
@@ -1610,5 +1611,94 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag header-表头,condition-查询条件
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut) {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
Map<String, Object> map1 = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
Map<String, Object> map5 = new HashMap<>();
|
||||
|
||||
if("header".equals(flag)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
//编号
|
||||
map1.put("db_field_name", "serial_number");//字段
|
||||
map1.put("db_field_txt", "编号");//字段中文名
|
||||
list.add(map1);
|
||||
//标题
|
||||
map2.put("db_field_name", "title");//字段
|
||||
map2.put("db_field_txt", "标题");//字段中文名
|
||||
list.add(map2);
|
||||
//状态
|
||||
map3.put("db_field_name", "state");//字段
|
||||
map3.put("db_field_txt", "状态");//字段中文名
|
||||
list.add(map3);
|
||||
//文件名称
|
||||
map4.put("db_field_name", "file_name");//字段
|
||||
map4.put("db_field_txt", "文件名称");//字段中文名
|
||||
list.add(map4);
|
||||
//文件信息
|
||||
map5.put("db_field_name", "text_info");//字段
|
||||
map5.put("db_field_txt", "文件信息");//字段中文名
|
||||
list.add(map5);
|
||||
} else {
|
||||
//编号
|
||||
map1.put("db_field_name", "serial_number");//字段
|
||||
map1.put("db_field_txt", "serial number");//字段中文名
|
||||
list.add(map1);
|
||||
//标题
|
||||
map2.put("db_field_name", "title");//字段
|
||||
map2.put("db_field_txt", "title");//字段中文名
|
||||
list.add(map2);
|
||||
//状态
|
||||
map3.put("db_field_name", "state");//字段
|
||||
map3.put("db_field_txt", "state");//字段中文名
|
||||
list.add(map3);
|
||||
//文件名称
|
||||
map4.put("db_field_name", "file_name");//字段
|
||||
map4.put("db_field_txt", "file name");//字段中文名
|
||||
list.add(map4);
|
||||
//文件信息
|
||||
map5.put("db_field_name", "text_info");//字段
|
||||
map5.put("db_field_txt", "text info");//字段中文名
|
||||
list.add(map5);
|
||||
}
|
||||
}else if("condition".equals(flag)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
//编号
|
||||
map1.put("db_field_name", "serial_number");//字段
|
||||
map1.put("db_field_txt", "编号");//字段中文名
|
||||
map1.put("dict_field", "");//数据字典
|
||||
map1.put("field_show_type", "1");
|
||||
list.add(map1);
|
||||
//标题
|
||||
map2.put("db_field_name", "title");//字段
|
||||
map2.put("db_field_txt", "标题");//字段中文名
|
||||
map2.put("dict_field", "");//数据字典
|
||||
map2.put("field_show_type", "1");
|
||||
list.add(map2);
|
||||
} else {
|
||||
//编号
|
||||
map1.put("db_field_name", "serial_number");//字段
|
||||
map1.put("db_field_txt", "serial number");//字段中文名
|
||||
map1.put("dict_field", "");//数据字典
|
||||
map1.put("field_show_type", "1");
|
||||
list.add(map1);
|
||||
//标题
|
||||
map2.put("db_field_name", "title");//字段
|
||||
map2.put("db_field_txt", "title");//字段中文名
|
||||
map2.put("dict_field", "");//数据字典
|
||||
map2.put("field_show_type", "1");
|
||||
list.add(map2);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ public class OcrRecordEO implements Serializable {
|
||||
|
||||
/**转换结果*/
|
||||
@Excel(name = "转换结果", width = 15)
|
||||
@Dict(dicCode = "result_content")
|
||||
@ApiModelProperty(value = "转换结果")
|
||||
private String resultContent;
|
||||
|
||||
|
||||
+10
-2
@@ -8,6 +8,7 @@ import com.jero.modules.ocr.entity.OcrRecordEO;
|
||||
import com.jero.modules.ocr.mapper.OcrRecordEOMapper;
|
||||
import com.jero.modules.ocr.service.IOcrRecordEOService;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -122,7 +123,14 @@ public class OcrRecordEOServiceImpl extends ServiceImpl<OcrRecordEOMapper, OcrRe
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if (StringUtils.isNotBlank(onlCgformField.getDictField())) {
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName)+ "_dictText");//配置了数据字典的字段,需要特殊处理
|
||||
}else{
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));//字段
|
||||
}
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
}else{
|
||||
@@ -162,7 +170,7 @@ public class OcrRecordEOServiceImpl extends ServiceImpl<OcrRecordEOMapper, OcrRe
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* 表单中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user