| | |
| | | subsystemFlowTemplate: 'SubsystemFlowTemplate', |
| | | flowStepTemplate: 'FlowStepTemplate', |
| | | taskPathTemplateMerge: 'TaskPathTemplateMerge', |
| | | missionFlowStepInstance: 'Mission Flow Steps', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | retryEnabled: "retryEnabled", |
| | | retryConfig: "retryConfig", |
| | | timeoutSeconds: "timeoutSeconds", |
| | | }, |
| | | flowStepInstance: { |
| | | flowInstanceId: "Flow Instance ID", |
| | | flowInstanceNo: "Flow Instance No", |
| | | stepTemplateId: "Step Template ID", |
| | | errorCode: "Error Code", |
| | | errorMessage: "Error Message", |
| | | startTime: "Start Time", |
| | | endTime: "End Time", |
| | | durationSeconds: "Duration(s)", |
| | | inputData: "Input Data", |
| | | outputData: "Output Data", |
| | | retryTimes: "Retry Times", |
| | | id: "ID", |
| | | stepOrder: "Step Order", |
| | | stepCode: "Step Code", |
| | | stepName: "Step Name", |
| | | stepType: "Step Type", |
| | | status: "Status", |
| | | executeResult: "Execute Result", |
| | | taskNo: "Task No", |
| | | createTime: "Create Time", |
| | | }, |
| | | subsystemFlowTemplate: { |
| | | flowCode: "flowCode", |
| | |
| | | order: 'Orders', |
| | | modiftySite: 'Modify SiteNo', |
| | | selectWave: 'Select Wave Rule', |
| | | flowStep: "Flow Step", |
| | | |
| | | }, |
| | | placeholder: { |
| | |
| | | subsystemFlowTemplate: '子系统流程模板', |
| | | flowStepTemplate: '流程步骤模板', |
| | | taskPathTemplateMerge: '任务路径模板合并', |
| | | missionFlowStepInstance: '任务流程步骤', |
| | | }, |
| | | table: { |
| | | field: { |
| | | field: { |
| | | flowStepInstance: { |
| | | flowInstanceId: "流程实例ID", |
| | | flowInstanceNo: "流程实例编号", |
| | | stepTemplateId: "步骤模板ID", |
| | | errorCode: "错误编码", |
| | | errorMessage: "错误消息", |
| | | startTime: "开始时间", |
| | | endTime: "结束时间", |
| | | durationSeconds: "持续秒数", |
| | | inputData: "输入数据", |
| | | outputData: "输出数据", |
| | | retryTimes: "重试次数", |
| | | id: "ID", |
| | | stepOrder: "步骤顺序", |
| | | stepCode: "步骤编码", |
| | | stepName: "步骤名称", |
| | | stepType: "步骤类型", |
| | | status: "状态", |
| | | executeResult: "执行结果", |
| | | taskNo: "任务号", |
| | | createTime: "创建时间", |
| | | }, |
| | | basStationArea: { |
| | | type: "类型", |
| | | stationAreaName: "站点区域名称", |
| | |
| | | modiftySite: '修改库口', |
| | | selectWave: '波次规则', |
| | | transformation: "转换", |
| | | flowStep: "流程步骤", |
| | | }, |
| | | placeholder: { |
| | | warehouseAreasCode: "用于库位编码前缀占位符", |
| | |
| | | import GradingOutlinedIcon from '@mui/icons-material/GradingOutlined'; |
| | | import StickyDataTable from "@/page/components/StickyDataTable"; |
| | | import useTableLayout from '@/utils/useTableLayout'; |
| | | import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined'; |
| | | import FlowStepInstanceModal from './FlowStepInstanceModal'; |
| | | |
| | | const TaskList = (props) => { |
| | | const translate = useTranslate(); |
| | |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [autoExce, setAutoExce] = useState(false); |
| | | const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_warehouse_type')) || []; |
| | | |
| | | // state for FlowStepInstanceModal |
| | | const [flowStepModalOpen, setFlowStepModalOpen] = useState(false); |
| | | const [currentTaskRecord, setCurrentTaskRecord] = useState(null); |
| | | |
| | | useEffect(() => { |
| | | getConfig() |
| | |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <TableItems drawerVal={drawerVal} /> |
| | | <TableItems |
| | | drawerVal={drawerVal} |
| | | onOpenFlowStep={(record) => { |
| | | setCurrentTaskRecord(record); |
| | | setFlowStepModalOpen(true); |
| | | }} |
| | | /> |
| | | </List> |
| | | <PageDrawer |
| | | title='Task Detail' |
| | |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | <FlowStepInstanceModal |
| | | open={flowStepModalOpen} |
| | | setOpen={setFlowStepModalOpen} |
| | | record={currentTaskRecord} |
| | | /> |
| | | </Box> |
| | | ) |
| | | } |
| | |
| | | export default TaskList; |
| | | |
| | | |
| | | const TableItems = ({ drawerVal }) => { |
| | | const TableItems = ({ drawerVal, onOpenFlowStep }) => { |
| | | const omittedFields = ['id', 'createTime', 'createBy$', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'warehType$', 'orderType', 'order_type', 'orderType$']; |
| | | const { boxMaxWidth, boxMaxHeight } = useTableLayout(drawerVal); |
| | | return ( |
| | |
| | | <CheckButton /> |
| | | <PickButton /> |
| | | <SetTopButton /> |
| | | <FlowStepButton onClick={onOpenFlowStep} /> |
| | | </WrapperField> |
| | | </StickyDataTable> |
| | | </Box> |
| | |
| | | } |
| | | |
| | | |
| | | const FlowStepButton = ({ onClick }) => { |
| | | const record = useRecordContext(); |
| | | return ( |
| | | <Button |
| | | label="toolbar.flowStep" |
| | | onClick={(e) => { |
| | | e.stopPropagation(); |
| | | onClick(record); |
| | | }} |
| | | > |
| | | <AccountTreeOutlinedIcon /> |
| | | </Button> |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 盘点 |
| | | * @returns te |
| | |
| | | > |
| | | {baseColumns |
| | | .map((column) => ( |
| | | <DataTable.Col |
| | | key={column.key || column.props.source} |
| | | source={column.props.source} |
| | | label={column.props.label} |
| | | sx={column.props.sx} |
| | | > |
| | | {column} |
| | | </DataTable.Col> |
| | | column |
| | | )) |
| | | } |
| | | <DataTable.Col |
| | | source="opt" |
| | | label="common.field.opt" |
| | | > |
| | | <WrapperField source="opt" cellClassName="opt" label="common.field.opt"> |
| | | <ViewFlowButton onClick={onOpenFlow} /> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </DataTable.Col> |
| | | |
| | | <WrapperField source="opt" cellClassName="opt" label="common.field.opt"> |
| | | <ViewFlowButton onClick={onOpenFlow} /> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </StickyDataTable>} |
| | | </Box> |
| | | ) |
| | |
| | | }} |
| | | // Manually handle selection style if needed, or rely on StickyDataTable support |
| | | > |
| | | {columns.map((col, index) => ( |
| | | <DataTable.Col |
| | | key={col.props.source} |
| | | source={col.props.source} |
| | | label={col.props.label} |
| | | > |
| | | {col} |
| | | </DataTable.Col> |
| | | ))} |
| | | {columns.map((col, index) => col)} |
| | | </StickyDataTable> |
| | | </Box> |
| | | <Pagination rowsPerPageOptions={[10, 25, 50, 100]} /> |
| | |
| | | rowClick={false} |
| | | hiddenColumns={['id', 'createTime', 'createBy', 'memo', 'statusBool']} |
| | | > |
| | | {columns |
| | | .map((column) => ( |
| | | <DataTable.Col |
| | | key={column.key || column.props.source} |
| | | source={column.props.source} |
| | | label={column.props.label} |
| | | sx={column.props.sx} |
| | | > |
| | | {column} |
| | | </DataTable.Col> |
| | | )) |
| | | } |
| | | {columns} |
| | | </StickyDataTable>} |
| | | </Box> |
| | | ) |
| | |
| | | @Autowired |
| | | private FlowStepInstanceService flowStepInstanceService; |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/flowStepInstance/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | |
| | | return R.ok().add(flowStepInstanceService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/flowStepInstance/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(flowStepInstanceService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping({"/flowStepInstance/many/{ids}", "/flowStepInstances/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(flowStepInstanceService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @GetMapping("/flowStepInstance/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(flowStepInstanceService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:save')") |
| | | @PreAuthorize("hasAuthority('manager:task:save')") |
| | | @OperationLog("Create 子流程步骤实例") |
| | | @PostMapping("/flowStepInstance/save") |
| | | public R save(@RequestBody FlowStepInstance flowStepInstance) { |
| | |
| | | return R.ok("Save Success").add(flowStepInstance); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:update')") |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @OperationLog("Update 子流程步骤实例") |
| | | @PostMapping("/flowStepInstance/update") |
| | | public R update(@RequestBody FlowStepInstance flowStepInstance) { |
| | |
| | | return R.ok("Update Success").add(flowStepInstance); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:remove')") |
| | | @PreAuthorize("hasAuthority('manager:task:remove')") |
| | | @OperationLog("Delete 子流程步骤实例") |
| | | @PostMapping("/flowStepInstance/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/flowStepInstance/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:flowStepInstance:list')") |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/flowStepInstance/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(flowStepInstanceService.list(), FlowStepInstance.class), response); |