|
|
|
@ -103,6 +103,7 @@ public class InvProductsTrService {
|
|
|
|
|
, warehouseEntity.getLocStorageCode(), warehouseEntity.getInvWarehouseCode());
|
|
|
|
|
if (invPreProductEntity == null) {
|
|
|
|
|
invPreProductEntity = buildInvProduct(erpOrderEntity.getGoodsid(), erpOrderEntity, orderEntity, warehouseEntity);
|
|
|
|
|
invPreProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invPreInProductService.insertInvProduct(invPreProductEntity);
|
|
|
|
|
} else {
|
|
|
|
|
int actCount = getActCount(warehouseEntity);
|
|
|
|
@ -115,6 +116,7 @@ public class InvProductsTrService {
|
|
|
|
|
if (erpOrderEntity.getPrice() != null) {
|
|
|
|
|
invPreProductEntity.setPrice(erpOrderEntity.getPrice() + "");
|
|
|
|
|
}
|
|
|
|
|
invPreProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invPreInProductService.updateInvProduct(invPreProductEntity);
|
|
|
|
|
}
|
|
|
|
|
} else if (bussinessTypeEntity.isAdvanceType()) {//预入库,则转存预入库
|
|
|
|
@ -123,6 +125,7 @@ public class InvProductsTrService {
|
|
|
|
|
, warehouseEntity.getInvStorageCode(), warehouseEntity.getInvWarehouseCode());
|
|
|
|
|
if (invPreProductEntity == null) {
|
|
|
|
|
invPreProductEntity = buildInvProduct(erpOrderEntity.getGoodsid(), erpOrderEntity, orderEntity, warehouseEntity);
|
|
|
|
|
invPreProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invPreProductService.insertInvProduct(invPreProductEntity);
|
|
|
|
|
} else {
|
|
|
|
|
int actCount = getActCount(warehouseEntity);
|
|
|
|
@ -135,6 +138,7 @@ public class InvProductsTrService {
|
|
|
|
|
if (erpOrderEntity.getPrice() != null) {
|
|
|
|
|
invPreProductEntity.setPrice(erpOrderEntity.getPrice() + "");
|
|
|
|
|
}
|
|
|
|
|
invPreProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invPreProductService.updateInvProduct(invPreProductEntity);
|
|
|
|
|
}
|
|
|
|
|
} else { //普通出入库
|
|
|
|
@ -143,6 +147,7 @@ public class InvProductsTrService {
|
|
|
|
|
if (invProductEntity == null) {
|
|
|
|
|
invProductEntity = buildInvProduct(erpOrderEntity.getGoodsid(), erpOrderEntity, orderEntity, warehouseEntity);
|
|
|
|
|
invProductEntity.setUnitFk(orderEntity.getFromCorpId());
|
|
|
|
|
invProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invProductService.insertInvProduct(invProductEntity);
|
|
|
|
|
} else {
|
|
|
|
|
int actCount = getActCount(warehouseEntity);
|
|
|
|
@ -155,6 +160,7 @@ public class InvProductsTrService {
|
|
|
|
|
if (erpOrderEntity.getPrice() != null) {
|
|
|
|
|
invProductEntity.setPrice(erpOrderEntity.getPrice() + "");
|
|
|
|
|
}
|
|
|
|
|
invProductEntity.setUpdateTime(new Date());
|
|
|
|
|
invProductService.updateInvProduct(invProductEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -171,6 +177,7 @@ public class InvProductsTrService {
|
|
|
|
|
if (erpOrderEntity.getPrice() != null) {
|
|
|
|
|
preInvEntity.setPrice(erpOrderEntity.getPrice() + "");
|
|
|
|
|
}
|
|
|
|
|
preInvEntity.setUpdateTime(new Date());
|
|
|
|
|
invPreInProductService.updateInvProduct(preInvEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|