Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
# Conflicts:
# rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
26个文件已添加
1个文件已删除
19个文件已修改
| | |
| | | maktx: "maktx", |
| | | matnrId: "matnrId", |
| | | matnrCode: "matnrCode", |
| | | asnId: "asnId", |
| | | asnCode: "asnCode", |
| | | asnItemId: "asnItemId", |
| | | trackCode: "trackCode", |
| | | anfme: "anfme", |
| | | workQty: "workQty", |
| | | unit: "unit", |
| | |
| | | poDetlCode: "PO单编码", |
| | | matnrId: "物料标识", |
| | | maktx: "物料名称", |
| | | maktxCode: "物料编码", |
| | | anfme: "数量", |
| | | stockUnit: "库存单位", |
| | | purQty: "计划收货数量", |
| | |
| | | code: "编码", |
| | | ansId: "收货通知单号", |
| | | asnCode: "收货通知单编码", |
| | | barcode: "条形码", |
| | | barcode: "容器码", |
| | | anfme: "数量", |
| | | ioStatus: "状态", |
| | | }, |
| | |
| | | maktx: "物料", |
| | | matnrId: "物料id", |
| | | matnrCode: "物料编码", |
| | | asnId: "收货通知单号", |
| | | asnCode: "收货通知单编码", |
| | | asnItemId: "收货通知单明细id", |
| | | trackCode: "条形码", |
| | | anfme: "数量", |
| | | workQty: "执行中数量", |
| | | unit: "单位", |
| | |
| | | waitPakinLog: { |
| | | pakinId: "组托Id", |
| | | code: "编码", |
| | | barcode: "条形码", |
| | | barcode: "容器码", |
| | | anfme: "数量", |
| | | ioStatus: "状态", |
| | | }, |
| | | waitPakinItemLog: { |
| | | pakinId: "组托Id", |
| | | pakinItemId: "组托明细Id", |
| | | ansId: "收货通知单号", |
| | | asnId: "收货通知单号", |
| | | asnCode: "收货通知单编码", |
| | | asnItemId: "收货通知单明细id", |
| | | trackCode: "条形码", |
| | |
| | | } |
| | | } |
| | | |
| | | const [selectedRows, setSelectedRows] = useState([]); |
| | | |
| | | const handleDeleteItem = () => { |
| | | const newTableData = _.filter(tabelData, (item) => !selectedRows.includes(item.matnrId)); |
| | | setTableData(newTableData); |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Dialog |
| | |
| | | <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> |
| | | <Form> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={4}> |
| | | <Grid item md={4}> |
| | | <DictSelect |
| | | label={translate("table.field.asnOrder.type")} |
| | | value={formData.type} |
| | |
| | | |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <Grid item md={4}> |
| | | <DictSelect |
| | | label={translate("table.field.asnOrder.wkType")} |
| | | value={formData.wkType} |
| | |
| | | <Box sx={{ mt: 2 }}> |
| | | <Stack direction="row" spacing={2}> |
| | | <Button variant="contained" onClick={() => setCreateDialog(true)}>新增物料</Button> |
| | | {asnId !== '' && <ConfirmButton label={'删除'} variant="outlined" color="error" onConfirm={handleDelete} />} |
| | | {/* {asnId !== '' && <ConfirmButton label={'删除'} variant="outlined" color="error" onConfirm={handleDelete} />} */} |
| | | <ConfirmButton label={'删除'} variant="outlined" color="error" onConfirm={handleDeleteItem} /> |
| | | </Stack> |
| | | |
| | | </Box> |
| | | |
| | | <Box sx={{ mt: 2 }}> |
| | | <AsnOrderModalTable tabelData={tabelData} setTableData={setTableData} asnId={asnId} ></AsnOrderModalTable> |
| | | <AsnOrderModalTable tabelData={tabelData} setTableData={setTableData} asnId={asnId} selectedRows={selectedRows} setSelectedRows={setSelectedRows} ></AsnOrderModalTable> |
| | | </Box> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | |
| | | |
| | | export default AsnOrderModal; |
| | | |
| | | const AsnOrderModalTable = ({ tabelData, setTableData, asnId }) => { |
| | | const AsnOrderModalTable = ({ tabelData, setTableData, asnId, selectedRows, setSelectedRows }) => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | |
| | | const [columns, setColumns] = useState([ |
| | | { |
| | | field: 'action', |
| | | headerName: '操作', |
| | | width: 70, |
| | | lockPosition: 'left', |
| | | renderCell: (params) => ( |
| | | <Tooltip title="Delete"> |
| | | <IconButton onClick={() => handleDelete(params.row)}> |
| | | <Delete /> |
| | | </IconButton> |
| | | </Tooltip> |
| | | ), |
| | | |
| | | }, |
| | | { |
| | | field: 'matnrId', |
| | | headerName: translate('table.field.asnOrderItem.matnrId'), |
| | |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.asnOrderItem.maktx'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | }, |
| | | { |
| | | field: 'maktxCode', |
| | | headerName: translate('table.field.asnOrderItem.maktxCode'), |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | |
| | | editable: true, |
| | | }, |
| | | |
| | | |
| | | ]) |
| | | |
| | | const action = { |
| | | field: 'action', |
| | | headerName: '操作', |
| | | width: 70, |
| | | lockPosition: 'left', |
| | | renderCell: (params) => ( |
| | | <Tooltip title="Delete"> |
| | | <IconButton onClick={() => handleDelete(params.row)}> |
| | | <Delete /> |
| | | </IconButton> |
| | | </Tooltip> |
| | | ), |
| | | |
| | | } |
| | | |
| | | let cdata = useRef([]); |
| | | |
| | |
| | | headerName: el.fieldsAlise, |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: el.unique |
| | | editable: true |
| | | })) |
| | | setColumns([...columns, ...cols]) |
| | | setColumns([...columns, ...cols, action]) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleSelectionChange = (ids) => { |
| | | setSelectedRows(ids) |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | return ( |
| | | <div style={{ height: 400, width: '100%' }}> |
| | | <DataGrid |
| | |
| | | disableMultipleColumnsSorting |
| | | processRowUpdate={processRowUpdate} |
| | | autoPageSize |
| | | editMode="row" |
| | | checkboxSelection |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | | selectionModel={selectedRows} |
| | | sx={{ |
| | | '& .MuiDataGrid-cell input': { |
| | | border: '1px solid #ccc' |
| | | }, |
| | | }} |
| | | /> |
| | | </div> |
| | | ); |
| | |
| | | import request from '@/utils/request'; |
| | | import { DataGrid } from '@mui/x-data-grid'; |
| | | import SaveIcon from '@mui/icons-material/Save'; |
| | | import { use } from "react"; |
| | | import TreeSelectInput from "@/page/components/TreeSelectInput"; |
| | | const AsnWareModal = (props) => { |
| | | const { open, setOpen, data, setData } = props; |
| | | |
| | |
| | | return { |
| | | matnrId: el.id, |
| | | maktx: el.name, |
| | | maktxCode: el.code, |
| | | stockUnit: el.stockUnit || '', |
| | | purUnit: el.purchaseUnit || '', |
| | | ...dynamicFields |
| | |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Box component="form" onSubmit={handleSubmit} sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={4}> |
| | | <Grid item md={4}> |
| | | <TextField |
| | | label={translate('table.field.matnr.name')} |
| | | name="name" |
| | | value={formData.name} |
| | | onChange={handleChange} |
| | | variant="outlined" |
| | | size="small" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4}> |
| | | <Grid item md={4}> |
| | | <TextField |
| | | label={translate('table.field.matnr.code')} |
| | | name="code" |
| | | value={formData.code} |
| | | onChange={handleChange} |
| | | variant="outlined" |
| | | size="small" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4}> |
| | | <TextField |
| | | label={translate('table.field.matnr.groupId')} |
| | | name="groupId" |
| | | <Grid item md={4}> |
| | | <TreeSelectInput |
| | | label="table.field.matnr.groupId" |
| | | value={formData.groupId} |
| | | resource={'matnrGroup'} |
| | | source="groupId" |
| | | name="groupId" |
| | | onChange={handleChange} |
| | | variant="outlined" |
| | | size="small" |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | |
| | | const notify = useNotify(); |
| | | |
| | | const [columns, setColumns] = useState([ |
| | | { field: 'id', headerName: 'ID', width: 100 }, |
| | | { field: 'name', headerName: translate('table.field.matnr.name'), width: 100 }, |
| | | // { field: 'id', headerName: 'ID', width: 100 }, |
| | | { field: 'name', headerName: translate('table.field.matnr.name'), width: 300 }, |
| | | { field: 'code', headerName: translate('table.field.matnr.code'), width: 100 }, |
| | | { field: 'groupId$', headerName: translate('table.field.matnr.groupId'), width: 100 }, |
| | | { field: 'spec', headerName: translate('table.field.matnr.spec'), width: 100 }, |
| | | { field: 'model', headerName: translate('table.field.matnr.model'), width: 100 }, |
| | | { field: 'weight', headerName: translate('table.field.matnr.weight'), width: 100 }, |
| | |
| | | |
| | | const TreeSelectInput = ({ resource, required, onChange, label, source = 'parentId', value, isTranslate = false, ...rest }) => { |
| | | const translate = useTranslate(); |
| | | const { setValue } = useFormContext(); |
| | | const form = useFormContext(); |
| | | const [filter, setFilter] = React.useState(""); |
| | | const [treeData, setTreeData] = React.useState([]); |
| | | |
| | |
| | | const handleChange = (event) => { |
| | | const val = event.target.value; |
| | | setProxyVal(val); |
| | | setValue(source, val, { |
| | | form?.setValue(source, val, { |
| | | shouldValidate: true, |
| | | shouldDirty: true, |
| | | }); |
| | |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.waitPakin.code" /> |
| | | {/* <NumberField source="ansId" label="table.field.waitPakin.ansId" /> */} |
| | | <TextField source="asnCode" label="table.field.waitPakin.asnCode" /> |
| | | {/* <TextField source="asnCode" label="table.field.waitPakin.asnCode" /> */} |
| | | <TextField source="barcode" label="table.field.waitPakin.barcode" /> |
| | | <NumberField source="anfme" label="table.field.waitPakin.anfme" /> |
| | | <TextField source="ioStatus$" label="table.field.waitPakin.ioStatus" sortable={false} /> |
| | |
| | | { |
| | | field: 'maktx', |
| | | headerName: translate('table.field.waitPakinItem.maktx'), |
| | | width: 300 |
| | | width: 200 |
| | | }, |
| | | { |
| | | field: 'matnrId', |
| | |
| | | headerName: translate('table.field.waitPakinItem.matnrCode') |
| | | }, |
| | | { |
| | | field: 'asnCode', |
| | | headerName: translate('table.field.waitPakinItem.asnCode') |
| | | }, |
| | | { |
| | | field: 'trackCode', |
| | | headerName: translate('table.field.waitPakinItem.trackCode') |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | | headerName: translate('table.field.waitPakinItem.anfme') |
| | | }, |
| | |
| | | const [maktx, setMaktx] = useState(''); |
| | | const pakinId = record.id; |
| | | |
| | | useEffect(() => { |
| | | debouncedHttp({ maktx }); |
| | | }, [pakinId, maktx]); |
| | | |
| | | const http = async (parmas) => { |
| | | const res = await request.post('/WaitPakinLog/page', { ...parmas, pakinId }); |
| | | const res = await request.post('/waitPakinItemLog/page', { ...parmas, pakinId }); |
| | | if (res?.data?.code === 200) { |
| | | setRows(res.data.data.records) |
| | | } else { |
| | |
| | | package com.vincent.rsf.server.api.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.controller.params.ReceiptParams; |
| | | import com.vincent.rsf.server.api.service.MobileService; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderItem; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | | import io.swagger.annotations.Api; |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return R.error("编码不能为空!!"); |
| | | } |
| | | return mobileService.getDeltByCode(code); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖") |
| | | @PostMapping("/waitPakin/merge") |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.mergeItems(waitPakin)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖解绑") |
| | | @PostMapping("/waitPakin/unbind") |
| | | public R pakinUnBind(@RequestBody WaitPakinParam param) { |
| | | if (Objects.isNull(param)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.unBind(param)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.api.entity.enums;
|
| | |
|
| | | public enum TaskStsType {
|
| | |
|
| | | GENERATE_IN(1L, "创建入库任务"),
|
| | | WCS_EXECUTE_IN(2L, "RCS任务已下发"),
|
| | | WCS_CONTAINER_RECEIVE(3L, "RCS容器到达"),
|
| | |
|
| | | WCS_CONVEYOR_START(4L, "RCS容器流动任务已下发"),
|
| | |
|
| | | WCS_TOTE_LOAD(5L, "RCS取箱完成"),
|
| | |
|
| | | WCS_TOTE_UNLOAD(6L, "RCS放箱完成"),
|
| | |
|
| | | WCS_PUTAWAY_SUCESS(7L, "RCS任务完成"),
|
| | |
|
| | | // WCS_PUTAWAY_FAILED(11L, "任务失败"),
|
| | | //
|
| | | // WCS_PUTAWAY_CANCEL(12L, "任务取消"),
|
| | | //
|
| | | // WCS_PUTAWAY_SUSPEND(13L, "入库任务挂起"),
|
| | |
|
| | | COMPLETE_IN(99L, "入库完成"),
|
| | |
|
| | | UPDATED_IN(100L, "库存更新完成"),
|
| | |
|
| | | GENERATE_OUT(101L, "创建出库任务"),
|
| | |
|
| | | WCS_EXECUTE_OUT(102L, "RCS出库任务已下发"),
|
| | |
|
| | | WCS_EXECUTE_OUT_TOTE_LOAD(103L, "RCS取箱完成"),
|
| | |
|
| | | WCS_EXECUTE_OUT_TOTE_UNLOAD(104L, "RCS放箱完成"),
|
| | |
|
| | | WCS_EXECUTE_OUT_TASK_DONE(105L, "RCS任务完成"),
|
| | |
|
| | | WCS_EXECUTE_OUT_ARRIVED(106L, "RCS容器已到达"),
|
| | |
|
| | | WCS_EXECUTE_OUT_CONVEYOR(107L, "RCS容器流动任务已下发"),
|
| | |
|
| | | GENERATE_WAVE_SEED(197L, "等待容器到达"),
|
| | | WAVE_SEED(198L, "播种中"),
|
| | |
|
| | | COMPLETE_OUT(199L, "出库完成"),
|
| | | UPDATED_OUT(200L, "库存更新完成"),
|
| | | ;
|
| | |
|
| | | public Long id;
|
| | | public String desc;
|
| | |
|
| | | TaskStsType(Long id, String desc) {
|
| | | this.id = id;
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.vincent.rsf.server.api.entity.enums; |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @version 1.0 |
| | | * @title TaskType |
| | | * @description |
| | | * @create 2025/3/29 17:02 |
| | | */ |
| | | public enum TaskType { |
| | | TASK_TYPE_EMPITY_IN(10L, "空板入库"), |
| | | TASK_TYPE_LOC_MOVE(11L, "库格移载"), |
| | | TASK_TYPE_PICK_IN(53L, "拣料再入库"), |
| | | TASK_TYPE_MERGE_IN(54L, "并板再入库"), |
| | | TASK_TYPE_CHECK_IN(57L, "盘点再入库"), |
| | | TASK_TYPE_OUT(101L, "出库"), |
| | | TASK_TYPE_PICK_AGAIN_IN(103L, "拣料入库"), |
| | | TASK_TYPE_MERGE_OUT(104L, "并板出库"), |
| | | TASK_TYPE_CHECK_OUT(107L, "盘点出库"), |
| | | TASK_TYPE_EMPITY_OUT(110L, "空板出库"), |
| | | ; |
| | | public Long type; |
| | | public String desc; |
| | | |
| | | TaskType(Long type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | } |
| | |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.controller.params.ReceiptParams; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrder; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakin; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | | import com.vincent.rsf.server.system.entity.Fields; |
| | | |
| | |
| | | R getReceiptAreas(); |
| | | |
| | | List<Fields> getDynamicFields(); |
| | | |
| | | R getDeltByCode(String code); |
| | | |
| | | WaitPakin mergeItems(WaitPakinParam waitPakin); |
| | | |
| | | WaitPakin unBind(WaitPakinParam param); |
| | | } |
| | |
| | | import com.vincent.rsf.server.common.security.JwtSubject; |
| | | import com.vincent.rsf.server.common.utils.CommonUtil; |
| | | import com.vincent.rsf.server.common.utils.JwtUtil; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.mapper.*; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemLogService; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderLogService; |
| | | import com.vincent.rsf.server.manager.service.WarehouseAreasItemService; |
| | | import com.vincent.rsf.server.manager.service.WarehouseAreasService; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.system.constant.CodeRes; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | |
| | | |
| | | @Autowired |
| | | private AsnOrderLogService asnOrderLogService; |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Autowired |
| | | private WaitPakinItemService waitPakinItemService; |
| | | |
| | | @Autowired |
| | | private AsnOrderItemLogService asnOrderItemLogService; |
| | |
| | | return fieldsMapper.selectList(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1).eq(Fields::getStatus, 1)); |
| | | } |
| | | |
| | | @Override |
| | | public R getDeltByCode(String code) { |
| | | return R.ok(asnOrderItemMapper.selectOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description PDA组拖 |
| | | * @param |
| | | * @return |
| | | * @time 2025/3/29 14:26 |
| | | */ |
| | | @Override |
| | | public WaitPakin mergeItems(WaitPakinParam waitPakin) { |
| | | return waitPakinService.mergeItems(waitPakin); |
| | | } |
| | | |
| | | @Override |
| | | public WaitPakin unBind(WaitPakinParam param) { |
| | | return waitPakinService.unBind(param); |
| | | } |
| | | |
| | | /** |
| | | * 获取ReceiptDetlsDtos |
| | | */ |
| | |
| | | return asnOrderItemService.generateBarcode(orders); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | return R.ok(asnOrderItemService.getOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); |
| | | } |
| | | /** |
| | | * ASN单据明细导入 |
| | | * @param file |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.vincent.rsf.server.manager.service.TaskService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); |
| | | return R.ok().add(taskService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping({"/task/many/{ids}", "/tasks/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @GetMapping("/task/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:save')") |
| | | @OperationLog("Create 任务工作档") |
| | | @PostMapping("/task/save") |
| | | public R save(@RequestBody Task task) { |
| | | task.setCreateBy(getLoginUserId()); |
| | | task.setCreateTime(new Date()); |
| | | task.setUpdateBy(getLoginUserId()); |
| | | task.setUpdateTime(new Date()); |
| | | if (!taskService.save(task)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(task); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @OperationLog("Update 任务工作档") |
| | | @PostMapping("/task/update") |
| | | public R update(@RequestBody Task task) { |
| | | task.setUpdateBy(getLoginUserId()); |
| | | task.setUpdateTime(new Date()); |
| | | if (!taskService.updateById(task)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(task); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:remove')") |
| | | @OperationLog("Delete 任务工作档") |
| | | @PostMapping("/task/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(Task::getId, condition); |
| | | } |
| | | taskService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskService.list(), Task.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.vincent.rsf.server.manager.service.TaskItemService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskItemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskItemService taskItemService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskItem, BaseParam> pageParam = new PageParam<>(baseParam, TaskItem.class); |
| | | return R.ok().add(taskItemService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskItemService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping({"/taskItem/many/{ids}", "/taskItems/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskItemService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @GetMapping("/taskItem/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskItemService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:save')") |
| | | @OperationLog("Create 任务工作档") |
| | | @PostMapping("/taskItem/save") |
| | | public R save(@RequestBody TaskItem taskItem) { |
| | | taskItem.setCreateBy(getLoginUserId()); |
| | | taskItem.setCreateTime(new Date()); |
| | | taskItem.setUpdateBy(getLoginUserId()); |
| | | taskItem.setUpdateTime(new Date()); |
| | | if (!taskItemService.save(taskItem)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:update')") |
| | | @OperationLog("Update 任务工作档") |
| | | @PostMapping("/taskItem/update") |
| | | public R update(@RequestBody TaskItem taskItem) { |
| | | taskItem.setUpdateBy(getLoginUserId()); |
| | | taskItem.setUpdateTime(new Date()); |
| | | if (!taskItemService.updateById(taskItem)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:remove')") |
| | | @OperationLog("Delete 任务工作档") |
| | | @PostMapping("/taskItem/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskItemService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskItem> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskItem::getId, condition); |
| | | } |
| | | taskItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskItemService.list(), TaskItem.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.vincent.rsf.server.manager.service.TaskItemLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskItemLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskItemLogService taskItemLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskItemLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskItemLog.class); |
| | | return R.ok().add(taskItemLogService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskItemLogService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping({"/taskItemLog/many/{ids}", "/taskItemLogs/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskItemLogService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @GetMapping("/taskItemLog/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskItemLogService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:save')") |
| | | @OperationLog("Create 任务工作历史档") |
| | | @PostMapping("/taskItemLog/save") |
| | | public R save(@RequestBody TaskItemLog taskItemLog) { |
| | | taskItemLog.setCreateBy(getLoginUserId()); |
| | | taskItemLog.setCreateTime(new Date()); |
| | | taskItemLog.setUpdateBy(getLoginUserId()); |
| | | taskItemLog.setUpdateTime(new Date()); |
| | | if (!taskItemLogService.save(taskItemLog)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskItemLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:update')") |
| | | @OperationLog("Update 任务工作历史档") |
| | | @PostMapping("/taskItemLog/update") |
| | | public R update(@RequestBody TaskItemLog taskItemLog) { |
| | | taskItemLog.setUpdateBy(getLoginUserId()); |
| | | taskItemLog.setUpdateTime(new Date()); |
| | | if (!taskItemLogService.updateById(taskItemLog)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskItemLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:remove')") |
| | | @OperationLog("Delete 任务工作历史档") |
| | | @PostMapping("/taskItemLog/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskItemLogService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskItemLog> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskItemLog::getId, condition); |
| | | } |
| | | taskItemLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskItemLogService.list(), TaskItemLog.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.vincent.rsf.server.manager.service.TaskLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskLogService taskLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskLog.class); |
| | | return R.ok().add(taskLogService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskLogService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping({"/taskLog/many/{ids}", "/taskLogs/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskLogService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @GetMapping("/taskLog/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskLogService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:save')") |
| | | @OperationLog("Create 任务工作历史档") |
| | | @PostMapping("/taskLog/save") |
| | | public R save(@RequestBody TaskLog taskLog) { |
| | | taskLog.setCreateBy(getLoginUserId()); |
| | | taskLog.setCreateTime(new Date()); |
| | | taskLog.setUpdateBy(getLoginUserId()); |
| | | taskLog.setUpdateTime(new Date()); |
| | | if (!taskLogService.save(taskLog)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:update')") |
| | | @OperationLog("Update 任务工作历史档") |
| | | @PostMapping("/taskLog/update") |
| | | public R update(@RequestBody TaskLog taskLog) { |
| | | taskLog.setUpdateBy(getLoginUserId()); |
| | | taskLog.setUpdateTime(new Date()); |
| | | if (!taskLogService.updateById(taskLog)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:remove')") |
| | | @OperationLog("Delete 任务工作历史档") |
| | | @PostMapping("/taskLog/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskLogService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskLog> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskLog::getId, condition); |
| | | } |
| | | taskLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskLogService.list(), TaskLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakin; |
| | | import com.vincent.rsf.server.manager.service.TaskService; |
| | | import com.vincent.rsf.server.manager.service.WaitPakinService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:list')") |
| | | @PostMapping("/waitPakin/page") |
| | |
| | | @PostMapping("/waitPakin/save") |
| | | public R save(@RequestBody WaitPakin waitPakin) { |
| | | waitPakin.setCreateBy(getLoginUserId()); |
| | | waitPakin.setCreateTime(new Date()); |
| | | waitPakin.setUpdateBy(getLoginUserId()); |
| | | waitPakin.setUpdateTime(new Date()); |
| | | if (Objects.isNull(waitPakin.getBarcode()) || StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("拖盘码不能为空!!"); |
| | | } |
| | | List<WaitPakin> list = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakin.getBarcode())); |
| | | if (!list.isEmpty()) { |
| | | return R.error("拖盘已组拖!!"); |
| | | } |
| | | if (!waitPakinService.save(waitPakin)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖") |
| | | @ApiOperation("生成任务列表") |
| | | @PostMapping("/waitPakin/merge") |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | public R generateTask(@RequestBody List<WaitPakin> waitPakin) { |
| | | if (Objects.isNull(waitPakin) || waitPakin.isEmpty()) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(waitPakinService.mergeItems(waitPakin)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖解绑") |
| | | @PostMapping("/waitPakin/unbind") |
| | | public R pakinUnBind(@RequestBody WaitPakinParam param) { |
| | | if (Objects.isNull(param)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (StringUtils.isBlank(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(waitPakinService); |
| | | |
| | | return taskService.generateTasks(waitPakin); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private Long matnrId; |
| | | |
| | | private Double qty; |
| | | private Double receiptQty; |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("man_task") |
| | | public class Task implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | private String taskCode; |
| | | |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态") |
| | | private Short taskStatus; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | private Short taskType; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | private String orgLoc; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | private String targLoc; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 机器人编码 |
| | | */ |
| | | @ApiModelProperty(value= "机器人编码") |
| | | private String robotCode; |
| | | |
| | | /** |
| | | * 执行状态 |
| | | */ |
| | | @ApiModelProperty(value= "执行状态") |
| | | private Short exceStatus; |
| | | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | private String expDesc; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | private Short sort; |
| | | |
| | | /** |
| | | * 异常编码 |
| | | */ |
| | | @ApiModelProperty(value= "异常编码") |
| | | private String expCode; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public Task() {} |
| | | |
| | | public Task(String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskCode = taskCode; |
| | | this.taskStatus = taskStatus; |
| | | this.taskType = taskType; |
| | | this.orgLoc = orgLoc; |
| | | this.targLoc = targLoc; |
| | | this.barcode = barcode; |
| | | this.robotCode = robotCode; |
| | | this.exceStatus = exceStatus; |
| | | this.expDesc = expDesc; |
| | | this.sort = sort; |
| | | this.expCode = expCode; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // Task task = new Task( |
| | | // null, // 任务号 |
| | | // null, // 任务状态 |
| | | // null, // 任务类型 |
| | | // null, // 源库位 |
| | | // null, // 目标库位 |
| | | // null, // 托盘码 |
| | | // null, // 机器人编码 |
| | | // null, // 执行状态 |
| | | // null, // 异常描述 |
| | | // null, // 优先级 |
| | | // null, // 异常编码 |
| | | // null, // 开始时间 |
| | | // null, // 结束时间 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_item") |
| | | public class TaskItem implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 主单ID |
| | | */ |
| | | @ApiModelProperty(value= "主单ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 物料ID |
| | | */ |
| | | @ApiModelProperty(value= "物料ID") |
| | | private Long matnrId; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | @ApiModelProperty(value= "物料名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnrCode; |
| | | |
| | | /** |
| | | * 库存单位 |
| | | */ |
| | | @ApiModelProperty(value= "库存单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 库存批次 |
| | | */ |
| | | @ApiModelProperty(value= "库存批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 字段索引 |
| | | */ |
| | | @ApiModelProperty(value= "字段索引") |
| | | private String fieldsIndex; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskItem() {} |
| | | |
| | | public TaskItem(Long taskId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.matnrId = matnrId; |
| | | this.maktx = maktx; |
| | | this.matnrCode = matnrCode; |
| | | this.unit = unit; |
| | | this.anfme = anfme; |
| | | this.batch = batch; |
| | | this.spec = spec; |
| | | this.model = model; |
| | | this.fieldsIndex = fieldsIndex; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskItem taskItem = new TaskItem( |
| | | // null, // 主单ID |
| | | // null, // 物料ID |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 库存单位 |
| | | // null, // 数量 |
| | | // null, // 库存批次 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 字段索引 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_item_log") |
| | | public class TaskItemLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 主单ID |
| | | */ |
| | | @ApiModelProperty(value= "主单ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 任务明细ID |
| | | */ |
| | | @ApiModelProperty(value= "任务明细ID") |
| | | private Long taskItemId; |
| | | |
| | | /** |
| | | * 物料ID |
| | | */ |
| | | @ApiModelProperty(value= "物料ID") |
| | | private Long matnrId; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | @ApiModelProperty(value= "物料名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnrCode; |
| | | |
| | | /** |
| | | * 库存单位 |
| | | */ |
| | | @ApiModelProperty(value= "库存单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 库存批次 |
| | | */ |
| | | @ApiModelProperty(value= "库存批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 字段索引 |
| | | */ |
| | | @ApiModelProperty(value= "字段索引") |
| | | private String fieldsIndex; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskItemLog() {} |
| | | |
| | | public TaskItemLog(Long taskId,Long taskItemId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.taskItemId = taskItemId; |
| | | this.matnrId = matnrId; |
| | | this.maktx = maktx; |
| | | this.matnrCode = matnrCode; |
| | | this.unit = unit; |
| | | this.anfme = anfme; |
| | | this.batch = batch; |
| | | this.spec = spec; |
| | | this.model = model; |
| | | this.fieldsIndex = fieldsIndex; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskItemLog taskItemLog = new TaskItemLog( |
| | | // null, // 主单ID |
| | | // null, // 任务明细ID |
| | | // null, // 物料ID |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 库存单位 |
| | | // null, // 数量 |
| | | // null, // 库存批次 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 字段索引 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_log") |
| | | public class TaskLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 任务ID |
| | | */ |
| | | @ApiModelProperty(value= "任务ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | private String taskCode; |
| | | |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态") |
| | | private Short taskStatus; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | private Short taskType; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | private String orgLoc; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | private String targLoc; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 机器人编码 |
| | | */ |
| | | @ApiModelProperty(value= "机器人编码") |
| | | private String robotCode; |
| | | |
| | | /** |
| | | * 执行状态 |
| | | */ |
| | | @ApiModelProperty(value= "执行状态") |
| | | private Short exceStatus; |
| | | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | private String expDesc; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | private Short sort; |
| | | |
| | | /** |
| | | * 异常编码 |
| | | */ |
| | | @ApiModelProperty(value= "异常编码") |
| | | private String expCode; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskLog() {} |
| | | |
| | | public TaskLog(Long taskId,String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.taskCode = taskCode; |
| | | this.taskStatus = taskStatus; |
| | | this.taskType = taskType; |
| | | this.orgLoc = orgLoc; |
| | | this.targLoc = targLoc; |
| | | this.barcode = barcode; |
| | | this.robotCode = robotCode; |
| | | this.exceStatus = exceStatus; |
| | | this.expDesc = expDesc; |
| | | this.sort = sort; |
| | | this.expCode = expCode; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskLog taskLog = new TaskLog( |
| | | // null, // 任务ID |
| | | // null, // 任务号 |
| | | // null, // 任务状态 |
| | | // null, // 任务类型 |
| | | // null, // 源库位 |
| | | // null, // 目标库位 |
| | | // null, // 托盘码 |
| | | // null, // 机器人编码 |
| | | // null, // 执行状态 |
| | | // null, // 异常描述 |
| | | // null, // 优先级 |
| | | // null, // 异常编码 |
| | | // null, // 开始时间 |
| | | // null, // 结束时间 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskItemLogMapper extends BaseMapper<TaskItemLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskItemMapper extends BaseMapper<TaskItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskLogMapper extends BaseMapper<TaskLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskMapper extends BaseMapper<Task> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | |
| | | public interface TaskItemLogService extends IService<TaskItemLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | |
| | | public interface TaskItemService extends IService<TaskItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | |
| | | public interface TaskLogService extends IService<TaskLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakin; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface TaskService extends IService<Task> { |
| | | |
| | | R generateTasks(List<WaitPakin> waitPakin); |
| | | } |
| | |
| | | public interface WaitPakinService extends IService<WaitPakin> { |
| | | |
| | | WaitPakin mergeItems(WaitPakinParam waitPakin); |
| | | |
| | | WaitPakin unBind(WaitPakinParam param); |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskItemLogMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.vincent.rsf.server.manager.service.TaskItemLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskItemLogService") |
| | | public class TaskItemLogServiceImpl extends ServiceImpl<TaskItemLogMapper, TaskItemLog> implements TaskItemLogService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskItemMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.vincent.rsf.server.manager.service.TaskItemService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskItemService") |
| | | public class TaskItemServiceImpl extends ServiceImpl<TaskItemMapper, TaskItem> implements TaskItemService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskLogMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.vincent.rsf.server.manager.service.TaskLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskLogService") |
| | | public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog> implements TaskLogService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.server.api.entity.enums.TaskStsType; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakin; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakinItem; |
| | | import com.vincent.rsf.server.manager.mapper.TaskMapper; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.vincent.rsf.server.manager.service.TaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vincent.rsf.server.manager.service.WaitPakinItemService; |
| | | import com.vincent.rsf.server.manager.service.WaitPakinService; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("taskService") |
| | | public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService { |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Autowired |
| | | private WaitPakinItemService waitPakinItemService; |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 生成任务列表 |
| | | * @param |
| | | * @return |
| | | * @time 2025/3/29 15:59 |
| | | */ |
| | | @Override |
| | | public R generateTasks(List<WaitPakin> waitPakin) { |
| | | if (Objects.isNull(waitPakin) || waitPakin.isEmpty()) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | /**获取组拖*/ |
| | | List<Long> ids = waitPakin.stream().map(WaitPakin::getId).collect(Collectors.toList()); |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().in(WaitPakin::getId, ids)); |
| | | if (waitPakins.isEmpty()) { |
| | | throw new CoolException("组拖信息不存在!!"); |
| | | } |
| | | /**获取组拖明细**/ |
| | | List<WaitPakinItem> waitPakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>().eq(WaitPakinItem::getPakinId, ids)); |
| | | if (waitPakinItems.isEmpty()) { |
| | | throw new CoolException("数据错误:组拖明细不存在"); |
| | | } |
| | | Task task = new Task(); |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_TASK_CODE, null); |
| | | task.setTaskCode(ruleCode).setTaskStatus(TaskStsType.GENERATE_IN.id.shortValue()); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | @Service("waitPakinService") |
| | | public class WaitPakinServiceImpl extends ServiceImpl<WaitPakinMapper, WaitPakin> implements WaitPakinService { |
| | | |
| | | |
| | | @Autowired |
| | | private AsnOrderService asnOrderService; |
| | | @Autowired |
| | | private AsnOrderItemService asnOrderItemService; |
| | | @Autowired |
| | | private AsnOrderService asnOrderService; |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private WaitPakinItemService waitPakinItemService; |
| | | |
| | | /** |
| | | * 单据组拖 |
| | | * @param waitPakin |
| | | * @author Ryan |
| | | * @description 组拖 |
| | | * @param |
| | | * @return |
| | | * @time 2025/3/29 14:42 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | throw new CoolException("参数错误:托盘码为空!!"); |
| | | } |
| | | |
| | | double sum = waitPakin.getItems().stream().mapToDouble(PakinItem::getQty).sum(); |
| | | double sum = waitPakin.getItems().stream().mapToDouble(PakinItem::getReceiptQty).sum(); |
| | | |
| | | WaitPakin pakin = new WaitPakin(); |
| | | |
| | |
| | | .setMatnrCode(item.getMatnrCode()); |
| | | for (PakinItem waitPakinItem : waitPakin.getItems()) { |
| | | if (waitPakinItem.getTrackCode().equals(item.getTrackCode())) { |
| | | Double v = item.getWorkQty() + waitPakinItem.getQty(); |
| | | Double v = item.getWorkQty() + waitPakinItem.getReceiptQty(); |
| | | pakinItem.setWorkQty(v) |
| | | .setAnfme(waitPakinItem.getQty()) |
| | | .setAnfme(waitPakinItem.getReceiptQty()) |
| | | .setTrackCode(waitPakinItem.getTrackCode()); |
| | | /**更新单据执行中库存*/ |
| | | if (v.compareTo(item.getAnfme()) > 0) {throw new CoolException("执行中数量大于收货数量!!");} |
| | |
| | | } |
| | | return pakin; |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 组拖解绑 |
| | | * @param |
| | | * @return |
| | | * @time 2025/3/29 14:42 |
| | | */ |
| | | @Override |
| | | public WaitPakin unBind(WaitPakinParam param) { |
| | | String barcode = param.getBarcode(); |
| | | if (StringUtils.isNotBlank(barcode)) { |
| | | WaitPakin waitPakins = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode), false); |
| | | if (Objects.isNull(waitPakins)) { |
| | | throw new CoolException("组拖不存在!!"); |
| | | } |
| | | List<PakinItem> paramItems = param.getItems(); |
| | | if (Objects.isNull(paramItems) || paramItems.isEmpty()) { |
| | | throw new CoolException("解绑物料不能为空!!"); |
| | | } |
| | | List<Long> list = paramItems.stream().map(PakinItem::getMatnrId).collect(Collectors.toList()); |
| | | List<WaitPakinItem> pakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>() |
| | | .eq(WaitPakinItem::getPakinId, waitPakins.getId()) |
| | | .in(WaitPakinItem::getMatnrId, list)); |
| | | if (pakinItems.isEmpty()) { |
| | | throw new CoolException("数据错误:组拖明细不存在!!"); |
| | | } |
| | | List<Long> ids = pakinItems.stream().map(WaitPakinItem::getId).collect(Collectors.toList()); |
| | | if (!waitPakinItemService.removeByIds(ids)) { |
| | | throw new CoolException("组拖明细解绑失败!!"); |
| | | } |
| | | return waitPakins; |
| | | } |
| | | return new WaitPakin(); |
| | | } |
| | | } |
| | |
| | | * 组拖编码生成规则 |
| | | */ |
| | | public final static String SYS_WAIT_PAKIN_CODE = "sys_wait_pakin_code"; |
| | | |
| | | /** |
| | | * 任务编码生成规则 |
| | | */ |
| | | public final static String SYS_TASK_CODE = "sys_task_code"; |
| | | } |
| | |
| | | # global-config:
|
| | | # field-strategy: 0
|
| | | configuration:
|
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | map-underscore-to-camel-case: true
|
| | | cache-enabled: true
|
| | | call-setters-on-nulls: true
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemLogMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskLogMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskMapper"> |
| | | |
| | | </mapper> |