| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | |
| | | .setSplrBatch(dto.getSplrBatch()) |
| | | .setMatnrCode(matnr.getCode()) |
| | | .setMatnrId(matnr.getId()) |
| | | .setMatnrName(matnr.getName()) |
| | | .setMaktx(matnr.getName()) |
| | | //库存单位为最小单位 |
| | | .setUnit(dto.getStockUnit()) |
| | | .setStockUnit(dto.getStockUnit()) |
| | |
| | | return fieldsMapper.selectList(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1).eq(Fields::getStatus, 1)); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 获取组盘明细 |
| | | * @param |
| | | * @return |
| | | * @time 2025/4/7 16:58 |
| | | */ |
| | | @Override |
| | | public R getDeltByCode(String code) { |
| | | return R.ok(warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>().eq(WarehouseAreasItem::getTrackCode, code))); |
| | | //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, qty, work_qty, matnr_code, matnr_id, maktx").lambda() |
| | | .eq(WarehouseAreasItem::getTrackCode, code) |
| | | .groupBy(WarehouseAreasItem::getSplrBatch, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getAreaId); |
| | | return R.ok(warehouseAreasItemService.getOne(queryWrapper)); |
| | | // return R.ok(warehouseAreasItemService.list(new LambdaQueryWrapper<WarehouseAreasItem>() |
| | | // .select(WarehouseAreasItem::getId, WarehouseAreasItem::getAsnCode, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getSplrBatch, |
| | | // WarehouseAreasItem::getIsptResult, WarehouseAreasItem::getPlatItemId, WarehouseAreasItem::getQty, WarehouseAreasItem::getWorkQty, |
| | | // WarehouseAreasItem::getMatnrCode, WarehouseAreasItem::getMatnrId) |
| | | // .eq(WarehouseAreasItem::getTrackCode, code) |
| | | // .groupBy(WarehouseAreasItem::getSplrBatch, WarehouseAreasItem::getAsnId, WarehouseAreasItem::getAreaId) |
| | | // )); |
| | | } |
| | | |
| | | /** |