|
|
|
@ -16,6 +16,7 @@ import com.glxp.api.admin.dao.business.StockOrderDao;
|
|
|
|
|
import com.glxp.api.admin.dao.business.StockOrderDetailDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inout.CodesDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inout.OrderDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inout.OrderDetailDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inventory.InvPreInProductDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inventory.InvPreInProductDetailDao;
|
|
|
|
|
import com.glxp.api.admin.dao.inventory.InvProductDao;
|
|
|
|
@ -92,6 +93,8 @@ public class StockOrderServiceImpl implements StockOrderService {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
BussinessTypeService bussinessTypeService;
|
|
|
|
|
@Resource
|
|
|
|
|
private OrderDetailDao orderDetailDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -319,19 +322,16 @@ public class StockOrderServiceImpl implements StockOrderService {
|
|
|
|
|
orderEntity.setErpFk("");
|
|
|
|
|
stockOrderDao.updateById(stockOrderEntity);
|
|
|
|
|
orderDao.updateOrder(orderEntity);
|
|
|
|
|
//置空扫码单据详情关联的业务单据号
|
|
|
|
|
orderDetailDao.updateErpOrderId(orderEntity.getId(), null);
|
|
|
|
|
} else {
|
|
|
|
|
orderEntity.setErpFk("");
|
|
|
|
|
stockOrderDao.deleteById(stockOrderEntity.getId());
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
|
|
|
|
|
orderDao.updateOrder(orderEntity);
|
|
|
|
|
List<WarehouseEntity> warehouseEntityList = codesDao.findByReceiptId(orderEntity.getId());
|
|
|
|
|
if (CollUtil.isNotEmpty(warehouseEntityList)) {
|
|
|
|
|
codesTempService.insertCodesTemp(warehouseEntityList);
|
|
|
|
|
codesDao.deleteByOrderId(orderEntity.getId());
|
|
|
|
|
}
|
|
|
|
|
//置空扫码单据详情关联的业务单据号
|
|
|
|
|
orderDetailDao.updateErpOrderId(orderEntity.getId(), null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//回退已完成单据
|
|
|
|
|
|
|
|
|
@ -460,7 +460,6 @@ public class StockOrderServiceImpl implements StockOrderService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新业务单据数据
|
|
|
|
|