zhou zhou
11 小时以前 2f8e173048d22c5b40612c3538b9c1aa5a5397f6
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -234,10 +234,17 @@
     * 更新库位状态
     */
    private void updateLocStatus(String locCode, String barcode) {
        boolean updated = locService.update(new LambdaUpdateWrapper<Loc>()
                .eq(Loc::getCode, locCode)
                .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_S.type)
                .set(Loc::getBarcode, barcode));
        Loc current = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, locCode));
        if (Objects.isNull(current)) {
            throw new CoolException("库位预约失败!!");
        }
        Loc update = new Loc();
        update.setId(current.getId());
        update.setVersion(current.getVersion());
        update.setUseStatus(LocStsType.LOC_STS_TYPE_S.type);
        update.setBarcode(barcode);
        boolean updated = locService.update(update, new LambdaUpdateWrapper<Loc>()
                .eq(Loc::getId, current.getId()));
        if (!updated) {
            throw new CoolException("库位预约失败!!");
        }
@@ -284,11 +291,19 @@
     * 更新组托状态
     */
    private void updateWaitPakinStatus(String barcode, Long loginUserId) {
        boolean updated = waitPakinService.update(new LambdaUpdateWrapper<WaitPakin>()
                .eq(WaitPakin::getBarcode, barcode)
                .set(WaitPakin::getUpdateBy, loginUserId)
                .set(WaitPakin::getCreateBy, loginUserId)
                .set(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_TASK_EXCE.val));
        WaitPakin current = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
                .eq(WaitPakin::getBarcode, barcode));
        if (Objects.isNull(current)) {
            throw new CoolException("组托状态修改失败!!");
        }
        WaitPakin update = new WaitPakin();
        update.setId(current.getId());
        update.setVersion(current.getVersion());
        update.setUpdateBy(loginUserId);
        update.setCreateBy(loginUserId);
        update.setIoStatus(PakinIOStatus.PAKIN_IO_STATUS_TASK_EXCE.val);
        boolean updated = waitPakinService.update(update, new LambdaUpdateWrapper<WaitPakin>()
                .eq(WaitPakin::getId, current.getId()));
        if (!updated) {
            throw new CoolException("组托状态修改失败!!");