|
|
@ -8,6 +8,7 @@ import java.util.stream.Collectors; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
|
|
|
|
|
|
|
import com.aliyuncs.utils.StringUtils; |
|
|
|
import com.aliyuncs.utils.StringUtils; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFRow; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
|
@ -436,6 +437,7 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> { |
|
|
|
if (StringUtils.isEmpty(String.valueOf(cell))) { |
|
|
|
if (StringUtils.isEmpty(String.valueOf(cell))) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExcelInfo excelInfo = new ExcelInfo(); |
|
|
|
ExcelInfo excelInfo = new ExcelInfo(); |
|
|
|
excelInfo.setcells(cells); |
|
|
|
excelInfo.setcells(cells); |
|
|
|
Fieldx222 fieldx222 = new Fieldx222(); |
|
|
|
Fieldx222 fieldx222 = new Fieldx222(); |
|
|
@ -455,6 +457,7 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> { |
|
|
|
fieldx222Service.remove(null); |
|
|
|
fieldx222Service.remove(null); |
|
|
|
return Result.error("序号为" + (r - 2) + "的中文名称不能为空"); |
|
|
|
return Result.error("序号为" + (r - 2) + "的中文名称不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
fieldx222.setFieldName(excelInfo.getFieldName()); |
|
|
|
Fieldx222 fieldx2221=fieldx222Service.query().eq("field_name",excelInfo.getFieldName()).one(); |
|
|
|
Fieldx222 fieldx2221=fieldx222Service.query().eq("field_name",excelInfo.getFieldName()).one(); |
|
|
|
if(fieldx2221!=null){ |
|
|
|
if(fieldx2221!=null){ |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("isError", "true"); |
|
|
@ -466,6 +469,17 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fieldx222.setFieldName(excelInfo.getFieldName()); |
|
|
|
fieldx222.setFieldName(excelInfo.getFieldName()); |
|
|
|
|
|
|
|
LambdaQueryWrapper<Fieldx> queryWrapper=new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq(Fieldx::getTableId,fieldx222.getTableId()).eq(Fieldx::getFieldName,fieldx222.getFieldName()); |
|
|
|
|
|
|
|
List<Fieldx> list=fieldxService.list(queryWrapper); |
|
|
|
|
|
|
|
if(list!=null&&list.size()!=0){ |
|
|
|
|
|
|
|
message.put("isError", "true"); |
|
|
|
|
|
|
|
message.put("status","序号为" + (r - 2) + "的字段名此表已存在不能重复"); |
|
|
|
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
|
|
|
fieldx222Service.remove(null); |
|
|
|
|
|
|
|
return Result.error("序号为" + (r - 2) + "的字段名此表已存在不能重复"); |
|
|
|
|
|
|
|
} |
|
|
|
if (StringUtil.isBlank(excelInfo.getFieldEnName())) { |
|
|
|
if (StringUtil.isBlank(excelInfo.getFieldEnName())) { |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("status","序号为" + (r - 2) + "的”英文名称”不能为空"); |
|
|
|
message.put("status","序号为" + (r - 2) + "的”英文名称”不能为空"); |
|
|
|