|
|
|
@ -53,6 +53,7 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
|
ValidatorBean.beginValid(sysDictionary)
|
|
|
|
|
.notNull("id",sysDictionary.getId())
|
|
|
|
|
.notNull("name",sysDictionary.getName())
|
|
|
|
|
.notNull("softType",sysDictionary.getSoftType())
|
|
|
|
|
.notNull("dictionaryCode",sysDictionary.getDictionaryCode())
|
|
|
|
|
.notNull("dictionaryValue",sysDictionary.getDictionaryValue());
|
|
|
|
|
|
|
|
|
@ -78,6 +79,7 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
|
// 条件验证
|
|
|
|
|
ValidatorBean.beginValid(sysDictionary)
|
|
|
|
|
.notNull("name",sysDictionary.getName())
|
|
|
|
|
.notNull("softType",sysDictionary.getSoftType())
|
|
|
|
|
.notNull("dictionaryCode",sysDictionary.getDictionaryCode())
|
|
|
|
|
.notNull("dictionaryValue",sysDictionary.getDictionaryValue());
|
|
|
|
|
|
|
|
|
@ -159,11 +161,11 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/find/{code}")
|
|
|
|
|
@ApiOperation(value = "根据父级code查询字典项", notes = "根据父级code查询字典项")
|
|
|
|
|
public ResultBean findSysDictionaryByParentCode(@PathVariable("code") String code) {
|
|
|
|
|
@GetMapping(value = "/find/{softType}/{code}")
|
|
|
|
|
@ApiOperation(value = "根据微服务与父级code查询字典项", notes = "根据微服务与父级code查询字典项")
|
|
|
|
|
public ResultBean findSysDictionaryByParentCode(@PathVariable("softType")Integer softType,@PathVariable("code") String code) {
|
|
|
|
|
try {
|
|
|
|
|
List<SysDictionary> sysDictionaryList = sysDictionaryService.findSysDictionaryByParentCode(code);
|
|
|
|
|
List<SysDictionary> sysDictionaryList = sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(softType,code);
|
|
|
|
|
return ResultBean.success("操作成功").setResultList(sysDictionaryList).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
@ -177,15 +179,24 @@ public class SysDictionaryController extends CoreBaseController{
|
|
|
|
|
public ResultBean findSysDictionaryUserInfo() {
|
|
|
|
|
try {
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
|
|
resultMap.put("1",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_SEX));
|
|
|
|
|
resultMap.put("2",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_FILE_TYPE));
|
|
|
|
|
resultMap.put("3",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_MARRIAGE));
|
|
|
|
|
resultMap.put("4",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_EDUCATION));
|
|
|
|
|
resultMap.put("5",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_NATIONALITY));
|
|
|
|
|
resultMap.put("6",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_CERTIFICATE_TYPE));
|
|
|
|
|
resultMap.put("7",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_EMPLOYEE_GRADE));
|
|
|
|
|
resultMap.put("8",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_POLITICAL_STATUS));
|
|
|
|
|
resultMap.put("9",sysDictionaryService.findSysDictionaryByParentCode(BaseConstWords.DICTIONARY_EMPLOYEE_TYPE));
|
|
|
|
|
resultMap.put("1", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_SEX));
|
|
|
|
|
resultMap.put("2", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_FILE_TYPE));
|
|
|
|
|
resultMap.put("3", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_MARRIAGE));
|
|
|
|
|
resultMap.put("4", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_EDUCATION));
|
|
|
|
|
resultMap.put("5", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_NATIONALITY));
|
|
|
|
|
resultMap.put("6", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_CERTIFICATE_TYPE));
|
|
|
|
|
resultMap.put("7", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_EMPLOYEE_GRADE));
|
|
|
|
|
resultMap.put("8", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_POLITICAL_STATUS));
|
|
|
|
|
resultMap.put("9", sysDictionaryService.findSysDictionaryBySoftTypeAndParentCode(
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE.CORE.getValue(), BaseConstWords.DICTIONARY_EMPLOYEE_TYPE));
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setResultMap(resultMap).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|