Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2022-02-28 18:42:54 +08:00
36 changed files with 953 additions and 250 deletions
@@ -123,7 +123,7 @@
<select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField">
select * from onl_cgform_field ocf
left join onl_cgform_head och on ocf.cgform_head_id = och.id
where table_name =#{tableName}
where table_name =#{tableName} and is_delete = 0
order by order_num asc
</select>
@@ -815,7 +815,7 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl<OnlCgformFieldMapper,
public List<OnlCgformField> getFieldList(String flag){
List<OnlCgformField> fieldList = new ArrayList<>();
if(ModuleEnum.DOCUMENT_LIBRARY.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable());
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable()+" ");
}else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable());
}else if(ModuleEnum.ONL_CGFORM_TAG.getValue().equals(flag)){
@@ -91,7 +91,8 @@ public class SysDict implements Serializable {
/**
* 是否为标签内容-数据字典(1是 0否)
*/
@Excel(name = "展示区域", width = 15, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
@Excel(name = "是否为标签内容", width = 15)/*, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")*/
private java.lang.Integer isTagDict;
/**
@@ -83,8 +83,8 @@ public class SysDictItem implements Serializable {
private Date updateTime;
/**是否为标签内容-数据字典(1是 0否)*/
@Excel(name = "展示区域", width = 15, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")
@Excel(name = "是否为标签内容", width = 15)/*, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")*/
private java.lang.Integer isTagDict;
/**是否是只读(2字段固定,内部可配1固定字段 0非固定字段)*/
@@ -117,6 +117,20 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
return Result.OK(infoPage);
}
/**
* ocr识别调取已入库文件
* @param parameter
* @return
*/
@AutoLog(value = "ocr识别调取已入库文件分页")
@ApiOperation(value="ocr识别调取已入库文件", notes="ocr识别调取已入库文件")
@PostMapping(value = "/ocrPageInfo")
@ResponseBody
public Result<?> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
IPage infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
return Result.OK(infoPage);
}
/**
* 列表查询
*
@@ -242,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
@@ -55,5 +55,17 @@ public interface BussDocumentLibraryEOMapper extends BaseMapper<BussDocumentLibr
@Param("field") String field,
@Param("condition") String condition);
/**
* ocr识别调取已入库文件分页
*
* @param page
* @param field
* @param condition
* @return
*/
IPage ocrPageInfo(@Param("page") IPage page,
@Param("field") String field,
@Param("condition") String condition);
}
@@ -54,5 +54,10 @@
select ${field} from buss_document_library
${condition}
</select>
<!--ocr识别调取已入库文件分页-->
<select id="ocrPageInfo" resultType="java.util.LinkedHashMap">
select ${field}
${condition}
</select>
</mapper>
@@ -110,6 +110,13 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
*/
IPage replacePageInfo(Map<String,Object> parameter);
/**
* ocr识别调取已入库文件分页
* @param parameter
* @return
*/
IPage ocrPageInfo(Map<String,Object> parameter);
/**
* 添加收藏
* @param id
@@ -156,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);
}
@@ -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;
@@ -249,10 +250,16 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
}
List<Map<String, Object>> result = new ArrayList<>();
for (OnlCgformArea onlCgformAreaTemp : areaList) {
String areaName = "";
if(CutEnum.CN.getValue().equals(cut)){
areaName = onlCgformAreaTemp.getShowArea();
}else{
areaName = onlCgformAreaTemp.getEnName();
}
List<OnlCgformField> fieldListTemp = fieldList.stream().filter(e -> onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
for (OnlCgformField onlCgformField : fieldListTemp) {
Map<String, Object> map = new HashMap<>();
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", onlCgformAreaTemp.getShowArea());
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName);
map.put("field_must_input", onlCgformField.getFieldMustInput());//区域
result.add(map);
}
@@ -757,27 +764,31 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//查询内容
String field = " id,serial_number,title,state";
//查询条件
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
//编码
String serialNumber = (String) parameter.get("serialNumber");
//标题
String title = (String) parameter.get("title");
if (StringUtils.isNotBlank(serialNumber)) {
conditionSb.append(" and " + "serial_number" + " like concat(concat('%','" + serialNumber + "'),'%')");
}
if (StringUtils.isNotBlank(title)) {
conditionSb.append(" and " + "title" + " like concat(concat('%','" + title + "'),'%')");
}
conditionSb.append(" order by create_time desc");
//需求变更,搜索条件有原来的编码和标题改为和文档库一致
// //查询条件
// StringBuilder conditionSb = new StringBuilder("where 1 = 1");
//
// //编码
// String serialNumber = (String) parameter.get("serialNumber");
//
// //标题
// String title = (String) parameter.get("title");
// if (StringUtils.isNotBlank(serialNumber)) {
// conditionSb.append(" and " + "serial_number" + " like concat(concat('%','" + serialNumber + "'),'%')");
// }
// if (StringUtils.isNotBlank(title)) {
// conditionSb.append(" and " + "title" + " like concat(concat('%','" + title + "'),'%')");
// }
//
// conditionSb.append(" order by create_time desc");
//封装查询条件
String condition = getConditionStr(parameter);
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
IPage page = new Page(pageNo, pageSize);
IPage infoPage = bussDocumentLibraryEOMapper.replacePageInfo(page, field, conditionSb.toString());
// IPage infoPage = bussDocumentLibraryEOMapper.replacePageInfo(page, field, conditionSb.toString());
IPage infoPage = bussDocumentLibraryEOMapper.replacePageInfo(page, field, condition);
//数据字典
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
@@ -801,6 +812,100 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
return infoPage;
}
/**
* ocr识别调取已入库文件分页
*
* @param parameter
* @return
*/
public IPage ocrPageInfo(Map<String, Object> parameter) {
//需要查询的字段
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
fieldList = fieldList.stream().filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
List<String> fileFieldList = fieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
//查询字段
StringBuilder fieldSb = new StringBuilder();
StringBuilder join = new StringBuilder();
int i = 1;
if (ObjectUtils.isNotEmpty(fileFieldList)) {
for (String fileField : fileFieldList) {
fieldSb.append("bdl." + fileField + ",");
if (i == 1) {
join.append(" on of.connect_id = bdl." + fileField);
i++;
continue;
}
join.append(" or of.connect_id = bdl." + fileField);
}
}
String fieldStr = fieldSb.substring(0, fieldSb.length() - 1);
String field = " bdl.id,bdl.serial_number,bdl.title,bdl.state,of.file_name,of.connect_id," + fieldStr
+ " from oss_file of join buss_document_library bdl" + join.toString();
//查询条件
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
//编码
String serialNumber = (String) parameter.get("serialNumber");
//标题
String title = (String) parameter.get("title");
//状态
String stateTemp = (String) parameter.get("state");
if (StringUtils.isNotBlank(serialNumber)) {
conditionSb.append(" and " + "serial_number" + " like concat(concat('%','" + serialNumber + "'),'%')");
}
if (StringUtils.isNotBlank(title)) {
conditionSb.append(" and " + "title" + " like concat(concat('%','" + title + "'),'%')");
}
if (StringUtils.isNotBlank(stateTemp)) {
conditionSb.append(" and " + "state" + " ='" + stateTemp + "'");
}
conditionSb.append(" order by bdl.create_time desc");
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
IPage page = new Page(pageNo, pageSize);
IPage infoPage = bussDocumentLibraryEOMapper.ocrPageInfo(page, field, conditionSb.toString());
List records = infoPage.getRecords();
//数据字典
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
//下拉选处理数据字典
for (Object record : records) {
Map<String, Object> record1 = (Map) record;
String key = "";
for (Map.Entry<String, Object> entry : record1.entrySet()) {
//状态数据字典
if ("state".equals(entry.getKey())) {
List<SysDictItem> stateList = sysDictItems.stream()
.filter(e -> StringUtils.isNotBlank(e.getDictCode()) && e.getDictCode().equals("state"))
.collect(Collectors.toList());
List<SysDictItem> state = stateList.stream().filter(e -> e.getItemValue().equals(entry.getValue())).collect(Collectors.toList());
if (state.size() != 0) {
entry.setValue(state.get(0).getItemText());
}
}
//添加文本信息
String connectId = (String) record1.get("connect_id");
if (connectId.equals(entry.getValue())) {
key = entry.getKey();
}
}
String finalKey = key;
List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> e.getDbFieldName().equals(finalKey)).collect(Collectors.toList());
record1.put("text_info", onlCgformFieldList.get(0).getDbFieldTxt());
}
return infoPage;
}
public IPage getInfoPage(Map<String, Object> parameter) {
//需要查询的字段
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
@@ -921,6 +1026,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
*/
private void collectAndSubscribe(List<Map> records, List<String> idList) {
//收藏
if (idList.size() == 0) {
return;
}
LambdaQueryWrapper<OnlCgformCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.in(OnlCgformCollection::getDocumentId, idList);
List<OnlCgformCollection> collectList = iOnlCgformCollectionService.list(wrapper);
@@ -1068,7 +1176,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
*/
@Override
public void exportExcel(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request) {
String flag = "file";
//String flag = "file"为带文件导出标识
String flag = (String) map.get("flag");
// String flag = "file";
OutputStream os = null;
Workbook workbook = new XSSFWorkbook();
try {
@@ -1092,7 +1202,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
&& !"sys_org_code".equals(e.getDbFieldName())
&& !"warn_flag".equals(e.getDbFieldName())).collect(Collectors.toList());
//只导出数据时,过滤掉文件类型
if(!"file".equals(flag)){
if (!"file".equals(flag)) {
fieldListTemp = fieldListTemp.stream().filter(e -> !FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
}
headerFieldList = fieldListTemp.stream().map(OnlCgformField::getDbFieldTxt).collect(Collectors.toList());
@@ -1118,15 +1228,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
// 创建数据
createDatas(workbook, sheet, datas, header, fieldListTemp);
if(!"file".equals(flag)){
if (!"file".equals(flag)) {
//不带文件导出
os = response.getOutputStream();
workbook.write(os);
os.flush();
}else{
} else {
String path = uploadpath + "/tempZip";
File fileTemp = new File(path);
if (fileTemp.exists()){
if (fileTemp.exists()) {
fileTemp.delete();
}
fileTemp.mkdirs();
@@ -1142,34 +1252,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<String> fileFieldList = onlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
for (Map<String, Object> data : datas) {
if(StringUtils.isBlank((String) data.get("serial_number"))){
if (StringUtils.isBlank((String) data.get("serial_number"))) {
continue;
}
String fileNowPath = uploadpath + "/tempZip/" + (String) data.get("serial_number");
File file = new File(fileNowPath);
if (file.exists()){
if (file.exists()) {
file.delete();
}
file.mkdirs();
List<String> valueList = new ArrayList<>();
for (String field : fileFieldList) {
String value = (String) data.get(field);
if(StringUtils.isNotBlank(value)){
if (StringUtils.isNotBlank(value)) {
valueList.add(value);
}
}
//每一个编号下的所有的文件
if(valueList.size()!= 0){
if (valueList.size() != 0) {
List<OSSFile> fileInfosList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(valueList, ","));
for (OSSFile ossFile : fileInfosList) {
String url = ossFile.getUrl();
copyFile(url, fileNowPath+ "/"+ossFile.getFileName());
copyFile(url, fileNowPath + "/" + ossFile.getFileName());
}
}
}
ZipUtil.zip(path,path+".zip");
ZipUtil.zip(path, path + ".zip");
//文件
FileInputStream fis = new FileInputStream(path+".zip");
FileInputStream fis = new FileInputStream(path + ".zip");
os = response.getOutputStream();
int len = 0;
@@ -1202,14 +1312,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
for (Map<String, Object> data : datas) {
for (OnlCgformField onlCgformField : fileFieldList) {
String value = (String) data.get(onlCgformField.getDbFieldName());
if(StringUtils.isNotBlank(value)){
if (StringUtils.isNotBlank(value)) {
connectIdList.add(value);
}
}
}
//所有的文件信息
List<OSSFile> fileInfos = new ArrayList<>();
if(connectIdList.size() != 0){
if (connectIdList.size() != 0) {
fileInfos = iOSSFileService.getFileInfosByConnectId(StringUtils.join(connectIdList, ","));
}
@@ -1233,20 +1343,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (ObjectUtils.isNotEmpty(data.get(onlCgformField.getDbFieldName()))) {
value = sdf.format(data.get(onlCgformField.getDbFieldName()));
}
}else if(FieldTypeEnum.FILE.getValue().equals(onlCgformField.getFieldShowType())){
} else if (FieldTypeEnum.FILE.getValue().equals(onlCgformField.getFieldShowType())) {
//处理文件名称(由connect_id转化为文件名)
if(fileInfos.size() != 0){
if (fileInfos.size() != 0) {
List<OSSFile> ossFileList = fileInfos.stream()
.filter(e -> e.getConnectId().equals(data.get(onlCgformField.getDbFieldName())))
.collect(Collectors.toList());
if(ossFileList.size()!= 0){
if (ossFileList.size() != 0) {
List<String> fileNameList = ossFileList.stream().map(OSSFile::getFileName).collect(Collectors.toList());
value = StringUtils.join(fileNameList,",");
}else{
value = StringUtils.join(fileNameList, ",");
} else {
value = "";
}
}
}else {
} else {
value = (String) data.get(onlCgformField.getDbFieldName());
}
row.createCell(sheetNum).setCellValue(value);
@@ -1300,6 +1410,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
/**
* 带文件导出
*
* @param map
* @param response
* @param request
@@ -1308,7 +1419,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
public void exportZip(Map<String, Object> map,
HttpServletResponse response,
HttpServletRequest request) {
exportExcel(map,response,request);
exportExcel(map, response, request);
}
@@ -1476,15 +1587,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
public static void copyFile(String oldFile, String newFile) throws IOException {
File file2 = new File(newFile);
if(!file2.exists()){
if (!file2.exists()) {
file2.createNewFile();
}
// file2.mkdir();
File temp = new File(oldFile );
File temp = new File(oldFile);
if (temp.isFile()) {
try(FileInputStream in = new FileInputStream(temp);
FileOutputStream ou = new FileOutputStream(newFile);) {
try (FileInputStream in = new FileInputStream(temp);
FileOutputStream ou = new FileOutputStream(newFile);) {
byte[] bs = new byte[1024];
int count = 0;
@@ -1500,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;
@@ -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
*/
@@ -1,6 +1,7 @@
package com.jero.modules.tag.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -23,7 +24,7 @@ import java.io.Serializable;
* @Version: V1.0
*/
@Data
@TableName("onl_cgform_tag")
@TableName("onl_cgform_field")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="onl_cgform_tag对象", description="标签项管理")
@@ -36,64 +37,76 @@ public class OnlCgformTag implements Serializable {
private java.lang.String id;
/**创建人*/
@TableField(exist = false)
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@TableField(exist = false)
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@TableField(exist = false)
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**所属模块(1文档库,0文档拆分)*/
@TableField(exist = false)
@Excel(name = "所属模块(1文档库,0文档拆分", width = 15, dicCode = "module")
@Dict(dicCode = "module")
@ApiModelProperty(value = "所属模块(1文档库,0文档拆分")
private java.lang.String isModel;
/**字段备注*/
@Excel(name = "字段备注", width = 15)
@Excel(name = "字段备注", width = 15,dictTable = "onl_cgform_field", dicText = "db_field_txt", dicCode = "db_field_txt")
@Dict(dictTable = "onl_cgform_field", dicText = "db_field_txt", dicCode = "db_field_txt")
@ApiModelProperty(value = "字段备注")
private java.lang.String dbFieldTxt;
/**字段英文名称描述*/
@Excel(name = "字段英文名称描述", width = 15)
@Excel(name = "字段英文名称描述", width = 15,dictTable = "onl_cgform_field", dicText = "db_field_en_name", dicCode = "db_field_en_name")
@Dict(dictTable = "onl_cgform_field", dicText = "db_field_en_name", dicCode = "db_field_en_name")
@ApiModelProperty(value = "字段英文名称描述")
private java.lang.String dbFieldName;
private java.lang.String dbFieldEnName;
/**表单控件类型*/
@Excel(name = "表单控件类型", width = 15, dicCode = "field_show_type")
@Dict(dicCode = "field_show_type")
@Excel(name = "表单控件类型", width = 15,dictTable = "onl_cgform_field", dicText = "field_show_type",dicCode ="field_show_type")
@Dict(dictTable = "onl_cgform_field", dicText = "field_show_type",dicCode ="field_show_type")
@ApiModelProperty(value = "表单控件类型")
private java.lang.String fieldShowType;
/**字典名称*/
@TableField(exist = false)
@Excel(name = "字典名称", width = 15, dictTable = "sys_dict", dicText = "dict_name", dicCode = "dict_name")
@Dict(dictTable = "sys_dict", dicText = "dict_name", dicCode = "dict_name")
@ApiModelProperty(value = "字典名称")
private java.lang.String dictName;
/**数据库字段长度*/
@Excel(name = "数据库字段长度", width = 15)
@Excel(name = "数据库字段长度", width = 15,dictTable = "onl_cgform_field", dicText = "db_length", dicCode = "db_length")
@Dict(dictTable = "onl_cgform_field", dicText = "db_length", dicCode = "db_length")
@ApiModelProperty(value = "数据库字段长度")
private java.lang.Integer dbLength;
/**排序*/
@Excel(name = "排序", width = 15)
@Excel(name = "排序", width = 15,dictTable = "onl_cgform_field", dicText = "order_num", dicCode = "order_num")
@Dict(dictTable = "onl_cgform_field", dicText = "order_num", dicCode = "order_num")
@ApiModelProperty(value = "排序")
private java.lang.Integer orderNum;
@@ -122,6 +135,7 @@ public class OnlCgformTag implements Serializable {
private java.lang.Integer isReadOnly;
/**展示区域*/
@TableField(exist = false)
@Excel(name = "展示区域", width = 15, dictTable = "onl_cgform_area", dicText = "show_area", dicCode = "id")
@Dict(dictTable = "onl_cgform_area", dicText = "show_area", dicCode = "id")
@ApiModelProperty(value = "展示区域")
@@ -10,7 +10,7 @@
<result column="sys_org_code" property="sysOrgCode" />
<result column="is_model" property="isModel" />
<result column="db_field_txt" property="dbFieldTxt" />
<result column="db_field_name" property="dbFieldName" />
<result column="db_field_en_name" property="dbFieldEnName" />
<result column="field_show_type" property="fieldShowType" />
<result column="dict_name" property="dictName" />
<result column="db_length" property="dbLength" />