产品管理空值问题

zhc4dev
赵玉瑞 2 years ago
parent f1350efc39
commit c685396252
  1. 4
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  2. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  3. 4
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  4. 15
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 9
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  6. 15
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  7. 6
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  8. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java

@ -145,6 +145,9 @@ export default {
},
confirmLoading: false,
validatorRules: {
enterpriseId: [
{required: true, message: '请选择企业!'},
],
nums: [
{required: true, message: '部件编号不能为空!'},
],
@ -154,6 +157,7 @@ export default {
partsName: [
{required: true, message: '请输入部件名称!'},
],
//
// modularId: [
// { required: true, message: '!'},
// ],

@ -146,16 +146,22 @@ export default {
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
enterpriseId: [
{required: true, message: '请选择企业!'},
],
modularType: [
{required: true, message: '请选择模块类型!'},
],
nums: [
{ required: true, message: '请输入编号!'},
],
modularName: [
{required: true, message: '请输入模块名称!'},
//{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;!()?]{0,50}$/, message: ''},
{min: 1, max: 50, message: '最多输入50字!', trigger: 'blur'},
],
clothsTypeId: [
{required: true, message: '请选择服类型!'},
{required: true, message: '请选择服类型!'},
]
},
url: {

@ -78,6 +78,9 @@ export default {
},
confirmLoading: false,
validatorRules: {
typeId: [
{required: true, message: '请选择上级类型'},
],
enterpriseId: [
{required: true, message: '请选择一个企业!'},
],
@ -88,6 +91,7 @@ export default {
{required: true, message: '请输入类型名称!'},
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
},
url: {
add: "/base/zyClothsType/add",

@ -363,18 +363,21 @@ export default {
},
confirmLoading: false,
validatorRules: {
// typeId: [
// {required: true, message: '!'},
// ],
typeId: [
{required: true, message: '请选择服装类型!'},
],
enterpriseId: [
{required: true, message: '请选择企业!'},
],
nums: [
{ required: true, message: '请输入编号!'},
],
styleNames: [
{required: true, message: '请输入款式名称!'},
],
// positionid: [
// {required: true, message: ''},
// ],
shape: [
{required: true, message: '请选择形式!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",

@ -138,6 +138,15 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
if (StringUtils.isEmpty(zyClothsComponent.getClothsTypeId())) {
return Result.error("添加失败!服装类型不能为空");
}
if (StringUtils.isEmpty(zyClothsComponent.getEnterpriseId())) {
return Result.error("添加失败!企业不能为空");
}
if (StringUtils.isEmpty(zyClothsComponent.getPartsName())) {
return Result.error("添加失败!部件名称不能为空");
}
if (StringUtils.isEmpty(zyClothsComponent.getModularType())) {
return Result.error("添加失败!模块类型不能为空");
}
if (StringUtils.isEmpty(zyClothsComponent.getNums())) {
return Result.error("添加失败!部件编号不能为空");
}

@ -123,6 +123,21 @@ public class ZyClothsModularController extends JeecgController<ZyClothsModular,
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsModular zyClothsModular) {
//zyClothsModular.setNums(zyClothsModularService.generateNumber(zyClothsModular));
if (StringUtils.isEmpty(zyClothsModular.getModularType())) {
return Result.error("添加失败!模块类型不能为空");
}
if (StringUtils.isEmpty(zyClothsModular.getEnterpriseId())) {
return Result.error("添加失败!企业不能为空");
}
if (StringUtils.isEmpty(zyClothsModular.getModularName())) {
return Result.error("添加失败!模块名称不能为空");
}
if (StringUtils.isEmpty(zyClothsModular.getClothsTypeId())) {
return Result.error("添加失败!服装类型不能为空");
}
if (StringUtils.isEmpty(zyClothsModular.getNums())) {
return Result.error("添加失败!编号不能为空");
}
//模块名称不能重复
List<ZyClothsModular> zyClothsModularList = zyClothsModularService.list();
for (ZyClothsModular zy : zyClothsModularList) {

@ -88,6 +88,12 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
if (StringUtils.isEmpty(zyClothsType.getEnterpriseId())) {
return Result.error("企业 不能为空");
}
if (StringUtils.isEmpty(zyClothsType.getTypeId())) {
return Result.error("上级类型 不能为空");
}
//type_name,类型名称,varchar,50,非空,同类型下不重复
String typeName = zyClothsType.getTypeName();
if (!StringUtils.hasText(typeName)) {

@ -159,6 +159,15 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
if (StringUtils.isEmpty(zyClothsStyle.getTypeName())) {
return Result.error("添加失败!服装类型不能为空");
}
if (StringUtils.isEmpty(zyClothsStyle.getEnterpriseId())) {
return Result.error("添加失败!企业不能为空");
}
if (StringUtils.isEmpty(zyClothsStyle.getStyleNames())) {
return Result.error("添加失败!款式名称不能为空");
}
if (StringUtils.isEmpty(zyClothsStyle.getShape())) {
return Result.error("添加失败!形式不能为空");
}
if (StringUtils.isEmpty(zyClothsStyle.getNums())) {
return Result.error("添加失败!编号不能为空");
}

Loading…
Cancel
Save