dev^2
itcast 1 year ago
parent 220c517379
commit ca6add2f7f
  1. 2
      ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue
  2. 4
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  3. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/controller/FieldxController.java
  4. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java

@ -456,4 +456,4 @@
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>

@ -551,8 +551,8 @@ export default {
'数据长度: 请填写该字段对应的长度', '数据长度: 请填写该字段对应的长度',
'浮点精度: 请填写浮点精度', '浮点精度: 请填写浮点精度',
'显示形式: 请填写该字段显示的形式', '显示形式: 请填写该字段显示的形式',
'是否主键(非空): 请填写该字段是否为主键,填:是或否', '是否主键: 请填写该字段是否为主键,填:是或否',
'是否外键(非空): 请填写该字段是否为外键,填:是或否', '是否外键: 请填写该字段是否为外键,填:是或否',
'关联实体: 请填写该字段关联的其它实体表', '关联实体: 请填写该字段关联的其它实体表',
'关联字段: 请填写该字段关联实体表中对应的字段', '关联字段: 请填写该字段关联实体表中对应的字段',
'是否为空(非空): 请填写该字段是否为空,填:是或否', '是否为空(非空): 请填写该字段是否为空,填:是或否',

@ -438,21 +438,13 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> {
fieldx222.setType(excelInfo.getType()); fieldx222.setType(excelInfo.getType());
if (StringUtil.isBlank(excelInfo.getIsPk())) { if (StringUtil.isBlank(excelInfo.getIsPk())) {
message.put("isError", "true"); fieldx222.setIsPk("0");
message.put("status","序号为" + (r - 2) + "的”是否主键”不能为空");
message.put("closeable","true");
webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("序号为" + (r - 2) + "的是否主键不能为空");
} }
fieldx222.setIsPk(excelInfo.getIsFk()); fieldx222.setIsPk(excelInfo.getIsPk());
if (StringUtil.isBlank(excelInfo.getIsFk())) { if (StringUtil.isBlank(excelInfo.getIsFk())) {
message.put("isError", "true"); fieldx222.setIsFk("0");
message.put("status","序号为" + (r - 2) + "的”是否外键”不能为空");
message.put("closeable","true");
webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("序号为" + (r - 2) + "”的是否外键”不能为空");
} }
fieldx222.setIsFk(excelInfo.getIsNull()); fieldx222.setIsFk(excelInfo.getIsFk());
if (StringUtil.isBlank(excelInfo.getIsNull())) { if (StringUtil.isBlank(excelInfo.getIsNull())) {
message.put("isError", "true"); message.put("isError", "true");
message.put("status","序号为" + (r - 2) + "的”是否为空”不能为空"); message.put("status","序号为" + (r - 2) + "的”是否为空”不能为空");
@ -460,7 +452,7 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> {
webSocketUtils.sendMessage(loginUser.getId(), message); webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("序号为" + (r - 2) + "的是否为空不能为空"); return Result.error("序号为" + (r - 2) + "的是否为空不能为空");
} }
fieldx222.setIsNull(excelInfo.getIsUniqueness()); fieldx222.setIsFk(excelInfo.getIsFk());
if (StringUtil.isBlank(excelInfo.getIsUniqueness())) { if (StringUtil.isBlank(excelInfo.getIsUniqueness())) {
message.put("isError", "true"); message.put("isError", "true");
message.put("status","序号为" + (r - 2) + "的”是否重复”不能为空"); message.put("status","序号为" + (r - 2) + "的”是否重复”不能为空");
@ -468,7 +460,7 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> {
webSocketUtils.sendMessage(loginUser.getId(), message); webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("序号为" + (r - 2) + "的是否重复不能为空"); return Result.error("序号为" + (r - 2) + "的是否重复不能为空");
} }
fieldx222.setStatus(excelInfo.getStatus()); fieldx222.setIsUniqueness(excelInfo.getIsUniqueness());
if (StringUtil.isBlank(excelInfo.getStatus())) { if (StringUtil.isBlank(excelInfo.getStatus())) {
message.put("isError", "true"); message.put("isError", "true");
message.put("status","序号为" + (r - 2) + "的”字段状态”不能为空"); message.put("status","序号为" + (r - 2) + "的”字段状态”不能为空");
@ -476,7 +468,7 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> {
webSocketUtils.sendMessage(loginUser.getId(), message); webSocketUtils.sendMessage(loginUser.getId(), message);
return Result.error("序号为" + (r - 2) + "的”字段状态”不能为空"); return Result.error("序号为" + (r - 2) + "的”字段状态”不能为空");
} }
fieldx222.setVerisonStatus(excelInfo.getVerisonStatus()); fieldx222.setStatus(excelInfo.getStatus());
if (StringUtil.isBlank(excelInfo.getVerisonStatus())) { if (StringUtil.isBlank(excelInfo.getVerisonStatus())) {
message.put("isError", "true"); message.put("isError", "true");
message.put("status","序号为" + (r - 2) + "的”版本状态”不能为空"); message.put("status","序号为" + (r - 2) + "的”版本状态”不能为空");

@ -28,7 +28,7 @@ public class FieldxServiceImpl extends ServiceImpl<FieldxMapper, Fieldx> impleme
public void saveSingleBatch(List<Fieldx> fieldxList, LoginUser loginUser, Map<String, String> message) { public void saveSingleBatch(List<Fieldx> fieldxList, LoginUser loginUser, Map<String, String> message) {
for (int i = 0; i < fieldxList.size(); i++){ for (int i = 0; i < fieldxList.size(); i++){
try { try {
Thread.sleep(1000L); Thread.sleep(500L);
message.put("uploaded", String.valueOf(i + 1)); message.put("uploaded", String.valueOf(i + 1));
this.save(fieldxList.get(i)); this.save(fieldxList.get(i));
webSocketUtils.sendMessage(loginUser.getId(), message); webSocketUtils.sendMessage(loginUser.getId(), message);

Loading…
Cancel
Save