| | |
| | | |
| | | export const EDIT_MODE = 'pessimistic'; // pessimistic | undoable |
| | | |
| | | export const LOGIN_BACKGROUND = 'image'; // image | media |
| | | export const LOGIN_BACKGROUND = 'media'; // image | media |
| | | |
| | | export const CUSTOM_PAGES_DATA_INTERVAL = 1000; |
| | |
| | | compDirect: "货叉方向", |
| | | locSts: "库位状态", |
| | | offset: "高度", |
| | | row: "排", |
| | | bay: "列", |
| | | lev: "层", |
| | | rowNo: "排", |
| | | bayNo: "列", |
| | | levNo: "层", |
| | | barcode: "库位码", |
| | | zpallet: "料箱码", |
| | | locType: "库位类型", |
| | |
| | | |
| | | export const getLocGroup = async (row, bay, callback) => { |
| | | await request.post('/map/shelf/group', { |
| | | row: row, |
| | | bay: bay |
| | | rowNo: row, |
| | | bayNo: bay |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | |
| | | <KeyValuePair label={translate('table.field.loc.locNo')} value={selectedLoc?.locNo || 'N/A'} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <KeyValuePair label={translate('table.field.loc.row')} value={selectedLoc?.row || 'N/A'} /> |
| | | <KeyValuePair label={translate('table.field.loc.rowNo')} value={selectedLoc?.rowNo || 'N/A'} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <KeyValuePair label={translate('table.field.loc.bay')} value={selectedLoc?.bay || 'N/A'} /> |
| | | <KeyValuePair label={translate('table.field.loc.bayNo')} value={selectedLoc?.bayNo || 'N/A'} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <KeyValuePair label={translate('table.field.loc.lev')} value={selectedLoc?.lev || 'N/A'} /> |
| | | <KeyValuePair label={translate('table.field.loc.levNo')} value={selectedLoc?.levNo || 'N/A'} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <KeyValuePair label={translate('table.field.loc.offset')} value={selectedLoc?.offset || 'N/A'} /> |
| | |
| | | <Grid item xs={12} display="flex" gap={1}> |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.row" |
| | | source="row" |
| | | label="table.field.loc.rowNo" |
| | | source="rowNo" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.bay" |
| | | source="bay" |
| | | label="table.field.loc.bayNo" |
| | | source="bayNo" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={4} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.lev" |
| | | source="lev" |
| | | label="table.field.loc.levNo" |
| | | source="levNo" |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | |
| | | <Stack direction='row' gap={2}> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.loc.row" |
| | | source="row" |
| | | label="table.field.loc.rowNo" |
| | | source="rowNo" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.loc.bay" |
| | | source="bay" |
| | | label="table.field.loc.bayNo" |
| | | source="bayNo" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.loc.lev" |
| | | source="lev" |
| | | label="table.field.loc.levNo" |
| | | source="levNo" |
| | | /> |
| | | </Stack> |
| | | </Stack> |
| | |
| | | <ReferenceInput source="locSts" label="table.field.loc.locSts" reference="locSts" alwaysOn> |
| | | <AutocompleteInput label="table.field.loc.locSts" optionText="name" filterToQuery={(val) => ({ name: val })} /> |
| | | </ReferenceInput>, |
| | | <NumberInput source="row" label="table.field.loc.row" alwaysOn />, |
| | | <NumberInput source="bay" label="table.field.loc.bay" alwaysOn />, |
| | | <NumberInput source="lev" label="table.field.loc.lev" alwaysOn />, |
| | | <NumberInput source="rowNo" label="table.field.loc.rowNo" alwaysOn />, |
| | | <NumberInput source="bayNo" label="table.field.loc.bayNo" alwaysOn />, |
| | | <NumberInput source="levNo" label="table.field.loc.levNo" alwaysOn />, |
| | | <ReferenceInput source="code" label="table.field.loc.code" reference="code"> |
| | | <AutocompleteInput label="table.field.loc.code" optionText="data" filterToQuery={(val) => ({ data: val })} /> |
| | | </ReferenceInput>, |
| | |
| | | <ReferenceField source="locSts" label="table.field.loc.locSts" reference="locSts" link={false} sortable={true}> |
| | | <TextField source="name" /> |
| | | </ReferenceField> |
| | | <NumberField source="row" label="table.field.loc.row" /> |
| | | <NumberField source="bay" label="table.field.loc.bay" /> |
| | | <NumberField source="lev" label="table.field.loc.lev" /> |
| | | <NumberField source="rowNo" label="table.field.loc.rowNo" /> |
| | | <NumberField source="bayNo" label="table.field.loc.bayNo" /> |
| | | <NumberField source="levNo" label="table.field.loc.levNo" /> |
| | | <NumberField source="offset" label="table.field.loc.offset" /> |
| | | <FunctionField |
| | | label="table.field.loc.compDirect" |
| | |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.loc.row" |
| | | property={record.row} |
| | | title="table.field.loc.rowNo" |
| | | property={record.rowNo} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.loc.bay" |
| | | property={record.bay} |
| | | title="table.field.loc.bayNo" |
| | | property={record.bayNo} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.loc.lev" |
| | | property={record.lev} |
| | | title="table.field.loc.levNo" |
| | | property={record.levNo} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | |
| | | /** |
| | | * SELECT |
| | | * ml.loc_no, |
| | | * ml.row, |
| | | * ml.bay, |
| | | * ml.lev, |
| | | * ml.row_no, |
| | | * ml.bay_no, |
| | | * ml.lev_no, |
| | | * ml.loc_sts AS locStsEl |
| | | * FROM man_loc ml |
| | | * LEFT JOIN man_task mt ON mt.dest_loc = ml.id OR mt.ori_loc = ml.id |
| | |
| | | * |
| | | * SELECT |
| | | * ml.loc_no, |
| | | * ml.row, |
| | | * ml.bay, |
| | | * ml.lev, |
| | | * ml.row_no, |
| | | * ml.bay_no, |
| | | * ml.lev_no, |
| | | * ml.loc_sts AS locStsEl |
| | | * FROM man_loc ml |
| | | * LEFT JOIN man_task mt ON mt.dest_loc = ml.id OR mt.ori_loc = ml.id |
| | |
| | | for (Loc loc : locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getLocSts, LocStsType.STOCK.val()))) { |
| | | DigitalStockVo vo = new DigitalStockVo(); |
| | | vo.setLocNo(loc.getLocNo()); |
| | | vo.setRow(loc.getRow()); |
| | | vo.setBay(loc.getBay()); |
| | | vo.setLev(loc.getLev()); |
| | | vo.setRowNo(loc.getRowNo()); |
| | | vo.setBayNo(loc.getBayNo()); |
| | | vo.setLevNo(loc.getLevNo()); |
| | | vo.setLocSts(loc.getLocStsEl()); |
| | | voList.add(vo); |
| | | } |
| | |
| | | if (action.getActionSts().equals(ActionStsType.FINISH.val())) { |
| | | DigitalStockVo vo = new DigitalStockVo(); |
| | | vo.setLocNo(loc.getLocNo()); |
| | | vo.setRow(loc.getRow()); |
| | | vo.setBay(loc.getBay()); |
| | | vo.setLev(loc.getLev()); |
| | | vo.setRowNo(loc.getRowNo()); |
| | | vo.setBayNo(loc.getBayNo()); |
| | | vo.setLevNo(loc.getLevNo()); |
| | | vo.setLocSts(loc.getLocStsEl()); |
| | | voList.add(vo); |
| | | } |
| | |
| | | if (!action.getActionSts().equals(ActionStsType.FINISH.val())) { |
| | | DigitalStockVo vo = new DigitalStockVo(); |
| | | vo.setLocNo(loc.getLocNo()); |
| | | vo.setRow(loc.getRow()); |
| | | vo.setBay(loc.getBay()); |
| | | vo.setLev(loc.getLev()); |
| | | vo.setRowNo(loc.getRowNo()); |
| | | vo.setBayNo(loc.getBayNo()); |
| | | vo.setLevNo(loc.getLevNo()); |
| | | vo.setLocSts(loc.getLocStsEl()); |
| | | voList.add(vo); |
| | | } |
| | |
| | | Long userId = getLoginUserId(); |
| | | for (Map<String, Object> row : rows) { |
| | | Zone zone = resolveZone(readCell(row, "zone")); |
| | | Integer rowNo = parseInteger(row.get("row"), "row", true); |
| | | Integer bayNo = parseInteger(row.get("bay"), "bay", true); |
| | | Integer levNo = parseInteger(row.get("lev"), "lev", true); |
| | | Integer rowNo = parseInteger(row.get("row_no"), "row_no", true); |
| | | Integer bayNo = parseInteger(row.get("bay_no"), "bay_no", true); |
| | | Integer levNo = parseInteger(row.get("lev_no"), "lev_no", true); |
| | | String locNo = buildLocNo(zone, rowNo, bayNo, levNo); |
| | | if (locService.selectByLocNo(locNo) != null) { |
| | | continue; |
| | |
| | | loc.setZoneId(zone.getId()); |
| | | loc.setUuid(locNo); |
| | | loc.setLocNo(locNo); |
| | | loc.setRow(rowNo); |
| | | loc.setBay(bayNo); |
| | | loc.setLev(levNo); |
| | | loc.setRowNo(rowNo); |
| | | loc.setBayNo(bayNo); |
| | | loc.setLevNo(levNo); |
| | | |
| | | loc.setLocSts(locStsId); |
| | | loc.setLocType(locTypeId); |
| | |
| | | return Cools.isEmpty(text) ? null : text; |
| | | } |
| | | |
| | | private String buildLocNo(Zone zone, Integer row, Integer bay, Integer lev) { |
| | | if (zone == null || row == null || bay == null || lev == null) { |
| | | throw new CoolException("zone/row/bay/lev cannot be null"); |
| | | private String buildLocNo(Zone zone, Integer rowNo, Integer bayNo, Integer levNo) { |
| | | if (zone == null || rowNo == null || bayNo == null || levNo == null) { |
| | | throw new CoolException("zone/rowNo/bayNo/levNo cannot be null"); |
| | | } |
| | | if (Cools.isEmpty(zone.getUuid())) { |
| | | throw new CoolException("zone uuid is empty"); |
| | | } |
| | | return Utils.zeroFill(zone.getUuid(), 2) |
| | | + String.format("%03d", row) |
| | | + String.format("%03d", bay) |
| | | + String.format("%02d", lev); |
| | | + String.format("%03d", rowNo) |
| | | + String.format("%03d", bayNo) |
| | | + String.format("%02d", levNo); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping("/shelf/group") |
| | | public R shelfGroup(@RequestParam(required = false) Integer row, @RequestParam(required = false) Integer bay) { |
| | | if (null == row || null == bay) { |
| | | public R shelfGroup(@RequestParam(required = false) Integer rowNo, |
| | | @RequestParam(required = false) Integer bayNo) { |
| | | if (null == rowNo || null == bayNo) { |
| | | return R.error(); |
| | | } |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getRow, row).eq(Loc::getBay, bay).orderByAsc(Loc::getLev)); |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getRowNo, rowNo) |
| | | .eq(Loc::getBayNo, bayNo) |
| | | .orderByAsc(Loc::getLevNo)); |
| | | return R.ok().add(locList); |
| | | } |
| | | |
| | |
| | | private String locNo; |
| | | |
| | | |
| | | private Integer row; |
| | | private Integer rowNo; |
| | | |
| | | |
| | | private Integer bay; |
| | | private Integer bayNo; |
| | | |
| | | |
| | | private Integer lev; |
| | | private Integer levNo; |
| | | |
| | | @ApiModelProperty(value = "库位状态") |
| | | private Long locSts; |
| | |
| | | |
| | | private String locNo; |
| | | |
| | | private int row; |
| | | private int rowNo; |
| | | |
| | | private int bay; |
| | | private int bayNo; |
| | | |
| | | private int lev; |
| | | private int levNo; |
| | | |
| | | private String locSts; |
| | | |
| | | public DigitalStockVo() { |
| | | } |
| | | |
| | | public DigitalStockVo(String locNo, int row, int bay, int lev, String locSts) { |
| | | public DigitalStockVo(String locNo, int rowNo, int bayNo, int levNo, String locSts) { |
| | | this.locNo = locNo; |
| | | this.row = row; |
| | | this.bay = bay; |
| | | this.lev = lev; |
| | | this.rowNo = rowNo; |
| | | this.bayNo = bayNo; |
| | | this.levNo = levNo; |
| | | this.locSts = locSts; |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonAlias; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.SpringUtils; |
| | | import com.zy.acs.manager.manager.service.CodeService; |
| | |
| | | * 排 |
| | | */ |
| | | @ApiModelProperty(value= "排") |
| | | private Integer row; |
| | | @JsonAlias({"row", "row_no"}) |
| | | private Integer rowNo; |
| | | |
| | | /** |
| | | * 列 |
| | | */ |
| | | @ApiModelProperty(value= "列") |
| | | private Integer bay; |
| | | @JsonAlias({"bay", "bay_no"}) |
| | | private Integer bayNo; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | @ApiModelProperty(value= "层") |
| | | private Integer lev; |
| | | @JsonAlias({"lev", "lev_no"}) |
| | | private Integer levNo; |
| | | |
| | | /** |
| | | * 库位码 |
| | |
| | | |
| | | public Loc() {} |
| | | |
| | | public Loc(String uuid,Long zoneId,String locNo,String name,Long code,Long locSts,Double offset,Integer row,Integer bay,Integer lev,String zpallet,Long locType,Integer status,Integer deleted,Long tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | public Loc(String uuid,Long zoneId,String locNo,String name,Long code,Long locSts,Double offset,Integer rowNo,Integer bayNo,Integer levNo,String zpallet,Long locType,Integer status,Integer deleted,Long tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.zoneId = zoneId; |
| | | this.locNo = locNo; |
| | |
| | | this.code = code; |
| | | this.locSts = locSts; |
| | | this.offset = offset; |
| | | this.row = row; |
| | | this.bay = bay; |
| | | this.lev = lev; |
| | | this.rowNo = rowNo; |
| | | this.bayNo = bayNo; |
| | | this.levNo = levNo; |
| | | this.zpallet = zpallet; |
| | | this.locType = locType; |
| | | this.status = status; |
| | |
| | | if (dto.getPriority() == 9527) { |
| | | if (Cools.isEmpty(dto.getDestLoc())) { |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .ge(Loc::getRow, 31).eq(Loc::getLocSts, LocStsType.IDLE.val())); |
| | | .ge(Loc::getRowNo, 31).eq(Loc::getLocSts, LocStsType.IDLE.val())); |
| | | if (Cools.isEmpty(locList)) { |
| | | log.error("there is no such idle loc"); |
| | | break; |
| | |
| | | <if test="param.locNo != null"> |
| | | AND a.loc_no = #{param.locNo} |
| | | </if> |
| | | <if test="param.row != null"> |
| | | AND a.row = #{param.row} |
| | | <if test="param.rowNo != null"> |
| | | AND a.row_no = #{param.rowNo} |
| | | </if> |
| | | <if test="param.bay != null"> |
| | | AND a.bay = #{param.bay} |
| | | <if test="param.bayNo != null"> |
| | | AND a.bay_no = #{param.bayNo} |
| | | </if> |
| | | <if test="param.lev != null"> |
| | | AND a.lev = #{param.lev} |
| | | <if test="param.levNo != null"> |
| | | AND a.lev_no = #{param.levNo} |
| | | </if> |
| | | <if test="param.status != null"> |
| | | AND a.status = #{param.status} |
| | |
| | | <select id="selectDigitalLocWhichNeedShow" resultType="java.util.Map"> |
| | | SELECT |
| | | DISTINCT ml.loc_no AS locNo, |
| | | ml.row, |
| | | ml.bay, |
| | | ml.lev, |
| | | ml.row_no AS rowNo, |
| | | ml.bay_no AS bayNo, |
| | | ml.lev_no AS levNo, |
| | | ml.loc_sts AS locSts |
| | | FROM man_loc ml |
| | | LEFT JOIN man_task mt ON mt.dest_loc = ml.id OR mt.ori_loc = ml.id |