1. 往来企业问题修复
2. 组托问题修复
3. 库位信息问题修复
| | |
| | | |
| | | export const ABORT_SIGNAL = false; |
| | | |
| | | export const DEFAULT_PAGE_SIZE = 25; |
| | | export const DEFAULT_PAGE_SIZE = 20; |
| | | |
| | | export const DEFAULT_ITEM_PAGE_SIZE = 10; |
| | | |
| | |
| | | memoWrap: 'memo wrap', |
| | | memo: 'memo', |
| | | opt: 'operate', |
| | | supplier: 'Supplier', |
| | | customer: 'Customer', |
| | | shipper: 'Shipper', |
| | | partners: 'Strategic Partners', |
| | | }, |
| | | list: { |
| | | empty: { |
| | |
| | | memoWrap: '显示备注', |
| | | memo: '备注', |
| | | opt: '操作', |
| | | supplier: '供应商', |
| | | customer: '客户', |
| | | shipper: '货主', |
| | | partners: '战略合作', |
| | | }, |
| | | list: { |
| | | empty: { |
| | |
| | | }, |
| | | locItem: { |
| | | locId: "库位ID", |
| | | locCode: "库位编码", |
| | | locCode: "库位", |
| | | orderId: "订单ID", |
| | | type: "单据类型", |
| | | orderItemId: "单据明细ID", |
| | | wkType: "业务类型", |
| | | matnrId: "物料ID", |
| | | maktx: "物料名称", |
| | | unit: '单位', |
| | | anfme: '数量', |
| | | matnrCode: "物料编码", |
| | | trackCode: "跟踪码", |
| | | workQty: '执行数', |
| | |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import DictField from "../../components/DictField"; |
| | | import DictSelect from "../../components/DictSelect"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | |
| | | <TextInput source="code" label="table.field.companys.code" />, |
| | | <TextInput source="name" label="table.field.companys.name" />, |
| | | <TextInput source="nameEn" label="table.field.companys.nameEn" />, |
| | | <TextInput source="breifCode" label="table.field.companys.breifCode" />, |
| | | <TextInput source="type" label="table.field.companys.type" />, |
| | | // <ReferenceInput source="type" reference="dictData" filter={{ dictTypeCode: 'sys_companys_type' }} label="table.field.companys.type"> |
| | | // <AutocompleteInput label="table.field.companys.type" optionValue="value"/> |
| | | // </ReferenceInput>, |
| | | <SelectInput label="table.field.companys.type" source="type" |
| | | choices={[ |
| | | { id: 'shipper', name: 'common.field.shipper' }, |
| | | { id: 'customer', name: 'common.field.customer' }, |
| | | { id: 'supplier', name: 'common.field.supplier' }, |
| | | { id: 'partners', name: 'common.field.partners' } |
| | | ]} />, |
| | | <TextInput source="contact" label="table.field.companys.contact" />, |
| | | <TextInput source="tel" label="table.field.companys.tel" />, |
| | | <TextInput source="email" label="table.field.companys.email" />, |
| | |
| | | <TextInput source="province" label="table.field.companys.province" />, |
| | | <TextInput source="city" label="table.field.companys.city" />, |
| | | <TextInput source="address" label="table.field.companys.address" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | |
| | | const CompanysList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.companys"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | {/* <TextField source="code" label="table.field.companys.code" /> */} |
| | | <TextField source="name" label="table.field.companys.name" /> |
| | | <TextField source="nameEn" label="table.field.companys.nameEn" /> |
| | | <TextField source="breifCode" label="table.field.companys.breifCode" /> |
| | |
| | | <TextField source="province" label="table.field.companys.province" /> |
| | | <TextField source="city" label="table.field.companys.city" /> |
| | | <TextField source="address" label="table.field.companys.address" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <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} /> |
| | |
| | | <TextField source="barcode" label="table.field.waitPakinLog.barcode" /> |
| | | <NumberField source="anfme" label="table.field.waitPakinLog.anfme" /> |
| | | <TextField source="ioStatus$" label="table.field.waitPakinLog.ioStatus" sortable={false} /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | |
| | | const { getValues } = useFormContext(); |
| | | |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'space-between' }}> |
| | | <Toolbar sx={{ justifyContent: 'end' }}> |
| | | <SaveButton /> |
| | | <DeleteButton mutationMode="optimistic" /> |
| | | {/* <DeleteButton mutationMode="optimistic" /> */} |
| | | </Toolbar> |
| | | ) |
| | | } |
| | |
| | | defaultValues={{}} |
| | | // validate={(values) => { }} |
| | | > |
| | | <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid item xs={12} md={8}> |
| | | <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid item xs={14} md={10}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | |
| | | source="locId" |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.locCode" |
| | | source="locCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.locItem.orderId" |
| | | source="orderId" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.type" |
| | | source="type" |
| | | source="type$" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | |
| | | label="table.field.locItem.orderItemId" |
| | | source="orderItemId" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.locItem.wkType" |
| | | source="wkType" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.locItem.matnrId" |
| | | source="matnrId" |
| | |
| | | source="maktx" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | |
| | | <TextInput |
| | | label="table.field.locItem.matnrCode" |
| | | source="matnrCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.trackCode" |
| | | source="trackCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.unit" |
| | | source="unit" |
| | |
| | | label="table.field.locItem.anfme" |
| | | source="anfme" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.locItem.qty" |
| | | source="qty" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.locItem.workQty" |
| | | source="workQty" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.batch" |
| | | source="batch" |
| | |
| | | source="splrBatch" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.spec" |
| | | source="spec" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.model" |
| | | source="model" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.locItem.fieldsIndex" |
| | | source="fieldsIndex" |
| | |
| | | </Stack> |
| | | |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | | <Grid item xs={10} md={2}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | width: 100 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <NumberInput source="locId" label="table.field.locItem.locId" />, |
| | | <TextInput source="locCode" label="table.field.locItem.locCode" />, |
| | | <NumberInput source="orderId" label="table.field.locItem.orderId" />, |
| | |
| | | <TextInput source="spec" label="table.field.locItem.spec" />, |
| | | <TextInput source="model" label="table.field.locItem.model" />, |
| | | <TextInput source="fieldsIndex" label="table.field.locItem.fieldsIndex" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.locItem"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */} |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | <MyExportButton /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | |
| | | <StyledDatagrid |
| | | preferenceKey='locItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | rowClick={false} |
| | | expand={() => <LocItemPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime','locId','workQty','qty', 'createBy', 'memo','fieldsIndex','opt']} |
| | | omit={['id', 'createTime','locId','orderId', 'orderItemId', 'matnrId', 'splrBatch','workQty','qty', 'createBy', 'memo','fieldsIndex']} |
| | | |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="locId" label="table.field.locItem.locId" /> |
| | | <TextField source="locCode" label="table.field.locItem.locCode" /> |
| | | <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="maktx" label="table.field.locItem.maktx" /> |
| | | <TextField source="spec" label="table.field.locItem.spec" /> |
| | | <TextField source="model" label="table.field.locItem.model" /> |
| | | <TextField source="batch" label="table.field.locItem.batch" /> |
| | | <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="batch" label="table.field.locItem.batch" /> |
| | | <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="fieldsIndex" label="table.field.locItem.fieldsIndex" /> |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <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} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | {/* <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> */} |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | required |
| | | /> |
| | | </Grid> |
| | | <Grid item md={3}> |
| | | <Grid item md={2}> |
| | | <TextField |
| | | label={translate("table.field.asnOrder.poCode")} |
| | | value={formData.poCode} |
| | | variant="filled" |
| | | onChange={(e) => handleChange(e.target.value, 'poCode')} |
| | | /> |
| | | </Grid> |
| | | <Grid item md={3}> |
| | | <Grid item md={2}> |
| | | <TextField |
| | | label={translate("table.field.asnOrder.logisNo")} |
| | | value={formData.logisNo} |
| | | variant="filled" |
| | | onChange={(e) => handleChange(e.target.value, 'logisNo')} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item md={3}> |
| | | {/* <TextField |
| | | label={translate("table.field.asnOrder.arrTime")} |
| | | value={formData.arrTime} |
| | | onChange={(e) => handleChange(e.target.value, 'arrTime')} |
| | | /> */} |
| | | <DateInput |
| | | source="arrTime" |
| | | label="table.field.asnOrder.arrTime" |
| | | value={formData.arrTime} |
| | | onChange={(e) => handleChange(e.target.value, 'arrTime')} |
| | | /> |
| | | |
| | | </Grid> |
| | | </Grid> |
| | | </Form> |
| | |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick='edit' |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', '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="type" label="table.field.stock.type" /> |
| | | <TextField source="wkType" label="table.field.stock.wkType" /> |
| | | <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} /> |
| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.waitPakin"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return R.error("编码不能为空!!"); |
| | | @PostMapping("/asnOrderItem/trackCode") |
| | | public R getItemByTrackCode(@RequestBody Map<String, Object> params) { |
| | | if (Objects.isNull(params)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return mobileService.getDeltByCode(code); |
| | | return mobileService.getDeltByCode(params); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | |
| | | |
| | | List<Fields> getDynamicFields(); |
| | | |
| | | R getDeltByCode(String code); |
| | | R getDeltByCode(Map<String, Object> params); |
| | | |
| | | WaitPakin mergeItems(WaitPakinParam waitPakin, Long userId); |
| | | |
| | |
| | | } |
| | | |
| | | List<ReceiptDetlsDto> receipts = receiptParam.getReceipts(); |
| | | List<WarehouseAreasItem> allOrders = new ArrayList<>(); |
| | | |
| | | Double receiptQty = receipts.stream().mapToDouble(ReceiptDetlsDto::getReceiptQty).sum(); |
| | | |
| | |
| | | } |
| | | Double itemRcptQty = dto.getReceiptQty() + orderItem.getQty(); |
| | | orderItem.setQty(itemRcptQty) |
| | | .setSplrBatch(dto.getSplrBatch()) |
| | | // .setSplrBatch(dto.getSplrBatch()) |
| | | .setUpdateBy(loginUserId) |
| | | .setStockUnit(dto.getStockUnit()) |
| | | .setProdTime(dto.getProdTime()); |
| | |
| | | * @time 2025/4/7 16:58 |
| | | */ |
| | | @Override |
| | | public R getDeltByCode(String code) { |
| | | public R getDeltByCode(Map<String, Object> params ) { |
| | | String code = params.get("code").toString(); |
| | | String batch = null; |
| | | if (!Objects.isNull(params.get("batch"))) { |
| | | batch = params.get("batch").toString(); |
| | | } |
| | | //TODO 后续需根据策略配置,获取组拖数据。如:混装,按批次混装等 |
| | | LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new QueryWrapper<WarehouseAreasItem>() |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch,unit, stock_unit, qty, work_qty, matnr_code, matnr_id, maktx").lambda() |
| | | .eq(WarehouseAreasItem::getTrackCode, code) |
| | | .eq(StringUtils.isNotBlank(code), WarehouseAreasItem::getTrackCode, code) |
| | | .eq(StringUtils.isNotBlank(batch), WarehouseAreasItem::getSplrBatch, batch) |
| | | .groupBy(WarehouseAreasItem::getSplrBatch, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getAreaId, WarehouseAreasItem::getMatnrId); |
| | | return R.ok(warehouseAreasItemService.getOne(queryWrapper)); |
| | | return R.ok(warehouseAreasItemService.getOne(queryWrapper, false)); |
| | | } |
| | | |
| | | /** |
| | |
| | | throw new CoolException("企业类型不能为空!!"); |
| | | } |
| | | |
| | | List<Companys> warehouses = companysService.list(new LambdaQueryWrapper<Companys>().eq(Companys::getName, companys.getName())); |
| | | List<Companys> warehouses = companysService.list(new LambdaQueryWrapper<Companys>() |
| | | .eq(Companys::getName, companys.getName()) |
| | | .eq(Companys::getType, companys.getType()) |
| | | .eq(Companys::getBreifCode, companys.getBreifCode())); |
| | | if (!warehouses.isEmpty()) { |
| | | throw new CoolException("企业名称已存在!!"); |
| | | throw new CoolException("企业已存在!!"); |
| | | } |
| | | if (!companysService.list(new LambdaQueryWrapper<Companys>().eq(Companys::getCode, companys.getBreifCode())).isEmpty()) { |
| | | throw new CoolException("编码已存在!!"); |
| | | if (!companysService.list(new LambdaQueryWrapper<Companys>() |
| | | .eq(Companys::getType, companys.getType()) |
| | | .eq(Companys::getName, companys.getName()) |
| | | .eq(Companys::getCode, companys.getBreifCode())).isEmpty()) { |
| | | throw new CoolException("企业编码重复!!"); |
| | | } |
| | | |
| | | companys.setCreateBy(getLoginUserId()); |
| | |
| | | if (Objects.isNull(companys.getType())) { |
| | | throw new CoolException("类型不能为空!!"); |
| | | } |
| | | Companys companys1 = companysService.getById(companys.getId()); |
| | | if (!companys.getName().equals(companys1.getName())) { |
| | | List<Companys> areasList = companysService.list(new LambdaQueryWrapper<Companys>().eq(Companys::getName, companys.getName())); |
| | | if (!areasList.isEmpty()) { |
| | | throw new CoolException("企业名已存在!!"); |
| | | // Companys companys1 = companysService.getById(companys.getId()); |
| | | List<Companys> warehouses = companysService.list(new LambdaQueryWrapper<Companys>() |
| | | .eq(Companys::getName, companys.getName()) |
| | | .eq(Companys::getType, companys.getType()) |
| | | .eq(Companys::getBreifCode, companys.getBreifCode())); |
| | | if (!warehouses.isEmpty()) { |
| | | throw new CoolException("企业已存在!!"); |
| | | } |
| | | } |
| | | if (!companys.getBreifCode().equals(companys1.getBreifCode())) { |
| | | List<Companys> areasList = companysService.list(new LambdaQueryWrapper<Companys>().eq(Companys::getBreifCode, companys.getBreifCode())); |
| | | if (!areasList.isEmpty()) { |
| | | throw new CoolException("编码已存在!!"); |
| | | } |
| | | if (!companysService.list(new LambdaQueryWrapper<Companys>() |
| | | .eq(Companys::getType, companys.getType()) |
| | | .eq(Companys::getName, companys.getName()) |
| | | .eq(Companys::getCode, companys.getBreifCode())).isEmpty()) { |
| | | throw new CoolException("企业编码重复!!"); |
| | | } |
| | | |
| | | if (!companysService.updateById(companys)) { |
| | |
| | | @ApiModelProperty("跟踪码") |
| | | private List<PakinItem> items; |
| | | |
| | | @ApiModelProperty("批次") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty("组拖类型{null: 组拖, defective: 不良品}") |
| | | private String type; |
| | | |
| | |
| | | return ""; |
| | | } |
| | | DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); |
| | | DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE).eq(DictData::getValue, this.type)); |
| | | DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>() |
| | | .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE) |
| | | .eq(DictData::getValue, this.type)); |
| | | if (Objects.isNull(dictData)) { |
| | | return null; |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vincent.rsf.server.system.constant.DictTypeCode; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.vincent.rsf.server.system.service.DictDataService; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getType$(){ |
| | | if (Cools.isEmpty(this.type)){ |
| | | return ""; |
| | | } |
| | | DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); |
| | | DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE).eq(DictData::getValue, this.type)); |
| | | if (Objects.isNull(dictData)) { |
| | | return null; |
| | | } |
| | | return dictData.getLabel(); |
| | | } |
| | | |
| | | public String getWkType$(){ |
| | | if (Cools.isEmpty(this.wkType)){ |
| | | return ""; |
| | | } |
| | | DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); |
| | | DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_BUSINESS_TYPE).eq(DictData::getValue, this.wkType)); |
| | | if (Objects.isNull(dictData)) { |
| | | return null; |
| | | } |
| | | return dictData.getLabel(); |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | |
| | | return "待入库"; |
| | | case 1: |
| | | return " 入库中"; |
| | | case 2: |
| | | return "任务执行中"; |
| | | case 3: |
| | | return "任务完成"; |
| | | default: |
| | | return String.valueOf(this.ioStatus); |
| | | } |
| | |
| | | //质检状态 |
| | | ASN_EXCE_STATUS_UN_EXCE("0", "未执行"), |
| | | ASN_EXCE_STATUS_EXCE_ING("1", "执行中"), |
| | | |
| | | ASN_EXCE_STATUS_RECEIPT_DONE("2", "收货完成"), |
| | | ASN_EXCE_STATUS_TASK_DONE("3", "已完成"), |
| | | ASN_EXCE_STATUS_TASK_CANCEL("4", "取消"), |
| | |
| | | throw new CoolException("未找到所属库区信息"); |
| | | } |
| | | |
| | | /**获取库位*/ |
| | | String targetLoc = LocManageUtil.getTargetLoc(warehouseArea.getId()); |
| | | if (Cools.isEmpty(targetLoc)) { |
| | | throw new CoolException("该站点对应库区未找到库位"); |
| | | } |
| | | /**获取组拖*/ |
| | | List<Long> ids = waitPakin.getWaitPakins().stream().map(WaitPakin::getId).collect(Collectors.toList()); |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>() |
| | |
| | | throw new CoolException("请检查组拖状态是否完成!!"); |
| | | } |
| | | waitPakins.forEach(pakin -> { |
| | | /**获取库位*/ |
| | | String targetLoc = LocManageUtil.getTargetLoc(warehouseArea.getId()); |
| | | if (Cools.isEmpty(targetLoc)) { |
| | | throw new CoolException("该站点对应库区未找到库位"); |
| | | } |
| | | |
| | | List<TaskItem> taskItems = new ArrayList<>(); |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_TASK_CODE, null); |
| | | if (StringUtils.isBlank(ruleCode)) { |
| | |
| | | * @time 2025/4/30 16:32 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | private void removeReceiptStock(WaitPakinItem pakinItem) { |
| | | public void removeReceiptStock(WaitPakinItem pakinItem) { |
| | | WarehouseAreasItem itemServiceOne = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>() |
| | | .eq(WarehouseAreasItem::getTrackCode, pakinItem.getTrackCode()) |
| | | .eq(WarehouseAreasItem::getSplrBatch, pakinItem.getBatch())); |
| | |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getTargLoc()), false); |
| | | LocItem item = new LocItem(); |
| | | BeanUtils.copyProperties(taskItem, item); |
| | | item.setLocCode(loc.getCode()).setId(null).setLocId(loc.getId()).setType(taskItem.getOrderType()); |
| | | item.setLocCode(loc.getCode()).setId(null) |
| | | .setLocId(loc.getId()) |
| | | .setWkType(taskItem.getWkType()) |
| | | .setType(taskItem.getOrderType()); |
| | | locItems.add(item); |
| | | }); |
| | | if (!locItemService.saveBatch(locItems)) { |
| | |
| | | .select("SUM(anfme) as anfme, track_code, asn_code, id, splr_batch, ispt_result, plat_item_id, batch, qty, unit, stock_unit, work_qty, matnr_code, matnr_id, maktx") |
| | | .lambda() |
| | | .in(WarehouseAreasItem::getTrackCode, tracks) |
| | | .eq(StringUtils.isNotBlank(waitPakin.getBatch()), WarehouseAreasItem::getSplrBatch, waitPakin.getBatch()) |
| | | .groupBy(WarehouseAreasItem::getSplrBatch, |
| | | WarehouseAreasItem::getTrackCode); |
| | | List<WarehouseAreasItem> warehouseAreasItems = warehouseAreasItemService.list(queryWrapper); |