fix:需求单删除,组盘入库工单问题

This commit is contained in:
zhaoyf
2026-11-04 17:10:55 +08:00
parent 5adc2d7e34
commit 9a84b2080e
3 changed files with 2 additions and 8 deletions

View File

@@ -1122,7 +1122,7 @@ public class InboundPdaServiceImpl implements InboundPdaService {
ioStorInvIn.setIs_upload(BaseDataEnum.IS_YES_NOT.code("是"));
dto.getItems().forEach(item -> {
BigDecimal qty = item.getQty();
boolean isOrder = StringUtils.isEmpty(item.getOrder_code());
boolean isOrder = !StringUtils.isEmpty(item.getOrder_code());
WorkOrderDao workOrder = null;
if (isOrder) {
workOrder = workOrderService.getWorkOrder(item.getOrder_code());

View File

@@ -53,6 +53,7 @@ public class PmDemandController {
@DeleteMapping
@Log("删除需求单")
@SaIgnore
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
List<String> idList = Arrays.asList(ids);
pmDemandService.deleteByIds(idList);

View File

@@ -240,13 +240,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
if (CollectionUtils.isEmpty(ids)) {
return;
}
final List<PmDemand> pmDemands = this.listByIds(ids);
for (PmDemand pmDemand : pmDemands) {
if (!pmDemand.getStatus().equals(DemandStatus.CREATE.getValue())
&& !pmDemand.getStatus().equals(DemandStatus.DIS.getValue())) {
throw new BadRequestException("删除失败,已经执行的需求单无法删除");
}
}
for (String id : ids) {
mesApi.delMesDemand(id);
this.update(new LambdaUpdateWrapper<PmDemand>()