zhc4dev
Gitea 2 years ago
parent 43200f64b4
commit 3b5d71f42c
  1. 4
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  2. 2
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  3. 13
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java
  4. 6
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java

@ -84,9 +84,9 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>--> <a @click="handleEdit(record)">编辑</a>
<!-- <a-divider type="vertical" />--> <a-divider type="vertical" />
<!-- --> <!-- -->
<a @click="handleDetail(record.id)">详情</a> <a @click="handleDetail(record.id)">详情</a>

@ -8,7 +8,7 @@
<j-popup <j-popup
v-model="model.typeName" v-model="model.typeName"
field="typeName" field="typeName"
org-fields="nums,contents" org-fields="id,contents"
dest-fields="typeId,typeName" dest-fields="typeId,typeName"
code="zy_accessories_type" code="zy_accessories_type"
:multi="false" :multi="false"

@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> { public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> {
@Autowired @Autowired
private IZyAccessoriesService zyAccessoriesService; private IZyAccessoriesService zyAccessoriesService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -73,7 +73,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper); IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -93,7 +93,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.save(zyAccessories); zyAccessoriesService.save(zyAccessories);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
@ -106,6 +106,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
public Result<?> edit(@RequestBody ZyAccessories zyAccessories) { public Result<?> edit(@RequestBody ZyAccessories zyAccessories) {
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessories.getContents()); queryWrapper.eq("contents",zyAccessories.getContents());
queryWrapper.ne("id",zyAccessories.getId());
int a= zyAccessoriesService.count(queryWrapper); int a= zyAccessoriesService.count(queryWrapper);
if(a>=1){ if(a>=1){
return Result.error("名称重复,请修改后重试!!"); return Result.error("名称重复,请修改后重试!!");
@ -113,7 +114,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.updateById(zyAccessories); zyAccessoriesService.updateById(zyAccessories);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -127,7 +128,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.removeById(id); zyAccessoriesService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -141,7 +142,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(","))); this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *

@ -38,8 +38,12 @@ public class ZyAccessories implements Serializable {
/**类型id*/ /**类型id*/
@Excel(name = "类型id", width = 15) @Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id") @ApiModelProperty(value = "类型id")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "nums") @Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "id")
private java.lang.String typeId; private java.lang.String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private java.lang.String typeName;
/**编号*/ /**编号*/
@Excel(name = "编号", width = 15) @Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")

Loading…
Cancel
Save