优化调拨出库单据的仓库判断
This commit is contained in:
@@ -324,6 +324,9 @@ public class ExceptionConstants {
|
|||||||
//单据录入-退货单不能欠款
|
//单据录入-退货单不能欠款
|
||||||
public static final int DEPOT_HEAD_BACK_BILL_DEBT_FAILED_CODE = 8500009;
|
public static final int DEPOT_HEAD_BACK_BILL_DEBT_FAILED_CODE = 8500009;
|
||||||
public static final String DEPOT_HEAD_BACK_BILL_DEBT_FAILED_MSG = "退货单不能欠款";
|
public static final String DEPOT_HEAD_BACK_BILL_DEBT_FAILED_MSG = "退货单不能欠款";
|
||||||
|
//单据录入-调入仓库与原仓库不能重复
|
||||||
|
public static final int DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_CODE = 8500010;
|
||||||
|
public static final String DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_MSG = "调入仓库与原仓库不能重复";
|
||||||
/**
|
/**
|
||||||
* 单据明细信息
|
* 单据明细信息
|
||||||
* type = 90
|
* type = 90
|
||||||
|
|||||||
@@ -368,7 +368,12 @@ public class DepotItemService {
|
|||||||
}
|
}
|
||||||
if(BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubType())) {
|
if(BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubType())) {
|
||||||
if (StringUtil.isExist(rowObj.get("anotherDepotId"))) {
|
if (StringUtil.isExist(rowObj.get("anotherDepotId"))) {
|
||||||
|
if(rowObj.getLong("anotherDepotId").equals(rowObj.getLong("depotId"))) {
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_CODE,
|
||||||
|
String.format(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_MSG));
|
||||||
|
} else {
|
||||||
depotItem.setAnotherDepotId(rowObj.getLong("anotherDepotId"));
|
depotItem.setAnotherDepotId(rowObj.getLong("anotherDepotId"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE,
|
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE,
|
||||||
String.format(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG));
|
String.format(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG));
|
||||||
|
|||||||
Reference in New Issue
Block a user