提交 3671caa7 作者: zhangqiliang

校验发货仓库和收货仓库是否相同

父级 9a29e438
......@@ -134,6 +134,9 @@ public class DeliveryController {
if (!StringUtils.isEmpty(jsonObjectDataArrival.getString("materialsName"))){
delivery.setMaterialName(jsonObjectDataArrival.getString("materialsName"));
}
if (wallboxApply.getReceiverWarehouseId().equals(da.getWarehouseId())){
throw new ServiceException("400","发货仓库和到货仓库请选择不同的仓库!");
}
}
//申请团队
delivery.setTeam(wallboxApply.getSupplierTeam());
......@@ -141,9 +144,6 @@ public class DeliveryController {
if (!StringUtils.isEmpty(deliveryInstallOrder)){
throw new ServiceException("400","订单号重复!");
}
if (da.getArrivalWarehouseId().equals(da.getWarehouseId())){
throw new ServiceException("400","发货仓库和到货仓库请选择不同的仓库!");
}
int result=this.wallboxApplyMapper.updateWallBoxTrackingStatusByOrderId("1",delivery.getInstallOrder());
if(result!=1){
throw new ServiceException("400","更新订单发货状态失败!订单号:"+delivery.getInstallOrder());
......@@ -165,6 +165,9 @@ public class DeliveryController {
throw new ServiceException("400","发货数量的总和不能大于批准数量!");
}
}
if (tauxiliarymaterials.getWarehouseId().equals(da.getWarehouseId())){
throw new ServiceException("400","发货仓库和到货仓库请选择不同的仓库!");
}
//收货仓库的信息
if (!StringUtils.isEmpty(tauxiliarymaterials)){
delivery.setReceiver(tauxiliarymaterials.getRecipents());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论