|
|
|
@ -553,14 +553,20 @@ public class OrderDetailController {
|
|
|
|
|
erpOrderEntity.setInvWarehouseCode(purchaseinResponse.getInvWarehouseCode());
|
|
|
|
|
erpOrderEntity.setLocStorageCode(purchaseinResponse.getLocStorageCode());
|
|
|
|
|
erpOrderEntity.setGoodsunit(subPurchase.getSpec());
|
|
|
|
|
erpOrderEntity.setBillType(purchaseinResponse.getBillType());
|
|
|
|
|
erpOrderEntity.setBindRlFk(subPurchase.getRelId());
|
|
|
|
|
erpOrderEntities.add(erpOrderEntity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (erpOrderEntities != null && erpOrderEntities.size() > 0) {
|
|
|
|
|
|
|
|
|
|
AuthAdmin authAdmin = customerService.getUserBean();
|
|
|
|
|
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
|
|
|
|
|
orderFilterRequest.setId(importErpOrderRequest.getOrderId());
|
|
|
|
|
OrderEntity orderEntity = orderService.findOne(orderFilterRequest);
|
|
|
|
|
orderEntity.setReviewUser(authAdmin.getId().intValue());
|
|
|
|
|
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
|
|
ErpOrderEntity temp = erpOrderEntities.get(0);
|
|
|
|
|
for (int i = 0; i < erpOrderEntities.size(); i++) {
|
|
|
|
|
if (!temp.getCompanyname().equals(erpOrderEntities.get(i).getCompanyname())) {
|
|
|
|
@ -575,12 +581,15 @@ public class OrderDetailController {
|
|
|
|
|
if (!temp.getInvWarehouseCode().equals(erpOrderEntities.get(i).getInvWarehouseCode())) {
|
|
|
|
|
return ResultVOUtils.error(500, "所选业务单据当前分库不一致!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!bussinessTypeEntity.getLocalAction().equals(erpOrderEntities.get(i).getBillType())) {
|
|
|
|
|
return ResultVOUtils.error(500, "所选单据类型不一致!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
|
|
|
|
|
orderFilterRequest.setId(importErpOrderRequest.getOrderId());
|
|
|
|
|
OrderEntity orderEntity = orderService.findOne(orderFilterRequest);
|
|
|
|
|
orderEntity.setReviewUser(authAdmin.getId().intValue());
|
|
|
|
|
|
|
|
|
|
ErpOrderEntity exitErp = new ContrastErpUtil().vailErpExit(orderDetailService, erpOrderEntities, importErpOrderRequest.getOrderId());
|
|
|
|
|
if (exitErp != null) {
|
|
|
|
|
String errMsg = "所选业务单据" + exitErp.getErpOrderId() + "已被其他出入库单" + exitErp.getOrderIdFk() + "绑定";
|
|
|
|
|