|
|
@ -53,7 +53,6 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
// 条件验证
|
|
|
|
// 条件验证
|
|
|
|
ValidatorBean.beginValid(sysDictionary)
|
|
|
|
ValidatorBean.beginValid(sysDictionary)
|
|
|
|
.notNull("id",sysDictionary.getId())
|
|
|
|
|
|
|
|
.notNull("name",sysDictionary.getName())
|
|
|
|
.notNull("name",sysDictionary.getName())
|
|
|
|
.notNull("dictionarySoftType",sysDictionary.getDictionarySoftType())
|
|
|
|
.notNull("dictionarySoftType",sysDictionary.getDictionarySoftType())
|
|
|
|
.notNull("dictionaryCode",sysDictionary.getDictionaryCode())
|
|
|
|
.notNull("dictionaryCode",sysDictionary.getDictionaryCode())
|
|
|
@ -221,7 +220,7 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/find/top")
|
|
|
|
@GetMapping("/find-top")
|
|
|
|
@ApiOperation(value = "查询顶级字典项",notes = "查询顶级字典项")
|
|
|
|
@ApiOperation(value = "查询顶级字典项",notes = "查询顶级字典项")
|
|
|
|
public ResultBean findSysDictionaryByTop() {
|
|
|
|
public ResultBean findSysDictionaryByTop() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -282,12 +281,13 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
for (CommonEnumUtil.SOFT_TYPE softType :CommonEnumUtil.SOFT_TYPE.values()) {
|
|
|
|
for (CommonEnumUtil.SOFT_TYPE softType :CommonEnumUtil.SOFT_TYPE.values()) {
|
|
|
|
if(group.containsKey(softType.getValue())){
|
|
|
|
if(group.containsKey(softType.getValue())){
|
|
|
|
child = new HashMap();
|
|
|
|
child = new HashMap();
|
|
|
|
child.put("id",softType.getCode());
|
|
|
|
child.put("id",softType.getValue());
|
|
|
|
child.put("name",softType.getValue());
|
|
|
|
child.put("name",softType.getCode());
|
|
|
|
child.put("childList",group.get(softType.getValue()));
|
|
|
|
child.put("childList",group.get(softType.getValue()));
|
|
|
|
dictTree.add(child);
|
|
|
|
dictTree.add(child);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(dictTree);
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(dictTree);
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
@ -295,4 +295,17 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/find-soft-type")
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据模块查询顶级字典",notes = "根据模块查询顶级字典")
|
|
|
|
|
|
|
|
public ResultBean findSysDictionaryByTopBySoftType(Integer softType){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
List<SysDictionary> dictionaryList = sysDictionaryService.findSysDictionaryByTopBySoftType(softType);
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(dictionaryList);
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|