feat: 强化出库上链一致性(确认中即已上链/出库时间必填/上链须先出库)
This commit is contained in:
@@ -38,6 +38,10 @@ export class OutboundService {
|
||||
if (isOutbound(code)) {
|
||||
throw new BusinessException(ErrorCode.BAD_REQUEST, '该追溯码已登记出库,不可重复出库');
|
||||
}
|
||||
// 出库时间必填:出库登记必须有出库时间
|
||||
if (!dto.outTime) {
|
||||
throw new BusinessException(ErrorCode.BAD_REQUEST, '出库时间不能为空');
|
||||
}
|
||||
const imageKeys = dto.outImageKeys ?? (dto.outImageKey ? [dto.outImageKey] : []);
|
||||
const data: Prisma.TraceCodeUpdateInput = {};
|
||||
if ('outTime' in dto) data.outTime = dto.outTime ? new Date(dto.outTime) : null;
|
||||
|
||||
Reference in New Issue
Block a user