zhou zhou
22 小时以前 cfe049492f81d2c650a2b17348593edbc5054498
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/ReviseLogServiceImpl.java
@@ -8,6 +8,7 @@
import com.vincent.rsf.server.manager.entity.*;
import com.vincent.rsf.server.manager.enums.CommonExceStatus;
import com.vincent.rsf.server.manager.enums.OrderType;
import com.vincent.rsf.server.manager.enums.OrderWorkType;
import com.vincent.rsf.server.manager.mapper.ReviseLogMapper;
import com.vincent.rsf.server.manager.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -27,9 +28,6 @@
    @Autowired
    private LocReviseService locReviseService;
    @Autowired
    private ReviseLogService reviseLogService;
    @Autowired
    private LocItemService locItemService;
@@ -66,7 +64,7 @@
                    .setCreateBy(loginUserId)
                    .setUpdateBy(loginUserId)
                    .setReviseCode(locRevise.getCode());
            if (!reviseLogService.save(reviseLog)) {
            if (!this.save(reviseLog)) {
                throw new CoolException("调整单明细保存失败!!");
            }
@@ -112,7 +110,7 @@
        if (!revise.getExceStatus().equals(CommonExceStatus.COMMON_EXCE_STATUS_EXCE_ING.val)) {
            throw new CoolException("单据状态未执行或已完成,无法执行完成操作!!");
        }
        List<ReviseLog> logs = reviseLogService.list(new LambdaQueryWrapper<ReviseLog>().eq(ReviseLog::getReviseId, revise.getId()));
        List<ReviseLog> logs = this.list(new LambdaQueryWrapper<ReviseLog>().eq(ReviseLog::getReviseId, revise.getId()));
        if (logs.isEmpty()) {
            throw new CoolException("库存日志不存在!!");
        }
@@ -128,7 +126,7 @@
                throw new CoolException("库位不存在!!");
            }
            List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
            if (!list.isEmpty()) {
            if (list.isEmpty()) {
                throw new CoolException("库位:" + loc.getCode() + ", 调整信息为空!!");
            }
            locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
@@ -137,6 +135,7 @@
                BeanUtils.copyProperties(logItem, locDetl);
                locDetl.setLocId(loc.getId())
                        .setType(OrderType.ORDER_REVISE.type)
                        .setWkType(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_STOCK_REVISE.type))
                        .setLocCode(loc.getCode())
                        .setAnfme(logItem.getReviseQty())
                        .setUpdateBy(loginUserId)
@@ -147,7 +146,6 @@
                }
            });
        });
        revise.setExceStatus(CommonExceStatus.COMMON_EXCE_STATUS_TASK_DONE.val);
        if (!locReviseService.updateById(revise)) {
            throw new CoolException("调整单修改失败!!");