Compare commits
5 Commits
401c51a4b5
...
8b087ce00a
| Author | SHA1 | Date |
|---|---|---|
|
|
8b087ce00a | |
|
|
6eb9ec648e | |
|
|
e8609eca0c | |
|
|
aa72f63f35 | |
|
|
f004f434a5 |
|
|
@ -600,7 +600,9 @@ public class ComponentOutboundController extends BaseController {
|
|||
&& StrUtil.equals(it.getFactoryNo(), factoryNo)
|
||||
&& StrUtil.equals(it.getWarehouseNo(), warehouseNo)
|
||||
&& StrUtil.equals(it.getBatchNo(), batchNumber)
|
||||
&& StrUtil.equals(it.getSerialNo(), serialNo))
|
||||
&& StrUtil.equals(it.getSerialNo(), serialNo)
|
||||
&& StrUtil.equals(it.getBinLocation(), binNo)
|
||||
)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (Objects.isNull(inventory)) {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 从SAP查询生产订单信息
|
||||
*
|
||||
* @param no 生产订单号
|
||||
* @return 订单信息
|
||||
*/
|
||||
|
|
@ -128,6 +129,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -220,6 +222,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @param request 搜索参数
|
||||
* @return 搜索结果
|
||||
*/
|
||||
|
|
@ -230,6 +233,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取订单的物料列表
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 列表
|
||||
*/
|
||||
|
|
@ -248,6 +252,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 订单ID
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -264,6 +269,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出物料条码pdf(逐个)
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @param type 1:逐个,2:一页
|
||||
*/
|
||||
|
|
@ -294,6 +300,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出物料标签图片ZIP
|
||||
*
|
||||
* @param id 订单ID
|
||||
*/
|
||||
@GetMapping(value = "exportItemImageZip", produces = "application/zip")
|
||||
|
|
@ -329,6 +336,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出报工单PDF(单个)
|
||||
*
|
||||
* @param id 订单id
|
||||
*/
|
||||
@GetMapping("exportOrderPdf")
|
||||
|
|
@ -338,6 +346,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出报工单PDF(批量)
|
||||
*
|
||||
* @param ids 订单id列表
|
||||
*/
|
||||
@PostMapping("exportOrderPdf1")
|
||||
|
|
@ -372,6 +381,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取订单信息(PDA使用)
|
||||
*
|
||||
* @param no 报工单号
|
||||
*/
|
||||
@GetMapping("getOrderInfo")
|
||||
|
|
@ -411,6 +421,7 @@ public class InProduceOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 收货和入库(PDA使用)
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -483,7 +494,7 @@ public class InProduceOrderController extends BaseController {
|
|||
VUtil.trueThrowBusinessError(Objects.isNull(qrCodeMaster)).throwMessage("无效的二维码:" + iit.getQrCode());
|
||||
VUtil.trueThrowBusinessError(Objects.equals(qrCodeMaster.getProcessStage(), BarCodeProcessStage.InBound.getState()))
|
||||
.throwMessage("二维码" + iit.getQrCode() + "已入库");
|
||||
it.getNum().subtract(qrCodeMaster.getQuantity());
|
||||
it.setNum(it.getNum().subtract(qrCodeMaster.getQuantity()));
|
||||
qrCodeMaster.setProcessStage(BarCodeProcessStage.InBound.getState());
|
||||
qrCodeMaster.setFactoryCode(it.getFactoryNo());
|
||||
qrCodeMaster.setStorageLocation(qitem.getWarehouseNo());
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import com.nflg.wms.starter.annotation.ApiMark;
|
|||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -31,6 +32,7 @@ import java.time.LocalDateTime;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 储位调拨
|
||||
*/
|
||||
|
|
@ -52,18 +54,20 @@ public class LocationTransferController extends BaseController {
|
|||
|
||||
@Resource
|
||||
private IWmsTransferOrdersService transferOrdersService;
|
||||
|
||||
/**
|
||||
* 获取包装码信息
|
||||
*/
|
||||
@PostMapping("search")
|
||||
@ApiMark(moduleName = "获取转储信息", apiName = "获取物料的转储信息")
|
||||
public ApiResult<PageData<TransferOrderVO>> search(@Valid @RequestBody TransferOrderSearchQO request) {
|
||||
return ApiResult.success( transferOrdersService.search(request));
|
||||
return ApiResult.success(transferOrdersService.search(request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 储位转储
|
||||
*/
|
||||
@Transactional
|
||||
@PostMapping("pda/transfer")
|
||||
@ApiMark(moduleName = "转储", apiName = "物料进行转储")
|
||||
public ApiResult<Void> changeLocation(@Valid @RequestBody LocationTransferQO request) {
|
||||
|
|
@ -117,24 +121,34 @@ public class LocationTransferController extends BaseController {
|
|||
item -> item.getBinLocation().equals(request.getBinLocation()))
|
||||
.collect(Collectors.toList()).size();
|
||||
VUtil.trueThrowBusinessError(count > 0).throwMessage("存在相同储位的二维码");
|
||||
VUtil.trueThrowBusinessError(
|
||||
allQcMasters.stream().map(WmsQrCodeMaster::getFactoryCode).toList().size() !=
|
||||
allQcMasters.stream().map(WmsQrCodeMaster::getFactoryCode).collect(Collectors.toSet()).size()
|
||||
).throwMessage("二维码所在工厂不一致");
|
||||
VUtil.trueThrowBusinessError(
|
||||
allQcMasters.stream().map(WmsQrCodeMaster::getStorageLocation).toList().size() !=
|
||||
allQcMasters.stream().map(WmsQrCodeMaster::getStorageLocation).collect(Collectors.toSet()).size()
|
||||
).throwMessage("二维码所在仓库不一致");
|
||||
|
||||
WmsBin wmsBin = wmsBinService.lambdaQuery().eq(WmsBin::getNo, request.getBinLocation())
|
||||
.one();
|
||||
// WmsBin wmsBin = wmsBinService.lambdaQuery().eq(WmsBin::getNo, request.getBinLocation())
|
||||
// .one();
|
||||
// VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsBin)).throwMessage("无效的储位");
|
||||
// WmsWarehouse wmsWarehouse = warehouseService.lambdaQuery().eq(WmsWarehouse::getId, wmsBin.getWarehouseId())
|
||||
// .one();
|
||||
// VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsWarehouse)).throwMessage("无效的储位【仓库无效】");
|
||||
//
|
||||
// DictionaryItem dictionaryItem = dictionaryItemService.lambdaQuery()
|
||||
// .eq(DictionaryItem::getId, wmsWarehouse.getFactoryId())
|
||||
// .one();
|
||||
// VUtil.trueThrowBusinessError(ObjectUtil.isNull(dictionaryItem)).throwMessage("无效的储位【工厂无效】");
|
||||
WmsBin wmsBin = wmsBinService.getByCode(allQcMasters.get(0).getFactoryCode(), allQcMasters.get(0).getStorageLocation(), request.getBinLocation());
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsBin)).throwMessage("无效的储位");
|
||||
WmsWarehouse wmsWarehouse = warehouseService.lambdaQuery().eq(WmsWarehouse::getId, wmsBin.getWarehouseId())
|
||||
.one();
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsWarehouse)).throwMessage("无效的储位【仓库无效】");
|
||||
|
||||
DictionaryItem dictionaryItem = dictionaryItemService.lambdaQuery()
|
||||
.eq(DictionaryItem::getId, wmsWarehouse.getFactoryId())
|
||||
.one();
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(dictionaryItem)).throwMessage("无效的储位【工厂无效】");
|
||||
|
||||
Integer count2 = allQcMasters.stream().filter(
|
||||
item -> !item.getFactoryCode().equals(dictionaryItem.getCode())
|
||||
&& !item.getStorageLocation().equals(wmsWarehouse.getNo()))
|
||||
.collect(Collectors.toList()).size();
|
||||
VUtil.trueThrowBusinessError(count2 > 0).throwMessage("存在不同仓库的二维码");
|
||||
// Integer count2 = allQcMasters.stream().filter(
|
||||
// item -> !item.getFactoryCode().equals(dictionaryItem.getCode())
|
||||
// && !item.getStorageLocation().equals(wmsWarehouse.getNo()))
|
||||
// .collect(Collectors.toList()).size();
|
||||
// VUtil.trueThrowBusinessError(count2 > 0).throwMessage("存在不同仓库的二维码");
|
||||
|
||||
// boolean hasDuplicates1 = allQcMasters.stream()
|
||||
// .map(WmsQrCodeMaster::getBarcodeCode)
|
||||
|
|
@ -151,7 +165,7 @@ public class LocationTransferController extends BaseController {
|
|||
smallQrCodeMaster.setLastScanTime(LocalDateTime.now());
|
||||
smallQrCodeMaster.setLastScanByname(UserUtil.getUserName());
|
||||
// 只有当储位发生变化的时候才会触发这个出库和入库的逻辑
|
||||
if (!smallQrCodeMaster.getPackagingType().equals((short)0)) {
|
||||
if (!smallQrCodeMaster.getPackagingType().equals((short) 0)) {
|
||||
WmsTransferOrders transferOrder = new WmsTransferOrders();
|
||||
transferOrder.setId(IdUtil.getSnowflakeNextId())
|
||||
.setBarcodeCode(smallQrCodeMaster.getBarcodeCode())
|
||||
|
|
@ -200,7 +214,8 @@ public class LocationTransferController extends BaseController {
|
|||
* @param request
|
||||
* @return
|
||||
* @author
|
||||
* */
|
||||
*
|
||||
*/
|
||||
@PostMapping("pda/scan")
|
||||
@ApiMark(moduleName = "扫码", apiName = "扫码获取扫码信息")
|
||||
public ApiResult<QrCodeVO> scan(@Valid @RequestBody PackingPDASearchQO request) {
|
||||
|
|
|
|||
|
|
@ -1265,39 +1265,40 @@ public class NormalPGIController extends BaseController {
|
|||
.findFirst()
|
||||
.orElse(null);
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(item)).throwMessage("未找到二维码对应的订单");
|
||||
item.setInQty(item.getInQty().add(code.getNum()));
|
||||
item.setCrossQty(item.getCrossQty().add(code.getNum()));
|
||||
// item.setInQty(item.getInQty().add(qrCodeMaster.getQuantity()));
|
||||
item.setCrossQty(item.getCrossQty().add(qrCodeMaster.getQuantity()));
|
||||
qrCodeMaster.setProcessStage(BarCodeProcessStage.Cross.getState());
|
||||
});
|
||||
});
|
||||
List<PoReceiveTaskConfirmQO> qos = new ArrayList<>();
|
||||
receiptItems.forEach(item -> {
|
||||
PoReceiveTaskConfirmQO qo = qos.stream()
|
||||
.filter(q -> q.getTaskId().equals(item.getReceiveId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (Objects.isNull(qo)) {
|
||||
qo = new PoReceiveTaskConfirmQO()
|
||||
.setTaskId(item.getReceiveId())
|
||||
.setItems(new ArrayList<>());
|
||||
qos.add(qo);
|
||||
}
|
||||
qo.getItems().add(new PoReceiveTaskItemConfirmQO()
|
||||
.setId(item.getId())
|
||||
.setReceivedWarehouse(item.getReceivedWarehouse())
|
||||
.setItems(
|
||||
qrCodeMasters.stream()
|
||||
.filter(qit -> qit.getReceiptItemId().equals(item.getId()))
|
||||
.toList()
|
||||
.stream()
|
||||
.map(qit -> new InCostCenterBackSubmitItemQRQO()
|
||||
.setBinNo(item.getStorageLocation())
|
||||
.setQrCode(qit.getBarcodeCode())
|
||||
)
|
||||
.toList()
|
||||
)
|
||||
);
|
||||
});
|
||||
qos.forEach(this::takeDeliveryConfirm);
|
||||
// List<PoReceiveTaskConfirmQO> qos = new ArrayList<>();
|
||||
// receiptItems.forEach(item -> {
|
||||
// PoReceiveTaskConfirmQO qo = qos.stream()
|
||||
// .filter(q -> q.getTaskId().equals(item.getReceiveId()))
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
// if (Objects.isNull(qo)) {
|
||||
// qo = new PoReceiveTaskConfirmQO()
|
||||
// .setTaskId(item.getReceiveId())
|
||||
// .setItems(new ArrayList<>());
|
||||
// qos.add(qo);
|
||||
// }
|
||||
// qo.getItems().add(new PoReceiveTaskItemConfirmQO()
|
||||
// .setId(item.getId())
|
||||
// .setReceivedWarehouse(item.getReceivedWarehouse())
|
||||
// .setItems(
|
||||
// qrCodeMasters.stream()
|
||||
// .filter(qit -> qit.getReceiptItemId().equals(item.getId()))
|
||||
// .toList()
|
||||
// .stream()
|
||||
// .map(qit -> new InCostCenterBackSubmitItemQRQO()
|
||||
// .setBinNo(item.getStorageLocation())
|
||||
// .setQrCode(qit.getBarcodeCode())
|
||||
// )
|
||||
// .toList()
|
||||
// )
|
||||
// );
|
||||
// });
|
||||
// qos.forEach(this::takeDeliveryConfirm);
|
||||
Map<String, List<Zwm3a07VO>> maps = datas.stream().collect(Collectors.groupingBy(Zwm3a07VO::getKey2));
|
||||
List<WmsOutProduce> pOrders = new ArrayList<>();
|
||||
List<WmsOutProduceTicket> tickets = new ArrayList<>();
|
||||
|
|
@ -1323,10 +1324,13 @@ public class NormalPGIController extends BaseController {
|
|||
items.forEach(item -> {
|
||||
RLock lock = redissonClient.getLock(StrUtil.format("lock:inventory:{}:{}:{}", item.getDwerk(), item.getLgort2(), item.getMatnr()));
|
||||
try {
|
||||
Long itemId=IdUtil.getSnowflakeNextId();
|
||||
// 等待5秒获取锁,10秒后自动释放
|
||||
if (lock.tryLock(5, 10, TimeUnit.SECONDS)) {
|
||||
WmsOutProduceItem data = Convert.convert(WmsOutProduceItem.class, item);
|
||||
data.setLockNum(item.getSqsl());
|
||||
data.setId(itemId);
|
||||
data.setLockNum(BigDecimal.ZERO);
|
||||
data.setNum(item.getSqsl());
|
||||
data.setOrderId(order.getId());
|
||||
outProduceItemService.save(data);
|
||||
} else {
|
||||
|
|
@ -1335,7 +1339,7 @@ public class NormalPGIController extends BaseController {
|
|||
ticketItems.add(
|
||||
new WmsOutProduceTicketItem()
|
||||
.setTicketId(ticket.getId())
|
||||
.setProduceItemId(order.getId())
|
||||
.setProduceItemId(itemId)
|
||||
.setNum(item.getSqsl())
|
||||
);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -1348,6 +1352,8 @@ public class NormalPGIController extends BaseController {
|
|||
}
|
||||
});
|
||||
});
|
||||
qrCodeMasterService.updateBarCode(qrCodeMasters);
|
||||
wmsPoReceiptItemService.updateBatchById(receiptItems);
|
||||
outProduceService.saveBatch(pOrders);
|
||||
outProduceTicketService.saveBatch(tickets);
|
||||
outProduceTicketItemService.saveBatch(ticketItems);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.nflg.wms.admin.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.wms.admin.pojo.dto.*;
|
||||
|
|
@ -35,7 +34,6 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.NumberUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -370,6 +368,7 @@ public class NormalQMController extends BaseController {
|
|||
* @param request 任务ID
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@PostMapping("unscan/task/confirm")
|
||||
@ApiMark(moduleName = "质检物料管理", apiName = "无码质检任务上架确认")
|
||||
public ApiResult<Void> confirmNoScan(@Valid @RequestBody ReceiveQO request) {
|
||||
|
|
@ -377,7 +376,7 @@ public class NormalQMController extends BaseController {
|
|||
.lambdaQuery()
|
||||
.in(WmsQcReceive::getId, request.getIds())
|
||||
.ne(WmsQcReceive::getIsCompleted, 2)
|
||||
.eq(WmsQcReceive::getIsCheck, true)
|
||||
.eq(WmsQcReceive::getIsCheck, 1)
|
||||
.list();
|
||||
|
||||
|
||||
|
|
@ -387,9 +386,20 @@ public class NormalQMController extends BaseController {
|
|||
//VUtil.trueThrowBusinessError(!qcReceive.getSourceType().equals(1)).throwMessage("不属于无码收货的采购单");
|
||||
//根据ID获取到任务单
|
||||
List<QCReceiveTaskConfirmQO> taskConfirmQOS = new ArrayList<>();
|
||||
List<InCostCenterBackSubmitItemQRQO> qrCodes=new ArrayList<>();
|
||||
for (WmsQcReceive qcReceive : qcReceives) {
|
||||
List<QCTaskItemVO> tasks = normalQMControllerService.getTaskItem(qcReceive.getId());
|
||||
if (CollectionUtil.isNotEmpty(tasks)) {
|
||||
VUtil.trueThrowBusinessError(tasks.stream()
|
||||
.anyMatch(task -> task.getUnqualifiedQty().compareTo(BigDecimal.ZERO) > 0)
|
||||
).throwMessage("含有质检不合格物料,请扫码入库!");
|
||||
qrCodeMasterService.getByExtendIds(tasks.stream().map(QCTaskItemVO::getId).toList())
|
||||
.forEach(code->{
|
||||
qrCodes.add(new InCostCenterBackSubmitItemQRQO()
|
||||
.setBinNo("")
|
||||
.setQrCode(code.getBarcodeCode())
|
||||
);
|
||||
});
|
||||
for (QCTaskItemVO item : tasks) {
|
||||
QCReceiveTaskConfirmQO taskConfirmQO = new QCReceiveTaskConfirmQO();
|
||||
taskConfirmQO.setId(item.getId())
|
||||
|
|
@ -403,6 +413,7 @@ public class NormalQMController extends BaseController {
|
|||
.map(QCTaskItemScanCodesVO::getId)
|
||||
.collect(Collectors.toList());
|
||||
taskConfirmQO.setQcIdList(qcIdList);
|
||||
taskConfirmQO.setReceiveItems(qrCodes);
|
||||
taskConfirmQOS.add(taskConfirmQO);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 质检物料入库单
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RestController
|
||||
|
|
|
|||
|
|
@ -66,6 +66,18 @@ public class ComponentOutboundControllerService {
|
|||
wmsComponentOutboundItemService.saveBatch(outboundItems);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(inventories)) {
|
||||
inventoryService.out(inventories);
|
||||
}
|
||||
//处理装箱单的货物详情的出库数量
|
||||
wmscomponentPackingService.lambdaUpdate()
|
||||
.set(WmsComponentPacking::getIsCompleted, 2)
|
||||
.eq(WmsComponentPacking::getId, outbound.getPackingId())
|
||||
.update();
|
||||
wmsComponentPackingItemService.addOutQty(outbound.getPackingId());
|
||||
|
||||
outMaterialScanRecordRespository.saveAll(records);
|
||||
|
||||
if (Objects.nonNull(zwm3a20DTO)) {
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1)
|
||||
|
|
@ -79,18 +91,6 @@ public class ComponentOutboundControllerService {
|
|||
.eq(WmsComponentOutbound::getId, outbound.getId())
|
||||
.update();
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(inventories)) {
|
||||
inventoryService.out(inventories);
|
||||
}
|
||||
//处理装箱单的货物详情的出库数量
|
||||
wmscomponentPackingService.lambdaUpdate()
|
||||
.set(WmsComponentPacking::getIsCompleted, 2)
|
||||
.eq(WmsComponentPacking::getId, outbound.getPackingId())
|
||||
.update();
|
||||
wmsComponentPackingItemService.addOutQty(outbound.getPackingId());
|
||||
|
||||
outMaterialScanRecordRespository.saveAll(records);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.nflg.wms.common.constant;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
|
|
@ -56,7 +55,11 @@ public enum BarCodeProcessStage {
|
|||
/**
|
||||
* 已拒收
|
||||
*/
|
||||
Reject((short) 11, "拒收");
|
||||
Reject((short) 11, "拒收"),
|
||||
/**
|
||||
* 已拒收
|
||||
*/
|
||||
Cross((short) 12, "已越库");
|
||||
|
||||
private final short state;
|
||||
private final String description;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import lombok.Data;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
|
|
@ -29,11 +30,19 @@ public class InventoryInDTO {
|
|||
*/
|
||||
private String batchNo;
|
||||
|
||||
public String getBatchNo() {
|
||||
return Objects.isNull(batchNo) ? "" : batchNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*/
|
||||
private String serialNo;
|
||||
|
||||
public String getSerialNo() {
|
||||
return Objects.isNull(serialNo) ? "" : serialNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
|
|
@ -44,6 +53,10 @@ public class InventoryInDTO {
|
|||
*/
|
||||
private String binLocation;
|
||||
|
||||
public String getBinLocation() {
|
||||
return Objects.isNull(binLocation) ? "" : binLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优先级,数字大优先
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class InventoryOutDTO {
|
|||
*/
|
||||
private String binLocation;
|
||||
|
||||
public String geBbinLocation() {
|
||||
public String getBinLocation() {
|
||||
return Objects.isNull(binLocation) ? "" : binLocation;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class QRCodeQO1 {
|
||||
|
||||
|
|
@ -16,10 +12,10 @@ public class QRCodeQO1 {
|
|||
@NotBlank
|
||||
private String codeId;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull
|
||||
@Positive(message = "数量必须大于0")
|
||||
private BigDecimal num;
|
||||
// /**
|
||||
// * 数量
|
||||
// */
|
||||
// @NotNull
|
||||
// @Positive(message = "数量必须大于0")
|
||||
// private BigDecimal num;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
|
|||
item.setNum(inventory.stream().map(InventoryOutDTO::getNum).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
List<WmsInventory> list = lambdaQuery()
|
||||
.eq(WmsInventory::getMaterialNo, item.getMaterialNo())
|
||||
.eq(WmsInventory::getBatchNo, item.getBatchNo())
|
||||
.eq(WmsInventory::getSerialNo, item.getSerialNo())
|
||||
.eq(WmsInventory::getFactoryNo, item.getFactoryNo())
|
||||
.eq(WmsInventory::getWarehouseNo, item.getWarehouseNo())
|
||||
.eq(WmsInventory::getBatchNo, item.getBatchNo())
|
||||
.eq(WmsInventory::getSerialNo, item.getSerialNo())
|
||||
.eq(WmsInventory::getBinLocation, item.getBinLocation())
|
||||
.gt(WmsInventory::getNum, 0)
|
||||
.orderByDesc(WmsInventory::getSort)
|
||||
|
|
@ -117,10 +117,10 @@ public class WmsInventoryServiceImpl extends ServiceImpl<WmsInventoryMapper, Wms
|
|||
InventoryInDTO item = inventory.get(0);
|
||||
WmsInventory info = lambdaQuery()
|
||||
.eq(WmsInventory::getMaterialNo, item.getMaterialNo())
|
||||
.eq(WmsInventory::getBatchNo, item.getBatchNo())
|
||||
.eq(WmsInventory::getSerialNo, item.getSerialNo())
|
||||
.eq(WmsInventory::getFactoryNo, item.getFactoryNo())
|
||||
.eq(WmsInventory::getWarehouseNo, item.getWarehouseNo())
|
||||
.eq(WmsInventory::getBatchNo, item.getBatchNo())
|
||||
.eq(WmsInventory::getSerialNo, item.getSerialNo())
|
||||
.eq(WmsInventory::getBinLocation, item.getBinLocation())
|
||||
.eq(WmsInventory::getSort, item.getOrder())
|
||||
.one();
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
INNER JOIN wms_in_produce_order_surplus ipos ON ipost.order_id=ipos."id"
|
||||
<where>
|
||||
<if test="request.startDate!=null">
|
||||
and ipost.create_time >= #{request.startDate}
|
||||
and ipos.create_time >= #{request.startDate}
|
||||
</if>
|
||||
<if test="request.endDate!=null">
|
||||
and ipost.create_time <= #{request.endDate}
|
||||
and ipos.create_time <= #{request.endDate}
|
||||
</if>
|
||||
<if test="request.no != null and request.no!=''">
|
||||
AND ipost."no" ilike CONCAT('%',#{request.no},'%')
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<if test="request.supplierNum !=null and request.supplierNum !=''">
|
||||
and b.supplier_num =#{request.supplierNum}
|
||||
</if>
|
||||
<if test="request.isCheck !=null and request.isCheck !=''">
|
||||
<if test="request.isCheck !=null">
|
||||
and a.is_check =#{request.isCheck}
|
||||
</if>
|
||||
<if test="request.poNumber !=null and request.poNumber !='' ">
|
||||
|
|
|
|||
Loading…
Reference in New Issue