| | |
| | | name: "name", |
| | | }, |
| | | dictType: { |
| | | name: "name", |
| | | description: "description", |
| | | code: "Code", |
| | | name: "Name", |
| | | description: "Description", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "dictTypeId", |
| | |
| | | name: "名称", |
| | | }, |
| | | dictType: { |
| | | code: "字典编码", |
| | | name: "字典名称", |
| | | description: "内容描述", |
| | | }, |
| | |
| | | list: CompanysList, |
| | | edit: CompanysEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | recordRepresentation: (record) => {0 |
| | | return `${record.name}` |
| | | } |
| | | }; |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictType.code" |
| | | source="code" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictType.name" |
| | |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictType.code" |
| | | source="code" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.dictType.uuid" />, |
| | | <TextInput source="code" label="table.field.dictType.code" />, |
| | | <TextInput source="name" label="table.field.dictType.name" />, |
| | | <TextInput source="description" label="table.field.dictType.description" />, |
| | | |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.dictType.code" /> |
| | | <TextField source="name" label="table.field.dictType.name" /> |
| | | <TextField source="description" label="table.field.dictType.description" /> |
| | | |
| | |
| | | </Grid> |
| | | <Box height={20}> </Box> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.dictType.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.dictType.name" |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | |
| | | @PostMapping("/dictType/save") |
| | | public R save(@RequestBody DictType dictType) { |
| | | dictType.setCreateBy(getLoginUserId()); |
| | | dictType.setCreateTime(new Date()); |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (Objects.isNull(dictType.getName())) { |
| | | throw new CoolException("字典名称不能为空!!"); |
| | | } |
| | | if (Objects.isNull(dictType.getDescription())) { |
| | | throw new CoolException("字典描述不能为空!!"); |
| | | } |
| | | if (Objects.isNull(dictType.getCode())) { |
| | | throw new CoolException("字典编码不能为空!!"); |
| | | } |
| | | |
| | | if (!dictTypeService.save(dictType)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String uuid; |
| | | @ApiModelProperty(value= "编码") |
| | | private String code; |
| | | |
| | | /** |
| | | * 名称 |
| | |
| | | |
| | | public DictType() {} |
| | | |
| | | public DictType(String uuid,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | public DictType(String code,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.code = code; |
| | | this.name = name; |
| | | this.description = description; |
| | | this.status = status; |