| | |
| | | deviceCode: "deviceCode", |
| | | deviceSite: "deviceSite", |
| | | flagInit: "flagInit", |
| | | wcsCode: "wcsCode", |
| | | channel: "channel", |
| | | }, |
| | | waitPakin: { |
| | | code: "code", |
| | |
| | | row: "排", |
| | | col: "列", |
| | | lev: "层", |
| | | channel: "通道", |
| | | channel: "巷道", |
| | | maxParts: "最大零件数", |
| | | maxPack: "最大包装数", |
| | | flagLabelMange: "标签管理", |
| | |
| | | }, |
| | | deviceSite: { |
| | | type: "入出库类型", |
| | | site: "入库口", |
| | | site: "作业站点", |
| | | name: "名称", |
| | | target: "目标站点", |
| | | label: "站点标签", |
| | |
| | | deviceSite: "设备站点", |
| | | flagInit: "是否初始化", |
| | | wcsCode: "wcs编号", |
| | | channel: "巷道", |
| | | }, |
| | | waitPakin: { |
| | | code: "编码", |
| | |
| | | stock: "库存不足,无法提交!!", |
| | | select_error_order: "请选择通知单", |
| | | out_stock_qty: "出库数量不能大于库存数量", |
| | | |
| | | qty_not_negative: "数量不能小于等于0", |
| | | } |
| | | |
| | | } |
| | |
| | | <TextField source="target" label="table.field.deviceSite.target" /> |
| | | <TextField source="label" label="table.field.deviceSite.label" /> |
| | | <TextField source="device$" label="table.field.deviceSite.device" /> |
| | | <TextField source="deviceCode" label="table.field.deviceSite.deviceCode" /> |
| | | <TextField source="channel" label="table.field.deviceSite.channel" /> |
| | | <TextField source="deviceSite" label="table.field.deviceSite.deviceSite" /> |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </Grid> |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.deviceSite.deviceCode")} |
| | | name="deviceCode" |
| | | label={translate("table.field.deviceSite.channel")} |
| | | name="channel" |
| | | size="small" |
| | | type="number" |
| | | /> |
| | |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | |
| | | const InitModal = ({ open, setOpen }) => { |
| | | const refresh = useRefresh(); |
| | | const translate = useTranslate(); |
| | | const {filterValues} = useListContext(); // 获取列表上下文 |
| | | |
| | | const { filterValues } = useListContext(); // 获取列表上下文 |
| | | |
| | | |
| | | const notify = useNotify(); |
| | | const [disabled, setDisabled] = useState(false) |
| | |
| | | filterToQuery={(val) => ({ name: val })} |
| | | /> |
| | | </ReferenceInput> |
| | | |
| | | </Grid> |
| | | |
| | | |
| | | <Grid item xs={4}> |
| | | <ReferenceArrayInput source="typeIds" reference="locType" > |
| | | <SelectArrayInput label="table.field.loc.type" validate={[required()]} onChange={(e) => handleChange(e.target.value, 'typeIds')} /> |
| | |
| | | <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} validate={[required()]} /> |
| | | </ReferenceArrayInput> */} |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.startBay")} |
| | | name="startBay" |
| | | value={formData.startBay} |
| | | onChange={(e) => handleChange(+e.target.value, 'startBay')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.startLev")} |
| | | name="startLev" |
| | | value={formData.startLev} |
| | | onChange={(e) => handleChange(+e.target.value, 'startLev')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.startRow")} |
| | |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.endBay")} |
| | | name="endBay" |
| | | value={formData.endBay} |
| | | onChange={(e) => handleChange(+e.target.value, 'endBay')} |
| | | label={translate("table.field.loc.startBay")} |
| | | name="startBay" |
| | | value={formData.startBay} |
| | | onChange={(e) => handleChange(+e.target.value, 'startBay')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.endLev")} |
| | | name="endLev" |
| | | value={formData.endLev} |
| | | onChange={(e) => handleChange(+e.target.value, 'endLev')} |
| | | label={translate("table.field.loc.startLev")} |
| | | name="startLev" |
| | | value={formData.startLev} |
| | | onChange={(e) => handleChange(+e.target.value, 'startLev')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.endRow")} |
| | |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.endBay")} |
| | | name="endBay" |
| | | value={formData.endBay} |
| | | onChange={(e) => handleChange(+e.target.value, 'endBay')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={translate("table.field.loc.endLev")} |
| | | name="endLev" |
| | | value={formData.endLev} |
| | | onChange={(e) => handleChange(+e.target.value, 'endLev')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4}> |
| | | <TextInput |
| | | label={"table.field.loc.channel"} |
| | | name="channel" |
| | | value={formData.channel} |
| | | onChange={(e) => handleChange(+e.target.value, 'channel')} |
| | | size="small" |
| | | type="number" |
| | | validate={[required()]} |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | | |
| | | </Box> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | export default InitModal; |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <NumberInput source="locId" label="table.field.locItem.locId" />, |
| | | <NumberInput source="orderId" label="table.field.locItem.orderId" />, |
| | | <TextInput source="type$" label="table.field.locItem.type" />, |
| | |
| | | <Box display="flex"> |
| | | <List |
| | | resource="locItem" |
| | | filter={{locId: locId}} |
| | | filter={{ locId: locId }} |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | <FilterButton /> |
| | | {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */} |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | <MyExportButton /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_ITEM_PAGE_SIZE} |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'locId', 'orderId', 'orderItemId', 'matnrId', 'createTime', 'createBy', 'memo']} |
| | | omit={['id', 'locId', 'orderId', 'orderItemId', 'matnrId', 'statusBool','trackCode', 'createTime', 'fieldsIndex','splrBatch', 'createBy', 'spec', 'model', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="locId" label="table.field.locItem.locId" /> |
| | | <NumberField source="orderId" label="table.field.locItem.orderId" /> |
| | | <TextField source="type" label="table.field.locItem.type" /> |
| | | <TextField source="type$" label="table.field.locItem.type" /> |
| | | <NumberField source="orderItemId" label="table.field.locItem.orderItemId" /> |
| | | <NumberField source="wkType" label="table.field.locItem.wkType" /> |
| | | <NumberField source="wkType$" label="table.field.locItem.wkType" /> |
| | | <NumberField source="matnrId" label="table.field.locItem.matnrId" /> |
| | | <TextField source="maktx" label="table.field.locItem.maktx" /> |
| | | <TextField source="matnrCode" label="table.field.locItem.matnrCode" /> |
| | | <TextField source="trackCode" label="table.field.locItem.trackCode" /> |
| | | <TextField source="unit" label="table.field.locItem.unit" /> |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" /> |
| | | <TextField source="maktx" label="table.field.locItem.maktx" /> |
| | | <TextField source="batch" label="table.field.locItem.batch" /> |
| | | <TextField source="trackCode" label="table.field.locItem.trackCode" /> |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" /> |
| | | <TextField source="unit" label="table.field.locItem.unit" /> |
| | | <TextField source="splrBatch" label="table.field.locItem.splrBatch" /> |
| | | <TextField source="spec" label="table.field.locItem.spec" /> |
| | | <TextField source="model" label="table.field.locItem.model" /> |
| | |
| | | {/* <TextField source="name" label="table.field.loc.name" /> */} |
| | | {/* <NumberField source="flagLogic" label="table.field.loc.flagLogic" /> |
| | | <TextField source="fucAtrrs" label="table.field.loc.fucAtrrs" /> |
| | | <TextField source="barcode" label="table.field.loc.barcode" /> */} |
| | | */} |
| | | {/* <TextField source="unit" label="table.field.loc.unit" /> */} |
| | | <TextField source="barcode" label="table.field.loc.barcode" /> |
| | | <TextField source="length" label="table.field.loc.length" /> |
| | | <TextField source="width" label="table.field.loc.width" /> |
| | | <TextField source="height" label="table.field.loc.height" /> |
| | | <NumberField source="row" label="table.field.loc.row" /> |
| | | <NumberField source="col" label="table.field.loc.col" /> |
| | | <NumberField source="lev" label="table.field.loc.lev" /> |
| | | <NumberField source="channel" label="table.field.loc.channel" /> |
| | | {/* <NumberField source="channel" label="table.field.loc.channel" /> |
| | | <NumberField source="maxParts" label="table.field.loc.maxParts" /> |
| | | <NumberField source="maxPack" label="table.field.loc.maxPack" /> |
| | | <NumberField source="flagLabelMange" label="table.field.loc.flagLabelMange" /> |
| | | <TextField source="locAttrs" label="table.field.loc.locAttrs" /> */} |
| | | <TextField source="useStatus$" label="table.field.loc.useStatus" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime align="left" /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime align="left" /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} align="left" /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | |
| | | |
| | | </StyledDatagrid> |
| | | <InitModal |
| | | open={initDialog} |
| | | setOpen={setInitDialog} |
| | | open={initDialog} |
| | | setOpen={setInitDialog} |
| | | /> |
| | | </List> |
| | | <LocCreate |
| | |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | |
| | | |
| | | |
| | | |
| | | </Box> |
| | | ) |
| | | } |
| | |
| | | <TextField source="spec" label="table.field.asnOrderItem.spec" />, |
| | | <TextField source="model" label="table.field.asnOrderItem.model" />, |
| | | <NumberField source="anfme" label="table.field.asnOrderItem.anfme" />, |
| | | <NumberField source="qty" label="table.field.asnOrderItem.qty" />, |
| | | <TextField source="stockUnit" label="table.field.asnOrderItem.stockUnit" />, |
| | | <NumberField source="purQty" label="table.field.asnOrderItem.purQty" />, |
| | | <TextField source="purUnit" label="table.field.asnOrderItem.purUnit" />, |
| | | <NumberField source="qty" label="table.field.asnOrderItem.qty" />, |
| | | <TextField source="splrCode" label="table.field.asnOrderItem.splrCode" />, |
| | | <TextField source="splrName" label="table.field.asnOrderItem.splrName" />, |
| | | <TextField source="isptResult$" label="table.field.asnOrderItem.isptResult" />, |
| | |
| | | preferenceKey='asnOrderItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | omit={['id', 'asnId', 'poDetlId', 'poDetlCode', 'matnrId', 'purQty', 'purUnit', 'qrcode', 'trackCode', 'splrCode', 'platWorkCode', 'projectCode']} |
| | | omit={['id', 'asnId', 'asnCode', 'poDetlId', 'poDetlCode', 'matnrId', 'spec', 'model', 'purQty', 'purUnit', 'qrcode', 'trackCode', 'splrCode', 'platWorkCode', 'projectCode']} |
| | | > |
| | | {columns.map((column) => column)} |
| | | </StyledDatagrid>} |
| | |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'matnrId', 'asnId']} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'purQty','purUnit','trackCode','packName','splrName','matnrId', 'asnId']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="asnId" label="table.field.outStockItem.asnId" /> |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <NumberInput source="orderId" label="table.field.stockItem.orderId" />, |
| | | <TextInput source="orderCode" label="table.field.stockItem.orderCode" />, |
| | | <TextInput source="sourceItemId" label="table.field.stockItem.sourceItemId" />, |
| | | <TextInput source="matnrId" label="table.field.stockItem.matnrId" />, |
| | | <TextInput source="matnrCode" label="table.field.stockItem.matnrCode" />, |
| | | <TextInput source="maktx" label="table.field.stockItem.maktx" />, |
| | | <TextInput source="locCode" label="table.field.loc.code" />, |
| | | <TextInput source="barcode" label="table.field.task.barcode" />, |
| | | <NumberInput source="anfme" label="table.field.stockItem.anfme" />, |
| | | <TextInput source="stockUnit" label="table.field.stockItem.stockUnit" />, |
| | | <NumberInput source="workQty" label="table.field.stockItem.workQty" />, |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'orderId', 'sourceItemId', 'matnrId', 'createBy','barcode', 'splrCode', 'splrBatch', 'updateBy$', 'createBy$', 'memo']} |
| | | omit={['id', 'createTime', 'orderId', 'sourceItemId', 'matnrId', 'purUnit','splrCode', 'purQty', 'createBy', 'packName', 'prodTime', 'splrName', 'splrCode', 'batch', 'packName', 'updateBy$', 'createBy$', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="orderId" label="table.field.stockItem.orderId" /> |
| | |
| | | <NumberField source="anfme" label="table.field.stockItem.anfme" /> |
| | | <TextField source="stockUnit" label="table.field.stockItem.stockUnit" /> |
| | | <NumberField source="workQty" label="table.field.stockItem.workQty" /> |
| | | <TextField source="locCode" label="table.field.loc.code" />, |
| | | <TextField source="barcode" label="table.field.task.barcode" />, |
| | | <NumberField source="purQty" label="table.field.stockItem.purQty" /> |
| | | <TextField source="purUnit" label="table.field.stockItem.purUnit" /> |
| | | <NumberField source="qty" label="table.field.stockItem.qty" /> |
| | |
| | | <TextField source="splrBatch" label="table.field.stockItem.splrBatch" /> |
| | | <TextField source="splrName" label="table.field.stockItem.splrName" /> |
| | | <TextField source="trackCode" label="table.field.stockItem.trackCode" /> |
| | | <TextField source="barcode" label="table.field.stockItem.barcode" /> |
| | | <TextField source="prodTime" label="table.field.stockItem.prodTime" /> |
| | | <TextField source="packName" label="table.field.stockItem.packName" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <PageDrawer |
| | |
| | | bulkActionButtons={false} |
| | | rowClick='edit' |
| | | expandSingle={false} |
| | | omit={['id', 'createTime','sourceId', 'createBy', 'memo']} |
| | | omit={['id', 'createTime', 'sourceId', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.stock.code" /> |
| | | <TextField source="sourceCode" label="table.field.stock.sourceCode" /> |
| | | <NumberField source="sourceId" label="table.field.stock.sourceId" /> |
| | | <TextField source="locCode" label="table.field.locArea.locId" />, |
| | | <TextField source="barcode" label="table.field.task.barcode" />, |
| | | <TextField source="type$" label="table.field.stock.type" /> |
| | | <TextField source="wkType$" label="table.field.stock.wkType" /> |
| | | <NumberField source="anfme" label="table.field.stock.anfme" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | |
| | | } |
| | | |
| | | return ( |
| | | record?.taskStatus == 198 && record?.taskType == 103 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></> |
| | | record?.taskStatus == 199 && record?.taskType == 103 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></> |
| | | ) |
| | | } |
| | | |
| | |
| | | }} |
| | | pageSizeOptions={[15, 25, 50, 100]} |
| | | editMode="row" |
| | | checkboxSelection |
| | | checkboxSelection = {false} |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | | selectionModel={selectedRows} |
| | | sx={{ |
| | |
| | | const http = async () => { |
| | | setLoading(true); |
| | | try { |
| | | const res = await request.post('/selectStaList/page', { |
| | | type: type, |
| | | current: page, |
| | | pageSize: perPage |
| | | const res = await request.post('/selectStaList/list', { |
| | | type: type |
| | | }); |
| | | |
| | | if (res?.data?.code === 200) { |
| | | setList(res.data.data.records.map((item) => { |
| | | return { |
| | | id: item.site, |
| | | name: item.site |
| | | } |
| | | })); |
| | | // 使用Set来过滤重复的site值 |
| | | const uniqueSites = new Set(); |
| | | setList(res.data.data |
| | | .filter(item => { |
| | | if (uniqueSites.has(item.site)) { |
| | | return false; |
| | | } |
| | | uniqueSites.add(item.site); |
| | | return true; |
| | | }) |
| | | .map((item) => { |
| | | return { |
| | | id: item.site, |
| | | name: item.site |
| | | } |
| | | })); |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | |
| | | } |
| | | const http = async (sta, items) => { |
| | | console.log(items); |
| | | |
| | | const filZores = items.filter(item => item.outQty <= 0.0); |
| | | const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme); |
| | | if (filter.length > 0) { |
| | | if (filter.length > 0 || filZores.length > 0) { |
| | | notify(translate('toolbar.request.error.out_stock_qty')) |
| | | return |
| | | } |
| | |
| | | width: 100, |
| | | type: 'number', |
| | | editable: true, |
| | | headerClassName: "custom", |
| | | headerClassName: "custom", |
| | | |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | |
| | | |
| | | |
| | | const processRowUpdate = (newRow, oldRow) => { |
| | | // 确保outQty不小于0 |
| | | if (newRow.outQty <= 0) { |
| | | notify(translate('request.error.qty_not_negative'), { type: 'error', messageArgs: { _: translate('request.error.qty_not_negative') } }); |
| | | return oldRow; // 如果小于0,保持原值不变 |
| | | } |
| | | |
| | | const rows = tabelData.map((r) => |
| | | r.id === newRow.id ? { ...newRow } : r |
| | | ) |
| | |
| | | }} |
| | | pageSizeOptions={[15, 25, 50, 100]} |
| | | editMode="row" |
| | | checkboxSelection |
| | | checkboxSelection = {false} |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | | selectionModel={selectedRows} |
| | | sx={{ |
| | |
| | | tableRef.current = useGridApiRef(); |
| | | const translate = useTranslate(); |
| | | |
| | | const [orgLoc, setOrgLoc] = useState([]); |
| | | const [tarLoc, setTarLoc] = useState([]); |
| | | const [orgLoc, setOrgLoc] = useState(""); |
| | | const [tarLoc, setTarLoc] = useState(""); |
| | | const [tarLocList, setTarLocList] = useState([]); |
| | | |
| | | useEffect(() => { |
| | | selectAreaNoUse(); |
| | | if (orgLoc === "" || orgLoc.length < 7) { |
| | | return; |
| | | } |
| | | selectLocItem().then((is) => { |
| | | if (is) { |
| | | selectAreaNoUse(); |
| | | } |
| | | |
| | | }); |
| | | },[orgLoc]) |
| | | |
| | | |
| | | const selectLocItem = async() =>{ |
| | | const { |
| | | data: { code, data, msg }, |
| | | } = await request.post("/locItem/useO/page",{ |
| | | locCode: orgLoc, |
| | | current: 1, |
| | | pageSize: 100, |
| | | orderBy: "create_time desc" |
| | | }); |
| | | if (code === 200) { |
| | | if(data.total !== 0) { |
| | | setTableData(data.records); |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | const selectAreaNoUse = async() =>{ |
| | | const { |
| | | data: { code, data, msg }, |
| | | } = await request.post("/loc/areaNoUse/list",{ |
| | | |
| | | locCode: orgLoc |
| | | }); |
| | | if (code === 200) { |
| | | const newData = data.map((item) => { |
| | |
| | | <Stack direction='row' spacing={2} minWidth={200}> |
| | | <SubmitButton |
| | | orgLoc={orgLoc} |
| | | tarLoc={tarLoc} |
| | | tarLoc={tarLoc} |
| | | tabelData={tabelData} |
| | | /> |
| | | </Stack> |
| | | </Box> |
| | |
| | | const notify = useNotify(); |
| | | const redirect = useRedirect(); |
| | | const refresh = useRefresh(); |
| | | const { orgLoc, tarLoc } = props; |
| | | const { orgLoc, tarLoc, tabelData } = props; |
| | | const move = () => { |
| | | console.log(orgLoc, tarLoc); |
| | | if (orgLoc === "" || orgLoc === undefined || orgLoc === null) { |
| | | notify("请选择站点"); |
| | | notify("请输入源库位"); |
| | | return; |
| | | } |
| | | if (tarLoc === "" || tarLoc === undefined || tarLoc === null) { |
| | | notify("请选择站点"); |
| | | notify("请输入目标库位"); |
| | | return; |
| | | } |
| | | } |
| | | if (tabelData.length === 0) { |
| | | notify("源库位明细无,请检查库位状态"); |
| | | return; |
| | | } |
| | | http(orgLoc, tarLoc?.id) |
| | | } |
| | | const http = async (orgLoc, tarLoc) => { |
| | |
| | | flex: 1, |
| | | editable: false |
| | | })) |
| | | setColumns([...columns, ...cols, action]) |
| | | setColumns([...columns, ...cols]) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | <DataGrid |
| | | apiRef={tableRef} |
| | | rows={tabelData} |
| | | columns={columns} |
| | | columns={columns} |
| | | checkboxSelection = {false} |
| | | disableRowSelectionOnClick |
| | | getRowId={(row) => row.matnrId ? row.matnrId : row.id} |
| | | disableColumnFilter |
| | |
| | | }, |
| | | }} |
| | | pageSizeOptions={[10, 25, 50, 100]} |
| | | editMode="row" |
| | | checkboxSelection |
| | | editMode="row" |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | | selectionModel={selectedRows} |
| | | sx={{ |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class ChineseMD5Util { |
| | | |
| | | /** |
| | | * 对汉字字符串进行MD5加密 |
| | | * @param input 要加密的汉字字符串 |
| | | * @return 32位小写MD5哈希值 |
| | | * @throws NoSuchAlgorithmException |
| | | */ |
| | | public static String md5Chinese(String input) throws NoSuchAlgorithmException { |
| | | if (input == null) { |
| | | return null; |
| | | public static List<Integer> getSelectedIndices(int[] arr) { |
| | | List<Integer> indices = new ArrayList<>(); |
| | | int index = 0; |
| | | int step = 3; |
| | | while (index < arr.length) { |
| | | indices.add(index); |
| | | index += step; |
| | | step = (step == 3) ? 1 : 3; |
| | | } |
| | | |
| | | // 统一使用UTF-8编码 |
| | | byte[] inputBytes = input.getBytes(StandardCharsets.UTF_8); |
| | | |
| | | MessageDigest md = MessageDigest.getInstance("MD5"); |
| | | byte[] digest = md.digest(inputBytes); |
| | | |
| | | // 将字节数组转换为16进制字符串 |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (byte b : digest) { |
| | | sb.append(String.format("%02x", b)); |
| | | } |
| | | |
| | | return sb.toString(); |
| | | return indices; |
| | | } |
| | | |
| | | /** |
| | | * 验证汉字字符串与MD5哈希是否匹配 |
| | | * @param input 要验证的汉字字符串 |
| | | * @param md5Hash 存储的MD5哈希值 |
| | | * @return 如果匹配返回true,否则false |
| | | */ |
| | | public static boolean verifyChinese(String input, String md5Hash) { |
| | | try { |
| | | String computedHash = md5Chinese(input); |
| | | return computedHash.equals(md5Hash.toLowerCase()); |
| | | } catch (NoSuchAlgorithmException e) { |
| | | // 理论上不会发生,因为MD5是Java标准库支持的 |
| | | return false; |
| | | public static Integer getNextSelectedValue(int[] arr, int inputIndex) { |
| | | List<Integer> selectedIndices = getSelectedIndices(arr); |
| | | int currentPos = selectedIndices.indexOf(inputIndex); |
| | | if (currentPos != -1 && currentPos + 1 < selectedIndices.size()) { |
| | | return arr[selectedIndices.get(currentPos + 1)]; |
| | | } |
| | | return null; // 或按需处理 |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | String chineseText = "你好,世界!"; |
| | | int[] arr = {2, 5, 8, 10, 15, 20, 25, 30, 35, 40, 45, 50, 15, 40, 32, 48}; |
| | | System.out.println("输入 0,输出: " + getNextSelectedValue(arr, 0)); // 10 |
| | | System.out.println("输入 3,输出: " + getNextSelectedValue(arr, 3)); // 15 |
| | | System.out.println("输入 4,输出: " + getNextSelectedValue(arr, 4)); // 30 |
| | | System.out.println("输入 4,输出: " + getNextSelectedValue(arr, 5)); // 30 |
| | | |
| | | // 加密 |
| | | String md5Hash = md5Chinese(chineseText); |
| | | System.out.println("原文: " + chineseText); |
| | | System.out.println("MD5哈希: " + md5Hash); |
| | | |
| | | // 验证 |
| | | boolean isValid = verifyChinese(chineseText, md5Hash); |
| | | System.out.println("验证结果: " + (isValid ? "匹配" : "不匹配")); |
| | | |
| | | // 错误验证示例 |
| | | boolean isWrongValid = verifyChinese("你好,世界!", md5Hash); |
| | | System.out.println("错误文本验证: " + (isWrongValid ? "匹配" : "不匹配")); |
| | | |
| | | } catch (NoSuchAlgorithmException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public InTaskMsgDto createInTask(TaskInParam param) { |
| | | // 获取库位号 |
| | | InTaskMsgDto locNo = getLocNo(param); |
| | | |
| | | // 验证设备站点 |
| | | DeviceSite deviceSite = validateDeviceSite(param); |
| | |
| | | |
| | | // 生成任务编码 |
| | | String ruleCode = generateTaskCode(); |
| | | |
| | | // 获取库位号 |
| | | InTaskMsgDto locNo = getLocNo(param); |
| | | |
| | | // 创建并保存任务 |
| | | Task task = createTask(ruleCode, locNo.getLocNo(), waitPakin.getBarcode(), |
| | |
| | | if ((ioType == 1 && deviceBind.getBeSimilar().equals("1"))) { |
| | | //相似物料打开,判断深库位有没有货,没货就放深库位,有货就不操作 |
| | | Loc locMast2 = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getRow, shallowLoc) |
| | | .eq(Loc::getCode, shallowLoc) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | |
| | | //查询当前库位类型空库位 小于5个则locmast = null |
| | | List<Loc> locTypeLocMasts = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq(Loc::getDeviceNo, deviceNo) |
| | | .eq(Loc::getChannel, deviceNo) |
| | | .eq(Loc::getType, locTypeDto.getLocType1()) |
| | | .eq(Loc::getAreaId, area) |
| | | ); |
| | |
| | | import com.vincent.rsf.server.manager.entity.DeviceBind; |
| | | import com.vincent.rsf.server.manager.entity.Loc; |
| | | import com.vincent.rsf.server.manager.service.DeviceBindService; |
| | | import com.vincent.rsf.server.manager.service.LocService; |
| | | |
| | | |
| | | import java.util.List; |
| | |
| | | * 获取 浅库位对应的深库位号 |
| | | */ |
| | | public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) { |
| | | int row = getRow(shallowLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | if (remainder == 2) { |
| | | targetRow = row - 1; |
| | | } else if (remainder == 3) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | throw new CoolException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | Loc shaLoc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, shallowLoc)); |
| | | int row = shaLoc.getRow()-1; |
| | | boolean contains = slaveProperties.getDoubleLocs().contains(row); |
| | | Loc deepLoc = null; |
| | | if (contains) { |
| | | deepLoc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, shaLoc.getAreaId()) |
| | | .eq(Loc::getRow, row) |
| | | .eq(Loc::getCol, shaLoc.getCol()) |
| | | .eq(Loc::getLev, shaLoc.getLev()) |
| | | ); |
| | | }else { |
| | | deepLoc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, shaLoc.getAreaId()) |
| | | .eq(Loc::getRow, shaLoc.getRow()+1) |
| | | .eq(Loc::getCol, shaLoc.getCol()) |
| | | .eq(Loc::getLev, shaLoc.getLev()) |
| | | ); |
| | | } |
| | | return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); |
| | | return deepLoc.getCode(); |
| | | } |
| | | |
| | | /** |
| | | * 获取 深库位对应的浅库位号 |
| | | */ |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | Loc depLoc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, deepLoc)); |
| | | int row = depLoc.getRow()-1; |
| | | boolean contains = slaveProperties.getDoubleLocs().contains(row); |
| | | Loc shallowLoc = null; |
| | | if (!contains) { |
| | | shallowLoc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, depLoc.getAreaId()) |
| | | .eq(Loc::getRow, row) |
| | | .eq(Loc::getCol, depLoc.getCol()) |
| | | .eq(Loc::getLev, depLoc.getLev()) |
| | | ); |
| | | }else { |
| | | shallowLoc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, depLoc.getAreaId()) |
| | | .eq(Loc::getRow, depLoc.getRow()+1) |
| | | .eq(Loc::getCol, depLoc.getCol()) |
| | | .eq(Loc::getLev, depLoc.getLev()) |
| | | ); |
| | | } |
| | | return shallowLoc.getCode(); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static int getRow(String locNo) { |
| | | if (!Cools.isEmpty(locNo)) { |
| | | return Integer.parseInt(locNo.substring(0, 2)); |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, locNo)); |
| | | if (null == loc) { |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | return loc.getRow(); |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:deviceSite:list')") |
| | | @PostMapping("/selectStaList/page") |
| | | @PostMapping("/selectStaList/list") |
| | | public R selectStaList(@RequestBody Map<String, Object> map) { |
| | | List<String> longs = null; |
| | | if (map.get("type") != null) { |
| | | longs = JSONArray.parseArray(map.get("type").toString(), String.class); |
| | | map.entrySet().removeIf(next -> next.getKey().equals("type")); |
| | | } |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DeviceSite, BaseParam> pageParam = new PageParam<>(baseParam, DeviceSite.class); |
| | | |
| | | QueryWrapper<DeviceSite> queryWrapper = pageParam.buildWrapper(true); |
| | | queryWrapper.lambda().in(DeviceSite::getType, longs); |
| | | PageParam<DeviceSite, BaseParam> page = deviceSiteService.page(pageParam, queryWrapper); |
| | | return R.ok().add(page ); |
| | | List<DeviceSite> list = deviceSiteService.list(new LambdaQueryWrapper<DeviceSite>().in(DeviceSite::getType, longs)); |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:deviceSite:list')") |
| | |
| | | import com.vincent.rsf.server.manager.controller.params.LocMastInitParam; |
| | | import com.vincent.rsf.server.manager.controller.params.LocModifyParams; |
| | | import com.vincent.rsf.server.manager.entity.Loc; |
| | | import com.vincent.rsf.server.manager.enums.LocStsType; |
| | | import com.vincent.rsf.server.manager.service.LocService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @PreAuthorize("hasAuthority('manager:loc:list')") |
| | | @PostMapping("/loc/areaNoUse/list") |
| | | public R areaNoUselist(@RequestBody Map<String, Object> map) { |
| | | List<Loc> list = locService.list(); |
| | | String locCode = map.get("locCode").toString(); |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, locCode),false); |
| | | List<Loc> list = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getAreaId, loc.getAreaId()) |
| | | .eq(Loc::getChannel,loc.getChannel()) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | ); |
| | | List<String> list1 = list.stream().map(obj -> obj.getCode()).collect(Collectors.toList()); |
| | | return R.ok(list1); |
| | | } |
| | |
| | | if (Objects.isNull(param.getEndLev())) { |
| | | return R.error("终止层不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getChannel())) { |
| | | return R.error("巷道不能为空!!"); |
| | | } |
| | | |
| | | return locService.initLocs(param, getLoginUserId()); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("目标站点") |
| | | private String target; |
| | | |
| | | @ApiModelProperty("巷道") |
| | | private Integer channel; |
| | | |
| | | } |
| | |
| | | @NotBlank(message = "库位类型") |
| | | private List<Long> typeIds; |
| | | |
| | | @ApiModelProperty("巷道") |
| | | @NotBlank(message = "巷道") |
| | | private Integer channel; |
| | | |
| | | |
| | | } |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value= "源数据") |
| | | private String origin; |
| | | |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value= "空板靠近开关") |
| | | private String emptySimilar; |
| | | |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | public DeviceBind() {} |
| | | |
| | | public DeviceBind(Integer currentRow,Integer startRow,Integer endRow,Integer deviceQty,Integer startDeviceNo,Integer endDeviceNo,String staList,Integer typeId,String beSimilar,String emptySimilar) { |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | @ApiModelProperty(value= "巷道") |
| | | private Integer channel; |
| | | |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | @ApiModelProperty("动态扩展字段") |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value = "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value= "库存数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "条形码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty("库位") |
| | | private String locCode; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vincent.rsf.server.system.constant.DictTypeCode; |
| | |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | .setDevice(param.getDeviceType()) |
| | | .setDeviceSite(deviceSite) |
| | | .setTarget(target) |
| | | .setDeviceCode(param.getDeviceCode()); |
| | | .setDeviceCode(param.getDeviceCode()) |
| | | .setChannel(param.getChannel()) |
| | | ; |
| | | deviceSites.add(site1); |
| | | } |
| | | } |
| | |
| | | throw new CoolException("库存信息不存在!"); |
| | | } |
| | | |
| | | if (locItem.getOutQty().compareTo(0.0) < 0) { |
| | | throw new CoolException("出库数里不能小于0!!"); |
| | | } |
| | | |
| | | if (locItem.getAnfme().compareTo(qty) < 0) { |
| | | Double minusQty = Math.round((locItem.getAnfme() - locItem.getWorkQty()) * 10000) / 10000.0; |
| | | item.setWorkQty(minusQty); |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | } |
| | | |
| | | List<Loc> list = new ArrayList<>(); |
| | | Integer chanl = 0; //默认第一巷道 |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | if (r % param.getChannel() == 1) { |
| | | chanl ++; |
| | | } |
| | | for (int b = param.getStartBay(); b <= param.getEndBay(); b++) { |
| | | for (int l = param.getStartLev(); l <= param.getEndLev(); l++) { |
| | | // 获取库位号 |
| | |
| | | .setRow(r) |
| | | .setCol(b) |
| | | .setLev(l) |
| | | .setChannel(chanl) |
| | | .setType(join) |
| | | .setAreaId(param.getAreaId()) |
| | | .setUpdateBy(loginUserId) |
| | |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | //保存入出库流水 |
| | | saveStockItems(taskItems, null, null, taskItem.getWkType(), taskItem.getOrderType()); |
| | | saveStockItems(taskItems, task, null, null, taskItem.getWkType(), taskItem.getOrderType()); |
| | | |
| | | |
| | | if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) { |
| | |
| | | /**修改为库位状态为O.空库*/ |
| | | if (!locService.update(new LambdaUpdateWrapper<Loc>() |
| | | .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .set(Loc::getBarcode, null) |
| | | .eq(Loc::getId, loc.getId()))) { |
| | | throw new CoolException("库位状态修改失败!!"); |
| | | } |
| | |
| | | List<TaskItem> items = orderMap.get(key); |
| | | try { |
| | | //保存库存明细 |
| | | saveStockItems(items, pakinItem.getId(), pakinItem.getAsnCode(), pakinItem.getWkType(), pakinItem.getType()); |
| | | saveStockItems(items, task, pakinItem.getId(), pakinItem.getAsnCode(), pakinItem.getWkType(), pakinItem.getType()); |
| | | //移出收货区库存, 修改组托状态 |
| | | removeReceiptStock(pakinItem); |
| | | } catch (Exception e) { |
| | |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveStockItems(List<TaskItem> items, Long id, String code, Short wkType, String type) throws |
| | | public void saveStockItems(List<TaskItem> items, Task task, Long id, String code, Short wkType, String type) throws |
| | | Exception { |
| | | Stock stock = new Stock(); |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_STOCK_CODE, null); |
| | |
| | | .setSourceCode(code) |
| | | .setAnfme(sum) |
| | | .setWkType(wkType) |
| | | .setBarcode(task.getBarcode()) |
| | | .setType(type); |
| | | if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || |
| | | task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_IN.type) || |
| | | task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type) || |
| | | task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type) || |
| | | task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type) ) { |
| | | stock.setLocCode(task.getTargLoc()); |
| | | } else { |
| | | stock.setLocCode(task.getOrgLoc()); |
| | | } |
| | | if (!stockService.save(stock)) { |
| | | throw new CoolException("库存保存失败!!"); |
| | | } |
| | |
| | | BeanUtils.copyProperties(item, stockItem); |
| | | stockItem.setSourceItemId(item.getOrderItemId()) |
| | | .setStockCode(stock.getCode()) |
| | | .setBarcode(task.getBarcode()) |
| | | .setSourceItemId(item.getOrderItemId()) |
| | | .setId(null) |
| | | .setStockId(stock.getId()); |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | |
| | | call-setters-on-nulls: true
|
| | | global-config:
|
| | | :banner: false
|
| | | # db-config:
|
| | | # id-type: auto
|
| | | # logic-delete-value: 1
|
| | | # logic-not-delete-value: 0
|
| | | db-config:
|
| | | id-type: auto
|
| | | logic-delete-value: 1
|
| | | logic-not-delete-value: 0
|
| | |
|
| | | super:
|
| | | pwd: xltys1995
|
| | |
| | | aoi.memo |
| | | FROM |
| | | man_asn_order_item aoi |
| | | where aoi.deleted = 0 |
| | | -- LEFT JOIN man_qly_ispt_item qii ON aoi.id = qii.asn_item_id |
| | | ) t |
| | | ${ew.customSqlSegment} |
| | |
| | | aoi.memo |
| | | FROM |
| | | man_asn_order_item aoi |
| | | where aoi.deleted = 0 |
| | | -- LEFT JOIN man_qly_ispt_item qii ON aoi.id = qii.asn_item_id |
| | | ) t |
| | | ${ew.customSqlSegment} |
| | |
| | | `valid_warn`, |
| | | `flag_check` |
| | | from man_matnr |
| | | where deleted = 0 |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | FROM |
| | | man_purchase_item mpi |
| | | WHERE |
| | | deleted = 0 and |
| | | id IN ( SELECT po_detl_id FROM man_asn_order_item |
| | | <where> |
| | | 1 = 1 |
| | |
| | | update_time, |
| | | memo |
| | | FROM man_qly_ispt_item qii |
| | | LEFT JOIN man_qly_inspect_result qir ON qii.id = qir.ispt_item_id) t |
| | | LEFT JOIN man_qly_inspect_result qir ON qii.id = qir.ispt_item_id |
| | | where qii.deleted = 0 |
| | | ) t |
| | | |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="selectIsptResult" resultType="com.vincent.rsf.server.manager.entity.QlyIsptItem"> |
| | |
| | | update_by, |
| | | update_time, |
| | | memo |
| | | FROM man_qly_ispt_item qii) t |
| | | FROM man_qly_ispt_item qii |
| | | where qii.deleted = 0 |
| | | ) t |
| | | |
| | | ${ew.customSqlSegment} |
| | | |
| | | </select> |
| | |
| | | update_time, |
| | | memo |
| | | FROM man_warehouse_areas_item qai |
| | | LEFT JOIN man_qly_inspect_result qir ON qai.id = qir.rcpt_id) t |
| | | LEFT JOIN man_qly_inspect_result qir ON qai.id = qir.rcpt_id |
| | | where qai.deleted = 0 |
| | | ) t |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="selectByName" resultType="com.vincent.rsf.server.manager.entity.Warehouse"> |
| | | SELECT wh.id AS id FROM man_warehouse wh LEFT JOIN man_warehouse_areas wa on wh.id = wa.warehouse_id |
| | | WHERE wh.`name` LIKE CONCAT('%',#{name},'%') OR wa.`name` LIKE CONCAT('%',#{name},'%') |
| | | WHERE wh.`name` LIKE CONCAT('%',#{name},'%') OR wa.`name` LIKE CONCAT('%',#{name},'%') and wh.deleted = 0 and wa.deleted = 0 |
| | | </select> |
| | | </mapper> |