rsf-admin/src/i18n/zh.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/waveRule/WaveRuleCreate.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/waveRule/WaveRuleEdit.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/waveRule/WaveRuleList.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WaveRuleController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveRule.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/java/com/vincent/rsf/server/system/constant/DictTypeCode.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/java/com/vincent/rsf/server/system/constant/SerialRuleCode.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
rsf-admin/src/i18n/zh.js
@@ -1046,7 +1046,7 @@ }, waveRule: { code: "编码", type: "类型", type: "波次类型", name: "名称", }, } rsf-admin/src/page/waveRule/WaveRuleCreate.jsx
@@ -33,7 +33,7 @@ const WaveRuleCreate = (props) => { const { open, setOpen } = props; const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_wave_rule_code')) || []; const translate = useTranslate(); const notify = useNotify(); @@ -85,18 +85,14 @@ <DialogContent sx={{ mt: 2 }}> <Grid container rowSpacing={2} columnSpacing={2}> <Grid item xs={6} display="flex" gap={1}> <TextInput label="table.field.waveRule.code" source="code" parse={v => v} autoFocus /> </Grid> <Grid item xs={6} display="flex" gap={1}> <NumberInput <AutocompleteInput choices={dicts} optionText="label" label="table.field.waveRule.type" source="type" /> optionValue="value" parse={v => v} validate={[required()]} /> </Grid> <Grid item xs={6} display="flex" gap={1}> <TextInput rsf-admin/src/page/waveRule/WaveRuleEdit.jsx
@@ -42,6 +42,7 @@ const WaveRuleEdit = () => { const translate = useTranslate(); const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_wave_rule_code')) || []; return ( <Edit @@ -68,14 +69,19 @@ label="table.field.waveRule.code" source="code" parse={v => v} readOnly autoFocus /> </Stack> <Stack direction='row' gap={2}> <NumberInput <AutocompleteInput choices={dicts} optionText="label" label="table.field.waveRule.type" source="type" /> optionValue="value" parse={v => v} validate={[required()]} /> </Stack> <Stack direction='row' gap={2}> <TextInput rsf-admin/src/page/waveRule/WaveRuleList.jsx
@@ -97,7 +97,7 @@ marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, }} title={"menu.waveRule"} empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} empty={false} filters={filters} sort={{ field: "create_time", order: "desc" }} actions={( @@ -120,9 +120,8 @@ > <NumberField source="id" /> <TextField source="code" label="table.field.waveRule.code" /> <NumberField source="type" label="table.field.waveRule.type" /> <TextField source="type$" label="table.field.waveRule.type" /> <TextField source="name" label="table.field.waveRule.name" /> <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> <TextField source="nickname" /> </ReferenceField> rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WaveRuleController.java
@@ -11,7 +11,10 @@ import com.vincent.rsf.server.common.domain.PageParam; import com.vincent.rsf.server.manager.entity.WaveRule; import com.vincent.rsf.server.manager.service.WaveRuleService; import com.vincent.rsf.server.system.constant.SerialRuleCode; import com.vincent.rsf.server.system.controller.BaseController; import com.vincent.rsf.server.system.utils.SerialRuleUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -59,6 +62,10 @@ waveRule.setCreateTime(new Date()); waveRule.setUpdateBy(getLoginUserId()); waveRule.setUpdateTime(new Date()); String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_WAVE_RULE_CODE, null); if (!StringUtils.isBlank(ruleCode)) { waveRule.setCode(ruleCode); } if (!waveRuleService.save(waveRule)) { return R.error("Save Fail"); } rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveRule.java
@@ -3,6 +3,11 @@ import com.baomidou.mybatisplus.annotation.TableLogic; import java.text.SimpleDateFormat; import java.util.Date; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.vincent.rsf.server.system.constant.DictTypeCode; import com.vincent.rsf.server.system.entity.DictData; import com.vincent.rsf.server.system.service.DictDataService; import org.springframework.format.annotation.DateTimeFormat; import java.text.SimpleDateFormat; import java.util.Date; @@ -20,6 +25,7 @@ import com.vincent.rsf.server.system.entity.User; import java.io.Serializable; import java.util.Date; import java.util.Objects; @Data @TableName("man_wave_rule") @@ -133,6 +139,18 @@ // null // 备注 // ); public String getType$() { if (null == this.type){ return null; } DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, DictTypeCode.SYS_WAVE_RULE_CODE) .eq(DictData::getValue, this.type)); if (Objects.isNull(dictData)) { return null; } return dictData.getLabel(); } public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ rsf-server/src/main/java/com/vincent/rsf/server/system/constant/DictTypeCode.java
@@ -65,4 +65,9 @@ /**PO单执行状态*/ public final static String SYS_PO_EXCE_STATUS = "sys_po_exce_status"; /** *波次策略类型 */ public final static String SYS_WAVE_RULE_CODE = "sys_wave_rule_code"; } rsf-server/src/main/java/com/vincent/rsf/server/system/constant/SerialRuleCode.java
@@ -80,6 +80,10 @@ /**企业编码*/ public final static String SYS_COMPANYS_CODE = "sys_companys_code"; /** * 波次策略 */ public final static String SYS_WAVE_RULE_CODE = "sys_wave_type"; }