bug修改

fengcang
anthonyywj2 3 years ago
parent fc6f5ff488
commit 8e827f5032

@ -314,6 +314,31 @@ public class WareHouseController {
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/saveTempCode")
public BaseResponse saveCode(@RequestBody WarehouseEntity warehouseEntity) {
if (StrUtil.isNotEmpty(warehouseEntity.getSerialNo()) && warehouseEntity.getSerialNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!序列号超出最大范围");
}
if (StrUtil.isNotEmpty(warehouseEntity.getBatchNo()) && warehouseEntity.getBatchNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!批次号超出最大范围");
}
if (StrUtil.isEmpty(warehouseEntity.getSerialNo()) && StrUtil.isEmpty(warehouseEntity.getBatchNo())) {
return ResultVOUtils.error(500, "批次号不能为空!");
}
if (StrUtil.isNotEmpty(warehouseEntity.getSerialNo())) {
List<WarehouseEntity> warehouseEntityList = codesTempService.findByOrderId(warehouseEntity.getOrderId());
for (WarehouseEntity object : warehouseEntityList) {
if (object.getId() != warehouseEntity.getId() && object.getCode().equals(warehouseEntity.getCode()) && StrUtil.nullToEmpty(object.getCode()).equals(warehouseEntity.getSerialNo())) {
return ResultVOUtils.error(500, "条码重复!");
}
}
}
boolean b = codesTempService.update(warehouseEntity);
if (b)
return ResultVOUtils.success("修改成功");

@ -338,7 +338,8 @@ public class OrderServiceImpl implements OrderService {
stockOrderEntityList.forEach(stockOrderEntity -> {
StockOrderResponse response = new StockOrderResponse();
BeanUtil.copyProperties(stockOrderEntity, response);
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER) && checkBusTypeSupplementOrder(stockOrderEntity.getBillNo())) {
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER) && checkBusTypeSupplementOrder(stockOrderEntity.getBillNo())
&& StrUtil.isEmpty(stockOrderEntity.getSupplementNo())) {
response.setEnableSupplementOrder(true);
}
result.add(response);

Loading…
Cancel
Save