fix:需求单删除,组盘入库工单问题
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>()
|
||||
|
||||
Reference in New Issue
Block a user